From 0befb170c73402733e4a23678012d76545176145 Mon Sep 17 00:00:00 2001 From: SinuS Von SifriduS Date: Thu, 30 Jul 2026 17:50:29 +0200 Subject: [PATCH] v0.1.0-pre.064-065 --- RULES_GENERAL.md | 8 +- docs/DOCUMENTATION_REFACTOR_AUDIT.md | 53 +- docs/DOCUMENTATION_REFACTOR_PLAN.md | 70 +- docs/README.md | 112 + .../DOCUMENT_ARCHIVE_SELECTION_POLICY.md | 70 + .../decisions/WINCODE_COMPATIBILITY_POLICY.md | 62 + docs/rules/CRATE_DOCUMENTATION_RULES.md | 299 + docs/templates/CRATE_CHANGELOG_TEMPLATE.md | 30 + docs/templates/CRATE_README_TEMPLATE.md | 36 + docs/templates/CRATE_TODO_TEMPLATE.md | 24 + docs/templates/CRATE_USAGE_TEMPLATE.md | 46 + olddocs/archivekbot2/CHANGELOG.md | 208 + olddocs/archivekbot2/README.md | 293 + olddocs/archivekbot2/ROADMAP.md | 1439 +++++ olddocs/archivekbot2/RULES.md | 231 + olddocs/archivekbot2/RUST_RULES.md | 134 + olddocs/archivekbot2/config/README.md | 62 + .../archivekbot2/config/example.config.json | 5211 +++++++++++++++++ .../archivekbot2/config/schema.config.json | 774 +++ .../docs/ACCOUNT_ONLY_CANDIDATES.md | 25 + olddocs/archivekbot2/docs/AGAVE_LOCAL_NODE.md | 210 + .../archivekbot2/docs/APPLICATION_CRATES.md | 28 + olddocs/archivekbot2/docs/ARCHITECTURE.md | 108 + olddocs/archivekbot2/docs/BACKFILL_HTTP.md | 145 + olddocs/archivekbot2/docs/BAGS_FM.md | 26 + olddocs/archivekbot2/docs/CODE_REUSE.md | 41 + olddocs/archivekbot2/docs/CONFIGURATION.md | 114 + .../docs/CORE_EXTRACTION_CONTRACTS.md | 148 + .../CORE_EXTRACTION_SELECTION_AND_REPLAY.md | 456 ++ olddocs/archivekbot2/docs/CORE_PROGRAM_IDS.md | 63 + olddocs/archivekbot2/docs/CORE_STORE.md | 73 + olddocs/archivekbot2/docs/DATABASE.md | 155 + .../docs/DECODER_MATERIALIZATION_CONTRACTS.md | 179 + .../docs/DECODER_SURFACE_AUDIT.md | 49 + olddocs/archivekbot2/docs/DELTA_WORKFLOW.md | 58 + .../archivekbot2/docs/DEVELOPMENT_ORDER.md | 91 + olddocs/archivekbot2/docs/DEVNET_EXECUTION.md | 119 + olddocs/archivekbot2/docs/EXECUTION_MODEL.md | 387 ++ .../docs/EXECUTOR_SURFACE_MATRIX.md | 130 + .../archivekbot2/docs/FOUNDATION_CLOSURE.md | 78 + .../docs/HISTORICAL_DATA_ACQUISITION_PLAN.md | 355 ++ .../docs/IDL_SURFACE_CLASSIFICATION.md | 107 + .../docs/INSTRUCTION_REPLAY_CONTRACTS.md | 112 + .../archivekbot2/docs/LIVE_SOURCE_STRATEGY.md | 104 + olddocs/archivekbot2/docs/LOGGING.md | 106 + olddocs/archivekbot2/docs/MATERIALIZATIONS.md | 68 + .../docs/METAPLEX_TOKEN_METADATA_MATRIX.json | 1612 +++++ .../docs/NATIVE_SOLANA_CLOSURE_AUDIT.md | 113 + .../docs/NATIVE_SOLANA_DECODER_MATRIX.json | 155 + .../docs/NATIVE_SOLANA_EXECUTION_MATRIX.json | 1279 ++++ .../NATIVE_SOLANA_MATERIALIZATION_AUDIT.md | 85 + .../docs/NATIVE_SOLANA_PROGRAMS.md | 233 + olddocs/archivekbot2/docs/NOMENCLATURE.md | 106 + olddocs/archivekbot2/docs/POSTGRES_STORE.md | 91 + .../archivekbot2/docs/PROGRAM_CODE_INDEX.md | 42 + olddocs/archivekbot2/docs/PROGRAM_IDS.md | 15 + .../docs/PROGRAM_ID_CONSTANTS_AUDIT.md | 18 + olddocs/archivekbot2/docs/PROGRAM_NAMING.md | 152 + .../docs/PROGRAM_REGISTRY_CONTROL.md | 328 ++ .../archivekbot2/docs/PROJECT_OBJECTIVES.md | 20 + .../docs/RAW_STORAGE_LIFECYCLE.md | 115 + olddocs/archivekbot2/docs/RAW_STORE.md | 147 + olddocs/archivekbot2/docs/REPLAY_PIPELINE.md | 80 + .../archivekbot2/docs/RPC_ENDPOINT_ROLES.md | 77 + .../docs/RUST_WORKSPACE_RULE_AUDIT.md | 236 + .../docs/SOLANA_INTERFACE_DEPENDENCIES.md | 272 + .../docs/SOLANA_NATIVE_RPC_CLOSURE_AUDIT.md | 106 + .../docs/SOLANA_STANDARD_RPC_MATRIX.json | 430 ++ .../SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json | 199 + .../docs/SPL_ELGAMAL_REGISTRY_MATRIX.json | 121 + .../archivekbot2/docs/SPL_MEMO_MATRIX.json | 266 + ...TOKEN_2022_CONFIDENTIAL_EXECUTION_AUDIT.md | 110 + .../docs/SPL_TOKEN_2022_MATRIX.json | 2698 +++++++++ .../docs/SPL_TOKEN_2022_SOURCE_AUDIT.md | 251 + .../SPL_TOKEN_2022_VALIDATION_MATRIX.json | 146 + .../archivekbot2/docs/SPL_TOKEN_MATRIX.json | 1440 +++++ olddocs/archivekbot2/docs/SQL_DEMOS.md | 109 + .../archivekbot2/docs/SURFACE_CRATE_MATRIX.md | 272 + olddocs/archivekbot2/docs/TRACING_CONTRACT.md | 168 + .../docs/TRANSACTION_ACQUISITION_MODEL.md | 137 + .../archivekbot2/docs/V0_4_6_VALIDATION.md | 66 + .../archivekbot2/docs/VERSION_HEADER_AUDIT.md | 30 + olddocs/archivekbot2/docs/WS_LISTENERS.md | 69 + olddocs/archivekbot2/idls/001.README.md | 8 + ...BihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.json | 1 + ...VGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.json | 1 + ...Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.json | 1 + ...NEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.json | 1 + ...ivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.json | 1 + ...Pc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.json | 1 + ...PZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.json | 1 + ...kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.json | 1 + ...spfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.json | 1 + ...HA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.json | 1 + ...9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.json | 1 + ...eSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.json | 1 + ...sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.json | 1 + ...ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.json | 1 + ...wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.json | 1 + ...HkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.json | 1 + ...UfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.json | 1 + ...pU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7..json | 1 + ...KmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.json | 1 + ...j8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.json | 1 + ...AxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.json | 1 + ...pjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.json | 1 + ...ucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.json | 1 + ...GBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.json | 1 + ...ecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.json | 1 + ...2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.json | 1 + ...bZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.json | 1 + ...FNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.json | 1 + ...pWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.json | 1 + ...g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.json | 1 + ...R8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.json | 1 + ...spG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.json | 1 + ...siCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.json | 1 + ...48px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.json | 1 + ...9kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.json | 1 + ...f31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.json | 1 + ...SgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.json | 1 + ...CCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.json | 1 + ...BfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.json | 1 + ...zsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.json | 1 + ...cBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.json | 1 + ...ZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.json | 1 + ...LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.json | 1 + ...RxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.json | 1 + ...67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.json | 1 + ...CLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.json | 1 + ...VNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.json | 1 + ...NsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.json | 1 + ...pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.json | 1 + ...RgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.json | 1 + ...B8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.json | 1 + ...AfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.json | 1 + ...2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.json | 1 + ...MiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.json | 1 + ...Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.json | 1 + ...bS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.json | 0 ...v7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.json | 1 + ...B6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.json | 1 + ...ecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.json | 1 + ...y6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json | 1 + ...EMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.json | 1 + ...5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.json | 1 + ...L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.json | 1 + ...sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.json | 1 + ...mn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.json | 1 + ...MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.json | 1 + ...p65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.json | 1 + ...3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.json | 1 + ...d8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.json | 1 + ...HZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.json | 1 + ...UCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.json | 1 + ...dwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.json | 1 + ...uy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.json | 1 + ...bXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.json | 1 + ...76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.json | 1 + ...qBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.json | 1 + olddocs/archivekbot2/kb_app_cli/README.md | 17 + olddocs/archivekbot2/kb_app_demo/README.md | 144 + olddocs/archivekbot2/kb_config/README.md | 68 + olddocs/archivekbot2/kb_core/README.md | 23 + .../README.md | 14 + .../kb_decoder_admin_jupiter_lock/README.md | 14 + .../kb_decoder_admin_pump_fees/README.md | 17 + .../kb_decoder_amm_aldrin_v1/README.md | 14 + .../kb_decoder_amm_aldrin_v2/README.md | 14 + .../kb_decoder_amm_alphaq/README.md | 14 + .../kb_decoder_amm_believe/README.md | 14 + .../kb_decoder_amm_bonk_swap/README.md | 14 + .../kb_decoder_amm_fluxbeam/README.md | 14 + .../kb_decoder_amm_goon_fi/README.md | 14 + .../kb_decoder_amm_goosefx_gamma/README.md | 14 + .../kb_decoder_amm_goosefx_v2/README.md | 14 + .../kb_decoder_amm_guac_swap/README.md | 14 + .../kb_decoder_amm_lifinity_swap_v2/README.md | 14 + .../README.md | 14 + .../kb_decoder_amm_metadao_v0_5/README.md | 14 + .../kb_decoder_amm_meteora_damm_v1/README.md | 17 + .../kb_decoder_amm_meteora_damm_v2/README.md | 17 + .../kb_decoder_amm_obric_v2/README.md | 14 + .../kb_decoder_amm_one_dex/README.md | 14 + .../kb_decoder_amm_pump_swap/README.md | 17 + .../kb_decoder_amm_raydium_lp_v4/README.md | 17 + .../kb_decoder_amm_solfi/README.md | 14 + .../kb_decoder_amm_solfi_v2/README.md | 14 + .../kb_decoder_amm_vertigo/README.md | 14 + .../kb_decoder_amm_virtuals/README.md | 14 + .../kb_decoder_amm_woofi/README.md | 14 + .../kb_decoder_amm_zero_fi/README.md | 14 + .../kb_decoder_amm_zora/README.md | 14 + .../archivekbot2/kb_decoder_anchor/README.md | 17 + olddocs/archivekbot2/kb_decoder_api/README.md | 25 + .../README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../kb_decoder_clmm_byreal/README.md | 14 + .../kb_decoder_clmm_fusion/README.md | 14 + .../kb_decoder_clmm_orca_whirlpool/README.md | 17 + .../kb_decoder_clmm_pancake_swap/README.md | 14 + .../kb_decoder_clmm_raydium/README.md | 17 + .../kb_decoder_clmm_stabble/README.md | 14 + .../kb_decoder_cpmm_raydium/README.md | 17 + .../kb_decoder_dlmm_meteora/README.md | 17 + .../README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../kb_decoder_launchpad_boop_fun/README.md | 14 + .../README.md | 14 + .../README.md | 17 + .../kb_decoder_launchpad_moonit/README.md | 14 + .../README.md | 14 + .../kb_decoder_launchpad_printr/README.md | 14 + .../kb_decoder_launchpad_pump_fun/README.md | 17 + .../README.md | 14 + .../README.md | 17 + .../kb_decoder_lending_clone/README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../kb_decoder_lending_kamino/README.md | 14 + .../kb_decoder_lending_marginfi_v2/README.md | 14 + .../kb_decoder_lock_raydium_lp/README.md | 14 + .../README.md | 178 + .../README.md | 17 + .../README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../README.md | 17 + .../kb_decoder_perpetuals_drift_v2/README.md | 14 + .../kb_decoder_perpetuals_jupiter/README.md | 14 + .../kb_decoder_perpetuals_zeta/README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../kb_decoder_router_jupiter_dca/README.md | 14 + .../kb_decoder_router_okx_labs_v1/README.md | 14 + .../kb_decoder_router_okx_labs_v2/README.md | 14 + .../README.md | 14 + .../kb_decoder_solana_core/README.md | 116 + .../README.md | 17 + .../README.md | 40 + .../kb_decoder_spl_elgamal_registry/README.md | 13 + .../kb_decoder_spl_memo/README.md | 55 + .../kb_decoder_spl_noop/README.md | 17 + .../kb_decoder_spl_single_pool/README.md | 17 + .../kb_decoder_spl_stake_pool/README.md | 14 + .../kb_decoder_spl_token/README.md | 89 + .../kb_decoder_spl_token_2022/README.md | 30 + .../README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../kb_decoder_stable_swap_stabble/README.md | 14 + .../kb_decoder_staking_kamino_farm/README.md | 14 + .../README.md | 14 + .../kb_decoder_staking_solayer/README.md | 14 + .../README.md | 14 + .../kb_decoder_vault_carrot_defi/README.md | 14 + .../README.md | 14 + .../kb_decoder_vault_kamino/README.md | 14 + .../kb_decoder_vault_kamino_v2/README.md | 14 + .../kb_decoder_vault_kamino_yvaults/README.md | 14 + .../kb_decoder_vault_meteora/README.md | 17 + .../kb_decoder_vesting_streamflow/README.md | 14 + .../README.md | 14 + .../README.md | 14 + .../archivekbot2/kb_execution_api/README.md | 101 + .../kb_execution_safety/README.md | 55 + .../kb_execution_solana/README.md | 151 + .../README.md | 15 + .../kb_executor_admin_jupiter_lock/README.md | 15 + .../kb_executor_admin_pump_fees/README.md | 15 + .../kb_executor_amm_aldrin_v1/README.md | 15 + .../kb_executor_amm_aldrin_v2/README.md | 15 + .../kb_executor_amm_alphaq/README.md | 15 + .../kb_executor_amm_believe/README.md | 15 + .../kb_executor_amm_bonk_swap/README.md | 15 + .../kb_executor_amm_fluxbeam/README.md | 15 + .../kb_executor_amm_goon_fi/README.md | 15 + .../kb_executor_amm_goosefx_gamma/README.md | 15 + .../kb_executor_amm_goosefx_v2/README.md | 15 + .../kb_executor_amm_guac_swap/README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../kb_executor_amm_metadao_v0_5/README.md | 15 + .../kb_executor_amm_meteora_damm_v1/README.md | 15 + .../kb_executor_amm_meteora_damm_v2/README.md | 15 + .../kb_executor_amm_obric_v2/README.md | 15 + .../kb_executor_amm_one_dex/README.md | 15 + .../kb_executor_amm_pump_swap/README.md | 15 + .../kb_executor_amm_raydium_lp_v4/README.md | 15 + .../kb_executor_amm_solfi/README.md | 15 + .../kb_executor_amm_solfi_v2/README.md | 15 + .../kb_executor_amm_vertigo/README.md | 15 + .../kb_executor_amm_virtuals/README.md | 15 + .../kb_executor_amm_woofi/README.md | 15 + .../kb_executor_amm_zero_fi/README.md | 15 + .../kb_executor_amm_zora/README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../kb_executor_clmm_byreal/README.md | 15 + .../kb_executor_clmm_fusion/README.md | 15 + .../kb_executor_clmm_orca_whirlpool/README.md | 15 + .../kb_executor_clmm_pancake_swap/README.md | 15 + .../kb_executor_clmm_raydium/README.md | 15 + .../kb_executor_clmm_stabble/README.md | 15 + .../kb_executor_cpmm_raydium/README.md | 15 + .../kb_executor_dlmm_meteora/README.md | 15 + .../README.md | 14 + .../README.md | 14 + .../README.md | 15 + .../kb_executor_launchpad_boop_fun/README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../kb_executor_launchpad_moonit/README.md | 15 + .../README.md | 15 + .../kb_executor_launchpad_printr/README.md | 15 + .../kb_executor_launchpad_pump_fun/README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../kb_executor_lending_clone/README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../kb_executor_lending_kamino/README.md | 15 + .../kb_executor_lending_marginfi_v2/README.md | 15 + .../kb_executor_lock_raydium_lp/README.md | 15 + .../README.md | 15 + .../README.md | 14 + .../README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../kb_executor_perpetuals_drift_v2/README.md | 15 + .../kb_executor_perpetuals_jupiter/README.md | 15 + .../kb_executor_perpetuals_zeta/README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../kb_executor_router_jupiter_dca/README.md | 15 + .../kb_executor_router_okx_labs_v1/README.md | 15 + .../kb_executor_router_okx_labs_v2/README.md | 15 + .../README.md | 15 + .../kb_executor_solana_core/README.md | 915 +++ .../README.md | 14 + .../README.md | 35 + .../README.md | 6 + .../kb_executor_spl_memo/README.md | 50 + .../kb_executor_spl_noop/README.md | 14 + .../kb_executor_spl_single_pool/README.md | 14 + .../kb_executor_spl_stake_pool/README.md | 15 + .../kb_executor_spl_token/README.md | 98 + .../kb_executor_spl_token_2022/README.md | 139 + .../README.md | 15 + .../README.md | 15 + .../README.md | 15 + .../kb_executor_stable_swap_stabble/README.md | 15 + .../kb_executor_staking_kamino_farm/README.md | 15 + .../README.md | 15 + .../kb_executor_staking_solayer/README.md | 15 + .../README.md | 15 + .../kb_executor_vault_carrot_defi/README.md | 15 + .../README.md | 15 + .../kb_executor_vault_kamino/README.md | 15 + .../kb_executor_vault_kamino_v2/README.md | 15 + .../README.md | 15 + .../kb_executor_vault_meteora/README.md | 15 + .../kb_executor_vesting_streamflow/README.md | 15 + .../README.md | 15 + .../README.md | 15 + olddocs/archivekbot2/kb_logging/README.md | 38 + .../kb_materializer_admin/README.md | 25 + .../kb_materializer_api/README.md | 25 + .../kb_materializer_bridge/README.md | 14 + .../README.md | 19 + .../kb_materializer_fees/README.md | 16 + .../kb_materializer_governance/README.md | 14 + .../kb_materializer_lending/README.md | 14 + .../kb_materializer_lifecycle/README.md | 36 + .../kb_materializer_liquidity/README.md | 17 + .../kb_materializer_metadata/README.md | 45 + .../kb_materializer_nft/README.md | 14 + .../kb_materializer_oracle/README.md | 14 + .../kb_materializer_orderbook/README.md | 17 + .../kb_materializer_perpetuals/README.md | 14 + .../kb_materializer_pool_state/README.md | 17 + .../kb_materializer_rewards/README.md | 17 + .../kb_materializer_risk/README.md | 18 + .../kb_materializer_routing/README.md | 14 + .../kb_materializer_staking/README.md | 56 + .../kb_materializer_token_accounts/README.md | 29 + .../README.md | 14 + .../kb_materializer_trades/README.md | 17 + .../README.md | 47 + .../kb_materializer_vault/README.md | 14 + olddocs/archivekbot2/kb_model/README.md | 32 + olddocs/archivekbot2/kb_pipeline/README.md | 214 + olddocs/archivekbot2/kb_program_ids/README.md | 30 + olddocs/archivekbot2/kb_rpc/README.md | 209 + olddocs/archivekbot2/kb_store_core/README.md | 222 + olddocs/archivekbot2/kb_store_pg/README.md | 246 + .../archivekbot2/kb_store_sqlite/README.md | 17 + olddocs/archivekbot2/kb_wallet/README.md | 25 + olddocs/archivekbot2/kb_worker/README.md | 17 + .../prompts/001_version_session_template.md | 60 + .../002_program_registry_and_naming_audit.md | 23 + .../003_v0_1_logging_config_profiles.md | 39 + .../004_v0_2_sql_storage_materialization.md | 242 + .../005_v0_2_2_pg_connection_migrations.md | 58 + .../prompts/005_v0_3_rpc_ingestion_ws.md | 40 + .../prompts/006_v0_4_wallet_execution_demo.md | 25 + .../007_v0_5_core_decoders_listeners.md | 23 + .../008_v0_6_priority_dex_router_surfaces.md | 48 + .../009_v0_2_1_store_core_contracts.md | 119 + ...2_postgres_connection_health_migrations.md | 52 + .../prompts/011_v0_2_3_raw_store_minimal.md | 167 + .../prompts/012_v0_2_4_core_store_minimal.md | 92 + .../013_v0_2_5_db_diagnostics_tauri.md | 50 + .../014_v0_3_0_agave_local_research.md | 210 + .../015_v0_3_1_canonical_store_migration.md | 48 + ...6_v0_3_2_canonical_transaction_contract.md | 112 + .../017_v0_3_3_http_backfill_free_tier.md | 186 + ...018_v0_3_4_canonical_to_core_extraction.md | 335 ++ .../019_v0_4_0_decoder_infrastructure.md | 288 + .../020_v0_4_1_native_solana_programs.md | 691 +++ .../021_v0_4_2_executor_solana_core.md | 281 + .../prompts/022_v0_4_3_spl_memo.md | 401 ++ .../prompts/023_v0_4_4_spl_token.md | 447 ++ ...024_v0_4_5_spl_associated_token_account.md | 244 + .../prompts/025_v0_4_6_spl_token_2022.md | 338 ++ .../026_v0_4_7_metaplex_token_metadata.md | 155 + olddocs/archivekbot2/prompts/README.md | 51 + olddocs/archivekbot2/sql/README.md | 8 + 440 files changed, 36186 insertions(+), 39 deletions(-) create mode 100644 docs/README.md create mode 100644 docs/decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md create mode 100644 docs/decisions/WINCODE_COMPATIBILITY_POLICY.md create mode 100644 docs/rules/CRATE_DOCUMENTATION_RULES.md create mode 100644 docs/templates/CRATE_CHANGELOG_TEMPLATE.md create mode 100644 docs/templates/CRATE_README_TEMPLATE.md create mode 100644 docs/templates/CRATE_TODO_TEMPLATE.md create mode 100644 docs/templates/CRATE_USAGE_TEMPLATE.md create mode 100644 olddocs/archivekbot2/CHANGELOG.md create mode 100644 olddocs/archivekbot2/README.md create mode 100644 olddocs/archivekbot2/ROADMAP.md create mode 100644 olddocs/archivekbot2/RULES.md create mode 100644 olddocs/archivekbot2/RUST_RULES.md create mode 100644 olddocs/archivekbot2/config/README.md create mode 100644 olddocs/archivekbot2/config/example.config.json create mode 100644 olddocs/archivekbot2/config/schema.config.json create mode 100644 olddocs/archivekbot2/docs/ACCOUNT_ONLY_CANDIDATES.md create mode 100644 olddocs/archivekbot2/docs/AGAVE_LOCAL_NODE.md create mode 100644 olddocs/archivekbot2/docs/APPLICATION_CRATES.md create mode 100644 olddocs/archivekbot2/docs/ARCHITECTURE.md create mode 100644 olddocs/archivekbot2/docs/BACKFILL_HTTP.md create mode 100644 olddocs/archivekbot2/docs/BAGS_FM.md create mode 100644 olddocs/archivekbot2/docs/CODE_REUSE.md create mode 100644 olddocs/archivekbot2/docs/CONFIGURATION.md create mode 100644 olddocs/archivekbot2/docs/CORE_EXTRACTION_CONTRACTS.md create mode 100644 olddocs/archivekbot2/docs/CORE_EXTRACTION_SELECTION_AND_REPLAY.md create mode 100644 olddocs/archivekbot2/docs/CORE_PROGRAM_IDS.md create mode 100644 olddocs/archivekbot2/docs/CORE_STORE.md create mode 100644 olddocs/archivekbot2/docs/DATABASE.md create mode 100644 olddocs/archivekbot2/docs/DECODER_MATERIALIZATION_CONTRACTS.md create mode 100644 olddocs/archivekbot2/docs/DECODER_SURFACE_AUDIT.md create mode 100644 olddocs/archivekbot2/docs/DELTA_WORKFLOW.md create mode 100644 olddocs/archivekbot2/docs/DEVELOPMENT_ORDER.md create mode 100644 olddocs/archivekbot2/docs/DEVNET_EXECUTION.md create mode 100644 olddocs/archivekbot2/docs/EXECUTION_MODEL.md create mode 100644 olddocs/archivekbot2/docs/EXECUTOR_SURFACE_MATRIX.md create mode 100644 olddocs/archivekbot2/docs/FOUNDATION_CLOSURE.md create mode 100644 olddocs/archivekbot2/docs/HISTORICAL_DATA_ACQUISITION_PLAN.md create mode 100644 olddocs/archivekbot2/docs/IDL_SURFACE_CLASSIFICATION.md create mode 100644 olddocs/archivekbot2/docs/INSTRUCTION_REPLAY_CONTRACTS.md create mode 100644 olddocs/archivekbot2/docs/LIVE_SOURCE_STRATEGY.md create mode 100644 olddocs/archivekbot2/docs/LOGGING.md create mode 100644 olddocs/archivekbot2/docs/MATERIALIZATIONS.md create mode 100644 olddocs/archivekbot2/docs/METAPLEX_TOKEN_METADATA_MATRIX.json create mode 100644 olddocs/archivekbot2/docs/NATIVE_SOLANA_CLOSURE_AUDIT.md create mode 100644 olddocs/archivekbot2/docs/NATIVE_SOLANA_DECODER_MATRIX.json create mode 100644 olddocs/archivekbot2/docs/NATIVE_SOLANA_EXECUTION_MATRIX.json create mode 100644 olddocs/archivekbot2/docs/NATIVE_SOLANA_MATERIALIZATION_AUDIT.md create mode 100644 olddocs/archivekbot2/docs/NATIVE_SOLANA_PROGRAMS.md create mode 100644 olddocs/archivekbot2/docs/NOMENCLATURE.md create mode 100644 olddocs/archivekbot2/docs/POSTGRES_STORE.md create mode 100644 olddocs/archivekbot2/docs/PROGRAM_CODE_INDEX.md create mode 100644 olddocs/archivekbot2/docs/PROGRAM_IDS.md create mode 100644 olddocs/archivekbot2/docs/PROGRAM_ID_CONSTANTS_AUDIT.md create mode 100644 olddocs/archivekbot2/docs/PROGRAM_NAMING.md create mode 100644 olddocs/archivekbot2/docs/PROGRAM_REGISTRY_CONTROL.md create mode 100644 olddocs/archivekbot2/docs/PROJECT_OBJECTIVES.md create mode 100644 olddocs/archivekbot2/docs/RAW_STORAGE_LIFECYCLE.md create mode 100644 olddocs/archivekbot2/docs/RAW_STORE.md create mode 100644 olddocs/archivekbot2/docs/REPLAY_PIPELINE.md create mode 100644 olddocs/archivekbot2/docs/RPC_ENDPOINT_ROLES.md create mode 100644 olddocs/archivekbot2/docs/RUST_WORKSPACE_RULE_AUDIT.md create mode 100644 olddocs/archivekbot2/docs/SOLANA_INTERFACE_DEPENDENCIES.md create mode 100644 olddocs/archivekbot2/docs/SOLANA_NATIVE_RPC_CLOSURE_AUDIT.md create mode 100644 olddocs/archivekbot2/docs/SOLANA_STANDARD_RPC_MATRIX.json create mode 100644 olddocs/archivekbot2/docs/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json create mode 100644 olddocs/archivekbot2/docs/SPL_ELGAMAL_REGISTRY_MATRIX.json create mode 100644 olddocs/archivekbot2/docs/SPL_MEMO_MATRIX.json create mode 100644 olddocs/archivekbot2/docs/SPL_TOKEN_2022_CONFIDENTIAL_EXECUTION_AUDIT.md create mode 100644 olddocs/archivekbot2/docs/SPL_TOKEN_2022_MATRIX.json create mode 100644 olddocs/archivekbot2/docs/SPL_TOKEN_2022_SOURCE_AUDIT.md create mode 100644 olddocs/archivekbot2/docs/SPL_TOKEN_2022_VALIDATION_MATRIX.json create mode 100644 olddocs/archivekbot2/docs/SPL_TOKEN_MATRIX.json create mode 100644 olddocs/archivekbot2/docs/SQL_DEMOS.md create mode 100644 olddocs/archivekbot2/docs/SURFACE_CRATE_MATRIX.md create mode 100644 olddocs/archivekbot2/docs/TRACING_CONTRACT.md create mode 100644 olddocs/archivekbot2/docs/TRANSACTION_ACQUISITION_MODEL.md create mode 100644 olddocs/archivekbot2/docs/V0_4_6_VALIDATION.md create mode 100644 olddocs/archivekbot2/docs/VERSION_HEADER_AUDIT.md create mode 100644 olddocs/archivekbot2/docs/WS_LISTENERS.md create mode 100644 olddocs/archivekbot2/idls/001.README.md create mode 100644 olddocs/archivekbot2/idls/bonkswap.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.json create mode 100644 olddocs/archivekbot2/idls/boop_fun.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.json create mode 100644 olddocs/archivekbot2/idls/bubblegum.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.json create mode 100644 olddocs/archivekbot2/idls/byreal_clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.json create mode 100644 olddocs/archivekbot2/idls/carrot.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.json create mode 100644 olddocs/archivekbot2/idls/cctp_v1.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.json create mode 100644 olddocs/archivekbot2/idls/cctp_v2.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.json create mode 100644 olddocs/archivekbot2/idls/clone.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.json create mode 100644 olddocs/archivekbot2/idls/dflow_v4.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.json create mode 100644 olddocs/archivekbot2/idls/drift_v2.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.json create mode 100644 olddocs/archivekbot2/idls/fusion_amm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.json create mode 100644 olddocs/archivekbot2/idls/goosefx_gamma.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.json create mode 100644 olddocs/archivekbot2/idls/goosefx_v2.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.json create mode 100644 olddocs/archivekbot2/idls/guacswap.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.json create mode 100644 olddocs/archivekbot2/idls/helium_treasury_management.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.json create mode 100644 olddocs/archivekbot2/idls/hylo_exchange.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.json create mode 100644 olddocs/archivekbot2/idls/hylo_stability_pool.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.json create mode 100644 olddocs/archivekbot2/idls/jito_tip_distribution.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7..json create mode 100644 olddocs/archivekbot2/idls/jupiter_aprepro_smart_wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.json create mode 100644 olddocs/archivekbot2/idls/jupiter_dca.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.json create mode 100644 olddocs/archivekbot2/idls/jupiter_limit_order.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.json create mode 100644 olddocs/archivekbot2/idls/jupiter_limit_order_v2.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.json create mode 100644 olddocs/archivekbot2/idls/jupiter_locker.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.json create mode 100644 olddocs/archivekbot2/idls/jupiter_perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.json create mode 100644 olddocs/archivekbot2/idls/jupiter_stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.json create mode 100644 olddocs/archivekbot2/idls/jupiter_v4.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.json create mode 100644 olddocs/archivekbot2/idls/jupiter_v6.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.json create mode 100644 olddocs/archivekbot2/idls/kamino.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.json create mode 100644 olddocs/archivekbot2/idls/kamino_farms.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.json create mode 100644 olddocs/archivekbot2/idls/kamino_lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.json create mode 100644 olddocs/archivekbot2/idls/kamino_vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.json create mode 100644 olddocs/archivekbot2/idls/kamino_vault_v2.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.json create mode 100644 olddocs/archivekbot2/idls/layerzero_endpoint.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.json create mode 100644 olddocs/archivekbot2/idls/layerzero_executor.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.json create mode 100644 olddocs/archivekbot2/idls/lifinity_amm_v2.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.json create mode 100644 olddocs/archivekbot2/idls/marginfi_v2.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.json create mode 100644 olddocs/archivekbot2/idls/marinade_finance.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.json create mode 100644 olddocs/archivekbot2/idls/metadao_amm_v0.5.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.json create mode 100644 olddocs/archivekbot2/idls/metadao_futarchy.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.json create mode 100644 olddocs/archivekbot2/idls/metadao_launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.json create mode 100644 olddocs/archivekbot2/idls/metdao_bid_wall.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.json create mode 100644 olddocs/archivekbot2/idls/meteora_damm_v2.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.json create mode 100644 olddocs/archivekbot2/idls/meteora_dbc.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.json create mode 100644 olddocs/archivekbot2/idls/meteora_dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.json create mode 100644 olddocs/archivekbot2/idls/meteora_pools_amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.json create mode 100644 olddocs/archivekbot2/idls/meteora_vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.json create mode 100644 olddocs/archivekbot2/idls/moonit.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.json create mode 100644 olddocs/archivekbot2/idls/numeraire.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.json create mode 100644 olddocs/archivekbot2/idls/okx_dex_router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.json create mode 100644 olddocs/archivekbot2/idls/okx_lab_v1.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.json create mode 100644 olddocs/archivekbot2/idls/ondo_gm.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.json create mode 100644 olddocs/archivekbot2/idls/openbook_v2.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.json create mode 100644 olddocs/archivekbot2/idls/orca_wavebreak.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.json create mode 100644 olddocs/archivekbot2/idls/orca_whirlpool.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.json create mode 100644 olddocs/archivekbot2/idls/pancakeswap.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.json create mode 100644 olddocs/archivekbot2/idls/phoenix_eternal.EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.json create mode 100644 olddocs/archivekbot2/idls/printr.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.json create mode 100644 olddocs/archivekbot2/idls/pump_fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.json create mode 100644 olddocs/archivekbot2/idls/pump_fun.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.json create mode 100644 olddocs/archivekbot2/idls/pump_swap.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json create mode 100644 olddocs/archivekbot2/idls/pumpup.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.json create mode 100644 olddocs/archivekbot2/idls/raydium_clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.json create mode 100644 olddocs/archivekbot2/idls/raydium_cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.json create mode 100644 olddocs/archivekbot2/idls/raydium_launchlab.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.json create mode 100644 olddocs/archivekbot2/idls/raydium_lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.json create mode 100644 olddocs/archivekbot2/idls/saber_decimal.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.json create mode 100644 olddocs/archivekbot2/idls/squads.SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.json create mode 100644 olddocs/archivekbot2/idls/stabble_clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.json create mode 100644 olddocs/archivekbot2/idls/stabble_stable_swap.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.json create mode 100644 olddocs/archivekbot2/idls/stabble_weighted_swap.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.json create mode 100644 olddocs/archivekbot2/idls/streamflow.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.json create mode 100644 olddocs/archivekbot2/idls/tensor-cnft.TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.json create mode 100644 olddocs/archivekbot2/idls/vertigo.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.json create mode 100644 olddocs/archivekbot2/idls/virtuals.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.json create mode 100644 olddocs/archivekbot2/idls/woofi.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.json create mode 100644 olddocs/archivekbot2/idls/zeta.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.json create mode 100644 olddocs/archivekbot2/kb_app_cli/README.md create mode 100644 olddocs/archivekbot2/kb_app_demo/README.md create mode 100644 olddocs/archivekbot2/kb_config/README.md create mode 100644 olddocs/archivekbot2/kb_core/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_adapter_saber_decimal_wrapper/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_admin_jupiter_lock/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_admin_pump_fees/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_aldrin_v1/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_aldrin_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_alphaq/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_believe/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_bonk_swap/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_fluxbeam/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_goon_fi/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_goosefx_gamma/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_goosefx_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_guac_swap/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_lifinity_swap_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_metadao_futarchy_amm/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_metadao_v0_5/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_meteora_damm_v1/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_meteora_damm_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_obric_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_one_dex/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_pump_swap/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_raydium_lp_v4/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_solfi/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_solfi_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_vertigo/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_virtuals/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_woofi/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_zero_fi/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_amm_zora/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_anchor/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_api/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_bridge_circle_cctp_token_messenger_minter/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_bridge_circle_cctp_token_messenger_minter_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_bridge_layer_zero_endpoint/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_bridge_layer_zero_executor/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_clmm_byreal/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_clmm_fusion/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_clmm_orca_whirlpool/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_clmm_pancake_swap/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_clmm_raydium/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_clmm_stabble/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_cpmm_raydium/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_dlmm_meteora/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_fees_bags_fee_share_v1/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_fees_bags_fee_share_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_governance_metadao_bid_wall/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_launchpad_boop_fun/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_launchpad_metadao_ico/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_launchpad_meteora_dbc/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_launchpad_moonit/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_launchpad_orca_wavebreak/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_launchpad_printr/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_launchpad_pump_fun/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_launchpad_pump_pumpup_ai/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_launchpad_raydium_launchlab/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_lending_clone/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_borrow/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_earn/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_flash_loan/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_liquidity/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_lending_kamino/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_lending_marginfi_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_lock_raydium_lp/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_metadata_metaplex_token_metadata/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_metadata_spl_name_service/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_nft_metaplex_bubblegum/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_orderbook_jupiter_limit_order/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_orderbook_jupiter_limit_order_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_orderbook_openbook_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_perpetuals_drift_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_perpetuals_jupiter/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_perpetuals_zeta/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_router_dflow_aggregator_v4/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_router_jupiter_aggregator_v4/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_router_jupiter_aggregator_v6/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_router_jupiter_dca/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_router_okx_labs_v1/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_router_okx_labs_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_rwa_ondo_global_markets/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_solana_core/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_spl_account_compression/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_spl_associated_token_account/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_spl_elgamal_registry/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_spl_memo/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_spl_noop/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_spl_single_pool/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_spl_stake_pool/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_spl_token/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_spl_token_2022/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_stable_swap_hylo_exchange/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_stable_swap_jupiter_stable/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_stable_swap_numeraire/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_stable_swap_stabble/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_staking_kamino_farm/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_staking_marinade_finance/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_staking_solayer/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_treasury_helium_treasury_management/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_vault_carrot_defi/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_vault_hylo_stability_pool/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_vault_kamino/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_vault_kamino_v2/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_vault_kamino_yvaults/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_vault_meteora/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_vesting_streamflow/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_wallet_jupiter_apepro_smart_wallet/README.md create mode 100644 olddocs/archivekbot2/kb_decoder_weighted_swap_stabble/README.md create mode 100644 olddocs/archivekbot2/kb_execution_api/README.md create mode 100644 olddocs/archivekbot2/kb_execution_safety/README.md create mode 100644 olddocs/archivekbot2/kb_execution_solana/README.md create mode 100644 olddocs/archivekbot2/kb_executor_adapter_saber_decimal_wrapper/README.md create mode 100644 olddocs/archivekbot2/kb_executor_admin_jupiter_lock/README.md create mode 100644 olddocs/archivekbot2/kb_executor_admin_pump_fees/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_aldrin_v1/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_aldrin_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_alphaq/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_believe/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_bonk_swap/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_fluxbeam/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_goon_fi/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_goosefx_gamma/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_goosefx_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_guac_swap/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_lifinity_swap_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_metadao_futarchy_amm/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_metadao_v0_5/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_meteora_damm_v1/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_meteora_damm_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_obric_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_one_dex/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_pump_swap/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_raydium_lp_v4/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_solfi/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_solfi_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_vertigo/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_virtuals/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_woofi/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_zero_fi/README.md create mode 100644 olddocs/archivekbot2/kb_executor_amm_zora/README.md create mode 100644 olddocs/archivekbot2/kb_executor_bridge_circle_cctp_token_messenger_minter/README.md create mode 100644 olddocs/archivekbot2/kb_executor_bridge_circle_cctp_token_messenger_minter_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_bridge_layer_zero_endpoint/README.md create mode 100644 olddocs/archivekbot2/kb_executor_bridge_layer_zero_executor/README.md create mode 100644 olddocs/archivekbot2/kb_executor_clmm_byreal/README.md create mode 100644 olddocs/archivekbot2/kb_executor_clmm_fusion/README.md create mode 100644 olddocs/archivekbot2/kb_executor_clmm_orca_whirlpool/README.md create mode 100644 olddocs/archivekbot2/kb_executor_clmm_pancake_swap/README.md create mode 100644 olddocs/archivekbot2/kb_executor_clmm_raydium/README.md create mode 100644 olddocs/archivekbot2/kb_executor_clmm_stabble/README.md create mode 100644 olddocs/archivekbot2/kb_executor_cpmm_raydium/README.md create mode 100644 olddocs/archivekbot2/kb_executor_dlmm_meteora/README.md create mode 100644 olddocs/archivekbot2/kb_executor_fees_bags_fee_share_v1/README.md create mode 100644 olddocs/archivekbot2/kb_executor_fees_bags_fee_share_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_governance_metadao_bid_wall/README.md create mode 100644 olddocs/archivekbot2/kb_executor_launchpad_boop_fun/README.md create mode 100644 olddocs/archivekbot2/kb_executor_launchpad_metadao_ico/README.md create mode 100644 olddocs/archivekbot2/kb_executor_launchpad_meteora_dbc/README.md create mode 100644 olddocs/archivekbot2/kb_executor_launchpad_moonit/README.md create mode 100644 olddocs/archivekbot2/kb_executor_launchpad_orca_wavebreak/README.md create mode 100644 olddocs/archivekbot2/kb_executor_launchpad_printr/README.md create mode 100644 olddocs/archivekbot2/kb_executor_launchpad_pump_fun/README.md create mode 100644 olddocs/archivekbot2/kb_executor_launchpad_pump_pumpup_ai/README.md create mode 100644 olddocs/archivekbot2/kb_executor_launchpad_raydium_launchlab/README.md create mode 100644 olddocs/archivekbot2/kb_executor_lending_clone/README.md create mode 100644 olddocs/archivekbot2/kb_executor_lending_jupiter_lend_borrow/README.md create mode 100644 olddocs/archivekbot2/kb_executor_lending_jupiter_lend_earn/README.md create mode 100644 olddocs/archivekbot2/kb_executor_lending_jupiter_lend_flash_loan/README.md create mode 100644 olddocs/archivekbot2/kb_executor_lending_jupiter_lend_liquidity/README.md create mode 100644 olddocs/archivekbot2/kb_executor_lending_kamino/README.md create mode 100644 olddocs/archivekbot2/kb_executor_lending_marginfi_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_lock_raydium_lp/README.md create mode 100644 olddocs/archivekbot2/kb_executor_metadata_metaplex_token_metadata/README.md create mode 100644 olddocs/archivekbot2/kb_executor_metadata_spl_name_service/README.md create mode 100644 olddocs/archivekbot2/kb_executor_nft_metaplex_bubblegum/README.md create mode 100644 olddocs/archivekbot2/kb_executor_orderbook_jupiter_limit_order/README.md create mode 100644 olddocs/archivekbot2/kb_executor_orderbook_jupiter_limit_order_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_orderbook_openbook_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_perpetuals_drift_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_perpetuals_jupiter/README.md create mode 100644 olddocs/archivekbot2/kb_executor_perpetuals_zeta/README.md create mode 100644 olddocs/archivekbot2/kb_executor_router_dflow_aggregator_v4/README.md create mode 100644 olddocs/archivekbot2/kb_executor_router_jupiter_aggregator_v4/README.md create mode 100644 olddocs/archivekbot2/kb_executor_router_jupiter_aggregator_v6/README.md create mode 100644 olddocs/archivekbot2/kb_executor_router_jupiter_dca/README.md create mode 100644 olddocs/archivekbot2/kb_executor_router_okx_labs_v1/README.md create mode 100644 olddocs/archivekbot2/kb_executor_router_okx_labs_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_rwa_ondo_global_markets/README.md create mode 100644 olddocs/archivekbot2/kb_executor_solana_core/README.md create mode 100644 olddocs/archivekbot2/kb_executor_spl_account_compression/README.md create mode 100644 olddocs/archivekbot2/kb_executor_spl_associated_token_account/README.md create mode 100644 olddocs/archivekbot2/kb_executor_spl_elgamal_registry/README.md create mode 100644 olddocs/archivekbot2/kb_executor_spl_memo/README.md create mode 100644 olddocs/archivekbot2/kb_executor_spl_noop/README.md create mode 100644 olddocs/archivekbot2/kb_executor_spl_single_pool/README.md create mode 100644 olddocs/archivekbot2/kb_executor_spl_stake_pool/README.md create mode 100644 olddocs/archivekbot2/kb_executor_spl_token/README.md create mode 100644 olddocs/archivekbot2/kb_executor_spl_token_2022/README.md create mode 100644 olddocs/archivekbot2/kb_executor_stable_swap_hylo_exchange/README.md create mode 100644 olddocs/archivekbot2/kb_executor_stable_swap_jupiter_stable/README.md create mode 100644 olddocs/archivekbot2/kb_executor_stable_swap_numeraire/README.md create mode 100644 olddocs/archivekbot2/kb_executor_stable_swap_stabble/README.md create mode 100644 olddocs/archivekbot2/kb_executor_staking_kamino_farm/README.md create mode 100644 olddocs/archivekbot2/kb_executor_staking_marinade_finance/README.md create mode 100644 olddocs/archivekbot2/kb_executor_staking_solayer/README.md create mode 100644 olddocs/archivekbot2/kb_executor_treasury_helium_treasury_management/README.md create mode 100644 olddocs/archivekbot2/kb_executor_vault_carrot_defi/README.md create mode 100644 olddocs/archivekbot2/kb_executor_vault_hylo_stability_pool/README.md create mode 100644 olddocs/archivekbot2/kb_executor_vault_kamino/README.md create mode 100644 olddocs/archivekbot2/kb_executor_vault_kamino_v2/README.md create mode 100644 olddocs/archivekbot2/kb_executor_vault_kamino_yvaults/README.md create mode 100644 olddocs/archivekbot2/kb_executor_vault_meteora/README.md create mode 100644 olddocs/archivekbot2/kb_executor_vesting_streamflow/README.md create mode 100644 olddocs/archivekbot2/kb_executor_wallet_jupiter_apepro_smart_wallet/README.md create mode 100644 olddocs/archivekbot2/kb_executor_weighted_swap_stabble/README.md create mode 100644 olddocs/archivekbot2/kb_logging/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_admin/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_api/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_bridge/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_compliance_audit/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_fees/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_governance/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_lending/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_lifecycle/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_liquidity/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_metadata/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_nft/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_oracle/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_orderbook/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_perpetuals/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_pool_state/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_rewards/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_risk/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_routing/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_staking/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_token_accounts/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_token_metadata_risk/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_trades/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_transaction_annotations/README.md create mode 100644 olddocs/archivekbot2/kb_materializer_vault/README.md create mode 100644 olddocs/archivekbot2/kb_model/README.md create mode 100644 olddocs/archivekbot2/kb_pipeline/README.md create mode 100644 olddocs/archivekbot2/kb_program_ids/README.md create mode 100644 olddocs/archivekbot2/kb_rpc/README.md create mode 100644 olddocs/archivekbot2/kb_store_core/README.md create mode 100644 olddocs/archivekbot2/kb_store_pg/README.md create mode 100644 olddocs/archivekbot2/kb_store_sqlite/README.md create mode 100644 olddocs/archivekbot2/kb_wallet/README.md create mode 100644 olddocs/archivekbot2/kb_worker/README.md create mode 100644 olddocs/archivekbot2/prompts/001_version_session_template.md create mode 100644 olddocs/archivekbot2/prompts/002_program_registry_and_naming_audit.md create mode 100644 olddocs/archivekbot2/prompts/003_v0_1_logging_config_profiles.md create mode 100644 olddocs/archivekbot2/prompts/004_v0_2_sql_storage_materialization.md create mode 100644 olddocs/archivekbot2/prompts/005_v0_2_2_pg_connection_migrations.md create mode 100644 olddocs/archivekbot2/prompts/005_v0_3_rpc_ingestion_ws.md create mode 100644 olddocs/archivekbot2/prompts/006_v0_4_wallet_execution_demo.md create mode 100644 olddocs/archivekbot2/prompts/007_v0_5_core_decoders_listeners.md create mode 100644 olddocs/archivekbot2/prompts/008_v0_6_priority_dex_router_surfaces.md create mode 100644 olddocs/archivekbot2/prompts/009_v0_2_1_store_core_contracts.md create mode 100644 olddocs/archivekbot2/prompts/010_v0_2_2_postgres_connection_health_migrations.md create mode 100644 olddocs/archivekbot2/prompts/011_v0_2_3_raw_store_minimal.md create mode 100644 olddocs/archivekbot2/prompts/012_v0_2_4_core_store_minimal.md create mode 100644 olddocs/archivekbot2/prompts/013_v0_2_5_db_diagnostics_tauri.md create mode 100644 olddocs/archivekbot2/prompts/014_v0_3_0_agave_local_research.md create mode 100644 olddocs/archivekbot2/prompts/015_v0_3_1_canonical_store_migration.md create mode 100644 olddocs/archivekbot2/prompts/016_v0_3_2_canonical_transaction_contract.md create mode 100644 olddocs/archivekbot2/prompts/017_v0_3_3_http_backfill_free_tier.md create mode 100644 olddocs/archivekbot2/prompts/018_v0_3_4_canonical_to_core_extraction.md create mode 100644 olddocs/archivekbot2/prompts/019_v0_4_0_decoder_infrastructure.md create mode 100644 olddocs/archivekbot2/prompts/020_v0_4_1_native_solana_programs.md create mode 100644 olddocs/archivekbot2/prompts/021_v0_4_2_executor_solana_core.md create mode 100644 olddocs/archivekbot2/prompts/022_v0_4_3_spl_memo.md create mode 100644 olddocs/archivekbot2/prompts/023_v0_4_4_spl_token.md create mode 100644 olddocs/archivekbot2/prompts/024_v0_4_5_spl_associated_token_account.md create mode 100644 olddocs/archivekbot2/prompts/025_v0_4_6_spl_token_2022.md create mode 100644 olddocs/archivekbot2/prompts/026_v0_4_7_metaplex_token_metadata.md create mode 100644 olddocs/archivekbot2/prompts/README.md create mode 100644 olddocs/archivekbot2/sql/README.md diff --git a/RULES_GENERAL.md b/RULES_GENERAL.md index a52ef0c..a6e2f2c 100644 --- a/RULES_GENERAL.md +++ b/RULES_GENERAL.md @@ -1,5 +1,5 @@ - + # Règles générales du projet @@ -27,7 +27,11 @@ - `ROADMAP.md` contient les futures étapes, versions et changements prévus. - `CHANGELOG.md` n’est modifié qu’après validation explicite d’une version. - Les documents de session et checklists conservent des critères d’acceptation vérifiables. -- Chaque crate publique possède un `README.md` ou `001.README.md` et, à la clôture de la migration, un `USAGES.md`. +- Chaque crate membre du workspace possède exactement `README.md`, `TODO.md`, `USAGE.md` et `CHANGELOG.md` à sa racine. +- Le contrat détaillé de ces quatre documents est défini dans `docs/rules/CRATE_DOCUMENTATION_RULES.md`. +- Les variantes `001.README.md` et `USAGES.md` sont interdites dans la documentation active. +- Les documents actifs de bot3 sont réécrits pour l’architecture actuelle ; aucun document de `olddocs/archivekbot2/` ne doit être déplacé ou repris automatiquement. +- Les matrices canoniques de `test-fixtures/contract-matrices/` doivent être référencées, non dupliquées dans `docs/`. - Une API publique ajoutée ou modifiée n’est pas considérée comme documentée tant que la documentation de sa crate n’est pas synchronisée. ## Travail par tranches diff --git a/docs/DOCUMENTATION_REFACTOR_AUDIT.md b/docs/DOCUMENTATION_REFACTOR_AUDIT.md index 873825d..d10ca0c 100644 --- a/docs/DOCUMENTATION_REFACTOR_AUDIT.md +++ b/docs/DOCUMENTATION_REFACTOR_AUDIT.md @@ -1,5 +1,5 @@ - + # Audit de refonte documentaire @@ -62,18 +62,32 @@ Ces documents sont une source historique et technique. Ils ne sont pas normatifs ## 3. État de `olddocs/` -Le répertoire `olddocs/` n’existe pas dans l’archive bot3 fournie. Il n’y a donc aucun contenu bot3 à préserver sous ce chemin dans cette base précise. +L’absence de `olddocs/` dans l’archive bot3 fournie est volontaire : conserver une copie partielle de bot2 dans chaque archive complète bot3 aurait dupliqué la source historique alors que l’archive complète bot2 est fournie au démarrage de la session documentaire. Ce point n’est donc pas un défaut de la base `pre.062`. -La reconstruction devra créer deux archives séparées : +La reconstruction crée deux archives séparées : ```text olddocs/archivekbot2/ olddocs/archivekbot3/ ``` -La totalité de `khadhroony-bot2/docs/` devra être copiée dans `olddocs/archivekbot2/` sans réécriture de fond. L’archive source fournie ne doit évidemment pas être modifiée. Les documents bot3 devenus temporaires ou remplacés seront déplacés ultérieurement vers `olddocs/archivekbot3/`, après correction de leurs références. +`olddocs/archivekbot2/` doit reproduire l’arborescence documentaire utile de bot2, et pas uniquement son ancien répertoire `docs/`. La structure attendue comprend notamment : -Le choix opérationnel retenu pour la suite doit être une copie depuis l’archive bot2, et non un déplacement destructif. +```text +olddocs/archivekbot2/README.md +olddocs/archivekbot2/CHANGELOG.md +olddocs/archivekbot2/ROADMAP.md +olddocs/archivekbot2/RULES.md +olddocs/archivekbot2/docs/... +olddocs/archivekbot2/prompts/... +olddocs/archivekbot2//README.md +olddocs/archivekbot2//CHANGELOG.md +olddocs/archivekbot2//.md|json +``` + +Cette archive est reconstruite depuis l’archive complète bot2 fournie, en conservant les chemins relatifs et sans modifier les fichiers historiques. Les documents bot3 devenus temporaires ou remplacés seront déplacés ultérieurement vers `olddocs/archivekbot3/`, après correction de leurs références. + +Le choix opérationnel est une copie documentaire depuis l’archive bot2, et non un déplacement destructif ni une copie complète du code bot2. ## 4. Contrat documentaire des crates @@ -109,7 +123,15 @@ Le workspace déclare 11 crates : Aucune crate ne satisfait donc le contrat complet `README.md`, `TODO.md`, `USAGE.md`, `CHANGELOG.md`. -Une contradiction normative existe dans `RULES_GENERAL.md` : le fichier exige encore un `README.md` ou `001.README.md` et, à terme, un `USAGES.md`. Cette formulation doit être remplacée par le contrat acquis utilisant exactement `README.md`, `TODO.md`, `USAGE.md` et `CHANGELOG.md`. +Une contradiction normative existe dans `RULES_GENERAL.md` : le fichier exige encore un `README.md` ou `001.README.md` et, à terme, un `USAGES.md`. La convention retenue est `USAGE.md`, nom singulier couramment utilisé pour un guide d’utilisation. La règle doit imposer exactement `README.md`, `TODO.md`, `USAGE.md` et `CHANGELOG.md`. + +### 4.4 Frontière de l’archive documentaire + +La première sélection fondée sur toutes les extensions Markdown et JSON était trop large. La sélection doit désormais reposer sur la fonction documentaire autonome du fichier. + +Sont notamment exclus les configurations de build et d’exécution Tauri/npm/TypeScript, les capabilities, les fixtures RPC et les fichiers internes sous `kb_store_core/src/` ou `kb_store_pg/src/`. + +Restent conservés les matrices documentaires, les IDL archivées, `config/example.config.json` et `config/schema.config.json`, conformément à [`decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md`](decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md). ## 5. Évaluation des documents racine @@ -153,7 +175,7 @@ Avant déplacement, il faudra : 3. adapter les chemins attendus par `scripts/audit_khadhroony_workspace_rules.py` ; 4. vérifier le lanceur `scripts/audit_rust_workspace_rules.py` ; 5. corriger README, prompts, documents d’onboarding et checklist de migration ; -6. exécuter l’audit et `git diff --check` avant livraison. +6. exécuter l’audit workspace et les validations adaptées aux fichiers modifiés avant livraison. Les commandes Git restent sous la responsabilité de l’opérateur et ne font pas partie des validations demandées à la session. ## 7. Analyse des prompts @@ -222,10 +244,10 @@ Les déplacements ne doivent commencer qu’après création de `docs/README.md` Les écarts suivants sont établis sans nouvel audit fonctionnel des protocoles : -1. absence de `olddocs/` dans la base bot3 fournie ; +1. absence volontaire de `olddocs/` dans la base bot3 fournie, à reconstruire depuis l’archive complète bot2 ; 2. absence de `docs/README.md` ; 3. contrat documentaire incomplet pour les 11 crates ; -4. contradiction `USAGES.md` contre `USAGE.md` ; +4. contradiction `USAGES.md` contre `USAGE.md`, résolue en faveur de `USAGE.md` ; 5. règles secondaires encore liées à la racine par le code d’audit et les prompts ; 6. changelog bot3 ne reprenant pas encore l’historique bot2 ; 7. roadmap général encore mélangé à la checklist de migration et aux prereleases ; @@ -237,7 +259,7 @@ Les écarts suivants sont établis sans nouvel audit fonctionnel des protocoles Aucune ambiguïté ne bloque la première livraison d’audit. -Les choix suivants doivent être validés avant les deltas de déplacement, mais peuvent être traités par propositions réversibles : +Les choix suivants restent à trancher avant les deltas de déplacement, mais ne bloquent pas l’archivage documentaire ni la correction des règles : - emplacement final de `OPERATION_NAMING_CONVENTION.md` entre `architecture/` et `rules/` ; - maintien temporaire ou archivage immédiat de `IDEA_REMINDERS.md` après ventilation dans les TODO ; @@ -249,3 +271,14 @@ Les choix suivants doivent être validés avant les deltas de déplacement, mais La base technique peut servir à la refonte documentaire, mais elle n’est pas encore démontrée comme officiellement alignée sur `0.4.6`. La prochaine étape contrôlée est l’application du plan décrit dans `docs/DOCUMENTATION_REFACTOR_PLAN.md`, par deltas séparés, avant la création de `docs/V0_4_6_ALIGNMENT_AUDIT.md` et avant toute modification des versions Cargo. + +## 12. Précisions acquises après le premier audit + +- L’absence initiale de `olddocs/` dans bot3 était volontaire ; l’archive bot2 fournie séparément évitait une duplication pendant la migration. +- Les documents actifs ne seront jamais déplacés ni générés automatiquement depuis `olddocs/archivekbot2/`. Chaque document bot3 sera créé après lecture et adaptation des sources pertinentes. +- Les matrices de contrats actives sont déjà centralisées sous `test-fixtures/contract-matrices/` et ne doivent pas être recopiées dans `docs/`. +- Le registre ElGamal est implémenté dans `kb-lib`; son intégration pipeline reste à vérifier précisément, son panneau desktop n’est qu’une présentation et son déploiement Devnet/Mainnet ne doit pas être supposé. +- La migration bot3 a commencé en cours de `0.4.7` après réalisation du décodeur Metaplex Token Metadata dans bot2 ; ce décodeur existe déjà dans bot3, tandis que le reste de la surface doit être évalué. +- La classification des IDL est un besoin actif immédiat à cause du renommage massif déjà effectué. Elle n’est pas reportée à `0.6.x`; seules les infrastructures Anchor supplémentaires relèvent de cette série. +- Chaque changelog de crate devra contenir au minimum une section `0.1.0` retraçant sa migration depuis bot2, sa consolidation dans bot3 et l’adoption des nouvelles normes Rust et Khadhroony. +- Les TODO pourront intégrer des idées de `docs/IDEA_REMINDERS.md` uniquement après confirmation, attribution, vérification et réordonnancement. diff --git a/docs/DOCUMENTATION_REFACTOR_PLAN.md b/docs/DOCUMENTATION_REFACTOR_PLAN.md index 3759b8c..6049211 100644 --- a/docs/DOCUMENTATION_REFACTOR_PLAN.md +++ b/docs/DOCUMENTATION_REFACTOR_PLAN.md @@ -1,5 +1,5 @@ - + # Plan de refonte documentaire @@ -13,7 +13,10 @@ Aucune version Cargo ne doit être modifiée avant la conclusion de `docs/V0_4_6 - livrer des deltas courts et thématiques ; - ne pas créer en masse des documents vides ; -- documenter une crate à partir de ses APIs et tests réels ; +- documenter une crate à partir de ses APIs publiques, binaires, tests et configurations réels ; +- ne jamais déplacer ni migrer automatiquement un document depuis `olddocs/archivekbot2/` ; +- créer des documents bot3 nouveaux après lecture, sélection, vérification et adaptation des sources historiques ; +- référencer les matrices canoniques de `test-fixtures/contract-matrices/` sans les dupliquer ; - ne pas inventer d’API ou de validation ; - archiver avant de retirer un document ayant une valeur historique ; - corriger toutes les références avant chaque déplacement ; @@ -113,6 +116,13 @@ docs/ olddocs/ ├── archivekbot2/ +│ ├── README.md +│ ├── CHANGELOG.md +│ ├── ROADMAP.md +│ ├── RULES.md +│ ├── docs/ +│ ├── prompts/ +│ └── /... └── archivekbot3/ ``` @@ -133,7 +143,6 @@ Validations : ```bash python3 scripts/audit_rust_workspace_rules.py -git diff --check ``` ### Delta 2 — archives et index documentaire @@ -141,25 +150,32 @@ git diff --check Travail : 1. créer `olddocs/archivekbot2/` ; -2. y copier intégralement `khadhroony-bot2/docs/` ; -3. créer `olddocs/archivekbot3/` ; -4. créer `docs/README.md` ; -5. créer l’arborescence utile sans fichiers factices ; -6. documenter la provenance, la non-normativité et l’intégrité logique de l’archive bot2. +2. y reconstruire le miroir documentaire de bot2 en conservant les chemins relatifs : documents racine, `docs/`, `prompts/` et documents des anciennes crates ; +3. inclure les fichiers présentant une fonction documentaire démontrée, conformément à la politique de sélection, sans copier le code, les artefacts de build ou les données privées ; +4. appliquer [`decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md`](decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md) pour distinguer matrices, schémas, exemples et IDL documentaires des fixtures et configurations d’exécution ; +4. créer `olddocs/archivekbot3/` ; +5. créer `docs/README.md` ; +6. créer l’arborescence utile sans fichiers factices ; +7. documenter la provenance, la non-normativité et l’intégrité logique de l’archive bot2. Aucun document bot3 actif ne doit encore être supprimé. -### Delta 3 — règles documentaires +### Delta 3 — règles documentaires (`v0.1.0-pre.065`) Travail : 1. corriger `RULES_GENERAL.md` pour imposer les quatre fichiers exacts par crate ; -2. supprimer les variantes obsolètes `001.README.md` et `USAGES.md` ; -3. définir la frontière entre README, TODO, USAGE, CHANGELOG général et changelogs de crates ; -4. préciser le rôle de `docs/`, `olddocs/archivekbot2/` et `olddocs/archivekbot3/` ; -5. définir les règles de prompts et d’archivage documentaire. +2. supprimer les variantes obsolètes `001.README.md` et `USAGES.md`, et retenir définitivement `USAGE.md` ; +3. créer `docs/rules/CRATE_DOCUMENTATION_RULES.md` ; +4. définir la frontière entre README, TODO, USAGE, CHANGELOG général et changelogs de crates ; +5. imposer que `USAGE.md` documente uniquement les APIs publiques réellement accessibles ; +6. imposer dans chaque changelog de crate une base `0.1.0` décrivant la migration bot2, la consolidation bot3 et les nouvelles normes ; +7. définir la reprise contrôlée des idées confirmées de `docs/IDEA_REMINDERS.md` dans les TODO ; +8. interdire toute duplication des matrices canoniques de `test-fixtures/contract-matrices/` ; +9. préciser les statuts Metaplex Token Metadata, ElGamal et IDL ; +10. fournir quatre modèles documentaires non génératifs. -Les règles restent temporairement à la racine dans ce delta. +Les règles secondaires restent temporairement à la racine dans ce delta. ### Delta 4 — déplacement des règles secondaires @@ -177,7 +193,6 @@ Validations obligatoires : ```bash python3 scripts/audit_rust_workspace_rules.py -git diff --check ``` ### Delta 5 — changelog général de transition @@ -199,7 +214,7 @@ Le changelog ne doit pas affirmer que bot3 est déjà officiellement `0.4.6`. Reconstruire `ROADMAP.md` selon les séries suivantes : - `0.4.6` : fermeture de l’alignement et écarts résiduels ; -- `0.4.7` : Metaplex Token Metadata et clôture `0.4.x` ; +- `0.4.7` : poursuite de Metaplex Token Metadata déjà partiellement migré, puis clôture `0.4.x` ; - `0.5.x` : configuration, scénarios autonomes, CLI, fixtures et wallet ; - `0.6.x` : infrastructure Anchor, reste SPL et Metaplex ; - `0.7.x` : Meteora ; @@ -323,9 +338,10 @@ Seulement après validation du delta 12 : ```bash python3 scripts/audit_rust_workspace_rules.py -git diff --check ``` +Les opérations Git et leurs contrôles sont réalisés séparément par l’opérateur et ne doivent pas être répétés dans les validations demandées à la session. + ### Code, scripts d’audit ou structure utilisée par le code ```bash @@ -349,16 +365,16 @@ cargo tauri dev -c kb-app-demo-desktop/tauri.conf.json ## 7. Risques contrôlés -| Risque | Mesure | -|----------------------------------------------------|--------------------------------------------------------------| -| perte d’historique bot2 | copie intégrale dans `olddocs/archivekbot2/` avant reprise | -| règles introuvables après déplacement | correction préalable des scripts et références, delta dédié | -| documentation d’API inventée | lecture des exports et tests avant rédaction | -| changelog général trop détaillé | déléguer le détail fonctionnel aux changelogs de crates | -| roadmap redevenant une checklist | interdire prereleases et correctifs dans le roadmap général | -| confusion entre migration et version fonctionnelle | section de transition explicite et audit d’alignement séparé | -| fausse validation ElGamal | conserver le statut non validé Devnet | -| modification massive difficile à relire | un thème documentaire par delta | +| Risque | Mesure | +|----------------------------------------------------|-----------------------------------------------------------------------------| +| perte d’historique bot2 | miroir documentaire hiérarchique dans `olddocs/archivekbot2/` avant reprise | +| règles introuvables après déplacement | correction préalable des scripts et références, delta dédié | +| documentation d’API inventée | lecture des exports et tests avant rédaction | +| changelog général trop détaillé | déléguer le détail fonctionnel aux changelogs de crates | +| roadmap redevenant une checklist | interdire prereleases et correctifs dans le roadmap général | +| confusion entre migration et version fonctionnelle | section de transition explicite et audit d’alignement séparé | +| fausse validation ElGamal | conserver le statut non validé Devnet | +| modification massive difficile à relire | un thème documentaire par delta | ## 8. Première décision attendue diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..c9cd6ba --- /dev/null +++ b/docs/README.md @@ -0,0 +1,112 @@ + + + +# Documentation de `khadhroony-bot3` + +## 1. Rôle + +Ce répertoire contient la documentation active, normative ou encore utilisée de `khadhroony-bot3`. + +La documentation historique de `khadhroony-bot2` et les documents bot3 remplacés sont conservés séparément sous `olddocs/`. Un document archivé peut servir de source historique, mais il n’est pas normatif pour l’architecture bot3 actuelle. + +## 2. Documents de pilotage actifs + +| Document | Rôle | +|----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------| +| [`DOCUMENTATION_REFACTOR_AUDIT.md`](DOCUMENTATION_REFACTOR_AUDIT.md) | inventaire et écarts documentaires de la base `v0.1.0-pre.062` | +| [`DOCUMENTATION_REFACTOR_PLAN.md`](DOCUMENTATION_REFACTOR_PLAN.md) | séquence contrôlée de reconstruction documentaire et d’alignement `0.4.6` | +| [`decisions/WINCODE_COMPATIBILITY_POLICY.md`](decisions/WINCODE_COMPATIBILITY_POLICY.md) | justification durable de la contrainte `wincode 0.5.x` et du contrôle du lockfile | +| [`decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md`](decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md) | critères normatifs de conservation et d’exclusion dans les archives documentaires | + +## 3. Documents existants à reclasser + +Les documents suivants restent temporairement à leur chemin actuel jusqu’au delta de réorganisation : + +- `DEVNET_EXECUTION_GUIDE.md` ; +- `PRE_062_DEVNET_VALIDATION_REPORT.md` ; +- `OPERATION_NAMING_CONVENTION.md` ; +- `IDL_AUDIT.md` ; +- `IDL_TO_KB_LIB_NOMENCLATURE.md` ; +- `MISSING_PROGRAM_IDLS.md` ; +- `IDEA_REMINDERS.md`. + +Leur présence à la racine de `docs/` est transitoire. Ils ne doivent pas être déplacés avant correction de leurs références. + +## 4. Arborescence cible + +```text +docs/ +├── README.md +├── architecture/ +├── audits/ +├── decisions/ +├── generated/ +├── guides/ +├── migrations/ +├── protocols/ +├── rules/ +└── validation/ +``` + +Les répertoires sont créés lorsqu’un document réel doit y être classé. Aucun fichier factice n’est requis. + +## 5. Archives historiques + +### 5.1 Archive bot2 + +```text +olddocs/archivekbot2/ +``` + +Cette archive reproduit les chemins relatifs des fichiers sélectionnés selon leur fonction documentaire dans l’archive complète bot2 fournie pour la session. La sélection ne dépend pas de l’extension et suit [`decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md`](decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md). Elle comprend notamment : + +- les documents racine historiques ; +- `docs/` ; +- `prompts/` ; +- les README, changelogs et autres documents des anciennes crates ; +- les matrices, schémas, exemples de configuration et IDL ayant une valeur documentaire démontrée. + +Les fichiers sont conservés sans adaptation de fond. Les liens relatifs peuvent viser l’ancienne arborescence bot2 et ne garantissent pas une navigation fonctionnelle depuis bot3. + +### 5.2 Archive bot3 + +```text +olddocs/archivekbot3/ +``` + +Cette archive recevra progressivement les audits, plans, prompts et documents bot3 remplacés qui conservent une valeur historique, décisionnelle ou de traçabilité. + +## 6. Contrat documentaire des crates + +Chaque crate doit finalement posséder exactement : + +```text +README.md +TODO.md +USAGE.md +CHANGELOG.md +``` + +`USAGE.md` est la convention retenue. La variante `USAGES.md` est obsolète. + +Le contenu attendu de chaque fichier est défini par [`rules/CRATE_DOCUMENTATION_RULES.md`](rules/CRATE_DOCUMENTATION_RULES.md). Les modèles de `docs/templates/` servent uniquement d’aide à la rédaction. + +## 7. Règles de consultation + +Ordre recommandé : + +1. `RULES.md` à la racine du workspace ; +2. les règles secondaires à leur emplacement normatif courant ; +3. le présent index ; +4. les documents d’architecture ou de validation liés à la tâche ; +5. `olddocs/` uniquement pour l’historique ou la reprise contrôlée d’informations. + +## Règles et modèles documentaires + +- [`rules/CRATE_DOCUMENTATION_RULES.md`](rules/CRATE_DOCUMENTATION_RULES.md) : contrat normatif des quatre documents de chaque crate ; +- [`templates/CRATE_README_TEMPLATE.md`](templates/CRATE_README_TEMPLATE.md) ; +- [`templates/CRATE_TODO_TEMPLATE.md`](templates/CRATE_TODO_TEMPLATE.md) ; +- [`templates/CRATE_USAGE_TEMPLATE.md`](templates/CRATE_USAGE_TEMPLATE.md) ; +- [`templates/CRATE_CHANGELOG_TEMPLATE.md`](templates/CRATE_CHANGELOG_TEMPLATE.md). + +Les modèles ne doivent jamais être remplis mécaniquement : la rédaction exige la lecture du code, des exports publics, des tests et des sources historiques pertinentes. diff --git a/docs/decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md b/docs/decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md new file mode 100644 index 0000000..9fb64f3 --- /dev/null +++ b/docs/decisions/DOCUMENT_ARCHIVE_SELECTION_POLICY.md @@ -0,0 +1,70 @@ + + + +# Politique de sélection des archives documentaires + +## 1. Objet + +Cette politique définit les fichiers historiques qui peuvent être copiés depuis l’archive complète de `khadhroony-bot2` vers `olddocs/archivekbot2/`. + +La sélection repose sur la fonction documentaire du fichier, et non sur son extension ni uniquement sur son emplacement. + +## 2. Principe général + +`olddocs/archivekbot2/` est une archive documentaire historique et non une copie partielle du workspace exécutable. + +L’archive complète de bot2 reste la référence pour le code source, les fixtures, les configurations d’exécution et les artefacts nécessaires à la compilation ou aux tests. + +## 3. Fichiers à conserver + +Les catégories suivantes peuvent être conservées lorsqu’elles présentent une valeur historique, normative, architecturale ou décisionnelle : + +- documents Markdown racine, sous `docs/`, sous `prompts/` et dans les anciennes crates ; +- changelogs, roadmaps, règles, audits, plans, rapports, guides et décisions ; +- matrices JSON décrivant une couverture, un contrat, une validation ou un inventaire ; +- IDL archivées servant de références pour la conception manuelle des futurs décodeurs, exécuteurs, matérialisateurs, matrices et tests ; +- schémas publics décrivant formellement un contrat de configuration ; +- exemples de configuration destinés aux utilisateurs ou aux opérateurs ; +- autres fichiers non exécutables dont la valeur documentaire est explicitement démontrée. + +## 4. Fichiers à exclure + +Les catégories suivantes ne doivent pas être copiées dans l’archive documentaire : + +- code source et fichiers internes placés sous `src/`, même lorsqu’ils utilisent une extension documentaire, sauf décision explicite motivée ; +- fixtures de tests, snapshots et réponses RPC enregistrées ; +- manifests et configurations nécessaires au build ou au lancement de l’ancienne application ; +- fichiers Tauri, npm, TypeScript et capabilities servant à l’exécution ; +- bases de données, clés, preuves, données privées et fichiers temporaires ; +- artefacts générés ou reconstructibles sans valeur documentaire autonome. + +## 5. Cas explicitement conservés + +Les fichiers suivants sont conservés car leur fonction est documentaire : + +```text +config/example.config.json +config/schema.config.json +docs/*_MATRIX.json +idls/*.json +``` + +`example.config.json` illustre la configuration utilisateur historique complète. `schema.config.json` formalise le contrat de cette configuration. Les matrices documentent les périmètres techniques et les validations. Les IDL sont des références archivées et ne sont pas chargées dynamiquement par le code de production. + +## 6. Cas explicitement exclus + +Les fichiers suivants sont exclus car ils relèvent de l’exécution ou des tests : + +```text +kb_app_demo/capabilities/default.json +kb_app_demo/package.json +kb_app_demo/tauri.conf.json +kb_app_demo/tsconfig.json +kb_rpc/tests/fixtures/*.json +kb_store_core/src/** +kb_store_pg/src/** +``` + +## 7. Évolution de l’archive + +Tout ajout futur à `olddocs/archivekbot2/` doit être évalué avec cette politique. En cas d’ambiguïté, le fichier n’est pas copié tant que sa valeur documentaire autonome n’est pas démontrée. diff --git a/docs/decisions/WINCODE_COMPATIBILITY_POLICY.md b/docs/decisions/WINCODE_COMPATIBILITY_POLICY.md new file mode 100644 index 0000000..a4a36c1 --- /dev/null +++ b/docs/decisions/WINCODE_COMPATIBILITY_POLICY.md @@ -0,0 +1,62 @@ + + + +# Politique de compatibilité `wincode` + +## 1. Objet + +Ce document explique pourquoi le workspace `khadhroony-bot3` contraint actuellement `wincode` à la famille `0.5.x` et pourquoi le contrôle du `Cargo.lock` local existe. + +Cette contrainte est un garde-fou de compatibilité de dépendances. Elle ne constitue pas un écart fonctionnel à réexaminer dans chaque prompt ou chaque livraison documentaire. + +## 2. Incident à l’origine de la règle + +Pendant la migration vers bot3, l’apparition de `wincode 0.6.0` dans la résolution de dépendances a créé une incompatibilité avec des crates Solana ou interfaces encore fondées sur les traits de `wincode 0.5.x`. + +Les familles `wincode 0.5` et `wincode 0.6` ne sont pas interchangeables au niveau de leurs traits et types. Une résolution transitive non maîtrisée peut donc produire des erreurs de compilation même lorsque les noms des APIs paraissent identiques. + +## 3. Décision actuelle + +Tant que les interfaces Solana consommées par le workspace utilisent la famille `0.5.x` : + +```text +wincode = "^0.5" +``` + +La résolution locale attendue est : + +```text +wincode 0.5.5 +solana-wincode-varint 1.0.0 +``` + +Le script `scripts/audit_khadhroony_workspace_rules.py` vérifie : + +1. la contrainte `^0.5` dans le catalogue de dépendances workspace ; +2. la présence du `Cargo.lock` local ; +3. l’absence d’une seconde famille `wincode` incompatible ; +4. les versions résolues attendues. + +## 4. Rôle du `Cargo.lock` + +Le `Cargo.lock` est nécessaire à ce contrôle parce que `Cargo.toml` décrit une plage de versions, tandis que le lockfile démontre la résolution réellement utilisée par le workspace. + +Les archives de livraison peuvent ne pas contenir ce fichier selon leur convention d’empaquetage. Dans ce cas : + +- l’absence du lockfile dans l’archive n’est pas un défaut fonctionnel du projet ; +- le contrôle complet doit être exécuté dans le workspace local réel avec son `Cargo.lock` ; +- la livraison ne doit pas répéter cette limite comme un nouvel écart documentaire à chaque session ; +- le lockfile peut être fourni ponctuellement à la session lorsqu’une exécution de l’audit est nécessaire. + +## 5. Évolution future + +Le passage à `wincode 0.6+` ne doit pas être effectué par simple mise à jour de version. Il exige : + +- l’inventaire des crates directes et transitives utilisant `wincode` ; +- la vérification des versions d’interfaces Solana compatibles ; +- l’absence de familles de traits concurrentes ; +- la compilation de l’ensemble du workspace ; +- les tests des décodeurs et parseurs concernés ; +- la mise à jour de la règle et du script d’audit dans le même changement. + +Jusqu’à cette migration explicitement validée, `wincode 0.5.5` reste la résolution normative du workspace. diff --git a/docs/rules/CRATE_DOCUMENTATION_RULES.md b/docs/rules/CRATE_DOCUMENTATION_RULES.md new file mode 100644 index 0000000..2a7e4f9 --- /dev/null +++ b/docs/rules/CRATE_DOCUMENTATION_RULES.md @@ -0,0 +1,299 @@ + + + +# Règles documentaires des crates + +## 1. Objet + +Ce document définit le contrat documentaire normatif applicable à chaque crate membre du workspace `khadhroony-bot3`. + +Chaque crate doit posséder exactement les quatre fichiers suivants à sa racine : + +```text +README.md +TODO.md +USAGE.md +CHANGELOG.md +``` + +Les variantes `001.README.md`, `USAGES.md` ou tout autre nom concurrent sont interdites dans la documentation active. + +Ces fichiers doivent être écrits pour l’architecture actuelle de `khadhroony-bot3`. Les documents de `olddocs/archivekbot2/` sont des sources historiques : leur contenu peut être étudié, vérifié, réinterprété et adapté, mais ne doit jamais être déplacé, copié automatiquement ou rendu normatif sans réécriture explicite. + +## 2. Principes communs + +Pour chaque document de crate : + +- décrire uniquement des éléments vérifiés dans le code, les exports publics, les tests, les configurations actives ou les décisions acquises ; +- ne pas inventer d’API, de fonctionnalité, de validation ou de compatibilité ; +- distinguer clairement l’existant, le partiellement implémenté, le reporté et le hors périmètre ; +- employer les noms actuels des crates, modules publics, binaires et types ; +- ajouter des liens relatifs valides vers les autres documents de la crate et vers la documentation transversale pertinente ; +- ne pas recopier une matrice, une fixture ou un rapport déjà maintenu à son emplacement canonique ; +- préférer un lien vers `test-fixtures/contract-matrices/`, les tests ou un document transversal plutôt qu’une duplication ; +- conserver les détails historiques dans les changelogs et archives, non dans le README ou le guide d’utilisation ; +- mettre à jour le numéro de version documentaire placé dans l’en-tête du fichier lorsqu’un changement substantiel est effectué. + +Les sections obligatoires ne doivent pas être laissées vides. Lorsqu’aucun élément n’est recensé, l’indiquer explicitement. + +## 3. `README.md` + +### 3.1 Rôle + +Le README présente la crate à un lecteur qui doit comprendre rapidement sa place dans le workspace. + +### 3.2 Contenu obligatoire + +Le README contient au minimum : + +1. objectif ; +2. périmètre fonctionnel ; +3. responsabilités ; +4. éléments explicitement hors périmètre ; +5. principales fonctionnalités déjà disponibles ; +6. principales façades ou catégories d’API publiques, sans catalogue exhaustif ; +7. relations avec les autres crates ; +8. binaires fournis, le cas échéant ; +9. statut de maturité et limites importantes ; +10. liens vers `USAGE.md`, `TODO.md`, `CHANGELOG.md` et les documents d’architecture pertinents. + +### 3.3 Interdictions + +Le README ne doit pas : + +- servir de journal chronologique ; +- contenir une liste détaillée de toutes les prereleases ou corrections `fix` ; +- annoncer comme disponible une fonctionnalité seulement prévue ; +- recopier intégralement les APIs publiques ; +- recopier les matrices de contrats présentes dans `test-fixtures/contract-matrices/` ; +- reprendre sans adaptation un README de bot2. + +## 4. `USAGE.md` + +### 4.1 Rôle + +`USAGE.md` documente l’utilisation réelle de la crate depuis l’extérieur de celle-ci. + +### 4.2 Frontière des APIs documentées + +Le guide documente uniquement les APIs publiques exposées aux consommateurs de la crate : + +- éléments `pub` effectivement accessibles depuis la racine publique ou un chemin public stable ; +- traits publics destinés à être implémentés ou appelés par d’autres crates ; +- fonctions, constructeurs, méthodes, types, constantes et façades publiques significatives ; +- commandes, événements, DTO ou contrats IPC publics d’une application ou d’une crate mixte ; +- arguments et comportement des binaires publics. + +Il ne documente pas comme APIs d’utilisation : + +- les éléments `pub(crate)` ; +- les sous-modules internes non réexportés ; +- les helpers de test ; +- les détails privés d’implémentation ; +- une dépendance simplement utilisée en interne ; +- une API historique bot2 qui n’existe plus dans bot3. + +Une réexportation publique doit être vérifiée jusqu’à son chemin d’accès consommateur. La seule présence du mot-clé `pub` dans un fichier interne ne suffit pas. + +### 4.3 Contenu obligatoire + +`USAGE.md` contient au minimum : + +1. objectif du guide ; +2. prérequis ; +3. dépendance Cargo et features utiles, lorsqu’applicable ; +4. configuration nécessaire ; +5. vue d’ensemble de la surface publique ; +6. description des APIs publiques significatives ; +7. types publics importants et invariants ; +8. erreurs publiques et conditions d’échec ; +9. exemples réalistes, préférablement compilables ; +10. utilisation des binaires ou commandes, lorsqu’applicable ; +11. limites connues ; +12. liens vers les tests, exemples, fixtures et matrices canoniques. + +Chaque API publique significative doit disposer d’au moins un exemple ou être couverte par un exemple de scénario explicitement identifié. Les APIs triviales ou regroupées peuvent partager un exemple lorsqu’il démontre réellement leur usage. + +### 4.4 Crates sans API bibliothèque publique + +Une crate principalement binaire ou interne conserve un `USAGE.md`. Le document décrit alors ses commandes, entrées, sorties, configuration, contrats d’intégration et limites, sans inventer une API Rust publique. + +## 5. `TODO.md` + +### 5.1 Rôle + +Le TODO maintient l’état futur propre à la crate. Il ne sert ni de roadmap général ni de changelog. + +### 5.2 Sections obligatoires + +Le fichier distingue au minimum : + +- fonctionnalités manquantes ; +- dette technique ; +- tests manquants ; +- validations Devnet/Mainnet manquantes ; +- documentation manquante ; +- dépendances ou contraintes externes ; +- éléments confirmés mais reportés ; +- hors périmètre. + +Chaque entrée doit préciser, lorsque connu : + +- son statut ; +- sa priorité ou son ordre relatif ; +- sa dépendance ; +- son critère de clôture ; +- la version ou série cible si elle est déjà décidée. + +### 5.3 Relation avec `docs/IDEA_REMINDERS.md` + +Les idées de `docs/IDEA_REMINDERS.md` ne sont pas copiées automatiquement dans les TODO de crates. + +Une idée peut être intégrée au TODO d’une crate uniquement après : + +1. confirmation qu’elle est toujours souhaitée ; +2. identification de la crate réellement responsable ; +3. vérification qu’elle n’est pas déjà implémentée ou remplacée ; +4. reformulation en tâche vérifiable ; +5. classement dans la bonne section et selon un ordre cohérent ; +6. ajout des dépendances et limites connues. + +Une idée encore exploratoire reste dans `docs/IDEA_REMINDERS.md` ou dans un document de décision ; elle ne doit pas être présentée comme engagement de crate. + +### 5.4 Interdictions + +Le TODO ne doit pas : + +- répéter les travaux déjà terminés ; +- contenir l’historique des corrections ; +- recopier le ROADMAP général ; +- transformer une hypothèse en obligation ; +- masquer une fonctionnalité partiellement implémentée sous un statut binaire terminé/non terminé. + +## 6. `CHANGELOG.md` + +### 6.1 Rôle + +Le changelog de crate retrace l’évolution fonctionnelle, structurelle et contractuelle de cette crate. + +### 6.2 Base historique minimale + +Chaque changelog de crate doit contenir au minimum : + +- une section `Non publié` ; +- une section `0.1.0` décrivant la migration depuis les composants correspondants de `khadhroony-bot2` ; +- les consolidations, renommages ou suppressions de frontières de crates intervenues dans bot3 ; +- l’adoption des nouvelles règles Rust et Khadhroony applicables ; +- les validations réellement exécutées et les limitations encore connues. + +La section `0.1.0` peut regrouper les prereleases de migration lorsque leur détail exhaustif n’apporte pas de valeur. Les prereleases ou correctifs importants peuvent être conservés lorsqu’ils expliquent une rupture, une correction notable ou une validation structurante. + +### 6.3 Catégories + +Utiliser uniquement les catégories pertinentes parmi : + +- Ajouté ; +- Modifié ; +- Corrigé ; +- Supprimé ; +- Migré ; +- Compatibilité ; +- Validation ; +- Limitations connues ; +- Documentation. + +Ne pas créer des sections vides. + +### 6.4 Versions et corrections + +Le changelog distingue clairement : + +- version publiée ; +- prerelease ; +- correctif `fix` ; +- changement non publié. + +Une modification fonctionnelle de la crate impose une mise à jour de son changelog. Une modification documentaire pure peut être regroupée sous `Non publié / Documentation`. + +### 6.5 Provenance bot2 + +La reprise historique depuis bot2 doit être synthétique et traçable. Elle s’appuie sur les changelogs, README, rapports et code historiques, mais est réécrite pour refléter la responsabilité actuelle de la crate bot3. + +Il est interdit de copier un changelog d’ancienne crate sans analyser : + +- la destination de ses responsabilités dans bot3 ; +- les APIs supprimées ou consolidées ; +- les changements de noms ; +- les nouvelles contraintes ; +- les validations réellement conservées. + +## 7. Matrices, fixtures, IDL et rapports + +### 7.1 Matrices de contrats + +Les matrices actives maintenues sous : + +```text +test-fixtures/contract-matrices/ +``` + +restent les références canoniques. Elles ne doivent pas être dupliquées dans `docs/`. + +Les documents de crate et de protocole doivent les référencer par lien et expliquer leur rôle, leur portée et leur statut de validation. + +### 7.2 IDL + +Les IDL archivées ou maintenues dans le workspace servent de références de conception et d’audit. Elles ne sont pas chargées dynamiquement par le code de production. + +L’inventaire et la classification des IDL sont des travaux documentaires actifs dès maintenant, notamment parce que bot3 a déjà subi un renommage massif des IDL. Ils ne sont pas reportés à l’implémentation future du décodeur Anchor. + +Pour chaque IDL ajoutée, documenter lorsque possible : + +- protocole et programme ; +- Program ID ; +- source ; +- version, tag ou commit ; +- nom de fichier normalisé ; +- surface actuelle ou future qui l’utilise ; +- statut de vérification. + +### 7.3 Rapports historiques + +Les rapports bot2 sont des preuves historiques. Les documents bot3 doivent synthétiser leurs conclusions utiles et les confronter à l’architecture actuelle, sans les déplacer depuis `olddocs/archivekbot2/` ni les recopier intégralement. + +## 8. Statuts particuliers connus + +### 8.1 Registre ElGamal + +La documentation doit distinguer les niveaux suivants : + +- implémentation du registre dans `kb-lib` ; +- éventuelle intégration dans `kb-pipeline` et `kb-pipeline-demo-scenarios`, à vérifier précisément ; +- présentation non fonctionnelle dans `kb-app-demo-desktop` ; +- absence de validation réelle Devnet ; +- déploiement Devnet/Mainnet non tenu pour acquis et à vérifier avant toute affirmation. + +Le registre ElGamal reste mis de côté tant que son déploiement, ses prérequis de preuve et son intégration applicative ne sont pas établis. + +### 8.2 Metaplex Token Metadata + +La migration bot2 vers bot3 a commencé en cours de développement de `0.4.7`. + +Le décodeur Metaplex Token Metadata déjà réalisé dans bot2 a été migré dans bot3. La documentation ne doit donc ni reporter le décodeur comme entièrement futur, ni considérer toute la surface `0.4.7` comme achevée. Les exécuteurs, matérialisateurs, préflights, validations et autres éléments doivent être décrits selon leur état réel. + +## 9. Processus de création des documents de crate + +Pour chaque crate : + +1. lire son `Cargo.toml`, ses features et ses cibles ; +2. inventorier les exports accessibles depuis la racine publique ; +3. identifier les binaires et commandes ; +4. lire les tests et exemples ; +5. rechercher les anciennes responsabilités bot2 correspondantes ; +6. confronter les idées confirmées et le ROADMAP ; +7. rédiger les quatre documents ; +8. vérifier les liens et exemples ; +9. exécuter les audits documentaires prescrits ; +10. exécuter les tests de la crate uniquement si le travail révèle ou corrige une incohérence de code. + +La création des documents ne doit jamais être une génération mécanique fondée seulement sur les noms de fichiers ou les anciens documents. diff --git a/docs/templates/CRATE_CHANGELOG_TEMPLATE.md b/docs/templates/CRATE_CHANGELOG_TEMPLATE.md new file mode 100644 index 0000000..73002f9 --- /dev/null +++ b/docs/templates/CRATE_CHANGELOG_TEMPLATE.md @@ -0,0 +1,30 @@ + + + +# Modèle de changelog de crate + +# Changelog de `` + +## Non publié + +### Documentation + +- Création ou mise à jour de la documentation de crate. + +## 0.1.0 + +### Migré + +- Migration depuis les composants correspondants de `khadhroony-bot2` vers l’architecture consolidée de `khadhroony-bot3`. + +### Modifié + +- Adoption des règles Rust et Khadhroony applicables à bot3. + +### Validation + +- Indiquer uniquement les validations réellement exécutées et pertinentes pour cette crate. + +### Limitations connues + +- Indiquer les fonctionnalités partielles, non raccordées ou non validées. diff --git a/docs/templates/CRATE_README_TEMPLATE.md b/docs/templates/CRATE_README_TEMPLATE.md new file mode 100644 index 0000000..7632728 --- /dev/null +++ b/docs/templates/CRATE_README_TEMPLATE.md @@ -0,0 +1,36 @@ + + + +# Modèle de README de crate + +> Ce modèle est une aide de rédaction. Supprimer les instructions et sections non applicables après analyse réelle de la crate. + +# `` + +## Objectif + +## Périmètre + +## Responsabilités + +## Hors périmètre + +## Fonctionnalités disponibles + +## Surface publique principale + +Présenter les catégories d’API ou façades sans recopier `USAGE.md`. + +## Binaire(s) + +Supprimer cette section si la crate ne fournit aucun binaire. + +## Relations avec le workspace + +## Statut et limites + +## Documentation + +- [Guide d’utilisation](USAGE.md) +- [Travaux restant à réaliser](TODO.md) +- [Historique des changements](CHANGELOG.md) diff --git a/docs/templates/CRATE_TODO_TEMPLATE.md b/docs/templates/CRATE_TODO_TEMPLATE.md new file mode 100644 index 0000000..3c6f05b --- /dev/null +++ b/docs/templates/CRATE_TODO_TEMPLATE.md @@ -0,0 +1,24 @@ + + + +# Modèle de TODO de crate + +# Travaux restant pour `` + +## Fonctionnalités manquantes + +## Dette technique + +## Tests manquants + +## Validations Devnet/Mainnet manquantes + +## Documentation manquante + +## Dépendances ou contraintes externes + +## Éléments confirmés mais reportés + +## Hors périmètre + +> Ne reprendre une idée de `docs/IDEA_REMINDERS.md` qu’après confirmation, attribution à cette crate et reformulation en tâche vérifiable. diff --git a/docs/templates/CRATE_USAGE_TEMPLATE.md b/docs/templates/CRATE_USAGE_TEMPLATE.md new file mode 100644 index 0000000..2066a2a --- /dev/null +++ b/docs/templates/CRATE_USAGE_TEMPLATE.md @@ -0,0 +1,46 @@ + + + +# Modèle de guide d’utilisation de crate + +> Documenter uniquement la surface publique réellement accessible aux consommateurs. + +# Utilisation de `` + +## Objectif + +## Prérequis + +## Dépendance et features + +## Configuration + +## Vue d’ensemble de l’API publique + +## APIs publiques significatives + +Pour chaque API ou groupe cohérent : + +- chemin public ; +- rôle ; +- paramètres ou types associés ; +- valeur retournée ; +- erreurs ; +- invariants ; +- exemple. + +## Types publics importants + +## Erreurs et invariants + +## Exemples + +## Utilisation du binaire + +Supprimer cette section si aucun binaire public n’existe. + +## Limites connues + +## Références + +Lier les tests, exemples, fixtures et matrices canoniques sans les dupliquer. diff --git a/olddocs/archivekbot2/CHANGELOG.md b/olddocs/archivekbot2/CHANGELOG.md new file mode 100644 index 0000000..b08dcc6 --- /dev/null +++ b/olddocs/archivekbot2/CHANGELOG.md @@ -0,0 +1,208 @@ + + + +# Changelog + +Ce fichier est réservé aux versions validées. Les changements non validés restent décrits dans `ROADMAP.md` ou `RULES.md`. + +## 0.0.1 — projet vide + +Initialisation du dépôt comme point de départ vide. Cette version sert uniquement de repère historique avant la création du squelette modulaire. + +## 0.0.2 — squelette stabilisé + +Validation du squelette initial de `khadhroony-bot2` : workspace Rust modulaire, règles de développement, nomenclature des surfaces, registres de programmes, configuration multi-profils, couche d'exécution réservée, décodeurs/exécuteurs/matérialisateurs réservés, documentation de cadrage, prompts de session et application Tauri de démonstration en squelette. Cette version devient la base propre avant le développement `0.1.x` consacré à `kb_logging` et `kb_config`. + +## 0.1.0 — `kb_logging` réel + +Validation du jalon `kb_logging` : API publique minimale, initialisation `tracing_subscriber`, routes console, fichier humain, fichier JSON et fichier erreurs, filtrage par target et niveau, nettoyage ANSI des fichiers pour les messages issus de WebView Tauri, support des globs `crate.*` et `crate::*`, et couverture unitaire renforcée. Validation locale effectuée : `cargo test -p kb_logging` avec 14 tests passés et `cargo clippy -p kb_logging --all-targets` sans erreur. `cargo fmt` n'est pas retenu comme validation obligatoire du jalon, car la configuration `rustfmt.toml` contient des options nightly non applicables sur stable et le formatage courant est géré depuis Eclipse. + +## 0.1.1 — `kb_config` typé et validé + +Validation du jalon `kb_config` : configuration JSON multi-profils avec un seul profil actif, schéma `config/schema.config.json` validé via `jsonschema`, désérialisation typée, validation métier des profils, endpoints HTTP JSON-RPC et WebSocket Solana standard, listeners standards, sorties de logging configurables, stores PostgreSQL/SQLite, wallet, exécution et sections de démonstration. Les placeholders de clés restent directement dans les URLs et les champs runtime hors périmètre avant `v1.x` sont refusés par le schéma. Les exports TS-rs suivent la convention `../frontend/ts/bindings/kb_config/settings/.ts`. Validation locale effectuée : `cargo test --tests -p kb_config` avec 35 tests passés, dont les tests générateurs TS-rs `export_bindings_*`, et `cargo clippy` annoncé sans erreur pour le jalon. + +## 0.1.2 — liaison `kb_logging`, `kb_config` et démo Tauri + +Validation du jalon d’intégration Tauri : `kb_app_demo` charge le profil actif via `kb_config`, initialise `kb_logging` depuis cette configuration, conserve un `AppState` global, garde `demo_config` comme fenêtre de démonstration isolée et réémet les logs frontend vers `tracing` avec des targets statiques. La fenêtre principale rend le README workspace en HTML via `markdown-it`, expose un dropdown de démos, et la fenêtre configuration affiche le profil actif, la configuration complète et le schéma JSON avec un viewer JSON interactif. Le verrou mono-instance est appliqué uniquement dans `kb_app_demo/src/main.rs` afin de préserver l’entrée mobile par `kb_app_demo_lib::run()`. Le provider Rustls par défaut est initialisé dans la librairie pour desktop et mobile. Le splashscreen est aligné sur le modèle de `khadhroony-bobobot/kb_demo_app`, avec fade-in/fade-out, durée minimale extensible et attente initiale avant fade-in pour éviter l’apparition instantanée. `kb_core` expose maintenant l’erreur et le résultat communs sous `kb_core::Error` et `kb_core::Result`. Validation locale effectuée : `cargo test -p kb_core` avec 2 tests passés, `cargo test -p kb_config` avec 35 tests passés, `cargo test -p kb_logging` avec 14 tests passés, `cargo test -p kb_app_demo` avec 12 tests passés, `cargo clippy --all-targets` sans erreur et validation visuelle via `cargo tauri dev -c kb_app_demo/tauri.conf.json`. + +## 0.1.3 — clients HTTP/WS Solana standard, rôles et pools + +Validation du jalon RPC initial : `kb_rpc` expose les contrats JSON-RPC 2.0 partagés, le routage par rôle et `request_kind`, les clients HTTP JSON-RPC et WebSocket Solana standard, ainsi que les pools HTTP/WS par rôle. `kb_app_demo` ajoute les fenêtres dédiées `demo_http` et `demo_ws`, les listes contrôlées de rôles et méthodes, le refresh explicite des pools, le profil `mainnet` Helius, la connexion WebSocket persistante conservée dans `AppState`, les subscriptions multiples sur une même socket, l’unsubscribe individuel, la déconnexion globale à l’arrêt de l’application et le throttling des notifications WebSocket vers la WebView pour éviter les freezes sur les programmes très bavards. Les transports gRPC, Helius enhanced WebSocket, Helius gRPC et LaserStream restent hors périmètre avant les versions ultérieures. Validation locale effectuée : `cargo test -p kb_rpc` avec 39 tests passés, `cargo test -p kb_app_demo` avec 28 tests passés, `cargo clippy --all-targets` sans erreur, et validation visuelle des démos HTTP/WS via `cargo tauri dev -c kb_app_demo/tauri.conf.json`. + +## 0.2.0 — conventions PostgreSQL et contrats DB + +Validation du jalon de cadrage stockage : conventions PostgreSQL définies autour du schéma courant/default du profil, généralement `public`, sans espaces applicatifs séparés, et convention de tables Solana `kb_sol__` avec les domaines `raw`, `core`, `obs`, `decode`, `mat`, `catalog`, `agg`, `ops` et `wallet` intégrés au nom de table. Les règles SQL de base sont documentées pour `id`, `created_at`, `updated_at`, `slot`, `signature`, `program_id`, `raw_json` et `payload_json`, avec index minimaux et contraintes strictes mais réversibles. Les responsabilités de `kb_store_core` et `kb_store_pg` sont clarifiées, avec séparation `entities/`, `dtos/`, `queries/` et `repositories/`, et interdiction de placer des structures métier ou DB dans les requêtes. Les migrations historiques de brouillon sont neutralisées afin de ne pas créer d'espace PostgreSQL applicatif ni de table qualifiée par espace logique. Validation locale effectuée : `cargo test -p kb_config` avec 35 tests passés, `cargo test -p kb_app_demo` avec 28 tests passés et `cargo clippy --all-targets` sans erreur. `kb_store_core` et `kb_store_pg` ne disposent pas encore de tests à ce stade documentaire. + +## 0.2.1 — contrats `kb_store_core` et replay instruction-level + +Validation du jalon de contrats storage : `kb_store_core` expose les types communs backend-agnostiques pour pagination, healthcheck, migrations, erreurs de stockage, DTOs applicatifs, entities proches SQL et traits repositories sans implémentation PostgreSQL. Les contrats couvrent le raw RPC et WebSocket, le cycle de vie raw `Full` / `Compacted` / `Archived` / `Purged`, les états de traitement raw, la signature optionnelle des notifications WebSocket, la déduplication par `notification_key`, le lien futur optionnel notification vers transaction canonique, ainsi que le replay par instruction. Le replay est défini comme un scheduling au niveau instruction, mais le décodage reçoit un contexte extrait complet via `CoreInstructionReplayInput` : instruction ciblée, account keys, logs, balance changes et contexte transactionnel minimal. Les repositories restent abstraits et ne créent encore ni pool PostgreSQL, ni migration SQL réelle. Validation locale effectuée : `cargo test -p kb_store_core` avec 28 tests passés et `cargo clippy --all-targets` sans avertissement. Les validations précédentes du jalon ont également confirmé `kb_store_pg` sans test actif, `kb_config` avec 35 tests passés et `kb_app_demo` avec 28 tests passés. + +## 0.2.2 — infrastructure PostgreSQL minimale + +Validation du jalon d'infrastructure PostgreSQL : `kb_store_pg` expose maintenant une première implémentation réelle avec options de connexion, pool `sqlx::PgPool`, construction depuis la configuration active, masquage du DSN pour les diagnostics, healthcheck `SELECT 1`, lecture du schema courant, lecture de la version PostgreSQL et snapshot de migrations non destructif. La stratégie de migrations reste volontairement cadrée sans créer les tables Solana lourdes, qui sont reportées à `0.2.3` pour le raw store minimal. Les validateurs de noms de tables imposent la convention `kb_sol__` et refusent les schemas explicites. Validation locale effectuée : `cargo test -p kb_store_pg` avec 11 tests passés, test PostgreSQL réel optionnel `optional_postgres_healthcheck_from_env` validé avec `KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/solana`, `cargo test -p kb_store_core` avec 28 tests passés, `cargo test -p kb_config` avec 35 tests passés, `cargo test -p kb_app_demo` avec 28 tests passés et `cargo clippy --all-targets` sans avertissement après remplacement local de l'exception `allow` par `expect` sur l'incompatibilité connue `async_trait` / `clippy::implicit_return`. + +## 0.2.3 — raw store Solana minimal + +Validation du jalon raw store minimal : `kb_store_pg` crée et initialise les deux premières tables Solana réelles, `kb_sol_raw_rpc_transactions` et `kb_sol_raw_ws_notifications`, sans créer de schema PostgreSQL applicatif explicite. Le raw RPC est inséré de façon idempotente par signature, les notifications WebSocket sont dédupliquées par `notification_key`, la signature des notifications reste optionnelle et le lien vers la transaction RPC canonique est préparé pour les étapes suivantes. Les tables conservent les champs de cycle de vie `retention_state`, `processing_state`, `processed_at` et `processing_reason`, avec `raw_json` nullable côté SQL afin de permettre les futures politiques `compacted`, `archived` et `purged` sans migration cassante. Les requêtes et l'implémentation PostgreSQL de `RawTransactionStore` couvrent les insertions, lookup de signature, lookup de notification et marquage lifecycle. Validation locale effectuée : `cargo test -p kb_store_pg` avec 21 tests passés, incluant le test PostgreSQL réel optionnel `optional_postgres_raw_store_roundtrip_from_env` avec `KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/solana`, `cargo test -p kb_store_core` avec 28 tests passés, `cargo test -p kb_config` avec 35 tests passés, `cargo test -p kb_app_demo` avec 28 tests passés et `cargo clippy --all-targets` sans avertissement. Une correction locale du test raw PostgreSQL a été intégrée pour appeler directement `test_signature()` depuis le module de test. + +## 0.2.4 — core Solana normalisé minimal + +Validation du jalon core store minimal : `kb_store_pg` crée et initialise maintenant les tables core `kb_sol_core_transactions`, `kb_sol_core_account_keys`, `kb_sol_core_instructions`, `kb_sol_core_inner_instructions`, `kb_sol_core_logs` et `kb_sol_core_balance_changes`, en complément du raw store `0.2.3`, sans schema PostgreSQL applicatif explicite. Les migrations et l'initializer utilisent des noms SQL préfixés et explicites pour les contraintes et index : `pk_`, `fk_`, `ck_`, `ux_` et `ix_`. L'initialisation raw/core est sérialisée par un verrou PostgreSQL `pg_advisory_xact_lock` afin d'éviter les courses concurrentes pendant les tests ou les démarrages parallèles. `CoreTransactionStore` dispose de l'implémentation PostgreSQL minimale pour insérer les transactions core, account keys, instructions, inner instructions, logs et deltas de balances, puis reconstruire `CoreInstructionReplayInput` pour les futurs décodeurs. Le script de maintenance `kb_store_pg/maintenance/drop_raw_core_store.sql` permet de réinitialiser explicitement les tables raw/core locales dans l'ordre inverse des dépendances. Validation locale effectuée : `KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/solana cargo test -p kb_store_pg -- --nocapture` avec 30 tests passés, création vérifiée des 8 tables dans PostgreSQL, réinitialisation validée via le script de maintenance, puis `cargo clippy --all-targets` sans avertissement. Le worker d'extraction raw RPC vers core, les observations et le ledger ops sont conservés pour les jalons suivants. + +## 0.2.5 — diagnostics SQL PostgreSQL dans `kb_app_demo` + +Validation du jalon diagnostics SQL : `kb_app_demo` ajoute les fenêtres `demo_sql_diag`, `demo_sql_pg_raw` et `demo_sql_pg_core` pour inspecter en lecture seule l’état PostgreSQL courant. Le démarrage Tauri tente l’initialisation raw/core lorsque `database.postgres.auto_initialize_schema` est actif, journalise les tables créées ou déjà présentes via le splashscreen et `tracing`, puis les fenêtres exposent le profil actif, le backend, le DSN masqué, le schema courant, le healthcheck, l’état migrations et les statistiques de tables raw/core. Les payloads JSON des trois fenêtres utilisent le viewer interactif déjà utilisé par `demo_config`, sans ajouter de nouvelle dépendance npm. Le jalon ne lance ni extracteur raw RPC vers core, ni décodage, ni matérialisation ; ces traitements restent reportés à `0.3.x`. Validation locale effectuée : `cargo test -p kb_store_pg` avec 30 tests passés, `cargo test -p kb_config` avec 35 tests passés, `cargo test -p kb_app_demo` avec 32 tests passés, `cargo clippy --all-targets` sans avertissement, et validation visuelle des trois fenêtres via `cargo tauri dev -c kb_app_demo/tauri.conf.json`. + +## 0.3.0 — cadrage Agave local et sources temps réel + +Validation du jalon de cadrage `0.3.x` : la phase ingestion/backfill/extraction raw vers core est reportée à `0.4.x`, tandis que `0.3.x` devient une phase d’expérimentation Agave local non votant et de stratégie live source. Le jalon documente le profil manuel `agave_local_research`, la commande de départ `agave-validator`, les probes RPC/WS attendus, les mesures ledger/accounts/CPU/RAM/réseau/lag, les règles de fallback vers les providers externes et les critères de décision avant `0.4.x`. Le profil Agave reste désactivé par défaut afin de préserver `mainnet_research` comme base stable, et aucune ingestion de production, aucun backfill historique, aucun décodage DEX, aucune matérialisation et aucune opération de trading ne sont introduits dans ce jalon. Validation locale du delta `0.3.0-pre.001` confirmée par l’utilisateur avant mise à jour du changelog. + +## 0.3.1 — transaction canonique et observations d’acquisition + +Validation du jalon de stockage canonique : `kb_sol_raw_transactions` conserve désormais une transaction source-indépendante par signature avec `canonical_json`, `canonical_json_hash` et `canonical_format_version`, tandis que `kb_sol_obs_transaction_observations` conserve uniquement les informations de provenance, méthode, session, timestamps, taille, statut et erreur sans dupliquer le payload complet. La lignée core utilise `raw_transaction_id`; les DTOs, entities, repositories, requêtes et diagnostics Tauri ont été alignés. La migration réelle depuis le schéma `0.2.x` a été contrôlée sur PostgreSQL 17.10 : les anciennes tables `kb_sol_raw_rpc_transactions` et `kb_sol_raw_ws_notifications` sont absentes, les tables canoniques sont présentes et les colonnes actives portent les nouveaux noms. Après cette validation, les fichiers SQL ont été consolidés en une baseline propre ne contenant que `0001_canonical_transaction_store.sql` et `0002_core_store.sql`; les fichiers SQL actifs n’embarquent plus les anciennes définitions de tables. Validation locale effectuée : `cargo test -p kb_app_demo` avec 32 tests passés, `cargo test -p kb_store_core` avec 30 tests passés, `KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/solana cargo test -p kb_store_pg -- --nocapture` avec 32 tests passés, `cargo clippy --all-targets` sans avertissement, démarrage Tauri validé et diagnostics des huit tables raw/obs/core confirmés. Les fixtures PostgreSQL de test ont été nettoyées manuellement après validation. + +## 0.3.2 — contrat canonique et adaptateur HTTP + +Validation du jalon transactionnel canonique : `kb_model` expose désormais un modèle source-indépendant couvrant les transactions legacy et version 0, le message, les comptes statiques et chargés par Address Lookup Tables, les instructions externes et internes, les logs, le statut et les erreurs, les frais, compute units et cost units, les balances SOL et SPL/Token-2022, les rewards, les return data et le block time lorsqu’ils sont disponibles. Les signatures et clés publiques restent en base58, les données d’instruction sont normalisées en base64, les montants SPL bruts sont canonicalisés sans perte et la sérialisation déterministe trie récursivement les objets JSON avant calcul du hash SHA-256. `kb_rpc` fournit l’adaptateur `getTransaction` JSON-RPC et l’interface commune préparant les futurs adaptateurs Helius WebSocket et Yellowstone gRPC dans la crate existante, tandis que `kb_store_core::RawTransactionInsert::from_canonical` relie le modèle au store canonique. Les fixtures offline couvrent legacy/v0, succès/échec, ALT, CPI, SPL Token et Token-2022, et les formes fournisseur équivalentes produisent le même hash. Validation locale effectuée : `cargo test -p kb_model` avec 23 tests passés, `cargo test -p kb_rpc` avec 48 tests passés, `cargo test -p kb_store_core` avec 31 tests passés, `KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/solana cargo test -p kb_store_pg -- --nocapture` avec 32 tests passés, puis `cargo clippy --all-targets` sans avertissement après ajout des retours explicites imposés par `clippy::implicit_return`. Les fixtures PostgreSQL du roundtrip ont été nettoyées manuellement après validation. + +## 0.3.3 — backfill HTTP gratuit et `demo_backfill` + +Validation du jalon de backfill HTTP : `kb_rpc` expose désormais `getSignaturesForAddress` avec pagination `before` / `until`, tandis que `getTransaction` alimente le modèle canonique sans conserver durablement le payload fournisseur. `kb_pipeline` orchestre les campagnes de signatures explicites et les recherches avant ou après une signature pour un programme, un token ou un pool, avec déduplication, limites de pages, reprise exportable, concurrence, temporisation, retries bornés, arrêt coopératif et journalisation détaillée. Le parcours `after` utilise la borne RPC `until`, des pages pouvant atteindre 1 000 signatures et une sélection bornée en mémoire afin de ne conserver que les `X` signatures directement postérieures à l’ancre dans l’historique de l’adresse. `kb_app_demo` ajoute la fenêtre `demo_backfill`, organisée en accordéons Bootstrap 5, avec paramètres communs, textarea de signatures, formulaires programme/token/pool, journal, résumé et commande d’arrêt. Chaque transaction complète est insérée une seule fois dans `kb_sol_raw_transactions`; chaque tentative d’acquisition produit une observation légère dans `kb_sol_obs_transaction_observations`, tandis que les résultats `missing` et `failed` ne créent aucun faux payload canonique. + +La correction finale de l’arrêt coopératif remplace la création globale des futures par une file bornée à la concurrence effective, distingue les candidats sélectionnés, démarrés, terminés, annulés et non démarrés, et calcule `resume_before_signature` depuis le dernier préfixe contigu réellement terminé. Une campagne réelle de 500 candidats a validé l’arrêt avec 7 candidats démarrés, 3 terminés, 4 annulés et 493 non démarrés, sans journalisation artificielle des candidats restants. Validation locale effectuée : `cargo test -p kb_rpc` avec 54 tests passés, `cargo test -p kb_pipeline` avec 10 tests passés, `cargo test -p kb_store_core` avec 31 tests passés, `cargo test -p kb_store_pg` avec 32 tests passés, `cargo test -p kb_app_demo` avec 38 tests passés et `cargo clippy --all-targets` sans avertissement. Les campagnes Tauri réelles ont validé les signatures explicites, programme avant/après, token avant/après et pool avant/après ; le cas `program_after` a parcouru 5 516 signatures indexées avant de sélectionner les 5 signatures les plus proches de l’ancre. Les diagnostics PostgreSQL ont confirmé 62 transactions canoniques et 62 observations, sans alimentation prématurée des tables core, dont l’extraction reste prévue pour `0.3.4`. + +## 0.3.4 — extraction canonique vers core et clôture de la fondation `0.3.x` + +Validation du jalon d’extraction structurelle : `kb_pipeline` transforme les transactions canoniques en graphes core atomiques comprenant transactions, account keys statiques et ALT, instructions outer et inner à chemins stables, logs reliés prudemment et deltas SOL/SPL Token/Token-2022. `kb_store_core` et `kb_store_pg` exposent et implémentent les contrats de persistance, le ledger versionné `kb_sol_ops_processing_ledger`, le skip par version/hash, le force replay et le rollback complet. `kb_app_demo` ajoute `demo_core_extraction` et le navigateur read-only `demo_sql_replay_candidates` avec filtres, sélection, copie et exports CSV sous `data/exports_csv/`; `kb_program_ids` fournit un registre énumérable de 182 programmes. Les transactions Solana échouées restent extractibles et seront décodables comme observations d’intention ou d’échec, sans être matérialisées automatiquement comme mutations réussies. Validation réelle effectuée sur PostgreSQL 17.10 : 70 transactions extraites sans erreur, sept contrôles d’intégrité sans anomalie, replay normal de 14 signatures entièrement ignoré, force replay des mêmes 14 signatures sans duplication, second replay entièrement ignoré, cardinalité finale de 70 transactions core et ledger final de 70 succès pour 84 tentatives. Validation locale finale : `cargo test -p kb_pipeline` avec 24 tests passés, `KB_POSTGRES_TEST_URL=... cargo test -p kb_store_pg -- --nocapture` avec 39 tests passés dont le rollback/replay corrigé, `cargo test -p kb_app_demo` avec 60 tests passés, `cargo test -p kb_program_ids` avec 2 tests passés et `cargo clippy --all-targets` sans avertissement. L’ancien jalon `0.3.5` est absorbé dans cette version ; la suite active devient `0.4.0` pour l’infrastructure commune de décodage et de matérialisation. + +## 0.4.0 — infrastructure commune de décodage et de matérialisation + +Validation du socle commun de replay contextualisé : `kb_decoder_api` et `kb_materializer_api` travaillent sur les inputs core complets, `kb_pipeline` sélectionne uniquement les programmes compatibles avec les processors activés, effectue un dispatch déterministe par programme et chemin d’instruction, persiste atomiquement couverture, ledger, événements décodés et sorties matérialisées, et applique le skip par processor/version/hash. Le force replay est autorisé uniquement avec des signatures explicites ou avec l’autorisation opérateur « toutes les signatures » bornée par les filtres et la limite. La matérialisation est refusée lorsqu’aucun matérialiseur n’est enregistré. Le classifieur `solana_native_classifier` déclare les 18 surfaces natives/runtime/loaders/précompiles connues sans produire de faux décodage. + +`kb_app_demo` ajoute `demo_decode_replay`, ses diagnostics decode/ledger/couverture et les contrôles de replay normal, force replay ciblé, replay global explicitement autorisé, concurrence bornée et arrêt coopératif. Chaque campagne possède un `campaign_id` propagé par spans jusqu’au pipeline, au store PostgreSQL et au décodeur. Les migrations raw/core/decode sont appliquées une seule fois au démarrage Tauri ; les commandes de démo réutilisent ensuite le schéma initialisé. Les validations frontend du backfill bloquent localement les requêtes incomplètes sans produire de faux événements backend `ERROR`. + +Validation locale finale : `cargo test -p kb_config` avec 36 tests passés, `cargo test -p kb_pipeline` avec 41 tests passés, `KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/solana_test cargo test -p kb_store_pg -- --nocapture` avec 44 tests passés, `cargo test -p kb_app_demo` avec 75 tests passés et `cargo clippy --all-targets` sans avertissement. Les campagnes Tauri réelles ont validé neuf skips version/hash, neuf force replays ciblés, un second skip cohérent, un replay global strictement limité à cinq inputs, l’annulation puis le redémarrage d’une campagne, et la corrélation complète des traces. Le correctif final d’annulation garantit `started + not_started = selected` et `completed = started`; une campagne réelle a terminé avec 382 inputs sélectionnés, 45 démarrés/terminés, 337 non démarrés, 45 dispatchs `unsupported`, aucun unmatched, aucun échec et aucun événement dans `errors.jsonl`. La couverture PostgreSQL confirme 18 déclarations natives, 382 observations Compute Budget reconnues sans erreur et 94 observations System reconnues sans erreur. `0.4.1` devient le jalon actif pour le décodage maximal des programmes Solana natifs, loaders et précompiles. + +## 0.4.1 — programmes Solana natifs, loaders, précompiles et matérialisations natives + +Validation du jalon `0.4.1` : `kb_decoder_solana_core` couvre désormais les programmes Solana natifs/runtime, historiques, loaders, précompiles et surfaces ZK explicitement incluses dans le périmètre. Le registre exécutable natif contient 18 surfaces après reclassification de `StakeConfig11111111111111111111111111111111` comme compte historique non exécutable et ajout du stateless Slashing Program `S1ashing11111111111111111111111111111111111` observé dans Agave `v4.1.1` derrière feature gate. Les surfaces décodées incluent System, Vote, Stake, Config, Compute Budget, Address Lookup Table, Feature, ZK ElGamal Proof, l’ancien ZK Token Proof historique/no-op, les loaders Native/BPF v1/v2/Upgradeable/v4, Ed25519, secp256k1, secp256r1 et Slashing. SPL Memo, SPL Token, Token-2022, Stake Pool, Single Pool, Account Compression, Noop et SPL Name Service restent réservés aux jalons suivants. + +Le jalon a étendu le contrat de replay instructionnel avec les instructions outer ordonnées afin de résoudre les références inter-instructions des précompiles et du profil Compute Budget. Les décodeurs bornent les offsets, tailles, compteurs, références d’instructions, comptes requis et payloads suffixes sans recalcul cryptographique pour les signatures ou preuves ZK. L’ancien `solana-zk-token-sdk` déprécié a été retiré ; le miroir ZK Token historique repose maintenant sur une table wire locale auditée, sans dépendance directe à `bincode`. + +Les matérialisations natives sont clôturées au niveau instructionnel stable. `kb_materializer_lifecycle` projette Address Lookup Table, lifecycle des loaders, révocation Feature, durable nonce, comptes System create/allocate, contextes ZK ElGamal et rapports Slashing. `kb_materializer_admin` projette assignations System, écritures Config opaques et changements d’autorité Loader. `kb_materializer_compliance_audit` projette écritures/copies de bytecode Loader et profils Compute Budget transactionnels agrégés. `kb_materializer_staking` projette les intentions commitées Stake/Vote : comptes, autorités, lockup, délégation, désactivation, split, merge, retraits, move stake/lamports, identité Vote, commission, vote state et dépôt de rewards. Les sorties ne prétendent pas reconstruire les snapshots finaux de comptes, les sysvars historiques, les crédits Vote cumulés, l’activation Stake par epoch, les unités compute consommées ou les frais finaux runtime. + +`kb_app_demo` enregistre les matérialiseurs natifs `solana_native_lifecycle`, `solana_native_admin`, `solana_native_compliance_audit` et `solana_native_staking`. Les profils de logging montent à 53 routes avec fichiers dédiés pour les crates opérationnelles ajoutées. `demo_backfill` accepte maintenant les modes `program_latest`, `token_latest` et `pool_latest` : une recherche « avant, plus anciennes » sans ancre commence sur les signatures les plus récentes, tandis que la direction « après, plus récentes » conserve une ancre obligatoire. + +Les validations utilisateur finales confirment : `kb_program_ids` 5 tests, `kb_decoder_solana_core` 114 tests, `kb_materializer_lifecycle` 16 tests, `kb_materializer_admin` 7 tests, `kb_materializer_compliance_audit` 7 tests, `kb_materializer_staking` 8 tests, `kb_config` 36 tests, `kb_pipeline` 45 tests, `kb_store_pg` 45 tests avec PostgreSQL réel, `kb_app_demo` 78 tests et `cargo clippy --all-targets` sans avertissement. Le correctif de sérialisation test-only des tests PostgreSQL réels élimine l’interblocage intermittent observé lors des tests optionnels concurrents. + +Les campagnes mainnet ciblées validées couvrent notamment : System 817 inputs décodés avec 258 sorties et 52 refus attendus sur transactions échouées ; Config 96/96 avec 96 sorties admin ; Stake 448/448 avec 447 sorties et un refus attendu ; Vote 600/600 avec 600 sorties ; Compute Budget 2 746/2 746 avec 1 603 profils transactionnels matérialisés ; ZK ElGamal 151/151 avec 139 sorties de contexte ; ALT 104/104 avec 104 sorties lifecycle ; Slashing sans corpus observable, validé par sources officielles et fixtures synthétiques. Tous ces replays se terminent avec `unmatched = 0`, `failedInputs = 0`, `unsupported = 0` et journaux `error.jsonl` vides dans les archives fournies. + +La suite active devient `0.4.2` : infrastructure d’exécution et `kb_executor_solana_core`, avec séparation stricte entre plan, simulation, signature, envoi et validation post-exécution. Les exécuteurs SPL suivront ensuite la politique décodeur maximal → matérialisateurs → exécuteur limité par opération. + +## 0.4.2 — infrastructure d’exécution native et RPC Solana standard + +Validation du jalon d’exécution native. `kb_execution_api`, `kb_execution_safety`, `kb_execution_solana`, `kb_wallet`, `kb_executor_solana_core`, `kb_rpc` et `kb_pipeline` séparent explicitement intent, plan, politique, lecture stateful, simulation, signature, envoi, confirmation et validation post-exécution. Le wallet temporaire de laboratoire reste confiné à Localnet/Devnet ; dry-run et simulation sont obligatoires par défaut, les plafonds de dépense/frais sont vérifiés et Mainnet reste désactivé sans politique et confirmation explicites. + +`kb_executor_solana_core` couvre 18 surfaces natives avec 109 opérations appelables : System, Compute Budget, Address Lookup Table, précompiles Ed25519/secp256k1/secp256r1, Config, Feature, Slashing, ZK ElGamal, Stake, Vote, Loader v3 et Loader v4. BPF Loader v1/v2, Native Loader et l’ancien ZK Token Proof sont classés sans builder client ; Stake `Redelegate` reste historique `decode-only`. Chaque builder est comparé à un encodeur officiel ou à un layout wire audité. La matrice `docs/NATIVE_SOLANA_EXECUTION_MATRIX.json` est vérifiée par un test Rust contre les 109 codes compilés. `kb_decoder_solana_core` conserve l’égalité exacte avec les 18 Program IDs natifs et 121 déclarations de couverture. + +Le préflight stateful de `kb_pipeline` inspecte ALT, Config, Feature, Slashing et les contextes ZK ElGamal sur Localnet/Devnet et retourne `NotRequired`, `Ready` ou `Blocked`. Les opérations administratives non validées réellement par un scénario cluster restent derrière ce garde-fou, hors de l’UI et sans activation Mainnet. Le parcours Devnet représentatif System transfer a été validé avec un wallet persistant préfinancé et 1 000 000 lamports : simulation exacte, signature, envoi, confirmation, `getTransaction`, insertion canonique, extraction core et decode replay ciblé ont réussi. + +`kb_rpc` expose des contrats propres et configurables pour les 52 méthodes HTTP standard et les neuf paires WebSocket standard. Les options sont composables sans exposer les DTO Agave. `WsSession` gère multiplexage, unsubscribe, timeout, reconnexion bornée et réabonnement. `blockSubscribe`, `slotsUpdatesSubscribe` et `voteSubscribe` sont activables par endpoint ; un rejet serveur indiquant une méthode absente ou non activée désactive automatiquement la capacité pour la session. `kb_app_demo` ne contient plus la boucle de transport WebSocket. + +La frontière Tauri/TS-rs a été corrigée pour ne plus transmettre de `bigint` dans les payloads JSON actifs. Les identifiants WebSocket sont contrôlés contre `Number.isSafeInteger` et les limites du navigateur SQL sont validées avant l’invocation backend. Les logs réels confirment les souscriptions/désabonnements WebSocket et le garde-fou de changement d’endpoint avec session active. + +Validation finale fournie par l’utilisateur : `kb_program_ids` 5 tests, `kb_decoder_solana_core` 116, `kb_executor_solana_core` 88, `kb_execution_api` 22, `kb_execution_safety` 15, `kb_execution_solana` 12, `kb_rpc` 113, `kb_pipeline` 56, `kb_config` 41, `kb_app_demo` 88 et `kb_store_pg` 45 avec PostgreSQL réel. Le test Devnet opt-in et le replay post-exécution sont réussis, `cargo clippy --all-targets` est propre et `cargo tauri dev` démarre avec Vite et initialise correctement PostgreSQL. Aucun jalon suivant n’est ouvert par cette clôture. + +## 0.4.3 — SPL Memo v1, v3 et v4 + +Validation complète de la surface SPL Memo. `kb_decoder_spl_memo` reconnaît exactement les Program IDs v1, v3 et v4, décode le payload UTF-8 brut, sa longueur et son SHA-256, conserve les comptes ordonnés et leurs flags, distingue les règles historiques de signataires, les chemins outer/inner, les transactions réussies ou échouées et les tentatives invalides sans produire de faux état commité. La matrice machine-readable `docs/SPL_MEMO_MATRIX.json` relie les contrats officiels, les fixtures synthétiques et le corpus Mainnet réel des trois générations. + +`kb_materializer_transaction_annotations` projette uniquement les Memo réussis et commités dans la famille `transaction_annotation`, avec texte borné, génération, Program ID, signataires vérifiés, provenance et clé d’idempotence. Les comptes complets et diagnostics d’audit restent dans le decode. La persistance réutilise `kb_sol_mat_events` et le ledger commun sans nouvelle table ; `demo_decode_replay` expose un journal typé et borné filtrable par signature. + +`kb_executor_spl_memo` fournit les intents typés v1/v3/v4 et construit les trois générations avec `spl-memo-interface 2.1.0`, payload exact et signataires readonly ordonnés. La bibliothèque reste universelle sur les clusters ; simulation obligatoire, dry-run par défaut, plafond de frais, autorisation opérateur et politiques Mainnet appartiennent à l’infrastructure commune. Le parcours Memo v4 Devnet réutilise wallet, RPC, safety, transaction Solana, confirmation, hydratation canonique, extraction core et decode replay. Trois transactions réelles ont chacune produit une annotation et un second replay idempotent `skipped`. + +La clôture utilisateur confirme : `kb_program_ids` 5 tests, `kb_decoder_spl_memo` 9, `kb_materializer_transaction_annotations` 7, `kb_executor_spl_memo` 15, `kb_execution_api` 22, `kb_execution_safety` 15, `kb_execution_solana` 12, `kb_pipeline` 61, `kb_rpc` 113, `kb_app_demo` 96 et `kb_store_pg` 46 avec PostgreSQL réel. Le test opt-in Devnet avec envoi est réussi et `cargo clippy --all-targets` est propre. La suite active devient `0.4.4 — SPL Token` selon `prompts/023_v0_4_4_spl_token.md`; l’acquisition historique différée reste hors ROADMAP actif. + +## 0.4.4 — SPL Token classique + +Validation complète du programme SPL Token classique `Tokenkeg...`. `kb_decoder_spl_token` +reconnaît exactement les 28 tags publiés par `spl-token-interface 3.0.0`, conserve le wire borné, +les comptes ordonnés, outer/inner paths, autorités simples ou multisig, montants bruts, decimals, +transactions échouées non commitées et diagnostics sans inventer mint ni état final. `Batch` +conserve son parent et ses enfants déterministes sans accepter les batchs imbriqués. La matrice +`docs/SPL_TOKEN_MATRIX.json` relie interface, processor, builders, corpus et preuves cluster. + +Les projections stables produisent des événements instructionnels `token_account`, `admin` et +`risk`, sans fee classique fictive, sans OHLC et sans snapshot final reconstruit. Le replay Mainnet +de 370 instructions a produit 371 sorties, huit refus correspondant exactement à huit transactions +échouées, puis un second replay idempotent sans nouvelle sortie. Le journal Tauri expose des filtres +bornés par signature, mint, compte, famille et opération, avec montants JSON sans perte. + +`kb_executor_spl_token` expose 24 opérations typées courantes ou récentes et laisse les quatre +initialisations Rent obsolètes en decode-only. Le préflight stateful Localnet/Devnet valide layouts, +relations mint/comptes, soldes, native reserve, délégations, autorités, multisig et rent hors du +décodeur et de l'exécuteur. Le parcours Devnet `TransferChecked` a réussi simulation, envoi, +confirmation, hydratation, extraction, replay, matérialisation et second replay idempotent. Un +lifecycle contrôlé sans ATA a ensuite initialisé mint et comptes, minté, transféré, approuvé, +révoqué, brûlé puis fermé les comptes avec récupération sûre après interruption RPC. + +Les tags récents `Batch` et `UnwrapLamports` ont été simulés avec succès sur le programme classique +Devnet, sans signature ni envoi, respectivement en 270 et 140 compute units. La clôture Tauri charge +77 routes de logs, réussit le préflight et la simulation `TransferChecked`, bloque l'envoi sans +confirmation, affiche la matérialisation commitée exacte et simule Memo v4 sans erreur runtime. + +La régression finale communiquée confirme notamment : `kb_program_ids` 5 tests, +`kb_decoder_spl_token` 8, `kb_executor_spl_token` 15, `kb_decoder_spl_memo` 9, +`kb_materializer_transaction_annotations` 7, `kb_execution_api` 22, `kb_execution_safety` 15, +`kb_execution_solana` 12, `kb_pipeline` 81, `kb_rpc` 113, `kb_config` 41, `kb_app_demo` 102 et +`kb_store_pg` 46 avec PostgreSQL réel. `cargo clippy --all-targets` est propre. La suite active +devient `0.4.5 — SPL Associated Token Account` selon +`prompts/024_v0_4_5_spl_associated_token_account.md`. + +## 0.4.5 — SPL Associated Token Account + +Validation complète du programme SPL Associated Token Account +`ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL`. Le décodeur consomme +`spl-associated-token-account-interface 2.0.0`, reconnaît exactement `Create`, +`CreateIdempotent`, `RecoverNested` et la forme historique vide de `Create`, puis conserve comptes +ordonnés, flags, doublons, chemins outer/inner, transactions échouées et diagnostics bornés. Les +adresses observées sont comparées aux PDA canoniques dérivés depuis wallet, Token Program ID et +mint ; une incohérence reste décodable et n'est jamais corrigée silencieusement. + +`kb_materializer_token_accounts` possède exclusivement le lifecycle de l'adresse associée : créée, +créée ou réutilisée idempotemment, ou récupérée depuis une imbrication. `kb_materializer_risk` +possède le constat distinct d'anti-pattern nested récupéré, sans score arbitraire. Les CPI SPL Token +restent propriétaires des initialisations, transferts et fermetures, et les matérialiseurs lifecycle +général, admin et fees ne produisent aucun doublon. Les transactions non commitées ou invalides sont +refusées comme mutations. + +`kb_executor_spl_associated_token_account` expose les trois variantes actuelles pour SPL Token +classique et Token-2022 avec les builders officiels, metas dans l'ordre exact, signataires uniques, +simulation obligatoire, dry-run par défaut et coûts rent/frais plafonnés. Le pipeline stateful +contrôle mints, owners, Program IDs, dérivations, comptes existants, rent, signataires et +postconditions avant et après l'exécution. La fenêtre Tauri Solana existante ajoute création ATA, +dérivation readonly et journal lifecycle borné ; `RecoverNested` reste volontairement hors UI. + +Les scénarios Devnet contrôlés du 16 juillet 2026 ont validé la création et la réutilisation +idempotente d'ATA classiques et Token-2022, puis un `RecoverNested` classique transférant +1 000 000 000 unités brutes vers l'ATA wallet et fermant le nested ATA. Chaque envoi a suivi +simulation, confirmation, hydratation canonique, extraction, decode, matérialisation et second +replay idempotent. L'ATA Token-2022 observé mesure 170 octets et expose `ImmutableOwner`, sans que le +jalon ne commence le décodage général de ses extensions. + +La clôture confirme 5 tests Program IDs, 8 tests décodeur Token classique, 15 tests exécuteur Token, +9 tests Memo, 7 tests annotations, 9 tests matérialiseur token accounts, 6 tests risk, 17 tests +lifecycle, 9 tests admin, 3 tests fees, 10 tests décodeur ATA, 10 tests exécuteur ATA, 22 tests API +d'exécution, 15 tests safety, 12 tests transaction Solana, 90 tests pipeline, 113 tests RPC, 41 tests +configuration, 111 tests démo et 46 tests PostgreSQL réels. `cargo clippy --all-targets` est propre +et `cargo tauri dev -c kb_app_demo/tauri.conf.json` a démarré Vite, Tauri et PostgreSQL. La suite +active devient `0.4.6 — Token-2022, extensions et registre ElGamal` selon +`prompts/025_v0_4_6_spl_token_2022.md`. + +## 0.4.6 — Token-2022, extensions et registre ElGamal + +Validation du jalon Token-2022 et ElGamal Registry avec frontières techniques séparées. Token-2022 couvre les instructions de base, les familles d’extensions identifiables, les états Mint/Account/Multisig et TLV, les metadata/group incorporés, les parcours confidentiels, les matérialisations propriétaires et les exécuteurs simulation-first avec préflights stateful et preuves inline/context-state. Huit opérations publiques Token-2022 ont été confirmées sur Devnet, hydratées, extraites, décodées, matérialisées et rejouées idempotemment. Le corpus Mainnet contient 55 instructions Token-2022 décodées sans échec. +Le registre ElGamal dispose de son décodeur, de sa matrice, de son parser d’état de 64 octets, de sa matérialisation administrative, de ses builders `CreateRegistry`/`UpdateRegistry`, de son PDA, de ses préflights et de son orchestration de preuves. La validation réseau publique reste indisponible sur Devnet/Mainnet au 20 juillet 2026 ; la validation synthétique/offline est conservée sans inventer de preuve cluster. +La validation Mainnet a corrigé le wire `Write` du loader immuable : longueur `u32` et données à l’offset 12, supprimant 68 diagnostics `loader_vector_length_mismatch`. Les 76 rejets restants sont tous issus de transactions Solana échouées et restent explicitement fail-closed ; quatre tags Loader v4 inconnus sont classés `Unsupported`. Un timeout ponctuel du pool PostgreSQL a été réparé par replay ciblé. +Le replay de `kb_app_demo` ajoute `incomplete_signatures`, qui sélectionne seulement les signatures contenant une instruction `pending`, `failed`, `replay_requested` ou `unsupported`, limite d’abord les signatures puis étend leurs instructions compatibles sans force replay global. Deux campagnes PostgreSQL réelles ont produit le même résultat : 81 entrées, 1 décodée, 4 unsupported, 76 failed, aucun unmatched et aucun doublon decode/mat. Validation finale : `kb_store_core` 41/41, `kb_store_pg` 46/46 avec PostgreSQL réel, `kb_pipeline` 124/124, `kb_app_demo` 118/118 et `cargo clippy --all-targets` propre. La suite active devient `0.4.7 — Metaplex Token Metadata` selon `prompts/026_v0_4_7_metaplex_token_metadata.md`. Anchor n’étant pas requis par les programmes SPL de `0.4.x`, son infrastructure commune est planifiée en `0.4.18`, immédiatement avant Meteora. + diff --git a/olddocs/archivekbot2/README.md b/olddocs/archivekbot2/README.md new file mode 100644 index 0000000..2b10c8e --- /dev/null +++ b/olddocs/archivekbot2/README.md @@ -0,0 +1,293 @@ + + + +# Khadhroony Bot2 + +Khadhroony Bot2 est un workspace Rust modulaire pour observer, décoder, matérialiser, exécuter et analyser des transactions Solana. + +Le projet poursuit deux objectifs complémentaires. À court terme, il doit fournir un trading assisté contrôlable depuis des démos live Tauri. À long terme, il doit devenir une bibliothèque d'indexation et d'analyse Solana capable de classifier un grand nombre de programmes et de surfaces. + +Le socle technique doit permettre de : + +- ingérer des transactions Solana depuis RPC HTTP, WebSocket ou futures sources spécialisées ; +- normaliser chaque source vers une transaction canonique source-indépendante ; +- conserver la transaction canonique comme source d’audit et de replay ; +- conserver séparément les observations légères de provenance et de timing ; +- extraire les instructions, inner instructions, logs, comptes résolus et deltas de balances ; +- détecter les programmes impliqués dans chaque transaction ; +- décoder les programmes Solana de base, les programmes SPL, les surfaces DEX, les orderbooks, les routers et les protocoles annexes ; +- matérialiser les événements décodés en tables métier exploitables ; +- rejouer uniquement les modules nécessaires grâce à un ledger de traitement par module et version ; +- alimenter des agrégations, diagnostics, signaux de risque et futures règles de stratégie ; +- construire des plans d'exécution séparés des décodeurs ; +- tester les fonctionnalités live via `kb_app_demo` avant automatisation. + +## Architecture générale + +Le workspace suit une chaîne de traitement en couches : + +```text +canonical transaction -> source observations -> Solana extraction -> decoding -> materialization -> aggregation -> strategy +``` + +Chaque couche doit être indépendante autant que possible. Les décodeurs ne dépendent pas du stockage, du RPC, de Tauri, du wallet ou des matérialisateurs. Les matérialisateurs travaillent sur les événements décodés et produisent des événements métier normalisés. + +## Rôle des dossiers principaux + +- `kb_core` contient les primitives partagées minimales. +- `kb_model` contient les types communs du modèle interne. +- `kb_config` définit le contrat JSON multi-profils, le schéma runtime, les validations typées et les exports TS-rs destinés aux applications Tauri. +- `kb_rpc` contient les protocoles et clients RPC Solana HTTP, WebSocket et futurs flux Helius/Yellowstone. +- `kb_execution_solana` assemble les plans communs en transactions Solana, lie la simulation au message exact et résout les signataires via l’interface Solana `Signer`; `kb_wallet` fournit actuellement le backend temporaire. +- Le projet différé d’acquisition historique gratuite est décrit dans `docs/HISTORICAL_DATA_ACQUISITION_PLAN.md`. Il reste hors du ROADMAP actif tant que les décodeurs, matérialisateurs et exécuteurs prioritaires ne sont pas suffisamment avancés. +- `kb_store_core` définit les traits de stockage. +- `kb_store_pg` fournit le backend PostgreSQL cible. +- `kb_store_sqlite` reste limité aux tests et imports locaux. +- `kb_decoder_api` définit le contrat des décodeurs. +- `kb_materializer_api` définit le contrat des matérialisateurs. +- `kb_materializer_*` contient les projections métier par famille : trades, liquidité, NFT, oracle, lending, routing, compliance audit, etc. +- `kb_pipeline` orchestre backfill, extraction canonique vers core, décodage, matérialisation, agrégation et validation. +- `kb_app_demo` sert de démonstrateur Tauri, sans logique métier lourde. Il charge le profil actif, initialise `kb_logging`, rend le README en HTML et expose une fenêtre dédiée à la configuration. +- Chaque crate opérationnelle doit émettre ses propres événements `tracing` avec une cible canonique égale à son nom Cargo ; `kb_app_demo` reste limité aux frontières UI/Tauri et aux résumés. +- Chaque profil écrit des fichiers globaux `debug.log`, `info.log`, `error.jsonl` et `app.log`, ainsi que `debug.log`, `info.log` et `error.jsonl` dans un répertoire par crate utilisant `tracing`. +- Les interfaces officielles Solana/SPL étroites sont privilégiées ; `wincode` puis Borsh sont préférés, et un parser local borné reste autorisé lorsque l’interface officielle n’expose que `bincode`. + + +## État `0.4.1` validé + +`0.4.1` clôt le décodage et les matérialisations instructionnelles stables des programmes Solana natifs, historiques, loaders, précompiles et surfaces ZK du périmètre core. + +`kb_decoder_solana_core` couvre maintenant 18 surfaces exécutables natives : System, Vote, Stake, Config, Compute Budget, Address Lookup Table, Feature, ZK ElGamal Proof, l’ancien ZK Token Proof historique/no-op, Native Loader, BPF Loader v1/v2/Upgradeable/v4, Ed25519, secp256k1, secp256r1 et Slashing. `StakeConfig11111111111111111111111111111111` est classé comme compte historique non exécutable, sans dispatch ni plan d’exécution. + +Les matérialisations natives actives sont réparties par famille : + +- `kb_materializer_lifecycle` : Address Lookup Table, lifecycle loaders, Feature revoke, durable nonce, comptes System create/allocate, contextes ZK ElGamal et rapports Slashing ; +- `kb_materializer_admin` : assignations System, écritures Config opaques, changements d’autorité Loader ; +- `kb_materializer_compliance_audit` : écritures/copies de bytecode Loader et profil transactionnel Compute Budget ; +- `kb_materializer_staking` : projections instructionnelles Stake/Vote commitées, sans prétendre reconstruire les snapshots finaux. + +Les précompiles de signature, les preuves ZK sans compte de contexte et l’ancien ZK Token Proof restent en decode/audit, sans duplication dans `kb_sol_mat_events` tant qu’aucun consommateur dédié ne l’exige. Les transactions échouées restent décodées comme intentions ou échecs, mais les matérialiseurs mutables appliquent `SuccessfulCommittedOnly`. + +Les validations finales de `0.4.1` couvrent les tests unitaires, PostgreSQL réel, Clippy et des replays mainnet ciblés : System, Config, Stake, Vote, Compute Budget, ALT, ZK ElGamal et Slashing synthétique. Les replays terminent sans `unmatched`, `failedInputs` ou `unsupported`; les archives de logs fournies ont des `error.jsonl` vides. + +## Couche d'exécution + +Le workspace développe une couche d'exécution séparée du décodage. Les crates `kb_executor_*` sont des bibliothèques universelles : elles construisent des plans pour les applications de trading, les CLI, les workers, les outils d'administration et de futurs exécutables indépendants. + +Les opérations dangereuses ne sont pas supprimées des bibliothèques. Elles doivent être encodées, testées et protégées par des politiques renforcées, tandis que `kb_app_demo` peut volontairement ne pas les exposer. Les exécuteurs ne dépendent ni du wallet, ni du RPC, ni des décodeurs ; l'orchestration assemble ensuite plan, sécurité, simulation, signature, envoi et validation post-exécution. + +## Démos live + +`kb_app_demo` reste le shell Tauri unique pour valider les capacités du workspace : configuration, logs, DB, RPC, wallet, listeners, décodage, matérialisation, exécution et validation post-transaction. + +## Documentation + +- `RUST_RULES.md` contient les règles Rust générales réutilisables ; `RULES.md` contient les règles spécifiques et normatives du workspace. +- `ROADMAP.md` contient les étapes futures et changements prévus. +- `CHANGELOG.md` ne reçoit une entrée qu'après validation d'une version. +- `docs/` contient les notes d'architecture et de conception, notamment `TRACING_CONTRACT.md`, `SOLANA_INTERFACE_DEPENDENCIES.md`, `NATIVE_SOLANA_CLOSURE_AUDIT.md`, `NATIVE_SOLANA_MATERIALIZATION_AUDIT.md` et `DEVNET_EXECUTION.md`. +- `validation_sql/` contient les contrôles SQL de validation. + +## Jalon validé `0.4.2` + +`0.4.2` valide l’infrastructure d’exécution et `kb_executor_solana_core`. L’exécuteur expose **109 opérations déterministes** : dix-sept System, quatre Compute Budget, cinq Address Lookup Table, six formes de précompile, deux Config, deux Feature, deux Slashing, trois ZK ElGamal, vingt-quatre Stake, vingt-quatre Vote, onze Loader v3 et neuf Loader v4. La surface Vote couvre les vingt variantes wire actuelles de `solana-vote-interface 6.0.3` ainsi que quatre plans composés de création legacy/V2, avec ou sans seed. Loader v3 consomme `solana-loader-v3-interface 8.x` et son schéma `wincode`; Loader v4 reproduit explicitement son wire officiel sans activer les helpers conditionnés par `bincode`. BPF Loader v1/v2 restent historiques `decode-only`, Native Loader ne possède pas de builder client et l’ancien ZK Token Proof reste historique. Les opérations nécessitant un état courant restent protégées par un préflight séparé et ne sont pas activées sur Mainnet par ce jalon. + +`kb_pipeline` fournit le préflight stateful Localnet/Devnet pour ALT, Config, Feature, Slashing et les contextes ZK ElGamal. Le rapport `Ready`/`Blocked`/`NotRequired` expose les contrôles et faits mesurés avant simulation. `docs/NATIVE_SOLANA_EXECUTION_MATRIX.json` inventorie les dix-huit surfaces et les 109 opérations appelables, avec égalité imposée par un test Rust. La matrice décodeur couvre les mêmes dix-huit surfaces et 121 déclarations de couverture. + +`kb_rpc` possède des contrats propres et configurables pour les 52 méthodes HTTP standard et les neuf paires WebSocket standard. Les options restent composables champ par champ et aucun DTO Agave n’est exposé par l’API publique. La session WebSocket persistante gère multiplexage, unsubscribe, timeout, reconnexion et réabonnement. `blockSubscribe`, `slotsUpdatesSubscribe` et `voteSubscribe` sont activables par endpoint ; lorsqu’un nœud les rejette comme indisponibles, la capacité concernée est désactivée automatiquement pour la session et les appels suivants sont refusés localement. + +`kb_wallet` fournit un wallet temporaire en mémoire ou persistant sous `wallets/temporary/`, avec fichiers non écrasés, permissions privées et secrets confinés côté Rust. `kb_execution_solana` assemble les transactions, lie la simulation au hash exact du message et signe seulement après autorisation de `kb_execution_safety`. `kb_pipeline` orchestre le parcours backend Devnet complet : contrôle du destinataire et du minimum rent-exempt, financement plafonné, System transfer, simulation exacte, signature, envoi, confirmation, hydratation canonique, extraction core et decode replay ciblé. Ce parcours a été validé réellement sur Devnet avec un transfert de 1 000 000 lamports et PostgreSQL réel. + +La frontière Tauri/TS-rs n’émet plus de `bigint` dans les payloads JSON actifs. Les identifiants WebSocket sont contrôlés contre `Number.isSafeInteger`, et les limites du navigateur SQL sont validées côté frontend avant l’appel backend. `cargo tauri dev` avec Vite constitue la validation frontend retenue ; aucun `npm run build` séparé n’est exigé pour cette clôture. + +## Jalon validé `0.4.3` + +Le prompt `prompts/022_v0_4_3_spl_memo.md` reste l’historique de travail du jalon. Le décodeur contextualisé distingue v1, v3 et v4 avec payload UTF‑8 ou tentative invalide, comptes ordonnés, signataires, outer/inner, hash et intentions non commitées. La projection dédiée `kb_materializer_transaction_annotations` transforme uniquement les Memo réussis et commités en annotations consultables et idempotentes ; les faits d’audit détaillés restent dans le decode. `demo_decode_replay` expose ces sorties comme un journal borné filtrable par signature, avec slot, instruction path, génération, texte, hash et signataires vérifiés. + +`kb_executor_spl_memo` expose maintenant un intent typé `AddMemo` et appelle le builder officiel `spl-memo-interface 2.1.0` avec l’ID explicite v1/v3/v4. Le wire reste le texte UTF‑8 brut et chaque signer est readonly, ordonné et visible avant signature. La bibliothèque construit les trois générations sur tout cluster ; la disponibilité effective du programme est vérifiée par la simulation obligatoire, et Mainnet reste régi par les garde-fous communs plutôt que désactivé dans l’exécuteur. La démo opérateur reste volontairement limitée à Memo v4 Devnet et réutilise la fenêtre Solana existante. Elle montre la simulation, l’envoi explicitement confirmé, l’hydratation, l’extraction, le replay, l’annotation et l’idempotence avec des DTO Tauri JSON sans `bigint` actif. + +Le parcours a été validé le 15 juillet 2026 avec une simulation seule puis trois transactions v4 Devnet confirmées. Chaque signature a produit une insertion canonique, une extraction core, un événement Memo, une annotation `transaction_annotation` et un second replay `skipped` sans nouvelle sortie. Le corpus Mainnet réel couvre séparément v1, v3 et v4 ; aucun envoi historique v1/v3 sur Devnet n’est revendiqué ni requis. + +La matrice `docs/SPL_MEMO_MATRIX.json` conserve les différences historiques, le corpus Mainnet réel, les preuves Devnet v4 et les limitations explicitement non revendiquées pour v1/v3. Le worker d’acquisition historique reste un projet différé indépendant, sans numéro de version attribué. + +La validation finale confirme 5 tests `kb_program_ids`, 9 tests décodeur Memo, 7 tests matérialiseur d’annotations, 15 tests exécuteur Memo, 22 tests API d’exécution, 15 tests safety, 12 tests Solana, 61 tests pipeline, 113 tests RPC, 96 tests démo et 46 tests PostgreSQL réels. Le test opt-in Devnet avec envoi et `cargo clippy --all-targets` sont propres. La version active devient `0.4.4 — SPL Token` selon `prompts/023_v0_4_4_spl_token.md`. + +## Jalon validé `0.4.4` + +Les premières tranches SPL Token établissent la matrice machine-readable des 28 tags publiés par +`spl-token-interface 3.0.0` et remplacent le scaffold du décodeur classique. Le wire local borné +conserve montants bruts, decimals explicites, autorités, comptes ordonnés, chemins outer/inner, +transactions échouées non commitées, suffixes et diagnostics. `Batch` produit un parent d'audit et +des enfants à identités dérivées stables sans accepter de batch imbriqué. + +Les matérialiseurs actifs produisent un journal instructionnel `token_account`, des faits admin et +des constats de risque sans score ; aucune fee classique n'est inventée. Le replay Mainnet validé de +370 instructions a produit 371 sorties, huit refus expliqués par huit transactions échouées et un +second replay idempotent sans nouvelle sélection. + +`kb_executor_spl_token` expose 24 opérations typées courantes ou récentes avec montants JSON en +chaînes, autorités simples/multisig et builders officiels. Quatre initialisations Rent obsolètes +restent decode-only. `UnwrapLamports` et `Batch` sont constructibles selon l'interface publiée ; leur +déploiement sur le programme classique Devnet a été observé le 16 juillet 2026 par deux simulations +réussies sans signature ni envoi. Localnet, Testnet et Mainnet restent non testés pour ces deux tags. + +`0.4.4-pre.005` ajoute le préflight stateful Localnet/Devnet dans `kb_pipeline`. Les lectures RPC +restent hors du décodeur et de l’exécuteur ; elles valident les layouts Mint/Account/Multisig, +l’état, les relations de mint, les soldes, les réserves wrapped SOL, les délégations, les autorités, +les seuils multisig et le rent avant simulation. Les tests standards sont offline et un test Devnet +read-only reste opt-in. La démo Token réutilise la fenêtre d’exécution Solana existante : son panneau +`TransferChecked` expose préflight, simulation, confirmation et validation post-exécution, tandis +qu’un journal matérialisé borné accepte des filtres typés par signature, mint, compte, famille et +opération sans créer une WebView par opération. + +Le correctif fonctionnel de `pre.005` ajoute l’orchestration Devnet générique : simulation autonome +après préflight, puis envoi explicitement confirmé lorsque le wallet du profil résout tous les +signataires. Une transaction envoyée est confirmée, hydratée, extraite, décodée et matérialisée, +avant un second replay idempotent. Cette couche ne restreint pas les builders universels aux seuls +clusters ou signataires disponibles dans la démo. + +Le parcours `TransferChecked` a été validé réellement sur Devnet le 15 juillet 2026 avec deux +comptes Token auxiliaires du même mint et un wallet isolé correspondant exactement à l’autorité. +Le test opt-in impose désormais la présence de la soumission et de la confirmation, l’absence +d’échec ou de refus au premier replay, au moins une matérialisation Token et un second replay sans +nouvelle sortie ; il imprime aussi la signature afin qu’elle puisse rejoindre le corpus audité. + +`0.4.4-pre.006` ajoute un lifecycle destructif explicitement autorisé pour trois comptes classiques +sans ATA. Son correctif crée d'abord les comptes bruts via trois instructions System officielles, +avec keypairs éphémères, rent et tailles 82/165/165 vérifiés, puis onze transactions initialisent le mint et deux comptes Token, mintent et +transfèrent un montant contrôlé, créent puis révoquent une délégation, brûlent exactement les deux +soldes et ferment les comptes Token. Chaque étape est simulée, confirmée, hydratée, décodée, +matérialisée et rejouée une seconde fois avant que l'étape suivante ne soit admise. + +Le correctif de reprise du lifecycle traite explicitement les confirmations RPC interrompues : une +signature prédécesseur confirmée est hydratée, extraite, décodée, rapprochée de l'opération attendue +et rejouée idempotemment avant de reprendre à l'index demandé. Un délai borné sépare ensuite les +étapes afin de réduire la pression sur les endpoints Devnet publics, sans masquer leurs erreurs. + +Le lifecycle Devnet réel a été validé le 15 juillet 2026 après une interruption du RPC public : la +reprise a récupéré l'initialisation déjà confirmée, puis achevé mint, transfer, approve/revoke, deux +burn et deux close. Chaque étape récupérée ou envoyée a produit exactement une matérialisation et un +second replay idempotent. La fenêtre opérateur `pre.007` permet désormais de rejouer le parcours +représentatif `TransferChecked` et de consulter ces faits `token_account`, `admin` et `risk` comme +événements chronologiques, sans inventer un état final de compte. + +L'audit `pre.008` reporte dans `docs/SPL_TOKEN_MATRIX.json` les preuves par instruction. Le corpus +Mainnet réel couvre `Transfer`, `Approve`, `CloseAccount`, `TransferChecked`, `BurnChecked` et +`SyncNative`; ses trois initialisations restent volontairement référencées sous leur nom matérialisé +normalisé sans inventer une variante wire. Le lifecycle Devnet prouve `InitializeAccount3`, +`MintToChecked`, `TransferChecked`, `ApproveChecked`, `Revoke`, `BurnChecked` et `CloseAccount`. +Localnet n'a pas été exécuté, et la publication p-token des tags `45`/`255` n'est pas assimilée à +leur déploiement sur un cluster public. + +La validation Tauri de `pre.007` a démarré Vite et l'application, réussi le préflight et la +simulation `TransferChecked`, puis refusé correctement l'envoi sans confirmation opérateur. Avec +confirmation, un second refus a identifié que le wallet du profil et l'autorité Token étaient deux +clés distinctes. La démo ne tente jamais de signer à la place d'une autorité externe ; pour envoyer, +les comptes Token doivent appartenir au wallet persistant sélectionné, comme dans le scénario +backend Devnet déjà confirmé et matérialisé. + +La clôture du 16 juillet 2026 confirme les régressions ciblées, PostgreSQL réel, Clippy et Tauri. +Les validations finales couvrent notamment 5 tests Program IDs, 8 tests décodeur Token, 15 tests +exécuteur Token, 9 tests décodeur Memo, 7 tests annotations, 22 tests API d'exécution, 15 tests +safety, 12 tests transaction Solana, 81 tests pipeline, 113 tests RPC, 41 tests configuration, +102 tests démo et 46 tests PostgreSQL réels. Tauri charge 77 routes de logs, simule +`TransferChecked`, bloque l'envoi non confirmé, restitue sa matérialisation commitée exacte et +simule Memo v4 sans erreur runtime. + +## Jalon validé `0.4.5` + +`0.4.5` clôt la surface SPL Associated Token Account avec +`spl-associated-token-account-interface 2.0.0`. Le décodeur reconnaît exactement `Create`, +`CreateIdempotent`, `RecoverNested` et la forme historique vide de `Create`; il conserve comptes +ordonnés, flags, doublons, outer/inner paths, transactions échouées non commitées et diagnostics +bornés. Les PDA sont dérivés et validés explicitement avec les seeds +`[wallet, Token Program ID, mint]`, ce qui distingue les ATA classiques des ATA Token-2022 sans +prétendre décoder les extensions de ce dernier. + +Le lifecycle ATA est possédé par `kb_materializer_token_accounts` : création normale, création ou +réutilisation idempotente non distinguable depuis le parent seul, et récupération nested. +`kb_materializer_risk` possède séparément le constat factuel d'anti-pattern nested récupéré. Les +matérialiseurs lifecycle général, admin et fees déclarent explicitement leur absence de projection, +et les CPI SPL Token conservent seules leurs initialisations, transferts et fermetures. Les +transactions échouées ou structurellement invalides ne produisent aucune mutation. + +`kb_executor_spl_associated_token_account` construit les trois variantes actuelles avec les +builders officiels, pour SPL Token classique ou Token-2022. Simulation et dry-run sont obligatoires +par défaut. Le préflight Localnet/Devnet contrôle cluster, mints, Program IDs, dérivations, comptes +existants, signataires, rent et plafonds ; la post-validation vérifie création/réutilisation ou les +conditions de fermeture/transfert de `RecoverNested`. + +Les preuves Devnet du 16 juillet 2026 couvrent deux parcours complets `CreateIdempotent` classiques, +la création puis la réutilisation d'un ATA Token-2022 avec `ImmutableOwner`, et un +`RecoverNested` classique transférant 1 000 000 000 unités brutes avant fermeture du nested ATA. +Chaque soumission a été simulée, confirmée, hydratée, extraite, décodée et matérialisée, puis rejouée +sans doublon. La fenêtre Tauri unique expose création ATA et journal lifecycle borné ; +`RecoverNested` reste couvert hors UI par un test opt-in contrôlé. + +La validation finale confirme les régressions Token/Memo, 10 tests décodeur ATA, 10 tests exécuteur +ATA, 90 tests pipeline, 113 tests RPC, 41 tests configuration, 111 tests démo, 46 tests PostgreSQL +réels et `cargo clippy --all-targets` propre. Les versions Rust, npm et Tauri sont synchronisées en +`0.4.5`. + +## Jalon validé `0.4.6` + +`0.4.6` clôt Token-2022 et le registre ElGamal comme surfaces séparées. Token-2022 couvre les instructions de base, les extensions identifiables, les états Mint/Account/Multisig et TLV, les matérialisations propriétaires et les exécuteurs simulation-first. Le registre ElGamal conserve son propre Program ID, sa matrice, son état de 64 octets, son PDA et ses opérations administratives ; il n’est pas fusionné avec Token-2022 ni avec le programme natif ZK ElGamal Proof. + +La validation publique Token-2022 comprend huit opérations Devnet confirmées et 55 instructions Mainnet décodées sans échec. La validation réseau ElGamal Registry reste indisponible sur les clusters publics au 20 juillet 2026, mais ses builders, parsers, préflights, preuves et scénarios stateful sont validés synthétiquement/offline. Le bilan détaillé est publié dans `docs/V0_4_6_VALIDATION.md`. + +Le replay contextualisé dispose désormais du mode `incomplete_signatures`. Il sélectionne uniquement les signatures contenant au moins une instruction `pending`, `failed`, `replay_requested` ou `unsupported`, applique la limite aux signatures avant expansion et réévalue leurs instructions compatibles sans activer le force replay global. Deux campagnes PostgreSQL réelles ont sélectionné 81 entrées chacune : 1 décodée, 4 unsupported et 76 rejets fail-closed appartenant tous à des transactions Solana échouées. + +La régression finale confirme `kb_store_core` 41/41, `kb_store_pg` 46/46 avec PostgreSQL réel, `kb_pipeline` 124/124, `kb_app_demo` 118/118 et `cargo clippy --all-targets` propre. + +## Jalon actif `0.4.7` + +La suite active est Metaplex Token Metadata selon `prompts/026_v0_4_7_metaplex_token_metadata.md`. La préversion `0.4.7-pre.001` ouvre l’audit avec les crates `kb_decoder_metadata_metaplex_token_metadata` et `kb_executor_metadata_metaplex_token_metadata`, ainsi que `docs/METAPLEX_TOKEN_METADATA_MATRIX.json`, sans activation runtime tant que le wire complet n’est pas prouvé. L’exécuteur existe comme frontière audit-only parce que le SDK officiel fournit des builders, mais il n’expose encore aucune construction de transaction. Ce programme indépendant complète les metadata externes des mints SPL Token classique et Token-2022 sans être absorbé par leurs décodeurs. La priorité porte sur la frontière exacte du Program ID, les PDA et layouts versionnés, les NFT/collections/programmable assets, la provenance des metadata et le replay PostgreSQL idempotent. + +Anchor n’est pas requis par les programmes SPL planifiés dans `0.4.x`. Son infrastructure commune est reportée à `0.4.18`, immédiatement avant Meteora, afin d’être conçue à partir des besoins réels des protocoles Anchor sans retarder Metaplex et les autres surfaces Core/SPL. + +## Backend de données + +PostgreSQL est le backend principal prévu. SQLite reste présent uniquement pour les tests, les imports ponctuels ou les petits corpus locaux. + +Les tables Solana PostgreSQL utilisent le schéma courant du profil, généralement `public`. Le projet ne crée pas de schémas applicatifs explicites comme `raw`, `core`, `obs`, `decode`, `mat`, `catalog`, `agg`, `ops` ou `wallet`. La séparation logique se fait dans le nom physique de table au format `kb_sol__`, par exemple `kb_sol_raw_transactions`. + +## Replay des signatures incomplètes + +La fenêtre de replay contextualisé de `kb_app_demo` expose un mode `signatures_incomplete`. Il sélectionne uniquement les signatures contenant au moins une instruction `pending`, `failed`, `replay_requested` ou un résultat `unsupported`, puis réévalue les instructions compatibles de ces signatures sans activer le force replay global. La limite porte sur le nombre de signatures incomplètes avant expansion. La matérialisation reste optionnelle et idempotente. + +Ce mode est destiné aux backfills croissants : une correction de décodeur peut reprendre seulement les signatures incomplètes au lieu de rejouer toutes les signatures déjà réussies. + +## Livraison par delta + +Après le squelette initial, les modifications doivent être livrées sous forme de zip delta contenant uniquement les fichiers ajoutés ou modifiés. Un delta multi-module ou racine utilise `khadhroony-bot2_vX.Y.Z-pre.abc-delta.zip`. Un delta limité à un module Rust utilise `kb_modulename_vX.Y.Z-pre.abc-delta.zip`. Un correctif conserve le même numéro `pre.abc` et ajoute `-delta-fix-001.zip`, puis `-fix-002.zip`, au lieu d’incrémenter la préversion. Chaque archive contient un `delta.md` non versionné listant les fichiers ajoutés, modifiés, à supprimer manuellement, ainsi que les validations exécutées ou non exécutées. + +## Surfaces réservées + +Le workspace réserve dès le squelette les crates de décodage pour les DEX, launchpads, orderbooks, routers, perps et surfaces candidates recensés dans `idls/` et dans la documentation de conception. Ces crates restent des points d'ancrage tant que les discriminants, corpus et règles de matérialisation ne sont pas validés. + + +## Registres de programmes + +Le workspace distingue deux registres : + +- `registry/program_registry_seed.toml` pour les surfaces applicatives et protocolaires ; +- `registry/core_program_id_seed.toml` pour les programmes primitifs, loaders, sysvars et comptes natifs Solana/SPL. + +Les comptes non exécutables observés pendant la recherche restent documentés dans `docs/ACCOUNT_ONLY_CANDIDATES.md`. Bags dispose maintenant aussi d'une note dédiée dans `docs/BAGS_FM.md` pour les programmes Fee Share V1/V2 confirmés. + +## Classification des surfaces + +La classification des IDL locales est suivie dans `docs/IDL_SURFACE_CLASSIFICATION.md`. Le registre machine principal reste `registry/program_registry_seed.toml`. + +## Configuration, endpoints et listeners + +Le workspace utilise `kb_config` pour charger plusieurs profils de configuration, avec un seul profil actif. Le fichier JSON est d'abord validé par `config/schema.config.json`, puis désérialisé et validé par les règles métier Rust. + +Le pipeline normalise toutes les sources vers une transaction canonique commune. HTTP JSON-RPC est utilisé d’abord pour les backfills gratuits. Helius `transactionSubscribe` et Yellowstone gRPC seront ajoutés plus tard dans `kb_rpc`, après les décodeurs prioritaires, sans créer de crate provider séparée. La fenêtre `demo_backfill` permet de lancer des campagnes bornées par liste de signatures, programme, token ou pool. En direction « avant, plus anciennes », une ancre vide commence sur la page la plus récente ; la direction « après, plus récentes » exige toujours une signature d’ancrage. + +Les listeners WebSocket doivent permettre la détection temps réel des créations de token, créations de pool, migrations, swaps, changements de liquidité et changements sur les tokens ou pools surveillés. Les exports TS-rs de `kb_config` servent uniquement à partager les types Rust/TypeScript avec les applications Tauri comme `kb_app_demo`, puis les futures applications wallet ou finales. Les payloads Tauri partagés, comme la page de configuration, doivent aussi être exportés par TS-rs depuis leur crate applicative. + +### Metaplex Token Metadata `0.4.7-pre.016` + +L’inventaire officiel complet des modules d’instruction a été réaudité avant le passage aux comptes on-chain. `FreezeDelegatedAccount` et `ThawDelegatedAccount` historiques sont désormais décodés avec leurs contrats exacts ; les autres surfaces encore absentes restent planifiées avant toute déclaration de couverture exhaustive. + diff --git a/olddocs/archivekbot2/ROADMAP.md b/olddocs/archivekbot2/ROADMAP.md new file mode 100644 index 0000000..f21cd46 --- /dev/null +++ b/olddocs/archivekbot2/ROADMAP.md @@ -0,0 +1,1439 @@ + + + +# Roadmap + +Ce fichier contient les changements futurs et le phasage prévu. Il ne remplace pas le changelog : le changelog ne reçoit que les versions validées. + +## Version 0.0.x — stabilisation du squelette + +- [x] Réserver les crates core, décodeurs, matérialisateurs, exécuteurs et applications. +- [x] Valider que le workspace compile après ajout de la couche d'exécution. +- [x] Conserver `CHANGELOG.md` pour les versions validées uniquement. +- [x] Réserver `prompts/` pour les futures sessions ChatGPT par version. +- [x] Documenter les objectifs court terme et long terme. +- [x] Ajouter `kb_config` et `config/example.config.json` comme base de configuration. +- [x] Ajouter les surfaces Bags Fee Share V1/V2 confirmées. +- [x] Définir le format obligatoire des zips delta ChatGPT. +- [x] Mettre à jour `CHANGELOG.md` pour `0.0.1` et `0.0.2`. +- [x] Exécuter `cargo build`. +- [x] Exécuter `cargo test --workspace`. +- [x] Exécuter `cargo clippy --workspace --all-targets`. +- [x] Faire le commit `v0.0.2` comme squelette stabilisé. + +## Version 0.1.x — logging et configuration + +### 0.1.0 — `kb_logging` + +- [x] Finaliser l'API publique minimale de `kb_logging`. +- [x] Définir les routes de logs console, fichier humain, fichier JSON et fichier erreurs. +- [x] Router les logs vers console, fichier humain, fichier JSON et fichier erreurs. +- [x] Gérer les niveaux par target et par sortie. +- [x] Conserver le nettoyage ANSI des fichiers via writer dédié pour les messages issus de WebView Tauri. +- [x] Ajouter la normalisation des globs `crate::*` en plus des globs `crate.*`. +- [x] Ajouter les tests unitaires de configuration des targets et expressions de filtres. +- [x] Ajouter les tests unitaires de sélection des routes console, fichier humain, fichier JSON et fichier erreurs. +- [x] Ajouter les tests unitaires du writer sans ANSI. +- [x] Valider localement `cargo test -p kb_logging` : 14 tests passés. +- [x] Valider localement `cargo clippy -p kb_logging --all-targets`. +- [x] Reporter `0.1.0` dans `CHANGELOG.md` après validation. + +### 0.1.1 — `kb_config` + +- [x] Finaliser les structures typées de configuration. +- [x] Normaliser les exports TS-rs avec `export_to = "../frontend/ts/bindings/kb_config/settings/*.ts"`. +- [x] Charger un fichier JSON avec plusieurs profils. +- [x] Garantir un seul profil actif. +- [x] Ajouter `config/schema.config.json`. +- [x] Valider le JSON brut via `jsonschema`. +- [x] Valider les profils absents, dupliqués ou incohérents. +- [x] Exclure du schéma les transports avancés hors périmètre avant `v1.x`. +- [x] Conserver les placeholders de clés directement dans les URLs. +- [x] Supprimer `ProfileConfig.enabled` : `active_profile` est l’unique sélection de profil. +- [x] Retirer `data.idls_directory` du contrat runtime : les IDLs restent des artefacts de développement. +- [x] Conserver `kb_core` comme dépendance anticipée pour les erreurs communes workspace. +- [x] Valider `config/example.config.json`. +- [x] Ajouter les tests de parsing, validation et sérialisation. +- [x] Valider localement `cargo test --tests -p kb_config` : 35 tests passés. +- [x] Valider localement `cargo clippy -p kb_config --all-targets`. +- [x] Reporter `0.1.1` dans `CHANGELOG.md` après validation. + +### 0.1.2 — liaison `kb_logging`, `kb_config` et démo Tauri + +- [x] Initialiser `kb_logging` depuis le profil actif. +- [x] Appliquer les niveaux, formats et chemins de fichiers depuis la configuration. +- [x] Vérifier la création des fichiers de logs configurés et conserver la rotation comme amélioration future. +- [x] Conserver `main.html` comme fenêtre d'accueil. +- [x] Rendre le README workspace en HTML dans la fenêtre `main` sans afficher les commentaires de métadonnées `file/version`. +- [x] Ajouter dans `main.html` un dropdown vers les fenêtres de démonstration. +- [x] Créer `kb_app_demo/src/demo_config.rs` comme fenêtre de démo uniquement. +- [x] Créer `kb_app_demo/frontend/demo_config.html`. +- [x] Créer `kb_app_demo/frontend/ts/demo_config.ts`. +- [x] Réutiliser le même format visuel que la fenêtre principale. +- [x] Afficher le profil actif, la configuration complète et le schéma JSON. +- [x] Ajouter un viewer JSON interactif pour le profil actif, la configuration complète et le schéma JSON. +- [x] Désactiver le toolbar natif du viewer JSON pour éviter les boutons d’indentation non configurables. +- [x] Exporter `DemoConfigPayload` via TS-rs et l'importer côté TypeScript. +- [x] Déclarer `demo_config` dans `capabilities/default.json` et `vite.config.ts`, puis créer la fenêtre à la demande depuis Rust pour éviter une fenêtre cachée bloquante. +- [x] Corriger la fermeture de l’application lorsque `demo_config` n’a jamais été ouverte. +- [x] Ajouter un pont `emit_frontend_log` pour réémettre les logs WebView avec des targets `tracing` statiques. +- [x] Router `kb_app_demo.frontend::*` dans la console et le fichier debug de `kb_app_demo`. +- [x] Ajouter `AppState` comme état applicatif global dans `kb_app_demo/src/app_state.rs`. +- [x] Retirer l’initialisation runtime globale de `demo_config`, qui reste une simple fenêtre de démo. +- [x] Ajouter un verrou mono-instance uniquement dans `kb_app_demo/src/main.rs`, non appliqué à `kb_app_demo_lib::run()` pour préserver l’entrée mobile. +- [x] Déplacer l’installation du provider Rustls par défaut dans `kb_app_demo_lib::run()` pour desktop et mobile. +- [x] Ajouter un splashscreen avec fade-in/fade-out et durée minimale extensible pour les vérifications longues futures. +- [x] Aligner le branchement du splashscreen dans `tauri_builder.setup` sur le modèle de `khadhroony-bobobot/kb_demo_app`. +- [x] Corriger `SplashOrder.duration_ms` en `u32` pour éviter un type BigInt côté TypeScript. +- [x] Corriger l’animation du splash avec `requestAnimationFrame`, une opacité initiale explicite et une attente initiale de `1500 ms` avant fade-in. +- [x] Valider visuellement le fade-in/fade-out dans `cargo tauri dev`. +- [x] Valider localement `cargo test -p kb_core` : 2 tests passés. +- [x] Valider localement `cargo test -p kb_config` : 35 tests passés. +- [x] Valider localement `cargo test -p kb_logging` : 14 tests passés. +- [x] Valider localement `cargo test -p kb_app_demo` : 12 tests passés. +- [x] Valider localement `cargo clippy --all-targets`. +- [x] Valider localement `cargo tauri dev -c kb_app_demo/tauri.conf.json` depuis la racine du workspace. +- [x] Reporter `0.1.2` dans `CHANGELOG.md` après validation. + +### 0.1.3 — clients HTTP/WS Solana standard, rôles et pools + +- [x] Explorer `khadhroony-bobobot/kb_lib` et les anciennes démos HTTP/WS comme source d'adaptation. +- [x] Remonter depuis `0.3.x` les points déjà nécessaires : réutilisation des pools HTTP/WS validés et finalisation initiale de `kb_rpc`. +- [x] Ajouter les contrats JSON-RPC 2.0 partagés entre HTTP et WebSocket. +- [x] Créer ou finaliser le client HTTP JSON-RPC Solana standard dans `kb_rpc`. +- [x] Créer ou finaliser le client WebSocket Solana standard court dans `kb_rpc`. +- [x] Ajouter la gestion de pool HTTP par rôle d'endpoint. +- [x] Ajouter la gestion de pool WebSocket par rôle d'endpoint. +- [x] Finaliser le premier modèle de rôles d'endpoints exploitable par les pools. +- [x] Associer chaque rôle à un ou plusieurs types de requêtes via `request_kinds`. +- [x] Router les requêtes HTTP et les requêtes WebSocket par rôle. +- [x] Préparer les contrats nécessaires aux futurs pools HTTP et WebSocket persistants. +- [x] Ajouter une fenêtre de démo HTTP JSON-RPC dédiée dans `kb_app_demo`. +- [x] Ajouter une fenêtre de démo WebSocket dédiée dans `kb_app_demo`. +- [x] Remplacer les champs libres `role`/`method` des démos HTTP/WS par des listes contrôlées issues de la config et des méthodes supportées. +- [x] Ajouter une connexion/déconnexion explicite dans `demo_ws`. +- [x] Réutiliser la même connexion WebSocket pour plusieurs souscriptions tant que l’endpoint sélectionné reste identique. +- [x] Conserver la connexion WebSocket dans `AppState` quand la fenêtre `demo_ws` est fermée puis recréée. +- [x] Ne plus déconnecter automatiquement `demo_ws` à la fermeture de la fenêtre ; réserver la fermeture au bouton déconnecter ou à l’arrêt global de l’application. +- [x] Remplacer l’affichage JSON échappé des démos par des zones texte readonly avec bouton de copie. +- [x] Ajouter le refresh explicite des pools HTTP/WS depuis les fenêtres de démo. +- [x] Ajouter un profil `mainnet` Helius avec les paramètres issus de l’ancien `config.json` fourni. +- [x] Élargir les listes de méthodes HTTP/WS de démonstration aux commandes Solana standard courantes. +- [x] Ajouter un champ `Params JSON complet` à la démo HTTP pour tester les méthodes multi-paramètres. +- [x] Ajouter l’unsubscribe explicite d’une subscription WebSocket sélectionnée sans fermer la socket persistante. +- [x] Ajouter une limitation côté Rust des notifications WebSocket envoyées à la WebView pour éviter le gel sur les subscriptions très bavardes. +- [x] Borner côté TypeScript l'historique affiché dans `demo_ws`. +- [x] Ajouter les tests unitaires offline de `kb_rpc` pour JSON-RPC, rôles, endpoints désactivés, snapshots, round-robin HTTP/WS et génération d’IDs. +- [x] Ajouter les liens correspondants dans le dropdown de la fenêtre principale. +- [x] Conserver les démos dans des fichiers Rust, HTML et TypeScript séparés comme dans `khadhroony-bobobot/kb_demo_app`. +- [x] Confirmer que gRPC, Helius enhanced WebSocket, Helius gRPC et LaserStream restent hors scope avant `v1.x` ou `v2.x`. +- [x] Reporter vers les versions RPC ultérieures les wrappers métier spécialisés HTTP/WS à partir des commandes RPC déjà couvertes dans `khadhroony-bobobot`. +- [x] Conserver les limites comme contrat de configuration et reporter vers `0.4.x` leur enforcement runtime par token bucket et pause 429. +- [x] Reporter vers `0.7.x` la généralisation des clients WebSocket persistants de production avec registry, unsubscribe contrôlé et relay d'événements durables. +- [x] Valider localement `cargo test -p kb_rpc` : 39 tests passés. +- [x] Valider localement `cargo test -p kb_app_demo` : 28 tests passés. +- [x] Valider localement `cargo clippy --all-targets`. +- [x] Valider visuellement `demo_http` dans `cargo tauri dev -c kb_app_demo/tauri.conf.json`. +- [x] Valider visuellement `demo_ws` dans `cargo tauri dev -c kb_app_demo/tauri.conf.json`. +- [x] Valider que le pool HTTP alterne entre endpoints compatibles avec le profil `mainnet_research`. +- [x] Valider que `programSubscribe` très bavard reste utilisable grâce au throttling UI et que l’unsubscribe fonctionne. +- [x] Reporter `0.1.3` dans `CHANGELOG.md` après validation. + +## Version 0.2.x — SQL, stockage et conventions DB + +### 0.2.0 — conventions storage, préfixes et contrats + +- [x] Auditer les crates existantes concernées par le stockage : `kb_store_core`, `kb_store_pg`, `kb_config`, `kb_core`, `kb_app_demo` et, si nécessaire seulement, `kb_rpc`. +- [x] Définir le rôle exact de chaque crate touchée avant d'ajouter des migrations ou des requêtes. +- [x] Valider que PostgreSQL utilise le schema courant/default, généralement `public`, sans schemas applicatifs explicites. +- [x] Valider le préfixe de table `kb_sol__` pour les tables Solana du nouveau projet. +- [x] Définir les domaines intégrés au nom de table : `raw`, `core`, `obs`, `decode`, `mat`, `catalog`, `agg`, `ops`, `wallet`. +- [x] Documenter les tables candidates initiales sans les implémenter toutes immédiatement. +- [x] Utiliser uniquement des noms de tables sans préfixe de schema explicite, par exemple `kb_sol_raw_rpc_transactions`, `kb_sol_core_transactions`, `kb_sol_obs_program_observations`, `kb_sol_decode_decoded_events`, `kb_sol_mat_trade_events`, `kb_sol_catalog_tokens` et `kb_sol_ops_processing_ledger`. +- [x] Définir la séparation stricte `entities/`, `dtos/`, `queries/`, `repositories/`. +- [x] Interdire les structures Rust dans `queries/` : les structures appartiennent à `entities/` ou `dtos/`. +- [x] Définir la convention `Entity` comme représentation proche d'une ligne SQL. +- [x] Définir la convention `Dto` comme contrat applicatif, Tauri ou repository. +- [x] Définir la convention `InsertDto` / `UpsertDto` pour les écritures. +- [x] Définir les règles de nommage SQL : `id`, `created_at`, `updated_at`, `slot`, `signature`, `program_id`, `raw_json`, `payload_json`. +- [x] Définir les contraintes minimales : clés primaires, index uniques, index par signature, slot, program id et temps d'insertion. +- [x] Définir les migrations comme artefacts PostgreSQL versionnés dans `kb_store_pg`. +- [x] Préparer la page Tauri future de diagnostic DB sans l'implémenter si le store n'est pas encore prêt. +- [x] Mettre à jour `kb_store_core/README.md` avec les conventions validées. +- [x] Mettre à jour `kb_store_pg/README.md` avec les conventions PostgreSQL validées. +- [x] Mettre à jour ou créer un document de prompt pour ouvrir la suite `0.2.x`. +- [x] Neutraliser les migrations héritées qui créaient des schemas applicatifs ou des tables qualifiées comme `raw DOT sol_transactions`. +- [x] Ne pas modifier `CHANGELOG.md` avant validation locale du jalon. + +### 0.2.1 — `kb_store_core` contrats et types communs + +- [x] Créer les modules publics minimaux de `kb_store_core` sans dépendre de PostgreSQL. +- [x] Ajouter les erreurs storage en s'appuyant sur `kb_core::Error` et `kb_core::Result`. +- [x] Ajouter les types communs : pagination, tri, limites, healthcheck, statut migration. +- [x] Ajouter les premiers DTO génériques : raw RPC transaction, raw WS notification, core transaction, core instruction. +- [x] Ajouter les contrats core pour account keys, logs et balance changes extraits. +- [x] Ajouter `CoreInstructionReplayInput` pour fournir aux décodeurs une instruction avec contexte extrait. +- [x] Ajouter les contrats de cycle de vie raw : état de rétention, état de traitement et mark lifecycle. +- [x] Ajouter les contrats de replay par instruction : état instruction, filtre de replay et lifecycle mark. +- [x] Ajouter les premiers traits repository sans implémentation SQL. +- [x] Étendre les repositories pour préparer la sélection des instructions non traitées. +- [x] Ajouter tests unitaires offline pour pagination, validation DTO et erreurs. +- [x] Documenter le cycle de vie raw et la future compaction/purge sans l'activer. +- [x] Documenter le split core des instructions, logs, account keys et balances avant les migrations. +- [x] Valider localement `cargo test -p kb_store_core` : 28 tests passés. +- [x] Valider localement `cargo clippy --all-targets` sans avertissement. +- [x] Reporter `0.2.1` dans `CHANGELOG.md` après validation locale. + +### 0.2.2 — `kb_store_pg` connexion PostgreSQL et migrations + +- [x] Ajouter la lecture effective de la configuration PostgreSQL depuis le profil actif. +- [x] Créer les options de connexion PostgreSQL minimales dans `kb_store_pg`. +- [x] Créer le pool PostgreSQL via `sqlx::PgPool`. +- [x] Ajouter le masquage DSN pour les diagnostics. +- [x] Ajouter un healthcheck PostgreSQL minimal basé sur `SELECT 1`. +- [x] Lire le schema courant PostgreSQL via `current_schema()`. +- [x] Lire la version PostgreSQL pour les diagnostics. +- [x] Ajouter une stratégie de migrations PostgreSQL explicite et non destructive. +- [x] Ne pas créer de schemas PostgreSQL applicatifs ; utiliser le schema par défaut du profil, généralement `public`. +- [x] Valider les noms de tables `kb_sol__` et refuser les schemas explicites. +- [x] Ajouter des tests offline pour options, masquage DSN et validation des noms de tables. +- [x] Ajouter un test PostgreSQL réel optionnel contrôlé par `KB_POSTGRES_TEST_URL`. +- [x] Valider localement `cargo test -p kb_store_pg` : 11 tests passés. +- [x] Valider localement le test PostgreSQL réel optionnel `optional_postgres_healthcheck_from_env` avec `postgres://solana:solana@localhost:5432/solana`. +- [x] Valider localement `cargo test -p kb_store_core` : 28 tests passés. +- [x] Valider localement `cargo test -p kb_config` : 35 tests passés. +- [x] Valider localement `cargo test -p kb_app_demo` : 28 tests passés. +- [x] Valider localement `cargo clippy --all-targets` sans avertissement après correction de l'exception `async_trait` / `clippy::implicit_return`. +- [x] Reporter `0.2.2` dans `CHANGELOG.md` après validation. + +### 0.2.3 — raw store Solana minimal + +- [x] Créer `kb_sol_raw_rpc_transactions` pour stocker le raw RPC immuable. +- [x] Créer `kb_sol_raw_ws_notifications` pour stocker les notifications WebSocket brutes utiles. +- [x] Prévoir `notification_key`, signature optionnelle et lien optionnel vers la transaction RPC canonique. +- [x] Créer les queries et repositories PostgreSQL associés aux DTOs `0.2.1`. +- [x] Ajouter insert idempotent par signature pour les transactions raw. +- [x] Ajouter insert append-only dédupliqué par `notification_key` pour les notifications WS raw. +- [x] Ajouter index minimaux par signature, slot, subscription kind, lien RPC et date d'insertion. +- [x] Ajouter une initialisation idempotente `PostgresStore::initialize_raw_store_schema()`. +- [x] Préparer `auto_initialize_schema` pour appliquer le schéma raw minimal après connexion quand le profil le demande. +- [x] Documenter que `0.2.3` ne purge pas encore physiquement `raw_json`. +- [x] Valider localement `cargo test -p kb_store_pg` : 21 tests passés. +- [x] Valider localement le test PostgreSQL réel optionnel `optional_postgres_raw_store_roundtrip_from_env` avec `KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/solana`. +- [x] Valider localement `cargo test -p kb_store_core` : 28 tests passés. +- [x] Valider localement `cargo test -p kb_config` : 35 tests passés. +- [x] Valider localement `cargo test -p kb_app_demo` : 28 tests passés. +- [x] Valider localement `cargo clippy --all-targets` sans avertissement. +- [x] Reporter `0.2.3` dans `CHANGELOG.md` après validation. + +### 0.2.4 — core Solana normalisé minimal + +- [x] Créer les tables core minimales : `kb_sol_core_transactions`, `kb_sol_core_account_keys`, `kb_sol_core_instructions`, `kb_sol_core_inner_instructions`, `kb_sol_core_logs`, `kb_sol_core_balance_changes`. +- [x] Construire `CoreInstructionReplayInput` depuis les tables `core` pour les décodeurs. +- [x] Marquer les instructions insérées comme `Pending` pour permettre un replay instruction-level. +- [x] Préparer le replay partiel par état, slot et program id via `CoreInstructionReplayFilter`. +- [x] Ajouter une initialisation idempotente raw/core via `PostgresStore::initialize_store_schema()`. +- [x] Sérialiser l'initialisation raw/core par verrou PostgreSQL `pg_advisory_xact_lock`. +- [x] Normaliser les noms de contraintes et d'index PostgreSQL avec les préfixes `pk_`, `fk_`, `ck_`, `ux_` et `ix_`. +- [x] Ajouter un script SQL de maintenance pour supprimer les tables raw/core dans l'ordre inverse des dépendances. +- [x] Valider localement le script `kb_store_pg/maintenance/drop_raw_core_store.sql` sur la base PostgreSQL locale. +- [x] Valider localement `KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/solana cargo test -p kb_store_pg -- --nocapture` : 30 tests passés. +- [x] Valider localement la création des 8 tables raw/core dans PostgreSQL. +- [x] Valider localement `cargo clippy --all-targets` sans avertissement. +- [x] Reporter le worker/extracteur raw RPC vers core vers les jalons d'ingestion/backfill, car `0.2.4` valide uniquement le stockage core et les inputs de replay. +- [x] Reporter les observations minimales et le ledger ops vers un jalon dédié après stabilisation de l'extraction. +- [x] Reporter l'extension du replay par module, version, signature, surface et discriminator après l'introduction des domaines `decode` et `ops`. +- [x] Reporter `0.2.4` dans `CHANGELOG.md` après validation. + +### 0.2.5 — diagnostics SQL dans `kb_app_demo` + +- [x] Ajouter `demo_sql_diag` pour le diagnostic PostgreSQL global : profil actif, backend, DSN masqué, schema courant, tables détectées, version migrations et healthcheck. +- [x] Ajouter `demo_sql_pg_raw` pour les tables `kb_sol_raw_rpc_transactions` et `kb_sol_raw_ws_notifications`. +- [x] Ajouter `demo_sql_pg_core` pour les tables core normalisées `kb_sol_core_*`. +- [x] Ajouter les boutons de refresh read-only dans chaque fenêtre. +- [x] Ajouter les liens dans le dropdown de la fenêtre principale. +- [x] Tenter l'initialisation raw/core au démarrage Tauri quand `database.postgres.auto_initialize_schema` est actif. +- [x] Afficher dans le splashscreen les tables créées, déjà présentes, manquantes ou en erreur, avec logs `tracing` associés. +- [x] Remplacer les payloads JSON textuels des démos SQL par le viewer JSON interactif déjà utilisé par `demo_config`. +- [x] Garantir que les démos SQL ne lancent ni extracteur, ni décodage, ni matérialisation. +- [x] Documenter à l’époque que l’extracteur raw RPC vers core était reporté à `0.4.x`; ce phasage historique est remplacé par le recadrage `0.3.x` ci-dessous. +- [x] Valider localement `cargo test -p kb_store_pg` : 30 tests passés. +- [x] Valider localement `cargo test -p kb_config` : 35 tests passés. +- [x] Valider localement `cargo test -p kb_app_demo` : 32 tests passés. +- [x] Valider localement `cargo clippy --all-targets` sans avertissement. +- [x] Valider visuellement `demo_sql_diag`, `demo_sql_pg_raw` et `demo_sql_pg_core` via `cargo tauri dev -c kb_app_demo/tauri.conf.json`. +- [x] Reporter `0.2.5` dans `CHANGELOG.md` après validation. + +## Version 0.3.x — fondation transactionnelle canonique et backfill gratuit + +`0.3.0` reste le jalon historique de cadrage Agave local validé. Les essais matériels ont ensuite montré qu’un nœud Agave mainnet complet n’était pas une source légère adaptée à cette phase. `0.3.1` réoriente donc la série vers une transaction canonique indépendante de la source, des observations d’acquisition légères, le backfill HTTP gratuit et l’extraction core. + +```text +sources HTTP / WebSocket / gRPC + -> adaptateur de source dans kb_rpc + -> transaction Solana canonique indépendante du provider + -> kb_sol_raw_transactions + -> kb_sol_obs_transaction_observations + -> extraction core + -> décodeurs et matérialiseurs +``` + +Après validation réelle de la transition `0.2.x -> 0.3.1`, les fichiers SQL ont été consolidés en une baseline propre avec `0001_canonical_transaction_store.sql` et `0002_core_store.sql`. `0.3.4` ajoute uniquement `0003_processing_ledger.sql`; l’historique des anciennes tables reste dans le changelog et la documentation, pas dans le DDL actif. + +### 0.3.0 — cadrage Agave local et sources temps réel — clôturé + +- [x] Documenter l’hypothèse d’un nœud Agave local non votant comme source temps réel. +- [x] Préparer le profil manuel `agave_local_research`, les probes RPC/WS et les mesures de ressources. +- [x] Conserver `mainnet_research` comme profil actif stable et ne lancer aucune ingestion de production. +- [x] Valider localement le delta `0.3.0-pre.001` avant mise à jour du changelog. +- [x] Mesurer l’impact réel du snapshot, d’AccountsDB, du ledger, de la RAM, du swap et du réseau. +- [x] Abandonner temporairement Agave local et `blockSubscribe` comme axe actif à cause du coût matériel et opérationnel. +- [x] Reporter les conclusions historiques dans `CHANGELOG.md`. + +### 0.3.1 — transaction canonique et observations d’acquisition — clôturé + +- [x] Remplacer la cible `kb_sol_raw_rpc_transactions` par `kb_sol_raw_transactions`. +- [x] Remplacer la cible `kb_sol_raw_ws_notifications` par `kb_sol_obs_transaction_observations`. +- [x] Renommer `raw_json` en `canonical_json` et `raw_json_hash` en `canonical_json_hash`. +- [x] Ajouter `canonical_format_version`. +- [x] Renommer `kb_sol_core_transactions.raw_rpc_transaction_id` en `raw_transaction_id`. +- [x] Stocker dans les observations uniquement la provenance, le protocole, la méthode, le commitment, la session, le filtre, les timestamps, la taille, les hashes techniques, les statuts et les erreurs. +- [x] Interdire la duplication durable du payload complet dans les observations. +- [x] Aligner DTOs, entities, repositories, requêtes, diagnostics SQL et démos Tauri. +- [x] Valider manuellement la migration réelle depuis le schéma `0.2.x` sur PostgreSQL 17.10. +- [x] Vérifier l’absence de `kb_sol_raw_rpc_transactions` et `kb_sol_raw_ws_notifications`. +- [x] Vérifier la présence de `kb_sol_raw_transactions`, `kb_sol_obs_transaction_observations`, `canonical_json`, `canonical_json_hash`, `canonical_format_version` et `raw_transaction_id`. +- [x] Consolider les migrations SQL en deux fichiers ne contenant que les tables actives. +- [x] Conserver temporairement dans le DDL runtime le chemin de compatibilité idempotent pour les workspaces encore en `pre.001`, sans recréer les anciennes tables. +- [x] Valider `cargo test -p kb_app_demo` : 32 tests passés. +- [x] Valider `cargo test -p kb_store_core` : 30 tests passés. +- [x] Valider `KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/solana cargo test -p kb_store_pg -- --nocapture` : 32 tests passés. +- [x] Valider `cargo clippy --all-targets` sans avertissement. +- [x] Valider le démarrage Tauri et les diagnostics des huit tables raw/obs/core. +- [x] Nettoyer manuellement les fixtures PostgreSQL de test. +- [x] Vérifier et rationaliser les prompts `0.3.x`. +- [x] Reporter `0.3.1` dans `CHANGELOG.md`. + +### 0.3.2 — contrat canonique et adaptateur HTTP — clôturé + +- [x] Définir le type canonique dans `kb_model` et ses conversions explicites. +- [x] Conserver les signatures et public keys en base58, les payloads d’instruction en base64 et les valeurs numériques sans perte. +- [x] Inclure transaction legacy/v0, message header, static account keys, Address Lookup Tables, loaded addresses, outer instructions, inner instructions, logs, statut, erreurs, fee, compute units, cost units, balances SOL/SPL, rewards, return data et block time quand disponibles. +- [x] Garantir une sérialisation déterministe pour `canonical_json_hash` avec tri récursif des objets JSON et SHA-256. +- [x] Ajouter dans `kb_rpc` un adaptateur `getTransaction` JSON-RPC vers le modèle canonique. +- [x] Définir une interface interne commune pour les futurs adaptateurs Helius WebSocket et Yellowstone gRPC, sans créer de crate séparée. +- [x] Ajouter des fixtures offline legacy et v0, succès et échec, ALT, CPI, Token et Token-2022. +- [x] Tester l’idempotence : une même transaction provenant de plusieurs réponses HTTP doit produire le même hash canonique. +- [x] Valider `cargo test -p kb_model` : 23 tests passés. +- [x] Valider `cargo test -p kb_rpc` : 48 tests passés. +- [x] Valider `cargo test -p kb_store_core` : 31 tests passés. +- [x] Valider `KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/solana cargo test -p kb_store_pg -- --nocapture` : 32 tests passés avec roundtrip PostgreSQL réel. +- [x] Ajouter les retours explicites requis dans `kb_model/src/canonical_transaction.rs`, `kb_rpc/src/get_transaction.rs` et `kb_store_core/src/dtos/raw_dtos.rs`. +- [x] Valider `cargo clippy --all-targets` sans avertissement. +- [x] Nettoyer manuellement les fixtures PostgreSQL après validation. +- [x] Reporter `0.3.2` dans `CHANGELOG.md` après validation. + +### 0.3.3 — backfill HTTP sur comptes gratuits — clôturé + +- [x] Ajouter `getSignaturesForAddress` paginé avec `before`, `until`, limite, curseur de reprise et borne `max_pages`. +- [x] Ajouter le backfill d’une liste explicite de signatures séparées par des retours à la ligne. +- [x] Ajouter les campagnes avant/après une signature pour un programme, un token et un pool. +- [x] Hydrater chaque signature avec `getTransaction` via les pools HTTP existants. +- [x] Appliquer le débit, la concurrence et la pause 429 depuis le rôle configuré, avec retries bornés. +- [x] Écrire une seule ligne canonique par signature dans `kb_sol_raw_transactions`. +- [x] Écrire une observation légère par tentative `getTransaction` dans `kb_sol_obs_transaction_observations`. +- [x] Conserver les statuts `missing` et `failed` sans créer de faux payload canonique. +- [x] Ignorer avant hydratation les signatures déjà présentes dans le store canonique. +- [x] Ajouter `demo_backfill` avec accordéons Bootstrap 5, journal, résumé et arrêt coopératif. +- [x] Corriger le parcours `after` avec la borne RPC `until`, la pagination `before`, des pages de 1 000 et une sélection bornée des signatures les plus proches de l’ancre. +- [x] Documenter le fonctionnement dans `docs/BACKFILL_HTTP.md`. +- [x] Valider `cargo test -p kb_rpc` : 54 tests passés. +- [x] Valider `cargo test -p kb_pipeline` : 10 tests passés après le correctif final d’arrêt/reprise. +- [x] Valider `cargo test -p kb_store_core` : 31 tests passés. +- [x] Valider `cargo test -p kb_store_pg` : 32 tests passés. +- [x] Valider `cargo test -p kb_app_demo` et les exports TS-rs : 38 tests passés. +- [x] Valider `cargo clippy --all-targets` sans avertissement. +- [x] Valider visuellement les modes signatures explicites, programme avant/après, token avant/après et pool avant/après dans Tauri. +- [x] Valider le parcours profond `program_after` : 5 516 signatures indexées parcourues pour sélectionner et hydrater les 5 signatures directement postérieures à l’ancre. +- [x] Valider la persistance PostgreSQL réelle : 62 transactions canoniques et 62 observations, sans ligne core avant `0.3.4`. +- [x] Détecter l’arrêt opérateur pendant une campagne de 500 candidats et confirmer l’interruption des nouveaux appels `getTransaction`. +- [x] Remplacer la création globale des futures par une file d’exécution bornée à la concurrence effective. +- [x] Séparer `candidates_started`, `candidates_completed`, `candidates_cancelled` et `candidates_not_started`. +- [x] Calculer le curseur de reprise `before` depuis le dernier préfixe contigu réellement terminé. +- [x] Valider localement le correctif `0.3.3-pre.004` avec `cargo test -p kb_pipeline`, `cargo test -p kb_app_demo` et `cargo clippy --all-targets`. +- [x] Rejouer l’arrêt d’une campagne de 500 candidats et vérifier qu’aucun candidat non démarré n’est journalisé comme traité : 7 démarrés, 3 terminés, 4 annulés et 493 non démarrés. +- [x] Reporter la validation finale de `0.3.3` dans `CHANGELOG.md`. + +### 0.3.4 — extraction transaction canonique vers core et clôture `0.3.x` — clôturé + +- [x] Ajouter le worker `kb_sol_raw_transactions -> kb_sol_core_*` dans `kb_pipeline`. +- [x] Résoudre les account keys statiques et les loaded addresses dans un ordre canonique unique. +- [x] Extraire outer instructions, inner instructions, logs, balances, statut et contexte transactionnel. +- [x] Conserver des hashes déterministes pour les payloads d’instruction et le texte des logs. +- [x] Garantir l’idempotence par signature, indices stables et instruction path. +- [x] Ajouter le ledger `kb_sol_ops_processing_ledger` pour l’extracteur et ses versions. +- [x] Persister le graphe core, l’état raw et le succès ledger dans une transaction PostgreSQL unique. +- [x] Permettre le replay par signature, lot pending, plage de slots et program id déjà indexé. +- [x] Ajouter le mode normal, le force replay, la concurrence bornée et l’arrêt coopératif. +- [x] Ajouter `demo_core_extraction` avec accordéons Bootstrap 5, journal et résumé JSON. +- [x] Ajouter `demo_sql_replay_candidates` avec cinq tableaux read-only : transactions, programmes, mints, owners et account keys. +- [x] Ajouter les filtres PostgreSQL bornés par raw, ledger, slots, programme outer/inner/logs, mint, owner et account key. +- [x] Ajouter sélection par checkbox, reset des filtres, copie individuelle/multiligne et export CSV natif. +- [x] Écrire les CSV dans `data/exports_csv/` avec BOM UTF-8, séparateur `;`, CRLF et nom non écrasant. +- [x] Valider l’écriture CSV native dans Tauri/Linux : `replay_transactions.csv` écrit dans le workspace. +- [x] Ajouter un registre énumérable de 182 program IDs dans `kb_program_ids` et l’exposer à l’interface. +- [x] Ajouter les requêtes SQL d’intégrité raw/core/ledger. +- [x] Valider une extraction pending réelle : 70 extraites, 0 skip, 0 échec. +- [x] Valider l’intégrité après extraction : aucun doublon, orphelin, hash incohérent, ledger incohérent ou chemin inner invalide. +- [x] Valider le skip réel sur 14 signatures : 0 extraction, 14 skips. +- [x] Valider le force replay réel sur les mêmes 14 signatures : 14 extractions, 0 skip, cardinalité core inchangée. +- [x] Valider un second skip après force replay : 0 extraction, 14 skips. +- [x] Confirmer le ledger réel : 70 lignes `succeeded`, 84 tentatives après le force replay. +- [x] Ajouter un test PostgreSQL optionnel qui provoque une erreur intermédiaire, vérifie le rollback complet puis rejoue le bundle corrigé. +- [x] Rendre annulables les appels `getSignaturesForAddress`, `getTransaction`, l’attente du pacer et les pauses de retry/429. +- [x] Ajouter les tests offline d’annulation d’une opération longue et d’une pause de retry déjà annulée. +- [x] Conserver les transactions Solana échouées dans core et les rendre éligibles au futur décodage comme observations d’intention/échec. +- [x] Interdire aux futurs matérialiseurs d’interpréter automatiquement les événements d’une transaction échouée comme mutations d’état réussies. +- [x] Fusionner l’ancien périmètre `0.3.5` dans `0.3.4`; les corpus exhaustifs sont reportés aux versions protocolaires concernées. +- [x] Considérer le sélecteur read-only, les requêtes d’intégrité et le replay core comme outils de clôture de la fondation. +- [x] Valider `cargo test -p kb_pipeline` après l’ajout des tests d’annulation : 24 tests passés. +- [x] Valider `KB_POSTGRES_TEST_URL=... cargo test -p kb_store_pg -- --nocapture` avec le test de rollback : 39 tests passés. +- [x] Valider `cargo clippy --all-targets` sans avertissement. +- [x] Reporter `0.3.4` dans `CHANGELOG.md` et basculer le jalon actif vers `0.4.0`. + +Les contrôles autrefois prévus dans `0.3.5` sont reclassés ainsi : la stabilité canonique entre formes fournisseur est déjà couverte par `0.3.2`; le coût et les limites du backfill sont documentés par `0.3.3`; les corpus exhaustifs Pump, Meteora, Raydium et Orca appartiennent à leurs versions protocolaires; le rejeu réel d’un curseur `before` reste un contrôle opératoire utile mais ne bloque pas l’infrastructure de décodage, car la frontière contiguë et l’arrêt réel ont déjà été validés. + +## Version 0.4.x — décodeurs et matérialisations Solana Core/SPL + +### 0.4.0 — infrastructure de décodage core — clôturé + +- [x] Utiliser `prompts/019_v0_4_0_decoder_infrastructure.md` comme contrat de session. +- [x] Stabiliser les API `kb_decoder_api` et `kb_materializer_api` sur les inputs core contextualisés. +- [x] Ajouter le dispatch déterministe par `program_id`, surface, instruction path, payload/discriminator et contexte inner/logs. +- [x] Ajouter le replay borné par signatures, slots, program IDs, instruction paths, processor/version/hash et force replay. +- [x] Ajouter la persistance atomique des observations décodées, sorties matérialisées, couvertures et ledger. +- [x] Ajouter la politique explicite pour les transactions on-chain échouées et le refus des mutations métier supposées réussies. +- [x] Ajouter la matrice machine-readable déclarée/observée/reconnue/décodée/matérialisée/erreur, séparée par succès ou échec on-chain. +- [x] Ajouter `demo_decode_replay` sans SQL libre, avec sélection, processors, concurrence, journal, arrêt et diagnostics. +- [x] Ajouter le classifieur initial de toutes les surfaces natives connues sans faux décodage. +- [x] Borner automatiquement la sélection SQL aux program IDs déclarés par les décodeurs activés et refuser les filtres incompatibles. +- [x] Permettre au force replay borné par signatures de resoumettre les inputs quel que soit leur lifecycle courant. +- [x] Ajouter l’autorisation explicite « toutes les signatures » bornée par les filtres et la limite. +- [x] Refuser tout force replay sans signatures ni autorisation « toutes les signatures ». +- [x] Désactiver/refuser la matérialisation lorsqu’aucun matérialiseur n’est enregistré. +- [x] Corréler les traces par `campaign_id`, signature, instruction path, program ID et processor/version. +- [x] Valider localement les champs obligatoires du backfill avant invocation Tauri. +- [x] Ne plus réappliquer les DDL à chaque commande Tauri et synchroniser précisément les snapshots de couverture. +- [x] Valider `cargo test -p kb_config` : 36 tests passés. +- [x] Valider `cargo test -p kb_pipeline` : 41 tests passés. +- [x] Valider PostgreSQL réel `cargo test -p kb_store_pg -- --nocapture` : 44 tests passés. +- [x] Valider `cargo test -p kb_app_demo` : 75 tests passés. +- [x] Valider `cargo clippy --all-targets` sans avertissement. +- [x] Valider le build frontend de production avec `(cd kb_app_demo && npm run build)`. +- [x] Valider dans Tauri le skip version/hash, le force replay ciblé, le second skip, le replay global limité, l’annulation et le redémarrage. +- [x] Corriger le résumé d’annulation afin que `completed = started` et `started + not_started = selected`. +- [x] Valider la campagne finale : 382 sélectionnés, 45 démarrés/terminés, 337 non démarrés, aucun unmatched ni échec. +- [x] Valider les diagnostics `0.4.0` : 18 déclarations alors exposées, 382 observations Compute Budget et 94 observations System reconnues sans erreur ; Stake Config a ensuite été reclassé, ramenant le registre exécutable à 17 surfaces dans `pre.008`. +- [x] Reporter `0.4.0` dans `CHANGELOG.md` et basculer le jalon actif vers `0.4.1`. + +### 0.4.1 — programmes Solana natifs, loaders et précompiles — clôturé + +- [x] Utiliser `prompts/020_v0_4_1_native_solana_programs.md` comme contrat de session. +- [x] Auditer l’état réel de `kb_decoder_solana_core`, des types decode, du store, de la couverture et de la démo avant modification. +- [x] Vérifier chaque format d’instruction depuis les sources officielles actuelles ; ne jamais inventer un discriminant, un ordre de champs ou une sémantique. +- [x] Définir une taxonomie stable des événements natifs et les types partagés nécessaires sans créer de dépendance vers PostgreSQL, RPC ou Tauri. +- [x] Décoder maximalement `system`, y compris nonce accounts, seeds, allocate/assign, transfers et `CreateAccountAllowPrefund`, depuis `solana-system-interface 3.2.0`. +- [x] Décoder maximalement `compute_budget`, y compris `RequestUnitsDeprecated`, le tag réservé actuel et les limites modernes de `solana-compute-budget-interface 3.0.0` ; `pre.011` reproduit aussi l’acceptation runtime des octets suffixes via Borsh unchecked et les conserve pour audit. +- [x] Décoder maximalement `address_lookup_table` : create, freeze, extend, deactivate et close depuis `solana-address-lookup-table-interface 3.1.0`. +- [x] Ajouter une matérialisation générique et idempotente du lifecycle ALT, limitée aux observations exactes, réussies et commitées. +- [x] Valider ALT sur corpus mainnet réel : 104 instructions core, 104 inputs décodés, 104 sorties lifecycle, zéro échec ou unsupported. +- [x] Décoder maximalement `vote` depuis `solana-vote-interface ^6.0` avec `serde` + `wincode` : 20 variantes, autorisations, identité, commissions, withdraw, votes/state updates, formes compactes/tower, V2/BLS et récompenses délégateurs ; les deux collecteurs V2 proviennent des comptes d’instruction et non de `VoteInitV2`. +- [x] Décoder maximalement `stake` dans `pre.013` : 18 tags officiels, initialize/authorize/delegate/split/merge/withdraw/deactivate/lockup, variantes checked/seed, minimum delegation, deactivate delinquent, move stake/lamports et `redelegate` historique désactivé. +- [x] Reclasser `StakeConfig11111111111111111111111111111111` comme compte natif historique non exécutable et le retirer du dispatch/domaine d’exécution. +- [x] Valider `pre.013` sur le corpus Stake mainnet : 2 601/2 601 inputs décodés, zéro `failed`, `unsupported` ou `unmatched`, dont 339 instructions Stake réparties sur neuf entry codes observés. +- [x] Décoder `config` comme une écriture générique `ConfigKeys` + payload opaque borné et `feature` comme `revoke_pending_activation` selon leurs interfaces officielles. +- [x] Valider `pre.008` par tests ciblés, PostgreSQL réel, Clippy et démarrage/replay Tauri : 476/476 décodés, aucun échec, `unsupported` ou `unmatched`. +- [x] Valider Config sur corpus réel : 95 instructions décodées, zéro échec ou unsupported. Conserver Feature en validation synthétique faute d’invocation core observable dans les campagnes adressées. +- [x] Valider Vote par tests ciblés et replay mainnet : 51 tests décodeur réussis, 500 instructions Vote réelles décodées, toutes `tower_sync`, zéro échec Vote ; les 20 variantes restent couvertes par fixtures `wincode` officielles. +- [x] Valider `pre.011` après correction Compute Budget : 52 tests natifs, Clippy propre et force replay mainnet de 1 265/1 265 inputs décodés, avec zéro `failed`, `unsupported` ou `unmatched`. +- [x] Stabiliser dans `pre.012` le tracing transversal avant de reprendre les décodeurs : target canonique égal au package Cargo, matrice globale et par crate, `error.jsonl` dédié, erreurs decode/materialize structurées et responsabilité laissée à la crate opérationnelle. +- [x] Auditer les crates utilisant `tracing.workspace = true` et couvrir les treize crates alors actives par un test de constante canonique et par les routes des trois profils. +- [x] Ajouter le tracing propriétaire manquant sur les clients/pools HTTP et WebSocket ainsi que sur le backfill ; promouvoir les inputs decode unmatched, statuts failed/unsupported et échecs de matérialisation/persistance au niveau `error`. +- [x] Formaliser dans `docs/SOLANA_INTERFACE_DEPENDENCIES.md` la politique d’interfaces officielles : dépendance seulement au point de consommation, priorité `wincode` puis Borsh, parser borné lorsque l’interface n’expose que `bincode`. +- [x] Passer `CoreInstructionReplayInput` au contrat `2` avec une liste stable et numériquement ordonnée des instructions outer, sans migration SQL, afin de résoudre les références inter-instructions des précompiles. +- [x] Décoder `zk_elgamal_proof` dans `pre.015` selon `solana-zk-elgamal-proof-interface ^0.1` et le runtime Agave : treize discriminants, preuves inline ou référencées par compte, contexte optionnel et fermeture du contexte, sans recalcul cryptographique. +- [x] Décoder dans `pre.016` l’ancien `zk_token_proof` comme compatibilité historique, puis retirer dans `pre.019` la dépendance dépréciée `solana-zk-token-sdk` au profit d’un miroir wire local borné des dix-sept discriminants et tailles auditées. +- [x] Décoder les loaders `native_loader`, `bpf_loader_deprecated`, `bpf_loader`, `bpf_loader_upgradeable` et `loader_v4` ; classer l’invocation Native Loader opaque comme `ignored` sans sémantique inventée. +- [x] Décoder dans `pre.014` les précompiles `ed25519`, `secp256k1` et `secp256r1`, y compris compteurs, tables d’offsets, références outer courantes/externes, recovery ID secp256k1 et payloads structurés bornés sans recalcul cryptographique. +- [x] Conserver Memo hors périmètre natif et réserver `kb_decoder_spl_memo` pour ses générations v1, v3 et v4. +- [x] Distinguer `recognized`, `decoded`, `ignored`, `unsupported` et `failed` sans convertir une reconnaissance partielle en succès de décodage ; l’audit `pre.017` confirme les statuts terminaux séparés du pipeline et des observations. +- [x] Conserver la politique des transactions échouées : événements d’intention/échec autorisés, mutations réussies interdites par défaut ; `SuccessfulCommittedOnly` protège toutes les projections lifecycle natives. +- [x] Matérialiser les projections natives génériques déjà stabilisées : ALT, lifecycle loaders, révocation Feature, durable nonce, contextes ZK ElGamal et rapports Slashing. Ne pas les présenter comme la totalité des matérialisations natives possibles. +- [x] Implémenter dans `pre.017` les projections natives manquantes réellement justifiées : lifecycle des durable nonce accounts System et lifecycle des comptes de contexte ZK ElGamal, sans matérialiser les preuves. +- [x] Concevoir dans `pre.017` le contrat de `kb_materializer_staking` pour les projections Stake/Vote nécessitant un état durable : état précédent/suivant, délégation, désactivation, retrait, autorités, lockup, identité/commission Vote et récompenses ; ne pas les ajouter au matérialiseur générique. +- [x] Ajouter dans `pre.022` un profil Compute Budget transactionnel agrégé ; conserver les précompiles de signature et les preuves ZK sans contexte en decode/audit tant qu’aucun consommateur n’exige une projection dédiée. +- [x] Documenter dans `pre.019` l’audit complet des projections actives, différées et volontairement absentes dans `docs/NATIVE_SOLANA_MATERIALIZATION_AUDIT.md`. +- [x] Couvrir chaque variante déclarée par des fixtures officielles, dérivées des encodeurs SDK ou explicitement alignées sur le wire runtime ; l’audit `pre.018` inclut aussi les deux instructions Slashing. +- [x] Clore l’inventaire corpus : ALT et Config validés réellement ; Feature, loaders v3/v4, Slashing et ZK Token Proof validés synthétiquement faute d’invocation observable ; campagne Slashing retournée proprement à zéro signature. +- [x] Couvrir les payloads tronqués, discriminants inconnus, comptes invalides, offsets précompile invalides et transactions on-chain échouées sur toutes les surfaces dont le runtime expose ces cas. +- [x] Ajouter dans `pre.014` les fixtures adversariales des trois précompiles : références courantes, externes et mixtes, signatures multiples, messages vides/volumineux, headers/tables tronqués, compteurs invalides, index ou offsets hors bornes, Base64 absent/invalide, débordement borné et transaction échouée non commitée. +- [x] Ajouter dans `pre.001`/`pre.002` les fixtures officielles System/Compute Budget, les limites numériques, payloads tronqués, tags inconnus, comptes manquants, déterminisme et transactions échouées. +- [x] Ajouter dans `pre.003` ALT exact, la projection lifecycle ALT, les IDs SPL vérifiés et les crates réservées manquantes. +- [x] Analyser le replay mainnet `pre.004` : 476 inputs, 475 décodés, un faux échec System dû à un compte additionnel et 11 faux refus de matérialisation hors surface ALT. +- [x] Corriger dans `pre.005` le décodage System afin de conserver les comptes additionnels validement résolus avec le rôle `additional_account`. +- [x] Ajouter dans `pre.005` une sélection de matérialiseur par observation exacte, avant ledger et politique de transaction. +- [x] Réserver les exécuteurs manquants pour Memo, Single Pool, Account Compression, Noop et SPL Name Service. +- [x] Formaliser puis rendre obligatoire le contrat de tracing par crate dans `docs/TRACING_CONTRACT.md`. +- [x] Valider `pre.005` : cinq exécuteurs SPL réservés, 42 tests pipeline, 22 tests natifs, 4 tests lifecycle, 76 tests démo et clippy propre. +- [x] Valider le force replay ciblé puis global : 3/3 et 476/476 décodés, zéro échec, unsupported, unmatched et refus de matérialisation. +- [x] Ajouter dans `pre.006` les loaders immuables v1/v2, le loader upgradeable, Loader v4, le classement Native Loader opaque et la projection lifecycle des loaders. +- [x] Valider `pre.006` : 31 tests natifs, 6 tests lifecycle, 42 tests pipeline, 76 tests démo, Clippy propre et replay global Tauri de 476/476 inputs sans échec, unsupported, unmatched ni refus de matérialisation. +- [x] Rejouer System, Compute Budget et ALT sur le corpus PostgreSQL réel : campagne globale `pre.005` de 476 inputs, 476 décodés, aucun failed, unsupported, unmatched ou faux refus de matérialisation. +- [x] Valider `pre.017` : 12 tests lifecycle, 42 tests pipeline, 45 tests PostgreSQL réel, 76 tests démo, Clippy propre, 484 instructions System décodées avec 27 sorties nonce et 27 refus attendus de transactions échouées, puis 151 instructions ZK ElGamal avec 139 sorties de contexte. +- [x] Auditer Agave `v4.1.1` et ajouter dans `pre.018` le stateless Slashing Program absent du registre : deux instructions exactes, dispatch sans fallback, projection de rapport et absence explicite de pénalité appliquée par le programme. +- [x] Ajouter des invariants automatiques garantissant une surface par ID natif, au moins une couverture par surface, des identités de couverture uniques et zéro fallback `unclassified_native_instruction`. +- [x] Ajouter dans `pre.019` les modes `program_latest`, `token_latest` et `pool_latest` : une recherche « avant, plus anciennes » sans ancre commence sur la page de signatures la plus récente ; la direction `after` conserve une ancre obligatoire. +- [x] Retirer dans `pre.019` `solana-zk-token-sdk` et sa dépendance transitive à `bincode`; conserver uniquement un miroir wire local audité des tags et tailles historiques. +- [x] `pre.020` : matérialiser System create/allocate/assign, les écritures Config, les changements d’autorité Loader et les mutations de bytecode Loader sans dupliquer les balances core ni les payloads complets. +- [x] Activer `kb_materializer_admin` pour `assign`/`assign_with_seed`, Config `store`, Loader v3 `set_authority`/`set_authority_checked` et Loader v4 `transfer_authority`, avec politique `SuccessfulCommittedOnly`. +- [x] Activer `kb_materializer_compliance_audit` pour les `write` Loader v1/v2/v3/v4 et `copy` Loader v4, en conservant uniquement comptes, offsets, tailles, SHA-256 et préfixes bornés. +- [x] Enregistrer les trois matérialiseurs natifs dans `demo_decode_replay` et ajouter les routes `debug`/`info`/`error.jsonl` dédiées aux deux crates nouvellement opérationnelles. +- [x] `pre.021` : activer `kb_materializer_staking` pour les intentions/transitions commitées Stake/Vote, avec limites explicites sur l'absence de snapshots de comptes, et sérialiser les tests PostgreSQL réels pour éviter les interblocages intermittents. +- [x] `pre.022` : produire le profil Compute Budget transactionnel agrégé via `kb_materializer_compliance_audit` et confirmer la politique d'absence de projection pour signatures/ZK sans contexte. +- [x] Clôturer `0.4.1` avec 18 surfaces natives, matérialisations instructionnelles stables, logs propres et prompt de reprise `0.4.2`. +- [x] `pre.023` : replay global ciblé, validations finales, documentation de clôture, prompt `0.4.2` et mise à jour du `CHANGELOG.md`. +- [x] Confirmer que les précompiles de signature, les preuves ZK sans contexte et l’ancien ZK Token Proof restent volontairement sans projection dédiée, hors contexte matérialisable. +- [x] Ne pas étendre `demo_decode_replay` au-delà des matérialiseurs natifs enregistrés : inspection suffisante via résumés, couverture et requêtes SQL de validation. +- [x] Valider les replays ciblés avec corrélation par `campaign_id` pour System, Config, Stake, Vote, Compute Budget, ALT, ZK ElGamal et les surfaces synthétiques sans corpus. +- [x] Exécuter les tests unitaires des crates touchées, PostgreSQL réel, Clippy et campagnes Tauri/réelles avant mise à jour du changelog. +- [x] Mettre à jour `CHANGELOG.md` uniquement après validation complète de `0.4.1`. + +### 0.4.2 — infrastructure d’exécution et `kb_executor_solana_core` — clôturée + +#### Principes de portée + +- [x] Les crates d’exécution sont des bibliothèques universelles réutilisables par `kb_app_demo`, les workers, les CLI et de futurs exécutables non liés au trading. +- [x] La dangerosité d’une opération ne justifie pas son absence du builder : elle doit être encodée, testée et protégée par une politique dédiée, puis éventuellement rester non exposée dans `kb_app_demo`. +- [x] L’objectif est de couvrir toutes les instructions natives officiellement appelables. `Unsupported(reason)` ne doit subsister que pour une surface non invocable par transaction, retirée du runtime, insuffisamment documentée officiellement ou encore temporairement non implémentée avec dette explicite au ROADMAP. +- [x] Les exécuteurs restent indépendants du wallet, du RPC, des décodeurs et de Tauri ; ils produisent des plans déterministes et laissent simulation, signature, envoi et validation à l’orchestration. + +#### Tranches validées + +- [x] `pre.001` : ajouter les contrats typés de capacité, politique, plan préparé, simulation contextualisée, envoi, confirmation et diagnostic post-exécution sans casser les exécuteurs réservés historiques. +- [x] `pre.001` : implémenter les builders officiels System transfer/create account/allocate/assign et Compute Budget set unit limit/set unit price. +- [x] `pre.001` : remplacer `Maybe` dans `kb_executor_solana_core` par `Yes/No` pour le pont historique et `Supported/Unsupported(reason)` pour la voie typée. +- [x] `pre.001` : ajouter les contrôles de plan et pré-envoi pour simulation obligatoire, dry-run, cluster, mainnet, blockhash/nonce, signataires et plafonds. +- [x] `pre.002` : aligner le registre de l’exécuteur sur les dix-huit surfaces natives en incluant Slashing et corriger les retours explicites Clippy. +- [x] Valider localement les fondations : `kb_execution_api` 21 tests, `kb_execution_safety` 13 tests, `kb_executor_solana_core` 10 tests, `kb_pipeline` 45 tests, `kb_app_demo` 78 tests, `kb_config` 36 tests et Clippy global propre. +- [x] `pre.003` : étendre la configuration wallet/exécution à localnet, devnet, testnet et mainnet, ajouter dry-run, plafonds de frais/priorité et âge maximal du blockhash. +- [x] `pre.003` : remplacer le placeholder `kb_wallet` par un wallet temporaire en mémoire ou persistant, stocké sous `wallets/`, créé sans écrasement, chargé de façon bornée et utilisable comme `Signer` sans exposer les octets privés. +- [x] `pre.003` : protéger les fichiers wallet par permissions Unix privées, effacement des buffers secrets sérialisés, `.gitignore` bloquant et interdiction de sélectionner le wallet temporaire dans un profil mainnet. +- [x] Valider localement `pre.003` : `kb_wallet` 6 tests, `kb_config` 40 tests, `kb_store_pg` 45 tests offline et PostgreSQL réel, `kb_app_demo` 78 tests et Clippy global propre. + +#### Suite d’orchestration + +- [x] `pre.004` : ajouter dans `kb_rpc` les adaptateurs typés `getGenesisHash`, `getLatestBlockhash`, `getFeeForMessage` et `simulateTransaction`, avec routage par rôle, classification des clusters publics, diagnostics runtime et conversion vers `ExecutionSimulationResult`, sans signature ni envoi. +- [x] `pre.004` : documenter dans `kb_executor_solana_core/README.md` chaque fonction publique, les six opérations constructibles, leurs paramètres, résultats, effets et frontières. +- [x] Valider localement `pre.004` : `kb_rpc` 63 tests, `kb_execution_api` 21 tests, `kb_execution_safety` 13 tests, `kb_executor_solana_core` 10 tests, `kb_config` 40 tests et Clippy global propre. +- [x] `pre.005` : ajouter `kb_execution_solana` pour assembler les instructions planifiées en transaction legacy, produire les payloads base64 de frais/simulation, lier la simulation au hash exact du message, résoudre exactement les signataires requis via l’interface Solana `Signer` et signer séparément hors Tauri. +- [x] `pre.005` : renommer la constante interne en `MAINNET_GENESIS_HASH` sans changer sa valeur ; conserver `mainnet-beta` seulement comme alias historique des endpoints/CLI et renommer le variant public en `Mainnet` sérialisé `mainnet`. +- [x] `pre.005` : distinguer la simulation exacte de la simulation avec remplacement de blockhash et interdire qu’un résultat `replaceRecentBlockhash=true` autorise la signature du message original. +- [x] Valider localement les tests ciblés de `pre.005`/`pre.006` : `kb_execution_solana` 7 tests, `kb_execution_api` 22 tests, `kb_execution_safety` 15 tests, `kb_rpc` 63 tests, `kb_executor_solana_core` 10 tests, `kb_wallet` 6 tests et `kb_config` 40 tests. +- [x] `pre.006` : corriger la compilation croisée de `pre.005`, supprimer l’avertissement TS-rs sur l’alias historique `mainnet_beta`, utiliser le trait public `TypedInstructionExecutor` dans les tests d’assemblage, resynchroniser le contrat de simulation RPC et rendre les erreurs de routage tracing explicites. +- [x] `pre.007` : supprimer le dernier opérateur `?` introduit dans un chemin de production de `kb_execution_api`, le remplacer par un `match` avec propagation explicite et auditer les fichiers d’exécution `0.4.2` contre `?`, `unwrap` et `expect` de production. +- [x] Valider localement `pre.007` : `kb_execution_api` 22 tests et Clippy global propre. +- [x] `pre.008` : ajouter les contrats RPC typés `getBalance`, `requestAirdrop`, `sendTransaction`, `getSignatureStatuses` et `getBlockHeight`, avec routage par rôle, préflight obligatoire, contrôle de la signature retournée et confirmation bornée jusqu’à succès, échec, expiration ou timeout. +- [x] `pre.008` : étendre la configuration avec retries d’envoi, intervalle/nombre maximal de polls et plafond d’airdrop devnet ; construire directement les politiques RPC depuis `ExecutionConfig`. +- [x] Valider localement `pre.008` : `kb_rpc` 69 tests, `kb_execution_api` 22 tests, `kb_config` 40 tests, `kb_execution_solana` 7 tests, `kb_execution_safety` 15 tests, `kb_wallet` 6 tests, `kb_executor_solana_core` 10 tests, `kb_store_pg` 45 tests avec PostgreSQL réel et Clippy global propre. +- [x] `pre.009` : orchestrer le premier parcours backend Devnet complet avec wallet persistant, airdrop plafonné, plan System transfer, simulation exacte, signature, envoi, confirmation, `getTransaction`, insertion canonique, extraction core et decode replay ciblé. +- [x] Valider `pre.009` offline : `kb_pipeline` 49 tests, `kb_rpc` 69 tests, `kb_execution_api` 22 tests, `kb_execution_safety` 15 tests, `kb_execution_solana` 7 tests, `kb_executor_solana_core` 10 tests, `kb_wallet` 6 tests, `kb_config` 40 tests, `kb_store_pg` 45 tests avec PostgreSQL réel et Clippy global propre. +- [x] Valider le parcours Devnet réel avec le wallet persistant préfinancé et un transfert de 1 000 000 lamports : simulation, signature, envoi, confirmation et replay post-exécution réussis. +- [x] `pre.010` : ajouter `getAccountInfo` et `getMinimumBalanceForRentExemption`, refuser avant simulation un transfert insuffisant vers une adresse inexistante et conserver l’erreur runtime ainsi que les logs lorsque la simulation échoue. +- [x] `pre.010` : ajouter `demo_execution_solana_core`, limité aux profils Devnet persistants, avec plan, simulation exacte, confirmation opérateur, envoi, progression et diagnostics post-exécution sans exposition de clé privée. +- [x] Valider localement `pre.010` : `kb_rpc` 70 tests, `kb_pipeline` 51 tests, `kb_app_demo` 87 tests, `kb_execution_api` 22 tests, `kb_execution_safety` 15 tests, `kb_execution_solana` 7 tests, `kb_executor_solana_core` 10 tests, `kb_wallet` 6 tests, `kb_config` 40 tests, `kb_store_pg` 45 tests avec PostgreSQL réel et Clippy global propre. +- [x] Valider visuellement `demo_execution_solana_core` dans `cargo tauri dev` : simulation dry-run, refus sans confirmation opérateur, envoi Devnet confirmé, insertion canonique 1, extraction core 1 et decode replay 1 sans échec. +- [x] `pre.011` : ajouter les builders System `create_account_with_seed`, `transfer_with_seed`, `allocate_with_seed`, `assign_with_seed` et `create_account_allow_prefund`, avec validation des dérivations et signataires exacts. +- [x] Valider localement `pre.011` : `kb_executor_solana_core` 14 tests, `kb_app_demo` 87 tests et Clippy global propre. Le build frontend séparé n’est pas requis lorsque Vite est déjà validé par le serveur de développement Tauri. +- [x] `pre.012` : ajouter `transfer_many`, les créations de compte nonce normale/seedée et les builders de lifecycle nonce initialize/advance/authorize/withdraw/upgrade, avec plans multi-instructions et politique recent-blockhash explicite. +- [x] Valider localement `pre.012` : `kb_executor_solana_core` 19 tests, `kb_execution_solana` 7 tests, `kb_execution_api` 22 tests et Clippy global propre. +- [x] `pre.013` : ajouter la lecture RPC complète et bornée d’un compte nonce, sa validation System Program/Current/Initialized via `solana-nonce` et `wincode`, l’assemblage officiel `Message::new_with_nonce` avec `AdvanceNonceAccount` en première instruction, la valeur nonce comme blockhash et la preuve de simulation liée au message et à cette valeur. +- [x] Valider localement `pre.013` : `kb_executor_solana_core` 20 tests, `kb_execution_solana` 12 tests, `kb_execution_api` 22 tests, `kb_rpc` 70 tests et Clippy global propre. +- [x] `pre.014` : compléter Compute Budget avec `RequestHeapFrame` et `SetLoadedAccountsDataSizeLimit`, synchroniser les capacités et exports TS-rs, rendre normative la documentation des APIs publiques dans les README et détailler le phasage des exécuteurs futurs. +- [x] Valider localement `pre.014` : `kb_executor_solana_core` 21 tests, `kb_execution_api` 22 tests, `kb_execution_safety` 15 tests, `kb_execution_solana` 12 tests, `kb_rpc` 70 tests et Clippy global propre. +- [x] `pre.015` : ajouter les cinq builders officiels Address Lookup Table create/extend/freeze/deactivate/close, avec contrats d’intent, capacités exactes, exports TS-rs, contrôles statiques et documentation de la frontière stateful. +- [x] Valider localement `pre.015` : `kb_executor_solana_core` 25 tests, `kb_execution_api` 22 tests, `kb_execution_safety` 15 tests, `kb_execution_solana` 12 tests, `kb_rpc` 70 tests et Clippy global propre. +- [x] `pre.016` : ajouter les builders déterministes Ed25519, secp256k1 et secp256r1 dans deux formes par précompile — inline et table d’offsets — avec layouts officiels, références externes, bornes, exports TS-rs et documentation des contraintes de positionnement. +- [x] Valider localement `pre.016` : `kb_executor_solana_core` 31 tests, `kb_execution_api` 22 tests, `kb_execution_safety` 15 tests, `kb_execution_solana` 12 tests, `kb_rpc` 70 tests et Clippy global propre. +- [x] `pre.017` : ajouter les builders Config create/store, Feature activate/revoke, Slashing close/duplicate-block proof atomique et ZK ElGamal inline/account/close ; classer l’ancien ZK Token Proof comme historique `decode-only`, sans `Unsupported` générique. +- [x] `pre.018` : corriger les quatre avertissements Clippy de tests de `pre.017`, ajouter les vingt-quatre opérations Stake actuelles avec miroir wire `wincode`, plans composés officiels, capacités exactes, exports TS-rs et documentation stateful. +- [x] Valider localement `pre.017` : `kb_executor_solana_core` 46 tests, `kb_execution_api` 22, `kb_execution_safety` 15, `kb_execution_solana` 12 et `kb_rpc` 70. Clippy ne signale que quatre `cloned_ref_to_slice_refs` de tests, corrigés dans `pre.018`. + +#### Exhaustivité des builders natifs + +- [x] Compléter System avec les variantes seed, transferts seed, `create_account_allow_prefund` et le helper multi-instructions `transfer_many`. +- [x] Implémenter les builders officiels de création et lifecycle durable nonce : create/create-with-seed, initialize, advance, authorize, withdraw et upgrade, exécutés avec un recent blockhash normal. +- [x] Ajouter dans `kb_execution_solana` l’assemblage d’une transaction utilisant réellement un nonce durable : lecture complète bornée, validation exacte de l’état courant initialisé, `AdvanceNonceAccount` en première instruction, valeur nonce comme blockhash et preuve de simulation liée au message exact. +- [x] `pre.014` : compléter Compute Budget avec les quatre variantes client actuelles `request_heap_frame`, `set_compute_unit_limit`, `set_compute_unit_price` et `set_loaded_accounts_data_size_limit`, comparées aux builders officiels et protégées par des limites explicites. Conserver `Unused` et `RequestUnitsDeprecated` comme compatibilité de décodage seulement. +- [x] `pre.014` : rendre normative la documentation des APIs publiques dans les README des crates opérationnelles, documenter les contrats `kb_execution_api`, `kb_execution_safety`, `kb_execution_solana`, `kb_executor_solana_core` et auditer l’appariement des 102 surfaces décodeur/exécuteur réservées. +- [x] Valider localement `pre.014` : `kb_executor_solana_core` 21 tests, `kb_execution_api` 22 tests, `kb_execution_safety` 15 tests, `kb_execution_solana` 12 tests, `kb_rpc` 70 tests et Clippy global propre. +- [x] Implémenter les builders stateless Address Lookup Table create/extend/freeze/deactivate/close contre l’interface officielle, avec signataires exacts, ordre conservé et bornes d’input. +- [x] Ajouter l’orchestration ALT stateful : lecture/décodage du compte, autorité et état courants, capacité restante, slot récent, rent top-up mesuré, cooldown de fermeture et lifecycle localnet/devnet. +- [x] Implémenter les précompiles Ed25519, secp256k1 et secp256r1 avec formes inline et offsets, layouts officiels déterministes, références inter-instructions, bornes de taille et aucune dépendance `bincode` directe. +- [x] Valider localement `pre.016` et confirmer les six builders par tests officiels, exports TS-rs et Clippy global. +- [x] Implémenter Config create/store, Feature activate/revoke, les deux instructions Slashing et les douze vérifications plus fermeture ZK ElGamal officiellement appelables, même lorsqu’elles ne seront pas proposées dans la démo opérateur. +- [x] Classer l’ancien ZK Token Proof comme programme historique `decode-only` : aucun builder moderne ne doit être inventé pour le stub retiré du runtime actif. +- [x] Ajouter les orchestrations stateful de `pre.022` : rent et état Config/Feature, compte de preuve et fenêtre temporelle Slashing, préallocation/owner/space des contextes ZK ElGamal. +- [x] Implémenter Stake maximalement pour les vingt-quatre helpers clients actuels : create/initialize, checked/seed, split/merge, délégation, autorités, lockup, withdraw, deactivate, delinquent et move. Classer `Redelegate`/`redelegate_with_seed` comme historiques désactivés `decode-only`. +- [x] Implémenter dans `pre.019` Vote maximalement : vingt variantes wire actuelles, quatre créations composées legacy/V2 avec ou sans seed, autorités Ed25519/BLS, votes, TowerSync, commissions, collecteurs, retrait et dépôt de récompenses, avec tests unitaires avant tout essai devnet. +- [x] Implémenter dans `pre.020` les opérations Loader réellement constructibles : onze plans Loader v3 via `solana-loader-v3-interface`/`wincode` et neuf plans Loader v4 au wire officiel reproduit sans activer ses helpers `bincode`; conserver BPF Loader v1/v2 historiques en `decode-only` et Native Loader sans builder client. +- [x] Traiter dans `pre.020` la dette post-`0.4.1` : migrer le parser Loader v3 upgradeable vers `solana-loader-v3-interface ^8.0` avec `wincode`, préserver la compatibilité du booléen optionnel historique et ne pas activer les helpers `bincode` de Config, Loader v2 ou Loader v4. +- [x] Consolider dans `pre.021` les helpers internes répétés de `kb_executor_solana_core` : neuf parsers de clés, cinq parsers d’ID natif, validations communes de comptes distincts, montants positifs, longueurs exactes, dérivations seedées, wrappers d’erreur Loader et appender d’offsets `u16`; conserver séparées les sérialisations et validations dont le contrat reste propre à une surface. +- [x] Ajouter une matrice machine-readable programme/opération/builder officiel/politique/tests unitaires/tests cluster/exposition UI, validée automatiquement contre les 109 constantes d’opération et les 18 surfaces natives. + +#### Phasage restant de l’exhaustivité native + +- [x] `pre.015` : builders stateless Address Lookup Table create/extend/freeze/deactivate/close, avec autorité, ordre de comptes, payer optionnel et contrats de lifecycle exacts ; conserver rent, capacité, slot et cooldown dans la tranche stateful `pre.022`. +- [x] `pre.016` : builders Ed25519, secp256k1 et secp256r1, avec formes inline/offsets, références d’instructions, comparaison aux constructeurs ou layouts officiels, low-S secp256r1 et position secp256k1 explicitement bornée. +- [x] Validation locale de `pre.016` avant passage à `pre.017`. +- [x] `pre.017` : Config, Feature, Slashing et surfaces ZK officiellement appelables ; classification explicite de l’ancien ZK Token Proof comme historique `decode-only`. +- [x] Validation locale de `pre.017` avant passage à `pre.018`, avec quatre avertissements Clippy de tests reportés et corrigés dans le lot suivant. +- [x] `pre.018` : Stake maximal — vingt-quatre helpers clients actuels, autorités, lockup, création/rent fourni, délégation, merge/split, retraits, move et variantes checked/seed ; `Redelegate` reste historique désactivé. +- [x] Valider localement `pre.018` : `kb_executor_solana_core` 57 tests, `kb_execution_api` 22, `kb_execution_safety` 15, `kb_execution_solana` 12, `kb_rpc` 70 et Clippy global propre. +- [x] `pre.019` : Vote maximal — vingt variantes wire, quatre créations composées, initialisation legacy/V2, vote/update, autorisations, commissions, collecteurs, identité, retrait, récompenses, compact update et TowerSync. +- [x] Valider localement `pre.019` : `kb_executor_solana_core` 70 tests, `kb_execution_api` 22, `kb_execution_safety` 15, `kb_execution_solana` 12, `kb_rpc` 70 et Clippy global propre. +- [x] `pre.020` : onze opérations Loader v3 et neuf opérations Loader v4 réellement constructibles, avec déploiement/upgrade/autorités/fermeture hors UI; BPF Loader v1/v2 restent historiques `decode-only` et Native Loader est classé sans instruction client. +- [x] Valider localement `pre.020` : `kb_executor_solana_core` 81 tests, `kb_decoder_solana_core` 115, `kb_execution_api` 22, `kb_execution_safety` 15, `kb_execution_solana` 12 et `kb_rpc` 70. +- [x] `pre.021` : centraliser dans un module privé les parsers `Pubkey`/program ID et les validations communes de longueur, montant positif, comptes distincts, dérivation seedée et erreurs partagées ; supprimer les implémentations de production identiques sans modifier les 109 opérations ni leur wire. +- [x] Valider localement `pre.021` après `fix.001` : `kb_executor_solana_core` 86 tests et `cargo clippy --all-targets` propre ; ce Clippy couvre également les changements Loader de `pre.020`. +- [x] `pre.022` : implémenter le préflight stateful Localnet/Devnet pour ALT, Config, Feature, Slashing et contextes ZK ElGamal ; ajouter `getEpochInfo` typé et la matrice machine-readable complète des 18 surfaces natives avec classification de toute opération non invocable. +- [x] Valider localement `pre.022` : `kb_executor_solana_core` 87 tests, `kb_pipeline` 56 tests, `kb_rpc` 71 tests, `kb_execution_api` 22 tests, `kb_execution_safety` 15 tests, `kb_execution_solana` 12 tests, validateur de matrice réussi et `cargo clippy --all-targets` propre. +- [x] `pre.023` : remplacer le validateur Python de la matrice d’exécution par un test Rust fondé sur `SOLANA_CORE_OPERATION_CODES`; ajouter une matrice décodeur exacte de 18 surfaces/121 déclarations et l’inventaire canonique des 52 méthodes HTTP et neuf paires WebSocket standard. +- [x] Valider localement `pre.023` : `kb_executor_solana_core` 88 tests, `kb_decoder_solana_core` 116 tests, `kb_rpc` 78 tests et `cargo clippy --all-targets` propre. +- [x] `pre.024` : ajouter les adaptateurs configurables propres à `kb_rpc` des 38 méthodes HTTP standard auparavant limitées au contrat JSON brut ; conserver toutes les options officielles sélectionnables indépendamment, ne pas exposer les DTO Agave et imposer `52 typed / 0 raw` dans la matrice RPC. +- [x] Valider localement `pre.024` : `kb_rpc` 98 tests après correction explicite du type de `Vec` dans un test, puis `cargo clippy --all-targets` propre. +- [x] `pre.025` : déplacer le runtime WebSocket persistant de `kb_app_demo` vers `kb_rpc`, typer paramètres et notifications des neuf paires standard et garder les trois surfaces instables derrière une capacité explicite. +- [x] Valider localement `pre.025` après `fix.001` : `kb_rpc` 113 tests, `kb_app_demo` 87 tests et `cargo clippy --all-targets` propre ; confirmer la désactivation dynamique des méthodes WebSocket instables rejetées par le nœud. +- [x] `pre.026` : auditer les logs Tauri de clôture et identifier l’unique erreur applicative réelle comme une incompatibilité TS-rs `u64 -> bigint` lors de `demo_ws_unsubscribe`; les avertissements de confirmation opérateur et de requête SQL lente restent attendus et non bloquants. + +- [x] `pre.027` : premières projections Transfer Fee publiques dans `kb_materializer_fees`; validation 4/4, Token-2022 50/50, ElGamal Registry 5/5 et Clippy propre. +- [x] `pre.028` : sept feuilles Confidential Transfer Fee classées dans `EventFamily::Fee` et projetées sans déchiffrement ; validation Token-2022 50/50, ElGamal Registry 5/5, fees 6/6 et Clippy propre. +- [ ] `pre.029` : projeter les snapshots bornés Mint/Account/Multisig Token-2022, leur inventaire TLV ordonné et les états confidentiels publics dans `kb_materializer_token_accounts`. +- [x] `pre.026` : aligner les payloads Tauri WebSocket, backfill, SQL et configuration sur des nombres JSON, supprimer la construction frontend de `BigInt`, borner l’identifiant d’unsubscribe à `Number.isSafeInteger` et ajouter des tests de non-régression sur les déclarations TS-rs. +- [x] Valider la correction TS-rs de `pre.026` : `kb_config` 41 tests, `kb_app_demo` 88 tests, `cargo clippy --all-targets` propre, démarrage Tauri/Vite réussi et souscriptions/désabonnements WebSocket réels sans erreur `BigInt`. +- [x] `pre.026`/`pre.027` : terminer les audits README/API, enregistrer les validations offline, PostgreSQL, Devnet et RPC réelles, conserver les opérations administratives stateful derrière leurs préflights et sans activation Mainnet, puis clôturer la documentation et le `CHANGELOG.md`. + +#### Critères de clôture de l’exécuteur natif + +- [x] Chaque surface native du registre possède soit tous ses builders client officiellement appelables, soit une classification documentée `non invocable`, `retirée` ou `historique decode-only` dans la matrice canonique. +- [x] La couverture bibliothèque est indépendante de l’exposition dans `kb_app_demo` ; masquer une opération dangereuse dans l’UI ne permet pas de la considérer comme hors périmètre. +- [x] Toute API publique utile des crates d’exécution est inventoriée dans le README de sa crate avec rôle, paramètres, résultat, effets, limites et exemple minimal ; l’audit final couvre `kb_execution_api`, `kb_execution_safety`, `kb_execution_solana`, `kb_executor_solana_core`, `kb_rpc`, `kb_pipeline` et `kb_app_demo`. +- [x] Chaque builder est comparé offline à un encodeur ou layout officiel. Les opérations stateful non exercées réellement restent bloquées par le préflight, hors UI dangereuse et sans activation Mainnet ; une validation Localnet/Devnet par opération reste obligatoire avant toute future activation mutable. +- [x] La matrice machine-readable ne contient aucune opération callable sans statut, politique, tests offline, validation cluster et décision d’exposition UI ; le test Rust impose l’égalité exacte avec les 109 codes compilés. + +#### Critères de clôture du décodeur natif et de `kb_rpc` + +- [x] Les 18 Program IDs natifs du registre partagé correspondent exactement aux 18 surfaces du décodeur. +- [x] Les 121 déclarations de couverture sont comptées par surface et reliées à un test d’enum officielle ou de layout wire audité. +- [x] Les 52 méthodes HTTP et neuf paires WebSocket standard sont inventoriées sans omission dans un registre compilé et une matrice JSON. +- [x] Les 52 méthodes HTTP possèdent un contrat typé dédié ; la voie JSON brute ne constitue plus le contrat principal d’une méthode standard. +- [x] Les neuf paires WebSocket possèdent paramètres, notifications et runtime persistant dans `kb_rpc`, sans logique de transport lourde dans `kb_app_demo`. + +#### Démo et clôture + +- [x] Ajouter `demo_execution_solana_core` après le premier parcours backend Devnet validé ; exposer le transfert contrôlé et masquer les opérations administratives dangereuses. +- [x] Afficher plan, comptes, signataires requis, plafonds, cluster réel, simulation, signature/envoi et validation post-exécution sans jamais transférer de clé privée à la WebView. +- [x] Conserver `0.4.2` limité à la démo System transfer validée ; les créations/allocation/assignation et le nonce ne sont volontairement pas ajoutés à l’UI sans orchestrateur stateful cluster dédié. +- [x] Valider les builders offline contre les encodeurs officiels, valider le parcours Devnet représentatif et conserver Mainnet désactivé par défaut ; les autres opérations stateful restent conditionnées à une preuve cluster ultérieure avant exposition. +- [x] Clôturer `0.4.2` par tests ciblés, PostgreSQL réel, Clippy, parcours Devnet avec replay post-exécution, smoke tests RPC/Tauri, documentation finale et mise à jour du `CHANGELOG.md`. + +#### Validation finale observée — 13 juillet 2026 + +- [x] `kb_program_ids` 5 tests, `kb_decoder_solana_core` 116, `kb_executor_solana_core` 88, `kb_execution_api` 22, `kb_execution_safety` 15 et `kb_execution_solana` 12. +- [x] `kb_rpc` 113 tests, `kb_pipeline` 56, `kb_config` 41 et `kb_app_demo` 88. +- [x] `kb_store_pg` 45 tests avec PostgreSQL réel, migrations et roundtrips optionnels réussis. +- [x] Parcours Devnet opt-in réussi avec wallet persistant préfinancé, transfert de 1 000 000 lamports, simulation, signature, envoi, confirmation, hydratation canonique, extraction core et decode replay. +- [x] `cargo clippy --all-targets` sans avertissement. +- [x] `cargo tauri dev -c kb_app_demo/tauri.conf.json` validé avec Vite, initialisation PostgreSQL et sessions WebSocket réelles. +- [x] Les logs de clôture confirment les unsubscribe `slot`, `root` et `program`. Le refus de changer d’endpoint avec une session active est un garde-fou attendu. La limite SQL supérieure à 5 000 est désormais refusée dans le frontend avant l’appel backend. + +La clôture de `0.4.2` n’active pas Mainnet et n’étend pas l’UI aux opérations administratives. La suite active reprend avec `0.4.3 — SPL Memo v1, v3 et v4`. Le projet d’acquisition historique gratuite est volontairement retiré du ROADMAP actif et conservé séparément dans `docs/HISTORICAL_DATA_ACQUISITION_PLAN.md`, sans version attribuée. + +### Politique commune de tous les programmes Solana + +Pour chaque programme Solana, natif, SPL, DEX, launchpad ou autre, l'ordre obligatoire est : décodeur maximal et corpus, décision/ajout des matérialisateurs concernés, puis exécuteur limité aux opérations explicitement supportées. Le décodeur conserve tout wire identifiable, historique, courant, récent ou expérimental. Les matérialisateurs projettent maximalement les faits stables sans dupliquer le core ni une autre projection. L'exécuteur exclut les opérations obsolètes ou purement historiques, mais peut construire les opérations courantes ou expérimentales officiellement encodées indépendamment de leur déploiement par cluster. Une absence de matérialisation ou d'exécution doit être une décision documentée, jamais un oubli. Chaque exécuteur est validé après le décodeur, avec builder officiel, simulation/dry-run, politiques d'autorisation et tests devnet avant mainnet. + +#### Audit rétroactif des programmes déjà clôturés + +- [x] Solana natif : le décodeur conserve les wires historiques ; les absences de projection des précompiles et preuves ZK sont documentées ; BPF Loader v1/v2, ancien ZK Token Proof et Stake Redelegate restent `decode-only`, tandis que l'exécuteur couvre les opérations officiellement appelables. +- [x] SPL Memo : le décodeur v1/v3/v4 et la matérialisation des annotations commitées respectent la politique maximale sans doublon. +- [x] Corriger le contrat de `kb_executor_spl_memo` : v1 et v3 historiques deviennent `Unsupported(reason)`/`decode-only`; v4 reste la seule génération courante constructible et exécutée par la démo. +- [ ] Valider par Cargo la matrice, les capacités compilées et la régression Memo/exécution avant de commencer le code des matérialisateurs SPL Token. + +### 0.4.3 — SPL Memo v1, v3 et v4 + +- [x] Réserver `kb_decoder_spl_memo` et `kb_executor_spl_memo` pour les trois générations sans produire de faux événement ni activer d’envoi. +- [x] Suivre `prompts/022_v0_4_3_spl_memo.md` et auditer les contrats officiels/historiques exacts des trois program IDs ; `docs/SPL_MEMO_MATRIX.json` prouve notamment que v1 ignore les comptes alors que v3/v4 exigent chaque compte comme signer. +- [x] Implémenter le décodeur maximal synthétique : génération, payload UTF-8 ou tentative invalide, longueur/hash, comptes signataires ordonnés, outer/inner, transaction réussie ou échouée et couverture machine-readable ; compilation, 9 tests et Clippy validés après `pre.001-delta-fix-001`. +- [x] Matérialiser les annotations Memo commitées dans un domaine dédié, sans détourner une projection métier incompatible ni produire de mutation réussie pour une transaction échouée ; `pre.002` validé par les tests ciblés, le store PostgreSQL réel et Clippy. +- [x] Remplacer l’exécuteur réservé par un contrat typé exact pour les générations réellement constructibles, avec builders/layouts officiels, signataires déclarés, simulation/dry-run et validation post-exécution Devnet. +- [x] Clôturer le jalon avec corpus synthétique et réel, replay idempotent, tests ciblés, PostgreSQL réel si le store est touché, Clippy et documentation des trois crates concernées. + +#### `0.4.3-pre.001` — audit et décodeur Memo contextualisé + +- [x] Remplacer `DecoderSupport::Maybe` par une reconnaissance exacte des trois IDs et déplacer le target tracing vers `src/constants.rs`. +- [x] Implémenter le wire brut borné, l’UTF‑8, le texte complet, longueur, SHA-256, préfixe diagnostic, comptes ordonnés, signataires et chemin outer/inner. +- [x] Séparer `add_memo`, `memo_intent` et `invalid_memo_attempt`, sans jamais marquer committed une transaction échouée. +- [x] Enregistrer `spl_memo` dans `demo_decode_replay` à côté du décodeur natif. +- [x] Valider la compilation et les tests sur une machine disposant de Cargo : 9 tests Memo, 41 tests config, 89 tests démo et Clippy propre après `delta-fix-001`; le corpus réel reste requis pour la clôture globale du jalon. + +#### `0.4.3-pre.002` — annotations de transaction Memo + +- [x] Créer `kb_materializer_transaction_annotations` et la famille explicite `TransactionAnnotation`, sans détourner les projections existantes. +- [x] Projeter uniquement `add_memo` réussi et commité avec identité, texte, longueur, hash, signataires vérifiés, provenance et clé d’idempotence. +- [x] Refuser les transactions échouées et observations non commitées ; laisser les comptes complets, writable, diagnostics et preuves uniquement dans le decode. +- [x] Réutiliser `kb_sol_mat_events` et le ledger commun sans migration SQL ni duplication core/decode. +- [x] Enregistrer le matérialiseur dans `demo_decode_replay` et déclarer son target tracing dans les trois profils. +- [x] Valider les tests ciblés, Clippy et PostgreSQL réel : modèle 23, Memo 9, matérialiseur 7, API matérialiseur 2, pipeline 56, config 41, démo 89, store PostgreSQL 45 et Clippy propre. +- [x] Valider `pre.002-delta-fix-001` côté compilation et persistance : store core 40, Memo 9, pipeline 57, démo 93 et store PostgreSQL réel 46 ; corriger dans `delta-fix-002` l’assertion de matrice du matérialiseur, la garde de mutex signalée par Clippy et la limite de 64 filtres qui empêchait le démarrage Tauri avec 65 routes. +- [x] Valider le parcours opérateur Mainnet de `pre.002-delta-fix-002` : trois backfills de 100 transactions, core extraction 300/300, replay v1 102/102 avec 69 annotations et 33 refus, v3 439/439 avec 422 annotations et 17 refus, v4 100/100 avec 100 annotations, zéro unmatched ou failed input ; second replay v3 non forcé sélectionnant zéro entrée. +- [x] Valider le démarrage Tauri avec 65 routes de logging sans dépassement de la limite de filtres ni erreur opérationnelle. +- [x] Valider le test logging de `pre.002-delta-fix-003` : 17 tests réussis, y compris la composition de plus de 64 routes ; Clippy a encore identifié la durée lexicale d’un `MutexGuard` dans le test pipeline malgré son `drop` explicite. +- [x] Valider `pre.002-delta-fix-004` : pipeline 57 tests et `cargo clippy --all-targets` propres après fermeture lexicale du `MutexGuard`. + +#### `0.4.3-pre.003` — contrat typé et wire de l’exécuteur Memo + +- [x] Remplacer le plan réservé par `SplMemoGeneration`, `SplMemoOperation::AddMemo`, `SplMemoExecutionIntent` et `SplMemoSigner`. +- [x] À la clôture initiale de `0.4.3`, construire v1/v3/v4 avec `spl_memo_interface::instruction::build_memo`; cette capacité historique est ensuite remplacée par l'audit transversal de `0.4.4`, qui conserve uniquement v4 exécutable. +- [x] Conserver les doublons dans les metas tout en dédupliquant les signataires transactionnels requis. +- [x] Imposer simulation, plafond de frais, dépense nulle hors frais et validation post-exécution complète sans lier la bibliothèque à un cluster. +- [x] Valider alors la séparation cluster/simulation/politique commune ; l'audit transversal ultérieur classe v1/v3 `decode-only` sans modifier le caractère universel du builder v4. +- [x] Valider `pre.003` : exécuteur Memo 14, API 22, safety 15, Solana 12 et `cargo clippy --all-targets` propres. +- [x] Valider `pre.003-delta-fix-001` après retrait des restrictions réseau placées à tort dans la bibliothèque universelle : exécuteur 15 tests et Clippy propre. +- [x] Ajouter un parcours opérateur Devnet v4 réutilisant simulation, confirmation, hydratation, core extraction, decode replay, projection et idempotence. +- [x] Réutiliser le journal générique des matérialisations et la fenêtre d’exécution Devnet pour Memo v4 avec DTO Tauri JSON sans `bigint` actif. + +#### `0.4.3-pre.004` — orchestration backend Memo v4 Devnet + +- [x] Ajouter un request simulation-first, un plan Memo v4 à dépense nulle hors frais et une autorisation d’envoi explicite. +- [x] Réutiliser le wallet persistant, la vérification du genesis Devnet, le blockhash, les frais, la simulation liée au message, la signature et la confirmation communs. +- [x] Hydrater la signature exacte, extraire le core, rejouer `spl_memo`, vérifier la projection `transaction_annotation` puis exécuter un second replay non forcé. +- [x] Valider `pre.004-delta-fix-001` : pipeline 61, exécuteur Memo 15, API 22, safety 15, Solana 12 et Clippy propres ; test opt-in Devnet réussi en simulation puis avec envoi. + +#### `0.4.3-pre.005` — démonstration Tauri Memo v4 Devnet + +- [x] Étendre la fenêtre Solana Devnet existante sans créer une nouvelle WebView ni déplacer de logique métier dans l’application. +- [x] Exposer message UTF-8, signer wallet readonly, simulation, confirmation opérateur et diagnostic complet sans clé privée ni `bigint` Tauri. +- [x] Afficher confirmation, validation canonique/core/decode, nombre d’annotations et preuve d’idempotence. +- [x] Valider 96 tests démo, 61 tests pipeline, Clippy propre et démarrage Tauri/Vite. +- [x] Exécuter trois Memo v4 Devnet réels : trois confirmations, trois insertions canoniques, trois extractions, trois annotations et trois seconds replays `skipped`, sans échec ni nouvelle matérialisation. + +#### `0.4.3-pre.006` — consolidation documentaire et corpus Devnet + +- [x] Reporter dans `docs/SPL_MEMO_MATRIX.json` les trois signatures v4 Devnet confirmées, leurs annotations de 34 octets et leurs seconds replays idempotents. +- [x] Synchroniser les README du décodeur, du matérialiseur, de l’exécuteur, du pipeline et de la démo avec les limites réellement validées. +- [x] Conserver comme non-revendications explicites l’envoi v1/v3 sur Devnet, le déploiement Localnet des binaires historiques et les coûts hors simulation/plafond de frais. + +#### `0.4.3-pre.007` — clôture et prompt SPL Token + +- [x] Enregistrer les validations finales fournies par l’utilisateur, y compris PostgreSQL réel, le parcours Devnet opt-in avec envoi et Clippy propre. +- [x] Clôturer `0.4.3` dans le ROADMAP et le `CHANGELOG.md` sans modifier le code ni le schéma PostgreSQL. +- [x] Ajouter `prompts/023_v0_4_4_spl_token.md` et rendre `0.4.4 — SPL Token` actif. + +#### Validation finale observée — 15 juillet 2026 + +- [x] `kb_program_ids` 5 tests, `kb_decoder_spl_memo` 9, `kb_materializer_transaction_annotations` 7 et `kb_executor_spl_memo` 15. +- [x] `kb_execution_api` 22 tests, `kb_execution_safety` 15 et `kb_execution_solana` 12. +- [x] `kb_pipeline` 61 tests, `kb_rpc` 113 et `kb_app_demo` 96. +- [x] `kb_store_pg` 46 tests avec PostgreSQL réel, migrations et requêtes de matérialisation typées réussies. +- [x] Test opt-in Devnet exécuté avec `KB_DEVNET_MEMO_EXECUTION_TEST=1` et `KB_DEVNET_MEMO_SUBMIT=1` : simulation, envoi, confirmation, hydratation, extraction, replay, annotation et idempotence réussis. +- [x] `cargo clippy --all-targets` sans avertissement. +- [x] Démo Tauri/Vite validée avec simulation Memo et trois envois v4 Devnet réels ; chaque transaction a produit une annotation et un second replay `skipped`. + +`0.4.3` est clôturé. La suite active devient `0.4.4 — SPL Token` selon `prompts/023_v0_4_4_spl_token.md`. Le worker d’acquisition historique reste différé et hors ROADMAP actif. + +### 0.4.4 — SPL Token + +- [x] `0.4.4-pre.001` — auditer les 28 tags publiés par `spl-token-interface 3.0.0` et implémenter le décodeur contextualisé classique : wire borné, comptes, autorités, multisig, inner instructions, transactions échouées, return data explicitement indisponible et `Batch` non imbriqué. +- [x] Valider `pre.001-delta-fix-001` le 15 juillet 2026 : 7 tests `kb_decoder_spl_token` réussis et `cargo clippy --all-targets` propre ; le correctif conserve le manifeste parent `Batch`, aligne la fixture multisig et autorise les listes explicites de tags via `workspace.lints.clippy.manual_range_patterns`. + +#### `0.4.4-pre.002` — contrat documentaire et politique d'exécution + +- [x] Rendre normative la couverture historique/courante/récente/expérimentale des décodeurs, la matérialisation maximale sans doublons et l'exclusion des opérations obsolètes dans les exécuteurs. +- [x] Détailler les responsabilités `token_accounts`, `admin`, `risk` et `fees`, ainsi que le futur journal métier et la démo opérateur. +- [x] Corriger la matrice et le test Memo : v1/v3 decode-only, v4 exécutable sur tout cluster sous gouvernance commune ; 16 tests Memo et Clippy global validés après `fix-002`. + +#### `0.4.4-pre.003` — matérialisations SPL Token classiques + +- [x] Activer `kb_materializer_token_accounts` pour les initialisations de mint, compte et multisig, transferts, approvals/revocations, mint, burn, freeze/thaw, close, sync native et unwrap, uniquement lorsqu'ils sont réussis et commités. +- [x] Produire un journal de mutations instructionnelles avec signature, slot, chemin stable, opération, comptes, mint explicitement connu ou `null`, montant brut en chaîne, decimals wire éventuels, autorité, provenance et clé d'idempotence ; ne pas prétendre reconstruire le snapshot final du compte. +- [x] Étendre `kb_materializer_admin` sans régresser ses projections natives, pour `set_authority` et les configurations multisig Token clairement administratives. +- [x] Activer `kb_materializer_risk` pour des constats factuels : délégation/allowance, revoke, freeze/thaw, révocation d'autorité et configuration multisig structurellement faible ; ne produire aucun score arbitraire. +- [x] Conserver `kb_materializer_fees` inactif pour SPL Token classique et tester/documenter explicitement `no projection`, car ni les transfer fees Token-2022 ni les frais réseau core n'appartiennent à cette surface. +- [x] Dédupliquer les sorties parent/enfants de `Batch` par leur chemin dérivé et leur `output_key`, refuser toute observation non commitée et réutiliser `kb_sol_mat_events` avec le ledger commun. +- [x] Enregistrer les matérialisateurs actifs dans le replay commun et valider leur idempotence, sans migration PostgreSQL si le contrat générique suffit. +- [x] Valider `pre.003` le 15 juillet 2026 : tests des quatre matérialiseurs, pipeline, config et démo réussis, Clippy global propre ; replay Mainnet de 370 instructions, 371 sorties, huit refus correspondant exactement à huit transactions échouées, puis second replay idempotent avec zéro sélection. + +#### `0.4.4-pre.004` — contrat typé et builders de `kb_executor_spl_token` + +- [x] Remplacer le scaffold par des intents typés pour les 24 opérations courantes et expérimentales officiellement constructibles ; classer les quatre initialisations historiques obsolètes en `Unsupported(reason)` au lieu de les construire. +- [x] Appeler les builders officiels 3.0.0, préserver l'ordre des metas et séparer autorité simple, multisig, signataires transactionnels, montants bruts en chaînes, decimals, rent, SOL transféré et frais réseau. +- [x] Construire `UnwrapLamports` et `Batch` après preuve exacte de leurs signatures et layouts officiels ; séparer explicitement constructibilité, déploiement par cluster et autorisation d'envoi. +- [x] Imposer simulation, dry-run par défaut, plafond de frais et validation post-exécution, sans dépendance vers RPC, wallet, Tauri ou le décodeur. +- [x] Valider `pre.004-delta-fix-001` le 15 juillet 2026 : 15 tests `kb_executor_spl_token`, 22 tests API, 15 tests safety, 12 tests Solana, 61 tests pipeline et `cargo clippy --all-targets` propres. + +#### `0.4.4-pre.005` — préflight stateful et orchestration + +- [x] Ajouter dans le pipeline les lectures bornées des comptes Mint/Account/Multisig nécessaires aux préconditions : owner, mint, decimals, état, solde, native reserve, delegate/allowance, autorités, seuil M/N et rent des comptes à initialiser. +- [x] Séparer le test réseau du test standard : layouts et bornes restent offline ; `KB_DEVNET_SPL_TOKEN_PREFLIGHT_TEST=1` active un contrôle réel de `TransferChecked` sur des comptes Devnet explicitement fournis, sans signature ni dépense. +- [x] Valider le socle `pre.005` le 15 juillet 2026 : 67 tests `kb_pipeline`, 15 tests `kb_executor_spl_token`, Clippy global propre et préflight `TransferChecked` Devnet réel `Ready` sur deux comptes auxiliaires contrôlés du même mint. +- [x] `pre.005-delta-fix-001` : réutiliser l'orchestration commune pour préflight obligatoire, simulation liée au message exact, signature/envoi autorisé, confirmation, hydratation canonique, extraction core, replay Token, vérification des projections et second replay idempotent. +- [x] Exposer séparément une API de simulation sans store ni signature et refuser l'envoi si les signataires requis ne sont pas tous résolus par le wallet persistant du profil. +- [x] Valider le test opt-in d'orchestration le 15 juillet 2026 sur les comptes Devnet contrôlés : simulation seule puis envoi réel de `TransferChecked`, avec wallet isolé explicitement aligné sur l'autorité Token, confirmation, hydratation canonique, extraction core, replay et matérialisation réussis ; le contrat renforcé a produit la signature `5Q71KeomfhHBueDsD92C7L21vHUpFGZnZzCFPGaCDAMHx6yV4Jy2fMDzCpze8mNr2c1GLSRT93mmBaYy2RGZ95ZY`, une matérialisation et un second replay sans échec, refus ni nouvelle sortie. + +#### `0.4.4-pre.006` — lifecycle contrôlé Devnet sans ATA + +- [x] Ajouter un orchestrateur séquentiel pour des comptes Mint/Account rent-exempt, non initialisés et possédés par le programme Token classique, sans création ATA implicite. +- [x] Enchaîner onze transactions simulation-first : `InitializeMint2`, deux `InitializeAccount3`, `MintToChecked`, `TransferChecked`, `ApproveChecked`, `Revoke`, deux `BurnChecked` puis deux `CloseAccount`. +- [x] Exiger la même autorité simple résolue par le wallet de profil, une confirmation destructive explicite, la conservation exacte des montants bruts et une validation canonique/idempotente complète avant de passer à l'étape suivante. +- [x] `pre.006-delta-fix-001` : remplacer la dépendance à l'ancienne commande CLI `solana create-account` par une préparation interne qui génère trois keypairs éphémères, mesure le rent, construit et simule trois `SystemCreateAccount`, exige les deux signatures, confirme puis vérifie owner Token, tailles 82/165/165 et données entièrement nulles. +- [x] `pre.006-delta-fix-002` : rendre une séquence partielle reprenable depuis un index explicite seulement après récupération canonique de la signature prédécesseur, correspondance de l'opération matérialisée, second replay idempotent, puis pacing borné et émission immédiate des signatures suivantes. +- [x] Valider le lifecycle réel Devnet le 15 juillet 2026 : préparation interne des comptes 82/165/165, reprise contrôlée après throttling du RPC public, puis `MintToChecked`, `TransferChecked`, `ApproveChecked`, `Revoke`, deux `BurnChecked` et deux `CloseAccount` confirmés ; chaque étape récupérée ou envoyée produit exactement une matérialisation et un second replay idempotent. Le scénario multisig reste candidat pour l'audit final si son coût demeure raisonnable. + +#### `0.4.4-pre.007` — journal métier et démo opérateur + +- [x] Étendre la fenêtre d'exécution Devnet existante, sans nouvelle WebView par opération, avec un panneau Token représentatif `TransferChecked`, simulation par défaut et confirmation explicite avant envoi ; le lifecycle complet reste exercé par son scénario opt-in dédié. +- [x] Conserver une seule fenêtre d'exécution : le panneau Token réutilise le profil, le wallet, le verrou d'exécution, la simulation et la confirmation déjà communs aux parcours System et Memo. +- [x] Ajouter une vue bornée du journal `kb_sol_mat_events`, filtrable par signature, mint, compte, famille et opération, avec détail JSON typé et montants bruts sans perte. +- [x] Visualiser les initialisations, transferts, délégations, mint/burn, freeze/thaw, changements d'autorité, close et opérations wrapped SOL comme événements chronologiques ; ne pas afficher d'OHLC ni de faux solde final. +- [x] Afficher séparément résultat de préflight, simulation, confirmation, extraction, décodage, matérialisations attendues et preuve d'idempotence. +- [x] Valider `pre.007` le 15 juillet 2026 : 102 tests `kb_app_demo`, 80 tests pipeline, 15 tests exécuteur Token et Clippy global propres ; `cargo tauri dev` a démarré Vite et Tauri, chargé le journal borné et simulé `TransferChecked`. Le refus sans confirmation puis le refus d'un envoi exigeant une autorité externe au wallet de profil prouvent les deux garde-fous attendus, sans invalider le parcours backend Devnet déjà envoyé et matérialisé. + +#### `0.4.4-pre.008` — corpus, audit cluster et clôture + +- [x] Documenter dans la matrice les signatures Mainnet représentatives et le lifecycle Devnet, avec statut séparé pour interface, processor, builder, simulation, soumission et déploiement ; conserver Localnet non testé et `UnwrapLamports`/`Batch` sans revendication de déploiement cluster. +- [x] `pre.008-delta-fix-001` : ajouter le probe Devnet simulation-only de `Batch` et `UnwrapLamports` ; valider 81 tests pipeline et Clippy global propre le 16 juillet 2026. +- [x] `pre.008-delta-fix-002` : enregistrer les deux simulations Devnet réussies, sans signature ni envoi : `Batch` avec un enfant `TransferChecked` de montant nul en 270 compute units et `UnwrapLamports` d'un lamport depuis un compte wrapped SOL auxiliaire classique en 140 compute units, sans erreur runtime. Devnet expose donc les deux tags récents et aucun binaire Localnet p-token n'est requis pour pallier une absence de déploiement. +- [x] `pre.008-delta-fix-003` : aligner le test de non-invention cluster sur la preuve Devnet réelle tout en exigeant que Localnet/Mainnet restent non testés et que les signatures réelles restent vides pour les deux simulations sans envoi ; validation ciblée 8/8 et Clippy global propre le 16 juillet 2026. +- [x] `pre.008-delta-fix-004` : aligner les assertions Memo sur `matrixVersion = 4` et compléter, dans les trois profils exemple, les routes console et fichier de `kb_executor_spl_token` ; validation 9/9 Memo, 7/7 annotations, 41/41 configuration, 102/102 démo et Clippy global propre le 16 juillet 2026. +- [x] Exécuter la régression ciblée, PostgreSQL réel, Clippy global et Tauri/Vite : 77 routes chargées, simulation `TransferChecked` réussie, refus sans confirmation vérifié, matérialisation commitée exacte consultée et simulation Memo v4 réussie ; synchroniser README/CHANGELOG et clôturer `0.4.4` avant ATA. +- [x] `pre.008-delta-fix-005` : publier la clôture documentaire `0.4.4`, activer `0.4.5 — SPL Associated Token Account` et fournir `prompts/024_v0_4_5_spl_associated_token_account.md` sans commencer son implémentation. + +### 0.4.5 — SPL Associated Token Account + +Règle de couverture du jalon : décoder maximalement toute variante officiellement identifiable, qu'elle soit historique, courante ou expérimentale ; matérialiser maximalement chaque fait stable et prouvé sans chevauchement entre propriétaires ; exécuter toute variante actuelle officiellement constructible, en excluant seulement les opérations historiques, obsolètes ou qui ne sont plus d'actualité. Un remaniement reste autorisé lorsqu'il est nécessaire pour respecter ces contrats, à condition d'être borné, justifié, documenté et couvert par les régressions. + +- [x] `pre.001` : auditer `spl-associated-token-account-interface 2.0.0`, les trois variantes Borsh publiées, les builders officiels, l'ordre et les flags des comptes, la dérivation PDA `[wallet, Token Program ID, mint]` et le processor de référence `program@v8.0.0` ; publier `docs/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json` et quatre tests d'égalité interface/matrice/builders/PDA. Résolution Cargo `2.0.0`, 4/4 tests et Clippy global validés le 16 juillet 2026 ; version workspace corrigée à `0.4.5` ; tests de matrice réintégrés dans `decoder.rs` pour conserver l'organisation homogène des décodeurs existants. Corpus canonique et égalité des binaires cluster encore non revendiqués. +- [x] `pre.002` : remplacer le scaffold par le décodeur ATA exact pour toutes les variantes officiellement identifiables de l'interface et du processor résolus, actuellement `Create`, `CreateIdempotent` et `RecoverNested` ; couvrir wire Borsh et `Create` historique vide, comptes ordonnés, flags, doublons, dérivations PDA, Token classique/Token-2022, outer/CPI, succès/échec, données inconnues/tronquées/suffixées et diagnostics bornés ; compléter le corpus offline et l'égalité matrice/couverture compilée sans commencer l'exécuteur. Validation opérateur du 16 juillet 2026 : ATA 10/10, configuration 41/41, pipeline 81/81, application 102/102 et Clippy global propre après `pre.002-delta-fix-001`. +- [x] `pre.003` : matérialiser maximalement les faits ATA commités avec propriétaires explicites : étendre `kb_materializer_token_accounts` pour `ata_created`, `ata_created_or_reused_idempotently` et `nested_ata_recovered`, puis étendre `kb_materializer_risk` pour le fait distinct `nested_ata_anti_pattern_recovered` sans score arbitraire. Documenter et tester l'absence de projection dans `kb_materializer_lifecycle` afin d'éviter le doublon de lifecycle, dans `kb_materializer_admin` car aucune autorité n'est modifiée et dans `kb_materializer_fees` car le wire ATA ne prouve aucun montant exact de rent ou de frais. Validation opérateur du 16 juillet 2026 : token_accounts 9/9, risk 6/6, lifecycle 17/17, admin 9/9, fees 3/3, décodeur ATA 10/10, application 103/103, pipeline 81/81 et Clippy global propre. Le replay PostgreSQL réel reste réservé à la validation cluster/finale. +- [x] `pre.004` : remplacer le scaffold exécuteur par les trois variantes actuelles officiellement constructibles `Create`, `CreateIdempotent` et `RecoverNested` ; comparer chaque plan au builder officiel et ajouter le préflight stateful pour dérivation, mint, compte existant, RecoverNested, rent, plafonds et signataires. `pre.004-delta-fix-001` ajoute les types `solana_pubkey::Pubkey` explicites après l'échec d'inférence `E0282`. Validation opérateur du 16 juillet 2026 : exécuteur ATA 10/10, pipeline 84/84 et Clippy global propre. +- [x] `pre.005` : valider l'orchestration Devnet simulation-first, la post-validation stateful adaptée aux créations et à RecoverNested, la reprise bornée après `429`, la confirmation, l'extraction, le replay ATA et CPI Token classique, la matérialisation et le second replay idempotent ; intégrer Create/CreateIdempotent et le journal lifecycle borné dans la fenêtre Solana existante. Validation opérateur du 16 juillet 2026 : décodeur ATA 10/10, exécuteur ATA 10/10, pipeline 90/90, configuration 41/41, application 111/111 et Clippy global propre ; `cargo tauri dev -c kb_app_demo/tauri.conf.json` démarre Vite, Tauri, les 83 routes de journalisation et le schéma PostgreSQL réel. Deux soumissions Devnet contrôlées `CreateIdempotent` classiques ont été simulées, confirmées, extraites, décodées et matérialisées exactement une fois, puis leur second replay n'a produit aucun doublon. Le mint Token-2022 contrôlé `3DxK…KTE` a ensuite créé puis réutilisé l'ATA `6WfC…C9Y` aux slots 476702448 et 476703343 ; les deux signatures ont réussi le parcours complet et leur second replay sans doublon. L'ATA indépendant mesure 170 octets, appartient à Token-2022, conserve le wallet/mint attendus et expose `ImmutableOwner`. +- [x] `pre.006` : valider le test opt-in Devnet `RecoverNested` hors UI avec fixture classique contrôlée, préflight des trois PDA, simulation, transfert de 1 000 000 000 unités brutes, fermeture du nested ATA, conservation de l'owner ATA, projections lifecycle/risk distinctes, deux matérialisations exactes et second replay idempotent sous la signature `37LG…HskM`. Les suites pipeline 90/90, décodeur ATA 10/10, exécuteur ATA 10/10 et Clippy global restent propres après `pre.006-delta-fix-001`. +- [x] `pre.006-delta-fix-003` : clôturer `0.4.5` après la régression complète. Validation opérateur du 16 juillet 2026 : Program IDs 5/5, Token classique decode 8/8 et exécuteur 15/15, Memo 9/9, annotations 7/7, token accounts 9/9, risk 6/6, lifecycle 17/17, admin 9/9, fees 3/3, API d'exécution 22/22, safety 15/15, transaction Solana 12/12, pipeline 90/90, RPC 113/113, configuration 41/41, application 111/111 et PostgreSQL réel 46/46 ; Clippy global propre. Les manifests Cargo héritent tous de `workspace.package.version = 0.4.5`, l'interface ATA résolue reste `2.0.0`, et les versions npm/Tauri de la démo sont synchronisées en `0.4.5`. README, matrice, dépendances d'interface, CHANGELOG et prompt `0.4.6` sont publiés seulement après ces preuves. +- [x] Décoder maximalement `Create`, `CreateIdempotent`, `RecoverNested` et la forme historique vide officiellement identifiable. +- [x] Couvrir les ATA ciblant SPL Token et Token-2022 sans commencer le décodage général Token-2022. +- [x] Matérialiser maximalement le lifecycle ATA et le fait de risque nested sans dupliquer les changements Token, puis développer l'exécuteur maximal des opérations actuelles après validation des projections. + +### 0.4.6 — Token-2022, extensions et registre ElGamal — clôturé + +`0.4.6` clôt la couverture Token-2022 et le registre ElGamal comme deux frontières techniques distinctes. Token-2022 conserve son Program ID, sa matrice, ses événements, ses états TLV, ses matérialisateurs et ses capacités d’exécution propres. Le registre ElGamal conserve séparément son Program ID, son état de 64 octets, son PDA, ses opérations administratives et ses preuves. Le programme natif ZK ElGamal Proof reste une troisième surface indépendante. + +- [x] Résoudre et documenter les interfaces réellement utilisées : `spl-token-2022-interface 3.1.1`, `spl-elgamal-registry-interface 0.2.1`, `solana-zk-elgamal-proof-interface 0.1.3`, Group `0.7.2`, Metadata `1.0.1` et TLV `0.9.1`. +- [x] Publier `docs/SPL_TOKEN_2022_MATRIX.json` et `docs/SPL_ELGAMAL_REGISTRY_MATRIX.json` avec frontières, wire, comptes, états, capacités et preuves séparés. +- [x] Décoder les instructions Token-2022 de base, les familles d’extensions identifiables, Token Metadata/Group incorporés, les parcours confidentiels et les instructions outer/CPI, sans fusionner les implémentations tierces. +- [x] Parser les préfixes Mint, Account et Multisig, le discriminant de type de compte et la région TLV bornée, y compris metadata variable, groupes et extensions publiques/confidentielles sans inventer de valeur déchiffrée. +- [x] Décoder et parser séparément le registre ElGamal, avec `create_registry`, `update_registry`, PDA officiel, owner, taille et état de 64 octets. +- [x] Attribuer chaque fait stable à un matérialiseur propriétaire unique : token accounts, metadata, admin, fees, risk/compliance ou annotations ; préserver la provenance et refuser les transactions échouées. +- [x] Exposer les exécuteurs typés Token-2022 et ElGamal Registry avec simulation obligatoire, dry-run par défaut, signataires exacts, préflights stateful, preuves inline/context-state, plafonds et postconditions explicites. +- [x] Valider sur Devnet huit opérations publiques Token-2022 : `MintToChecked`, `TransferChecked`, `ApproveChecked`, `Revoke`, `BurnChecked`, `FreezeAccount`, `ThawAccount` et `CloseAccount`, avec hydratation, extraction, replay, matérialisation et second replay idempotent. +- [x] Valider ElGamal Registry synthétiquement/offline : builders, exact-wire, PDA, état, lectures RPC bornées, preuves et orchestration. La validation réseau publique reste explicitement indisponible sur Devnet/Mainnet au 20 juillet 2026 ; aucune preuve cluster n’est inventée. +- [x] Valider le corpus Mainnet/PostgreSQL : 55 instructions Token-2022 décodées sans échec, aucune duplication decode/mat, et correction du wire `Write` du loader immuable sur 68 instructions Mainnet. +- [x] Qualifier les rejets natifs restants : 31 `immutable_loader_tag_truncated`, 44 `loader_v4_tag_truncated` et 1 `loader_accounts_invalid`, tous dans des transactions Solana échouées ; quatre variantes Loader v4 inconnues restent explicitement `Unsupported`. +- [x] Ajouter le mode `incomplete_signatures` dans le replay de `kb_app_demo` : sélection des signatures contenant au moins une instruction `pending`, `failed`, `replay_requested` ou `unsupported`, limite appliquée aux signatures, expansion aux instructions compatibles et réévaluation sans force replay global. +- [x] Valider deux campagnes PostgreSQL réelles `incomplete_signatures` identiques : 81 entrées sélectionnées, 1 décodée, 4 unsupported, 76 failed, aucun unmatched, aucun not-started et aucune duplication de matérialisation. +- [x] Valider la régression finale : `kb_store_core` 41/41, `kb_store_pg` 46/46 avec PostgreSQL réel, `kb_pipeline` 124/124, `kb_app_demo` 118/118 et `cargo clippy --all-targets` propre. +- [x] Publier le bilan final dans `docs/V0_4_6_VALIDATION.md` et préparer `prompts/026_v0_4_7_metaplex_token_metadata.md`. + +#### Modèle de couverture des tokens et actifs numériques + +- [x] Les tokens fongibles et les NFT basés sur un mint restent décodés au niveau des mouvements par `kb_decoder_spl_token` ou `kb_decoder_spl_token_2022`; il n’existe pas d’instruction Token distincte nommée « NFT ». +- [x] La classification fongible/NFT/SFT est une projection dérivée de la supply, des decimals, des authorities et des standards metadata observés; elle ne doit jamais remplacer l’adresse canonique du mint ou de l’actif. +- [x] Les NFT classiques et programmables liés à un mint sont couverts par le futur `kb_decoder_metadata_metaplex_token_metadata` (`0.4.7`). +- [x] Les actifs Metaplex Core, qui ne sont pas des mints SPL Token classiques, sont couverts séparément en `0.4.8`. +- [x] Les NFT compressés exigent Bubblegum en plus d’Account Compression et Noop; leur couverture complète est planifiée en `0.4.9`. +- [x] Les metadata Token-2022 incorporées, Metaplex externes et implémentations tierces de Token Metadata Interface conservent leur provenance et ne sont jamais fusionnées silencieusement. + +### 0.4.7 — Metaplex Token Metadata + +Ce jalon est prioritaire immédiatement après Token-2022. Metaplex Token Metadata n'est pas un programme SPL officiel : il s'agit d'un programme indépendant de la Metaplex Foundation, utilisé comme standard de metadata externe pour SPL Token classique et Token-2022. Son Program ID canonique est `metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s` et doit être revérifié depuis les sources officielles au début du jalon. + +### Audit et dépendances + +- [x] Lire `RULES.md`, les contrats decode/materialization/execution/replay, les matrices SPL Token/Token-2022, `docs/SOLANA_INTERFACE_DEPENDENCIES.md` et le prompt `026` avant tout code. +- [x] Ouvrir l’audit des crates et sources officielles Metaplex réellement disponibles : SDK Rust `mpl-token-metadata ^5.1`, Program ID, IDL `1.14.0`, inventaire généré des instructions et séparation maintenu/historique. Les comptes, builders et PDA détaillés restent à prouver par variante. +- [x] Créer `docs/METAPLEX_TOKEN_METADATA_MATRIX.json` comme matrice d’audit machine-readable avant le décodage maximal : sources officielles figées, inventaire SDK courant, frontière historique IDL, familles de PDA/comptes et statuts de preuve. L’enrichissement exhaustif par instruction et compte reste requis avant l’activation runtime. +- [x] Ne pas introduire Anchor dans ce jalon : Token Metadata utilise ses propres layouts Borsh et interfaces ; l'infrastructure Anchor reste en `0.4.18`, juste avant les protocoles qui en dépendent réellement. +- [ ] Conserver `wincode ^0.5` tant que les crates Solana utilisées exposent leurs implémentations `SchemaRead`/`SchemaWrite` contre `wincode 0.5.x`; ne pas migrer isolément le workspace vers `0.6`. + +### Journal de préversions + +- `0.4.7-pre.001` : ouverture de l’audit officiel, ajout de `mpl-token-metadata ^5.1`, création de la matrice initiale et des squelettes `kb_decoder_metadata_metaplex_token_metadata` et `kb_executor_metadata_metaplex_token_metadata`; aucun décodeur runtime ni builder/exécuteur actif. +- `0.4.7-pre.002` : activer le dispatcher contextualisé et le décodage Borsh exact du premier groupe création/mise à jour (`CreateMetadataAccountV3`, `UpdateMetadataAccountV2`), avec comptes ordonnés, outer/CPI, transactions échouées non committées, bornes et diagnostics fail-closed; garder l’enregistrement runtime, la matérialisation et l’exécution pour les groupes suivants. +- `0.4.7-pre.003` : ajouter le groupe de vérification de collection (`VerifyCollection`, `UnverifyCollection`, `SetAndVerifyCollection`) avec discriminateurs officiels, comptes ordonnés, autorité de collection, payer/update authority, `collection_authority_record` optionnel, outer/CPI, échecs non committés et diagnostics fail-closed; conserver matérialisation, exécution et registre runtime pour des préversions dédiées. +- `0.4.7-pre.004` : décodage du groupe sized collection item (`VerifySizedCollectionItem`, `UnverifySizedCollectionItem`, `SetAndVerifySizedCollectionItem`). +- `0.4.7-pre.005` : décoder l’administration des autorités de collection (`ApproveCollectionAuthority`, `RevokeCollectionAuthority`) avec records PDA, autorités distinctes, comptes système/rent et contrats signer/writable exacts. +- `0.4.7-pre.006` : décoder les usages et autorités d’usage (`ApproveUseAuthority`, `RevokeUseAuthority`, `Utilize`) avec compteurs `u64`, `use_authority_record`, burner, comptes Token/ATA, comptes système/rent, outer/CPI et échecs non committés. +- `0.4.7-pre.007` : décoder la signature de creator et la déclaration de première vente (`SignMetadata`, `UpdatePrimarySaleHappenedViaToken`) avec comptes ordonnés, signer/writable exacts, outer/CPI, échecs non committés et diagnostics fail-closed. +- `0.4.7-pre.008` : décoder la normalisation et la classification metadata (`PuffMetadata`, `RemoveCreatorVerification`, `SetTokenStandard`) avec edition optionnelle, comptes ordonnés et diagnostics fail-closed. +- `0.4.7-pre.009` : décoder `CreateMetadataAccountV2` historique (discriminant `16`) avec `DataV2`, mutabilité, comptes exacts et politique non exécutable. +- `0.4.7-pre.010` : décoder `CreateMetadataAccount` et `UpdateMetadataAccount` historiques (discriminants `0` et `1`) avec layouts `Data` V1 bornés, comptes exacts et politique non exécutable. +- `0.4.7-pre.011` : décoder `CreateMasterEditionV3` et la conversion historique `ConvertMasterEditionV1ToV2`, avec `max_supply`, comptes exacts et politique d’exécution distincte. +- `0.4.7-pre.012` : décoder le mint d’éditions imprimées via token et la variante historique vault proxy (`MintNewEditionFromMasterEditionViaToken`, `MintNewEditionFromMasterEditionViaVaultProxy`), avec numéro d’édition `u64`, edition marker et comptes exacts. +- `0.4.7-pre.013` : décoder `SetCollectionSize` et le bridge `BubblegumSetCollectionSize`, avec taille `u64`, autorités/records exacts et frontière Bubblegum explicite. +- `0.4.7-pre.014` : décoder `Delegate` et `Revoke` programmables, leurs enums Borsh, 14 comptes positionnels et placeholders optionnels. +- `0.4.7-pre.015` : décoder `Transfer`, `Lock`, `Unlock`, `Burn` et `CloseAccounts`, avec enums Borsh, montants `u64`, comptes programmables exacts et transactions échouées non committées. +- `0.4.7-pre.016` : réauditer exhaustivement l’index officiel des instructions Rust avant le décodage des comptes, puis décoder `FreezeDelegatedAccount` et `ThawDelegatedAccount` historiques avec discriminants `26`/`27`, cinq comptes exacts, outer/CPI, échecs non committés et politique decode-only. +- `0.4.7-pre.017` : décoder `BurnNft`, `BurnEditionNft` et `DeprecatedMintNewEditionFromMasterEditionViaPrintingToken` historiques avec discriminateurs `29`/`37`/`3`, comptes exacts, comptes optionnels de fin, outer/CPI, échecs non committés et politique decode-only. +- `0.4.7-pre.018` : décoder `CreateEscrowAccount`, `CloseEscrowAccount`, `TransferOutOfEscrow` et `Collect`, avec montant `u64`, authorities optionnelles, comptes exacts et diagnostics fail-closed. +- `0.4.7-pre.019` : décoder le wrapper moderne `Create` (`42`) avec `CreateArgs::V1`, neuf comptes positionnels et placeholders optionnels exacts. +- `0.4.7-pre.020` : décoder le wrapper moderne `Mint` (`43`) avec `MintArgs::V1`, montant `u64`, `AuthorizationData`, quinze positions et placeholders optionnels exacts. +- `0.4.7-pre.021` : décoder le wrapper moderne `Print` (`55`) avec `PrintArgs::V1`/`V2`, édition `u64`, dix-huit positions et Token Record optionnel exact. +- `0.4.7-pre.022` : décoder le wrapper moderne `Update` (`50`) et toutes les variantes `UpdateArgs` V1/V2, avec onze positions et placeholders optionnels exacts. +- `0.4.7-pre.023` : décoder les wrappers modernes `Use` (`51`), `Verify` (`52`) et `Unverify` (`53`) avec leurs enums Borsh, comptes positionnels, placeholders optionnels, outer/CPI et échecs non committés. +- `0.4.7-pre.024` : décoder `Resize` (`56`), `Migrate` (`48`) et les six discriminateurs historiques manquants `2`/`5`/`6`/`8`/`9`/`10`, puis prouver une couverture exhaustive des 58 discriminateurs `0..=57`. +- `0.4.7-pre.025` : décoder le compte `Metadata`, vérifier owner, discriminant `MetadataV1`, bornes officielles et PDA canonique `[metadata, program_id, mint]`, sans encore enregistrer le décodeur stateful dans le pipeline. +- `0.4.7-pre.026` : décoder `DeprecatedMasterEditionV1`, `MasterEditionV2` et `EditionV1`, vérifier owner, layouts bornés et PDA commun `[metadata, program_id, mint, edition]`, tout en conservant V1 comme état historique decode-only. +- `0.4.7-pre.027` : décoder `EditionMarker` et `EditionMarkerV2`, vérifier owner, bitmaps, groupes de 248 éditions, seeds PDA V1/V2 et longueurs Borsh exactes. +- `0.4.7-pre.028` : décoder `TokenRecord`, vérifier owner, layout fixe de 80 octets, PDA mint/token account, bump stocké, états programmables, delegate, rôle et locked transfer. +- `0.4.7-pre.029` : décoder `MetadataDelegateRecord`, `HolderDelegateRecord`, `CollectionAuthorityRecord` et `UseAuthorityRecord`, avec longueurs, rôles-seeds, PDA et bumps exacts. +- `0.4.7-pre.030` : décoder `TokenOwnedEscrow`, distinguer `TokenOwner`/`Creator`, vérifier les deux familles de seeds PDA, longueurs Borsh et bump stocké, puis documenter les transitions stateful escrow/migrate/resize sans les matérialiser prématurément. +- `0.4.7-pre.031` : décoder `ReservationListV1/V2` historiques, préserver compteurs, supply snapshot, caches et PDA dépendant de `resource`, avec limites officielles et politique decode-only. + +- `0.4.7-pre.032` : inventaire exhaustif des quinze variantes `Key`, liaison de chaque layout à son décodeur, sentinelle `Uninitialized` explicitement rejetée et audit fail-closed des futures variantes upstream. +- `0.4.7-pre.033` : ajouter l’enveloppe canonique des snapshots, l’identité stable `program_id:account`, la version de layout, les classes actif/historique/expérimental et la provenance live/replay/backfill/repair ; rendre explicite que les comptes historiques sont matérialisables mais jamais exécutables. +- `0.4.7-pre.034` : règles décodeur/matérialiseur/exécuteur renforcées ; projection canonique commitée de `MetadataV1`, snapshot owned autoritatif et absence de doublon d’état avec les observations d’instructions. +- `0.4.7-pre.035` : matérialiser les autres comptes Metaplex actifs, expérimentaux et historiques avec identité stable, lifecycle, provenance et propriétaire unique des faits. + +#### Audit canonique des comptes `0.4.7` + +- [x] Auditer les quinze variantes `Key` publiées (`0..=14`) et relier chaque compte réel à un décodeur borné. +- [x] Rejeter explicitement `Key::Uninitialized` et toute variante future inconnue sans projection partielle. +- [x] Vérifier par test les discriminateurs Borsh du SDK épinglé, l’unicité de l’inventaire et sa correspondance avec la matrice. +- [x] Définir l’identité stable canonique `program_id:account`, le nom de layout, le discriminant et la version canonique. +- [x] Distinguer explicitement lifecycle, politique de matérialisation et politique d’exécution. +- [x] Autoriser la matérialisation des comptes historiques comme état historique de backfill/replay, sans jamais les exposer à l’exécuteur. +- [x] Conserver source, slot, write version, signature, index outer/inner et statut committed dans la provenance canonique. + +#### Découpage prévisionnel restant de `0.4.7` + +- `pre.036` : intégration du décodeur de comptes dans `kb_pipeline`, routage owner/discriminant, replay, fermeture de comptes, ordering et déduplication. +- `pre.037` : corrélation instructions/comptes avant-après et vérification stateful des observations décodées. +- `pre.038` : exécuteur moderne de base (`Create`, `Update`, `Mint`, `Print`, `Verify`, `Unverify`, `Use`, `Resize`, `Migrate`) avec builders officiels et simulation-first. +- `pre.039` : exécuteur programmable (`Delegate`, `Revoke`, `Transfer`, `Lock`, `Unlock`, `Burn`) avec Token Records et Authorization Rules. +- `pre.040` : exécuteur collection/use/admin, en excluant formellement les opérations historiques. +- `pre.041` : preflight stateful complet, postconditions et replay de confirmation idempotent. +- `pre.042` : intégration `kb_app_demo`, bindings et scénarios PostgreSQL/replay/dry-run. +- `pre.043` : corpus Mainnet de signatures et comptes historiques/actifs. +- `pre.044` : validations Devnet et Localnet des opérations encore appelables. +- `pre.045` : audit de non-duplication et conflits de provenance Metaplex externe / Token-2022 incorporée / Metaplex Core. +- `pre.046` : audit final, documentation, changelog, prompt de session suivant et clôture de `0.4.7`. + +### Frontière du décodeur + +- [x] Créer le squelette canonique `kb_decoder_metadata_metaplex_token_metadata`, borné au Program ID Metaplex vérifié, sans enregistrement runtime ni prétention de décodage dans `0.4.7-pre.001`. +- [x] Créer le squelette canonique `kb_executor_metadata_metaplex_token_metadata`, audit-only et sans builder runtime avant validation exacte des comptes, autorités, coûts, confirmations et postconditions stateful. +- [ ] Réutiliser le Program ID déjà enregistré dans `kb_program_ids`, puis ajouter les capacités au registre runtime et aux options Tauri seulement après validation du premier corpus, sans heuristique fondée seulement sur un PDA ou un discriminant. +- [ ] Préserver signature, slot, outer/CPI, chemin d'instruction, statut de transaction, payload hash, comptes ordonnés, signers/writable et provenance de layout. +- [ ] Produire des diagnostics stables et bornés pour discriminant inconnu, payload tronqué/suffixé, comptes manquants/supplémentaires, PDA incohérent, owner incorrect, enum future et chaîne/vecteur hors limites. +- [ ] Classer les variantes futures ou non prouvées en `Unsupported`, et les payloads structurellement invalides en `Failed`, sans projection partielle trompeuse. + +### Décodage des instructions + +- [x] Inventorier et couvrir les générations historiques et actuelles publiées de création et mise à jour de metadata (`CreateMetadataAccount`, V2, V3, `UpdateMetadataAccount`, V2). +- [ ] Couvrir création de master edition, edition, edition marker et mint d'éditions, avec limites numériques et PDA exacts. + - [x] Décoder `CreateMasterEditionV3` et `ConvertMasterEditionV1ToV2` avec wire et comptes exacts. + - [x] Décoder le mint d'éditions via token et vault proxy, avec numéro d'édition `u64`, edition marker et comptes exacts. + - [ ] Décoder et valider les comptes edition/edition marker ainsi que leurs PDA dans la tranche de décodage d’état. +- [x] Couvrir vérification/dé-vérification de créateurs et collections, collection size/details et autorités de collection. + - [x] Décoder `SetCollectionSize` et `BubblegumSetCollectionSize` avec taille `u64`, flags exacts et record optionnel. + - [ ] Valider les PDA/owners des collection authority records lors du décodage des comptes on-chain. +- [x] Couvrir uses, approve/revoke use authority et consommation d'usage avec comptes exacts. +- [x] Couvrir délégations et révocations metadata/collection/use/sale/transfer/utility/staking/programmable lorsqu'elles sont officiellement définies. +- [x] Couvrir les opérations programmables actuelles : transfer, lock, unlock, burn, delegate, revoke et authorization data/rule set lorsque le wire exact est prouvé. La validation stateful des rule sets et PDA reste planifiée séparément. +- [x] Couvrir les migrations et instructions historiques encore observables sans les confondre avec les variantes actuelles. + - [x] Décoder `FreezeDelegatedAccount` et `ThawDelegatedAccount` historiques avec leurs cinq comptes exacts et les conserver decode-only. + - [x] Décoder les burns NFT historiques et le mint déprécié via printing token (`BurnNft`, `BurnEditionNft`, `DeprecatedMintNewEditionFromMasterEditionViaPrintingToken`). + - [x] Décoder les instructions escrow/collect (`CreateEscrowAccount`, `CloseEscrowAccount`, `TransferOutOfEscrow`, `Collect`) avec wire et comptes exacts. + - [x] Décoder le wrapper moderne `Create` (`42`) avec `CreateArgs::V1`, neuf comptes positionnels et placeholders optionnels exacts. + - [x] Décoder le wrapper moderne `Mint` (`43`) avec `MintArgs::V1`, quinze comptes positionnels et placeholders optionnels exacts. + - [x] Décoder le wrapper moderne `Print` (`55`) avec `PrintArgs::V1`/`V2`, dix-huit comptes positionnels et Token Record optionnel exact. + - [x] Décoder le wrapper moderne `Update` (`50`) et ses variantes `V1`/`As…V2` avec wire et comptes exacts. + - [x] Décoder les wrappers modernes `Use`, `Verify` et `Unverify` avec leurs variantes et contrats positionnels exacts. + - [x] Décoder `Resize` et `Migrate`, couvrir les six discriminateurs historiques manquants `2`/`5`/`6`/`8`/`9`/`10` et prouver l’inventaire exhaustif `0..=57`. +- [x] Préserver tous les champs wire significatifs : autorités, creators, seller fee basis points, collection, uses, token standard, collection details, programmable config et authorization data pour les instructions actuellement couvertes. + +### Intégration `kb_pipeline` et `kb_app_demo` + +- [ ] Enregistrer le décodeur dans le registre runtime de `kb_pipeline` après stabilisation de la matrice d’instructions et des comptes. +- [ ] Ajouter les tests `kb_pipeline` pour outer/CPI, transactions échouées, replay, déduplication et routage vers les matérialiseurs. +- [ ] Ajouter les tests `kb_pipeline` de matérialisation idempotente et d’orchestration d’exécution simulation-first. +- [ ] Enregistrer décodeur, matérialiseurs et exécuteur dans `kb_app_demo`, puis couvrir les campagnes replay et les scénarios PostgreSQL. +- [ ] Valider dans `kb_app_demo` les refus explicites des instructions historiques/non supportées et les commandes Tauri éventuelles. + +### Décodage des comptes et PDA + +- [ ] Parser et versionner `Metadata`, `MasterEditionV1/V2`, `Edition`, `EditionMarker`, `EditionMarkerV2`, `TokenRecord`, `MetadataDelegateRecord`, `CollectionAuthorityRecord`, `UseAuthorityRecord` et tout autre compte officiel confirmé. + - [x] `pre.025` : parser `MetadataV1`, conserver les champs descriptifs et administratifs, et produire une projection JSON bornée. + - [x] `pre.026` : parser `DeprecatedMasterEditionV1`, `MasterEditionV2` et `EditionV1`, conserver supply/max supply, printing mints historiques, parent et numéro d’édition. + - [x] `pre.027` : parser `EditionMarker` et `EditionMarkerV2`, conserver ledger, groupe V1, index d’octet, masque et état de l’édition demandée. + - [x] `pre.028` : parser `TokenRecord`, conserver bump, état programmable, révision du rule set, delegate, rôle et locked transfer. + - [x] `pre.029` : parser les records Metadata/Holder Delegate, Collection Authority et Use Authority avec leurs champs exacts. + - [x] `pre.030` : parser `TokenOwnedEscrow`, conserver base token, autorité TokenOwner/Creator et bump. + - [x] `pre.031` : parser `ReservationListV1/V2`, conserver Master Edition, supply snapshot, réservations et caches historiques en decode-only. +- [ ] Vérifier l'owner du compte avant tout parsing et refuser les comptes étrangers même si leur payload ressemble au layout attendu. + - [x] `pre.025` : appliquer cette frontière au compte `Metadata` avant toute désérialisation. + - [x] `pre.026` : appliquer la même frontière aux comptes edition/master edition avant toute désérialisation. + - [x] `pre.027` : appliquer cette frontière aux Edition Markers avant toute lecture du discriminant ou du ledger. + - [x] `pre.028` : appliquer cette frontière au Token Record avant toute lecture de l’état programmable. + - [x] `pre.029` : appliquer cette frontière aux quatre familles de records avant désérialisation. + - [x] `pre.030` : appliquer cette frontière à Token Owned Escrow avant lecture de l’autorité. + - [x] `pre.031` : appliquer cette frontière aux Reservation Lists avant lecture de leur génération historique. +- [ ] Vérifier les PDA canoniques et l'ordre exact des seeds pour metadata, edition/master edition, edition markers, token records, delegates, collection authorities et use authorities. + - [x] `pre.025` : valider le PDA Metadata exact `[b"metadata", program_id, mint]` et conserver le bump. + - [x] `pre.026` : valider le PDA edition/master edition exact `[b"metadata", program_id, mint, b"edition"]` et conserver le bump. + - [x] `pre.027` : valider le PDA V1 `[metadata, program_id, mint, edition, edition/248 décimal]` et le PDA V2 `[metadata, program_id, mint, edition, marker]`. + - [x] `pre.028` : valider le PDA Token Record `[metadata, program_id, mint, token_record, token_account]` et le bump stocké. + - [x] `pre.029` : valider les PDA exacts des records Metadata/Holder Delegate, Collection Authority et Use Authority. + - [x] `pre.030` : valider les PDA escrow TokenOwner `[metadata, program_id, base_token, 0, escrow]` et Creator `[metadata, program_id, base_token, 1, creator, escrow]`, ainsi que le bump stocké. + - [x] `pre.031` : valider le PDA Reservation List `[metadata, program_id, master_edition, reservation, resource]` avec contexte resource explicite. +- [ ] Borner strictement noms, symboles, URI, creators, options, enums et données d'autorisation ; distinguer taille minimale, taille exacte et compte extensible. + - [x] `pre.025` : borner Metadata à 1 024 octets, name à 32, symbol à 10, URI à 200 et creators à 5. + - [x] `pre.026` : borner edition/master edition à 128 octets et exiger exactement 41 octets pour `EditionV1`. + - [x] `pre.027` : exiger 32 octets pour V1, une longueur Borsh sans suffixe pour V2 et un ledger V2 borné à 1 048 576 octets. + - [x] `pre.028` : exiger exactement 80 octets pour Token Record et refuser troncature, suffixe, clé ou bump incohérents. + - [x] `pre.029` : exiger 98 octets pour les delegate records, 10 pour Use Authority et les deux tailles Borsh Collection Authority. + - [x] `pre.030` : exiger 35 octets pour TokenOwner et 67 pour Creator, sans suffixe. + - [x] `pre.031` : limiter les listes à 200 entrées, 6 949 octets pour V1 et 9 749 pour V2, avec padding nul uniquement. +- [ ] Corréler mint, token account, edition, collection et rule set uniquement lorsque toutes les identités sont prouvées. +- [ ] Conserver explicitement la provenance `metaplex_token_metadata`, distincte de `token_2022_embedded_metadata` et de `metaplex_core`. + +### Matérialisation + +- [ ] Étendre `kb_materializer_metadata` comme propriétaire unique des faits descriptifs : nom, symbole, URI, seller fee, creators, collection, uses, token standard, mutabilité, collection details, programmable config et provenance. + - [x] `pre.034` : matérialiser `MetadataV1` comme snapshot owned autoritatif, stable et commité, sans doublon avec les observations d’instructions. + - [x] `pre.035` : matérialiser Edition/Master Edition, Edition Marker et Reservation Lists historiques avec lifecycle et provenance explicites. +- [ ] Étendre `kb_materializer_admin` pour update authority, collection authority, delegates, rule set authority et changements d'autorité prouvés. + - [x] `pre.035` : projeter les Delegate Records et Authority Records avec `kb_materializer_admin` déclaré comme propriétaire unique du fait administratif. +- [ ] Étendre `kb_materializer_lifecycle` pour création, mise à jour, édition, verify/unverify, mint d'édition, burn, lock/unlock et transitions programmables prouvées. + - [x] `pre.035` : projeter Token Record et Token Owned Escrow avec `kb_materializer_lifecycle` déclaré comme propriétaire unique du fait de lifecycle. +- [ ] Étendre `kb_materializer_risk`/`compliance_audit` pour creators non vérifiés, metadata mutable, royalties, délégations sensibles, rule sets et conflits de provenance, sans dupliquer les faits metadata. +- [ ] Définir une identité canonique stable par mint/asset + source + compte metadata, avec `event_key`/`output_key` idempotents. + - [x] `pre.033–035` : utiliser `program_id:account` et un `output_key` stable par compte pour les snapshots actifs, expérimentaux et historiques. +- [ ] Conserver simultanément metadata Metaplex externe et metadata Token-2022 incorporée ; exposer source, autorité, slot, priorité de lecture et conflits sans fusion silencieuse. +- [ ] Refuser toute matérialisation engagée issue d'une transaction Solana en échec. + +### Exécuteur et préflight + +- [ ] Créer ou finaliser `kb_executor_metadata_metaplex_token_metadata` uniquement après audit des builders officiels et de leurs comptes exacts. +- [ ] Définir des intents typés pour les opérations officiellement constructibles ; retourner `Unsupported(reason)` pour les surfaces sans builder/wire suffisamment prouvé. +- [ ] Préserver l'ordre exact des metas, signers, writable, PDA, authorities, payer, token program et system/sysvar programs. +- [ ] Imposer simulation-first, dry-run par défaut, plafond de frais/dépense et confirmation opérateur dédiée pour burn, authority changes, verify/unverify, delegate/revoke, lock/unlock et opérations programmables. +- [ ] Ajouter les prélectures stateful : owner, layout/version, PDA, mint/token account, update authority, collection authority, delegate, token standard, rule set, état locked/burned et cohérence avec SPL Token/Token-2022. +- [ ] Définir des postconditions exactes et un replay de confirmation idempotent avant d'autoriser une opération comme réussie. +- [ ] Ne jamais télécharger le JSON externe référencé par URI dans le chemin critique de construction, simulation ou confirmation on-chain. + +### JSON externe et sécurité + +- [ ] Concevoir le fetch HTTP/IPFS/Arweave comme composant optionnel séparé du décodeur canonique on-chain. +- [ ] Borner timeout, taille, content type, redirections, nombre de tentatives, cache et concurrence ; conserver URL finale, hash, provenance et date d'observation. +- [ ] Bloquer SSRF, localhost, réseaux privés/link-local et schémas non autorisés ; ne jamais faire confiance aux champs du JSON distant. +- [ ] Ne jamais faire dépendre le statut `Decoded` on-chain de la disponibilité ou de la validité du contenu externe. +- [ ] Autoriser une première livraison sans fetch actif si l'isolation et les politiques réseau ne sont pas encore entièrement prouvées. + +### Corpus, replay et validation + +- [ ] Ajouter un corpus synthétique couvrant chaque instruction, compte, PDA et branche de diagnostic, avec valeurs limites et variantes historiques/currentes. +- [ ] Ajouter des signatures Mainnet réelles pour token fongible, NFT, SFT, collection sized/unsized, master edition, edition et programmable NFT. +- [ ] Couvrir outer et CPI, transactions réussies et échouées, comptes dupliqués/manquants, mauvais Program ID/owner/PDA, payload tronqué/suffixé et discriminant inconnu. +- [ ] Ajouter des cas de conflit entre metadata Metaplex externe et metadata Token-2022 incorporée, sans perte de provenance. +- [ ] Enregistrer le décodeur et les materializers dans `kb_pipeline` et `kb_app_demo`, avec démonstration de lecture des observations/projections. +- [ ] Vérifier le replay PostgreSQL idempotent, l'absence de doublons decode/materialization et le mode `incomplete_signatures` sans `forceReplay` global. +- [ ] Valider avec PostgreSQL réel, tests ciblés, tests pipeline/app demo, bindings Tauri si modifiés et `cargo clippy --all-targets` propre. + +### Documentation et clôture + +- [ ] Mettre à jour les README des crates touchées, `README.md`, `docs/SOLANA_INTERFACE_DEPENDENCIES.md`, la matrice dédiée et les contrats de provenance metadata. +- [ ] Documenter précisément les surfaces observées sur Mainnet, celles seulement synthétiques, les variantes `Unsupported` et les limites du fetch externe. +- [ ] Mettre à jour `CHANGELOG.md` et cocher ce jalon seulement après validations réelles. +- [ ] Préparer le prompt suivant `0.4.8 — Metaplex Core` sans mélanger les actifs Core avec les mints SPL/Token-2022. + +### 0.4.8 — Metaplex Core + +Metaplex Core est un standard d’actifs indépendant qui ne repose pas sur un mint SPL Token pour représenter chaque NFT. Il doit donc disposer de sa propre frontière de programme et ne pas être traité comme une simple variante de metadata SPL. + +- [ ] Créer `kb_decoder_metaplex_core` avec Program IDs, comptes Asset/Collection et plugins audités depuis les sources Metaplex officielles. +- [ ] Décoder les opérations et états des actifs Core, collections, authorities, royalties, attributes et plugins sans les fusionner avec Metaplex Token Metadata. +- [ ] Matérialiser une identité d’actif canonique avec provenance `metaplex_core`, distincte des mints SPL Token/Token-2022. +- [ ] Ajouter exécuteur, corpus, démo et replay seulement après validation exacte des comptes et autorités. + +### 0.4.9 — SPL Account Compression, Noop et Metaplex Bubblegum + +Ce jalon remonte avant les pools de stake : Bubblegum dépend directement d’Account Compression et de Noop, et complète la couverture NFT ouverte par Metaplex Token Metadata et Metaplex Core. + +- [x] Réserver `kb_executor_spl_account_compression`, `kb_executor_spl_noop` et `kb_executor_nft_metaplex_bubblegum` sans activer d’envoi. +- [ ] Implémenter `kb_decoder_spl_account_compression` et `kb_decoder_spl_noop`. +- [ ] Finaliser `kb_decoder_nft_metaplex_bubblegum` pour les instructions, arbres, feuilles et metadata des NFT compressés ; ne pas considérer Compression/Noop seuls comme un décodeur NFT complet. +- [ ] Corréler Bubblegum, Account Compression et Noop sans fusionner leurs frontières de programme ni dupliquer les événements. +- [ ] Matérialiser l’identité des actifs compressés avec arbre, leaf index, asset id, owner/delegate, collection et metadata prouvées. +- [ ] N’activer les exécuteurs qu’après validation des preuves Merkle, coûts et builders officiels. + +### 0.4.10 — SPL Stake Pool + +- [ ] Décoder maximalement `SPoo1...` dans `kb_decoder_spl_stake_pool`. +- [ ] Distinguer le pool SPL du Stake Program natif, adapter `staking`, `reward`, `fee`, `admin` et `lifecycle`, puis développer `kb_executor_spl_stake_pool` après validation du décodeur. + +### 0.4.11 — SPL Single Pool + +- [x] Réserver `kb_executor_spl_single_pool` sans activer d’envoi. +- [ ] Implémenter `kb_decoder_spl_single_pool` pour `SVSPx...`. +- [ ] Couvrir et matérialiser lifecycle, dépôts/retraits, mint LST et récompenses, puis activer `kb_executor_spl_single_pool` seulement après validation des projections. + +### 0.4.12 — SPL Token Wrap + +Token Wrap est un programme SPL actuel et audité, destiné au wrapping bidirectionnel entre SPL Token classique et Token-2022. Il ne doit pas être classé avec les programmes historiques. + +- [ ] Ajouter le Program ID canonique `TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR` à `kb_program_ids` après vérification finale des sources officielles. +- [ ] Créer `kb_decoder_spl_token_wrap` et auditer instructions, comptes d’état, PDA, mints source/wrapped et contrats de conversion. +- [ ] Matérialiser le lien canonique entre mint source et mint wrapped sans fusionner leurs balances, supplies, authorities ou metadata. +- [ ] Créer `kb_executor_spl_token_wrap` uniquement après preuve des builders, coûts, decimals, ratios et conditions de fermeture/unwrapping. +- [ ] Ajouter corpus réel, démo, préflight et replay PostgreSQL idempotent. + +### 0.4.13 — SPL Token Swap + +SPL Token Swap reste dans la série `0.4.x` : il s’agit d’un programme SPL autonome avec Program ID propre, même si son domaine fonctionnel est un AMM. Les phases AMM ultérieures couvriront les protocoles tiers et réutiliseront les abstractions établies ici. + +- [ ] Vérifier et enregistrer le Program ID officiel `SwapsVeCiPHMUAtzQWZw7RjsKjgCjhwU55QGu4U1Szw` dans `kb_program_ids`. +- [ ] Créer `kb_decoder_spl_token_swap` et auditer instructions, courbes, fees, états de pool, autorités et compatibilité Token classique/Token-2022. +- [ ] Matérialiser pools, liquidité, swaps, fees et lifecycle sans dupliquer les mouvements Token sous-jacents. +- [ ] Créer `kb_executor_spl_token_swap` seulement après preuve des courbes, slippage, comptes ordonnés, builders et simulations. +- [ ] Ajouter corpus réel, démo, préflight et replay PostgreSQL idempotent. + +### 0.4.14 — SPL Token Lending + +SPL Token Lending reste également dans `0.4.x` : c’est un programme SPL autonome avec Program ID propre. Les phases Lending ultérieures couvriront Solend, Kamino et les autres protocoles dérivés ou indépendants. + +- [ ] Vérifier et enregistrer le Program ID officiel `6TvznH3B2e3p2mbhufNBpgSrLx6UkgvxtVQvopEZ2kuH` dans `kb_program_ids`. +- [ ] Créer `kb_decoder_spl_token_lending` et auditer markets, reserves, obligations, collateral, liquidations, flash loans, oracles et autorités. +- [ ] Matérialiser lending, borrowing, collateral, interest, liquidation, fees et risk sans dupliquer les transferts Token. +- [ ] Créer `kb_executor_spl_token_lending` uniquement après validation des calculs, oracles, slippage, health factor et simulation. +- [ ] Ajouter corpus réel, démo, préflight et replay PostgreSQL idempotent. + +### 0.4.15 — SPL Name Service + +- [x] Réserver `kb_executor_metadata_spl_name_service` sans activer d’envoi. +- [ ] Implémenter `kb_decoder_metadata_spl_name_service` pour `namesLPne...`. +- [ ] Décoder puis matérialiser metadata/admin/lifecycle des noms, puis activer `kb_executor_metadata_spl_name_service` après validation des autorités et coûts. + +### 0.4.16 — SPL Governance et programmes utilitaires déployés + +- [ ] Auditer les déploiements et versions encore pertinents de SPL Governance, Feature Proposal, Record, Shared Memory et Instruction Padding depuis leurs dépôts maintenus ou forks officiels identifiés. +- [ ] Créer des jalons internes séparés par Program ID ; ne pas regrouper leurs wire formats dans un décodeur générique « SPL utilities ». +- [ ] Prioriser Governance si des stratégies ou materializations de vote/DAO en dépendent ; conserver Feature Proposal, Record, Shared Memory et Instruction Padding comme surfaces d’infrastructure à priorité moindre. +- [ ] Distinguer strictement les programmes déployés, les interfaces sans Program ID universel et les implémentations tierces. + +### 0.4.17 — SPL historique ou archivé + +- [ ] Auditer Managed Token, Stateless Asks, Token Upgrade, Binary Option et Binary Oracle Pair avant toute réservation de crate ou Program ID. +- [ ] Auditer Token Collection et les anciennes implémentations Token Metadata/Token Group uniquement comme sources historiques ou compatibilité, sans les confondre avec les interfaces actuelles. +- [ ] Ne pas attribuer un Program ID universel aux interfaces Token Group, Token Metadata ou Transfer Hook ; dispatcher vers les implémentations observées. + +### 0.4.18 — infrastructure de décodage Anchor + +Anchor est un framework et un ensemble de conventions, pas un programme Solana unique. Les programmes SPL planifiés dans `0.4.x` utilisent leurs propres interfaces et n’exigent pas cette couche. Le jalon Anchor est donc placé immédiatement avant Meteora afin de fournir l’infrastructure commune requise par Meteora, Pump, Raydium et les autres programmes Anchor, sans remplacer leurs décodeurs protocolaires ni accepter un discriminant isolé comme preuve d’identité. + +- [ ] Auditer les versions Anchor réellement rencontrées, les discriminateurs d’instruction et de compte, les événements `Program data:`, les erreurs, les IDL historiques/courantes et les différences entre générations. +- [ ] Définir un registre versionné `Program ID + provenance IDL + hash/version + cluster + plage de slots` ; refuser tout décodage lorsqu’aucun descripteur vérifié ne correspond au programme et à sa version observée. +- [ ] Créer une couche commune pour les enveloppes, comptes, événements et erreurs Anchor, tout en laissant aux crates Meteora/Pump/Raydium leurs Program IDs, leur sémantique métier, leurs invariants, leurs matérialisations et leurs exécuteurs. +- [ ] Décoder outer et CPI avec chemins exacts, comptes ordonnés, discriminateurs vérifiés, arguments Borsh bornés et politique explicite pour suffixes, troncatures et versions inconnues. +- [ ] Extraire les événements Anchor depuis les logs sans les confondre avec des logs texte arbitraires, conserver l’ordre d’émission et rattacher chaque événement à l’instruction/CPI source lorsque la pile d’invocation le permet. +- [ ] Décoder les comptes Anchor uniquement avec owner/program ID, discriminant et layout IDL vérifiés ; conserver les comptes inconnus ou versions futures comme `Unsupported`, jamais comme état partiellement inventé. +- [ ] Définir les contrats de fallback pour les programmes sans IDL publique, les IDL obsolètes, les upgrades et les collisions de discriminateurs entre Program IDs. +- [ ] Ajouter une matrice machine-readable, des corpus synthétiques/Mainnet et des tests anti-collision prouvant qu’un même discriminant sous deux Program IDs ne partage jamais silencieusement le même sens. +- [ ] Raccorder `incomplete_signatures` afin qu’une nouvelle IDL ou version de descripteur puisse reprendre uniquement les signatures Anchor non complètement décodées. +- [ ] Préparer `0.5.x — Meteora` : les décodeurs Meteora doivent consommer cette infrastructure pour le wire commun, tout en conservant leurs frontières protocolaires propres. + +### 0.4.19 — clôture Solana Core/SPL et metadata adjacente + +- [ ] Exécuter le replay complet des corpus `0.3.x` et des corpus SPL dédiés. +- [ ] Vérifier couverture, matérialisations, idempotence, versions de processor et absence de régression. +- [ ] Produire la documentation des événements core/SPL disponibles pour les stratégies. + +## Version 0.5.x — Meteora + +Les surfaces AMM et de liquidité précèdent le launchpad DBC dans l’ordre de développement. + +### 0.5.0 — corpus et surfaces Meteora + +- [ ] Constituer les corpus dédiés DLMM, DAMM v1, DAMM v2, DBC et Vault. +- [ ] Vérifier tous les Program IDs dans `kb_program_ids`. +- [ ] Auditer IDL/interfaces, comptes, événements, autorités et frais. +- [ ] Établir la matrice complète instructions/events/materializations/executors. + +### 0.5.1 — Meteora DLMM + +- [ ] Décoder maximalement instructions, événements, bins, positions et lifecycle. +- [ ] Matérialiser pools, bins, positions, liquidité, swaps, fees et changements administratifs. +- [ ] Implémenter `kb_executor_dlmm_meteora` après validation du décodeur, avec slippage, limites de liquidité, autorités et coûts bornés. + +### 0.5.2 — Meteora DAMM v1 + +- [ ] Décoder maximalement instructions, événements et états de pool. +- [ ] Matérialiser pools, liquidité, swaps, fees et lifecycle sans dupliquer les mouvements Token. +- [ ] Implémenter `kb_executor_amm_meteora_damm_v1` pour les opérations client officiellement appelables. + +### 0.5.3 — Meteora DAMM v2 + +- [ ] Décoder maximalement instructions, événements et états de pool. +- [ ] Matérialiser pools, liquidité, swaps, fees et lifecycle. +- [ ] Implémenter `kb_executor_amm_meteora_damm_v2` avec quotes, slippage, plafonds et simulation. + +### 0.5.4 — Meteora DBC + +- [ ] Décoder maximalement le launchpad DBC après stabilisation des AMM et Vault. +- [ ] Matérialiser créations, courbes, migrations, liquidité, paramètres et risques observables. +- [ ] Implémenter `kb_executor_launchpad_meteora_dbc` pour les opérations client officiellement appelables. + +### 0.5.5 — Meteora Vault + +- [ ] Auditer et décoder les surfaces Vault et complémentaires réellement confirmées. +- [ ] Matérialiser dépôts, retraits, parts, stratégies, fees et lifecycle. +- [ ] Implémenter `kb_executor_vault_meteora` uniquement pour les opérations appelables validées. + +### 0.5.6 — régression Meteora + +- [ ] Fusionner les corpus Meteora et rejouer toutes les surfaces. +- [ ] Vérifier interactions, idempotence et régressions croisées. +- [ ] Valider les cinq exécuteurs offline et sur localnet/devnet, puis enregistrer coûts, autorités et exposition dans la matrice. + +## Version 0.6.x — Pump + +Les surfaces AMM Pump Swap sont traitées avant le launchpad Pump Fun. + +### 0.6.0 — corpus et surfaces Pump + +- [ ] Constituer des corpus dédiés Pump Swap, Pump Fun et Pump Fees. +- [ ] Vérifier tous les Program IDs dans `kb_program_ids`. +- [ ] Établir la matrice complète instructions/events/materializations. + +### 0.6.1 — Pump Swap + +- [ ] Décoder toutes les instructions et événements connus. +- [ ] Matérialiser trades, liquidité, lifecycle et changements administratifs. +- [ ] Implémenter `kb_executor_amm_pump_swap` maximalement pour les opérations client appelables, avec quotes/plafonds/slippage et comparaison au contrat officiel. + +### 0.6.2 — Pump Fun + +- [ ] Décoder toutes les instructions et événements connus, y compris les entrées non directement liées au trading. +- [ ] Matérialiser créations, migrations, trades, liquidité, paramètres et risques observables. +- [ ] Implémenter `kb_executor_launchpad_pump_fun` après stabilisation du décodeur : builders officiels/IDL validés, autorités, coûts, slippage, simulation et tests devnet ; l’exposition trading reste une décision séparée. + +### 0.6.3 — Pump Fees + +- [ ] Décoder toutes les instructions et événements connus. +- [ ] Matérialiser les signaux de frais, buyback, partage, donation et changements d’autorité utiles à la gestion du risque. +- [ ] Implémenter `kb_executor_admin_pump_fees` pour les opérations administratives officiellement appelables, avec politiques d’autorité renforcées et aucune exposition UI par défaut. + +### 0.6.4 — régression Pump + +- [ ] Fusionner les corpus Pump et rejouer toutes les surfaces. +- [ ] Vérifier les interactions et régressions croisées. +- [ ] Valider les trois exécuteurs Pump offline et sur devnet/localnet, puis enregistrer leur statut exact dans la matrice décodeur/matérialiseur/exécuteur. + +## Version 0.7.x — Raydium + +Les surfaces AMM précèdent le launchpad LaunchLab. + +### 0.7.0 — corpus et surfaces Raydium + +- [ ] Constituer les corpus AMM v4, CPMM, CLMM, Stable Swap et LaunchLab. +- [ ] Vérifier tous les Program IDs et versions de programme dans `kb_program_ids`. +- [ ] Auditer instructions, événements, états, autorités, fees et courbes. +- [ ] Établir la matrice complète instructions/events/materializations/executors. + +### 0.7.1 — Raydium AMM v4 + +- [ ] Décoder maximalement instructions, événements et comptes historiques/courants. +- [ ] Matérialiser pools, liquidité, swaps, fees et lifecycle. +- [ ] Implémenter `kb_executor_amm_raydium_lp_v4` après preuve des builders et limites. + +### 0.7.2 — Raydium CPMM + +- [ ] Décoder maximalement instructions, événements et états CPMM. +- [ ] Matérialiser pools, liquidité, swaps, fees et lifecycle. +- [ ] Implémenter `kb_executor_cpmm_raydium` avec quotes, slippage et plafonds. + +### 0.7.3 — Raydium CLMM + +- [ ] Décoder maximalement instructions, événements, ticks, positions et rewards. +- [ ] Matérialiser pools, ticks, positions, liquidité, swaps, fees et rewards. +- [ ] Implémenter `kb_executor_clmm_raydium` avec bornes de ticks, slippage et coûts. + +### 0.7.4 — Raydium Stable Swap + +- [ ] Auditer les surfaces actuelles et historiques confirmées sans inventer de programme générique. +- [ ] Décoder et matérialiser uniquement les contrats dont le Program ID et le wire sont prouvés. +- [ ] N’activer un exécuteur qu’après identification d’une interface ou crate canonique. + +### 0.7.5 — Raydium LaunchLab + +- [ ] Décoder maximalement LaunchLab après stabilisation des AMM. +- [ ] Matérialiser créations, migrations, liquidité, paramètres et risques observables. +- [ ] Implémenter `kb_executor_launchpad_raydium_launchlab` pour les opérations client appelables. + +### 0.7.6 — régression Raydium + +- [ ] Fusionner les corpus Raydium et rejouer toutes les surfaces. +- [ ] Vérifier interactions, idempotence et régressions croisées. +- [ ] Valider les exécuteurs confirmés offline/localnet/devnet et enregistrer coûts, slippage et autorités. + +## Version 0.8.x — Orca + +La surface AMM Whirlpool précède le launchpad Wavebreak. + +### 0.8.0 — corpus et surfaces Orca + +- [ ] Constituer les corpus Whirlpool, Wavebreak et surfaces complémentaires confirmées. +- [ ] Vérifier tous les Program IDs et versions dans `kb_program_ids`. +- [ ] Auditer instructions, événements, comptes, authorities, fees et matrice commune. + +### 0.8.1 — Orca Whirlpool + +- [ ] Décoder maximalement instructions, événements, ticks, positions et rewards. +- [ ] Matérialiser pools, ticks, positions, liquidité, swaps, fees et rewards. +- [ ] Implémenter `kb_executor_clmm_orca_whirlpool` avec slippage, bornes de ticks, positions, liquidité et autorités. + +### 0.8.2 — Orca Wavebreak + +- [ ] Décoder maximalement le launchpad après stabilisation de Whirlpool. +- [ ] Matérialiser créations, migrations, liquidité, paramètres et risques observables. +- [ ] Implémenter `kb_executor_launchpad_orca_wavebreak` pour les opérations client officiellement appelables. + +### 0.8.3 — régression Orca + +- [ ] Fusionner les corpus Orca et rejouer toutes les surfaces. +- [ ] Vérifier interactions, idempotence et régressions croisées. +- [ ] Valider les exécuteurs offline/localnet/devnet et enregistrer leur statut dans la matrice. + +## Version 0.9.x — Jupiter, routeurs et surfaces complémentaires + +- [ ] Décoder Jupiter Aggregator v4/v6 et les routes multi-hop, puis implémenter `kb_executor_router_jupiter_aggregator_v4` et `kb_executor_router_jupiter_aggregator_v6` après validation des contrats encore appelables. +- [ ] Décoder Jupiter DCA puis implémenter `kb_executor_router_jupiter_dca` pour les opérations officiellement appelables. +- [ ] Décoder Jupiter Limit Order v1/v2 puis implémenter `kb_executor_orderbook_jupiter_limit_order` et `kb_executor_orderbook_jupiter_limit_order_v2`. +- [ ] Décoder Jupiter Perpetuals puis implémenter `kb_executor_perpetuals_jupiter` avec politiques de marge, collateral, levier, prix et liquidation renforcées. +- [ ] Traiter les surfaces Jupiter lending/admin/wallet selon les crates réservées correspondantes ; chaque décodeur validé reçoit un statut d’exécuteur explicite, pas une promesse générique Jupiter. +- [ ] Décoder Jupiter même lorsque la source temps réel n’est pas directement abonnée au program id Jupiter. +- [ ] Ajouter OKX/Onchain Labs et DFlow après validation des program ids, puis leurs exécuteurs réservés `kb_executor_router_okx_labs_v1`, `kb_executor_router_okx_labs_v2` et `kb_executor_router_dflow_aggregator_v4`. +- [ ] Ajouter Bags Fee Share v1/v2 puis `kb_executor_fees_bags_fee_share_v1` et `kb_executor_fees_bags_fee_share_v2`, avec garde-fous administratifs et aucune exposition trading implicite. +- [ ] Mesurer quelles routes Jupiter sont déjà reçues via les DEX sous-jacents. +- [ ] Valider les exécuteurs routeur/orderbook/perpetuals offline puis localnet/devnet ; l’activation live dépend de quotes exactes, slippage, limites de dépense et validation post-exécution. + +## Version 0.10.x — démonstrations Devnet Solana Core + +Le scan de `kb_decoder_solana_core` et `kb_executor_solana_core` confirme que System, Compute Budget, Address Lookup Table, Stake et Vote appartiennent tous au domaine Solana Core. Les exécuteurs sont disponibles, mais `kb_pipeline` et `DemoExecutionSolanaCore` n’orchestrent actuellement qu’un transfert System de bout en bout. + +- [x] Confirmer les capacités exactes déjà compilées : quatre opérations Compute Budget, cinq opérations Address Lookup Table, vingt-quatre helpers Stake actuels et vingt-quatre opérations Vote actuelles. +- [ ] Ajouter un accordéon par famille seulement lorsque la famille dispose d’une démonstration utile ; conserver System affiché directement tant qu’il reste la seule orchestration réseau complète. +- [ ] Ajouter en premier une transaction System enrichie de `SetComputeUnitLimit` et `SetComputeUnitPrice`, avec plan, simulation, soumission, hydratation et replay. +- [ ] Ajouter ensuite le lifecycle Address Lookup Table contrôlé : create, extend, deactivate, attente du cooldown puis close ; freeze doit utiliser une table jetable distincte car il est irréversible. +- [ ] Ajouter un lifecycle Stake contrôlé sur compte temporaire : create/initialize, delegate vers un vote account Devnet existant, deactivate, attente d’epoch puis withdraw/close. +- [ ] Ajouter Vote en dernier : création d’un vote account temporaire et opérations administratives sûres ; ne pas tenter de produire artificiellement des votes de consensus sans validator contrôlé. +- [ ] Mutualiser l’orchestration réseau générique afin d’éviter une fonction pipeline spécifique par opération et conserver simulation-first, autorisation explicite, plafonds, postconditions et second replay. + +## Version 0.11.x — sources temps réel interchangeables + +Cette série commence seulement lorsque les transactions reçues peuvent être décodées et matérialisées immédiatement. + +### 0.11.0 — contrat de stream commun dans `kb_rpc` + +- [ ] Ajouter une interface interne de flux transactionnel source-indépendante dans `kb_rpc`. +- [ ] Normaliser toutes les sources vers le même modèle canonique `kb_model`. +- [ ] Garantir que les décodeurs et stores ne dépendent d’aucun provider. + +### 0.11.1 — extension Helius WebSocket + +- [ ] Ajouter `transactionSubscribe` et `transactionUnsubscribe` dans des modules internes Helius de `kb_rpc`. +- [ ] Ajouter `accountInclude`, `accountExclude`, `accountRequired`, `vote`, `failed` et options de transaction complète. +- [ ] Tester offline avant tout abonnement payant. +- [ ] Acheter Helius Developer seulement pour la campagne mainnet réelle. + +### 0.11.2 — Yellowstone gRPC + +- [ ] Ajouter le client Yellowstone gRPC dans `kb_rpc` avec `tonic` et Protobuf. +- [ ] Supporter Triton, Chainstack, Shyft et autres endpoints compatibles par configuration. +- [ ] Ajouter filtres transaction `account_include`, `account_exclude`, `account_required`, `vote` et `failed`. +- [ ] Normaliser `SubscribeUpdateTransaction` vers la transaction canonique. + +### 0.11.3 — fallback Solana standard + +- [ ] Ajouter `logsSubscribe` par mention et `logsSubscribe("all")` comme probes/fallbacks mesurés. +- [ ] Ajouter l’hydratation `getTransaction` bornée. +- [ ] Ne jamais stocker le payload complet des notifications quand la transaction canonique est disponible. + +### 0.11.4 — comparaison fournisseur et coût + +- [ ] Comparer Helius `transactionSubscribe`, Yellowstone gRPC et logs + hydration. +- [ ] Mesurer couverture, latence, octets, crédits/coût, doublons, pertes et reconnexions. +- [ ] Utiliser `kb_sol_obs_transaction_observations` pour les comparaisons de timing par signature. +- [ ] Commencer avec Meteora, Pump et Raydium ; ajouter Orca ensuite ; garder Jupiter hors filtre initial. +- [ ] Choisir la source principale, le fallback et le fournisseur selon les mesures. + +### 0.11.5 — ingestion live durable + +- [ ] Ajouter sessions persistantes, backpressure, reconnexion et réparation des trous. +- [ ] Désactiver le trading pendant toute perte de source ou phase de rattrapage. +- [ ] Marquer les origines `live`, `replayed`, `backfilled` et `repaired`. +- [ ] Interdire par défaut toute décision de trading depuis un événement non `live`. + +## Version 0.12.x — wallet, sécurité et démos devnet + +- [ ] Promouvoir `kb_wallet` du backend temporaire `0.4.2` vers des backends de production chiffrés, coffre système ou hardware wallet. +- [ ] Lire l’adresse wallet locale et les soldes SOL/SPL. +- [ ] Généraliser les parcours wallet et soldes SOL/SPL au-delà du laboratoire d’exécution native validé en `0.4.2`. +- [ ] Finaliser `kb_execution_safety` minimal. +- [ ] Ajouter simulation obligatoire, limites de dépense, slippage, dry-run et validation post-transaction. +- [ ] Ajouter les pages Tauri wallet, balances et transferts. + +## Version 0.13.x — listeners et trading assisté + +- [ ] Relier les transactions décodées live aux listeners métier. +- [ ] Notifier créations de tokens/pools, migrations, liquidité, swaps, frais et opérations administratives dangereuses. +- [ ] Ajouter des conditions manuelles d’achat/revente sans automatisation complète. +- [ ] Ajouter heartbeat opérateur et état global `TRADING_DISABLED` / `LIVE_READY`. +- [ ] Interdire tout envoi mainnet tant que les garde-fous ne sont pas validés. +- [ ] N’autoriser les listeners ou stratégies à demander que des capacités d’exécuteur explicitement activées ; une crate réservée ou un builder hors UI ne constitue pas une autorisation de trading. + +## Développement parallèle par surface + +Pour chaque surface prioritaire : + +- [ ] Décodeur maximal, y compris instructions obsolètes ou non directement liées au trading. +- [ ] Corpus de signatures dédié. +- [ ] Événements décodés stables. +- [ ] Matérialisation complète de tout ce qui est exploitable. +- [ ] Tests synthétiques. +- [ ] Replay et SQL anti-régression. +- [ ] Statut d’exécuteur obligatoire dans le même jalon : `réservé`, `en implémentation`, `complet`, ou `non applicable` avec justification officielle. +- [ ] Pour toute surface appelable, implémenter l’exécuteur après stabilisation du décodeur et des garde-fous ; couvrir maximalement les opérations client même si elles restent hors `kb_app_demo`. +- [ ] Synchroniser le README de l’exécuteur avec ses types, constantes, opérations, paramètres, effets, erreurs, exemple d’usage et limites d’exposition. + +## Objectif long terme — bibliothèque d’analyse Solana + +- [ ] Étendre les registres à toutes les surfaces observées. +- [ ] Ajouter classification automatique des programmes inconnus. +- [ ] Ajouter matérialisations NFT, metadata, oracle, lending, staking, governance, bridge, perpetuals, vault, routing, risk et compliance audit. +- [ ] Ajouter agrégations comparables à un explorateur : tokens, pools, pairs, volumes, états, risques, anomalies et historiques. +- [ ] Ajouter replay partiel par module, version, slot, signature, program id, surface et discriminator. + +## Transports futurs + +- [ ] Étudier shred delivery/RabbitStream uniquement après stabilisation des flux transactionnels complets. +- [ ] Ne pas confondre les transactions pré-exécution sans metadata avec la source canonique de décodage. diff --git a/olddocs/archivekbot2/RULES.md b/olddocs/archivekbot2/RULES.md new file mode 100644 index 0000000..e0aeec2 --- /dev/null +++ b/olddocs/archivekbot2/RULES.md @@ -0,0 +1,231 @@ + + + +# Règles spécifiques à `khadhroony-bot2` + +Ce fichier contient uniquement les règles propres au projet et au workspace `khadhroony-bot2`. + +Les règles Rust générales et réutilisables dans tous les projets sont définies dans [`RUST_RULES.md`](RUST_RULES.md). Les deux fichiers sont normatifs et cumulatifs. En cas de conflit, la règle la plus stricte s'applique ; une règle spécifique au workspace ne peut jamais assouplir une règle générale sans exception explicitement documentée. + +Toute livraison doit exécuter l'audit `python3 scripts/audit_rust_workspace_rules.py`. Tant que l'audit global n'est pas propre, les écarts existants doivent être résorbés par lots de correctifs avant toute nouvelle prérelease. + +## Règles de nommage + +- Tous les noms de fichiers et de répertoires doivent être écrits en anglais. +- Les noms de fichiers et de répertoires ne doivent contenir aucun accent, espace ou caractère spécial inutile. +- Les noms internes doivent utiliser le format `snake_case` lorsque c'est applicable. +- Les crates Rust utilisent le préfixe `kb_`. +- Les crates de décodeur utilisent le format `kb_decoder__`. +- Les crates de matérialisation utilisent le format `kb_materializer_`. +- Le crate de journalisation s'appelle `kb_logging`. + +## Règles Tauri et TypeScript + +- Toute structure ou énumération Rust exposée au frontend TypeScript doit importer le trait `TS` avec `use ts_rs::TS;` puis dériver `TS`. +- Les types Rust exportés vers TypeScript doivent utiliser des noms stables et explicites. +- Les bindings générés doivent être produits dans un dossier dédié, généralement `../frontend/ts/bindings` ou `#[ts(export, export_to = "../frontend/ts/bindings/MyStruct.ts")]`. +- Les types purement internes au backend ne doivent pas être exportés vers TypeScript par défaut. +- Un payload de commande ou d’événement Tauri traverse une frontière JSON et ne doit jamais exiger un `bigint` JavaScript. Pour un entier Rust borné et représentable par l’UI, utiliser un override TS-rs `number`; si l’exactitude au-delà de `Number.MAX_SAFE_INTEGER` est nécessaire, sérialiser explicitement une chaîne décimale côté Rust et exporter `string`. Ne jamais construire un `BigInt` dans un objet passé à `invoke` ou `emit`. +- Corriger le type Rust/TS-rs source puis régénérer les bindings ; ne pas considérer une modification manuelle isolée d’un fichier généré comme un correctif durable. + +## Règles d'architecture + +- Les décodeurs ne dépendent pas de PostgreSQL, SQLite, RPC, Tauri, wallet, stratégie ou matérialisateurs. +- Les matérialisateurs ne dépendent pas du RPC, du wallet, de Tauri ou des décodeurs spécifiques. +- Pour chaque programme Solana, quelle que soit sa famille, un décodeur doit couvrir maximalement tout wire officiellement identifiable de sa surface, qu'il soit historique, courant, récent, expérimental ou publié avant son déploiement généralisé. Ces statuts doivent rester explicites et ne constituent pas un motif pour supprimer le décodage. +- Une observation lisible issue d'une transaction échouée peut conserver une intention non commitée ; elle ne doit jamais être présentée comme une mutation réussie. +- Pour chaque programme Solana, les matérialisateurs doivent projeter maximalement tous les faits métier stables et prouvés par le décodage, y compris les états historiques, obsolètes, dépréciés ou seulement rencontrables pendant un backfill. Le statut historique interdit l'exécution, mais ne constitue jamais à lui seul un motif de non-matérialisation. +- Toute projection historique doit conserver explicitement son lifecycle, sa version de layout, sa provenance, son slot ou ordre d'observation lorsqu'ils sont connus, et ne doit jamais écraser silencieusement un état actif plus récent. +- Une même réalité métier doit avoir une seule projection canonique. Les snapshots de comptes sont la source autoritative de l'état final lorsqu'ils sont disponibles ; les instructions et événements corrélés restent des observations de mutation et ne doivent pas produire un doublon concurrent du même état. +- Les matérialisateurs doivent refuser les transactions non commitées pour les mutations d'état, tout en pouvant conserver séparément une intention non commitée lorsque le modèle métier le prévoit explicitement. +- Toute absence volontaire de projection doit être documentée avec une justification technique précise. Un matérialisateur ne doit inventer ni état final, ni montant, ni autorité, ni frais, ni agrégation que l'observation ne prouve pas. +- Pour chaque programme Solana, les exécuteurs doivent couvrir maximalement les opérations officiellement appelables et les opérations expérimentales publiées lorsque leurs contrats exacts et garde-fous sont prouvés. Les opérations historiques, dépréciées ou obsolètes doivent rester décodables et matérialisables, mais ne doivent jamais être exposées à l'exécution ; cette exclusion doit être explicite dans la matrice et le README. +- Les stores exposent leurs comportements via les traits de `kb_store_core`. +- `kb_store_pg` est le store de production. +- `kb_store_sqlite` sert aux tests, imports et corpus locaux. +- `kb_wallet` reste isolé du reste du système. +- Les transactions raw sont immuables et restent la source d'audit. +- Les replays doivent être ciblés par module, version, programme, surface, discriminator, slot ou signatures. +- La documentation du projet ne doit pas référencer le nom de l'ancien workspace. + +## Règles de documentation projet + +- `README.md` décrit le projet, son rôle, ses objectifs et son organisation. +- `ROADMAP.md` contient les futures étapes, versions et changements prévus. +- `ROADMAP.md` conserve une structure documentaire normale par phases, cases cochées et journal de préversions ; les étiquettes conversationnelles de priorité ne doivent pas y être ajoutées. +- Les réponses de livraison doivent reprendre la liste exhaustive des tâches avec les rubriques conversationnelles **Validé**, **En cours**, **Next** et **Planifié**, sans réduire le suivi à un résumé ambigu. +- `CHANGELOG.md` n'est modifié qu'après validation d'une version, avec un paragraphe ajouté à la fin décrivant ce qui a été fait ou ajouté. +- Chaque crate Rust doit avoir un `README.md` ou `001.README.md` expliquant son rôle dans l'écosystème. +- Le README d'une crate opérationnelle doit inventorier ses types, traits, constantes et fonctions publics utiles, expliquer leurs paramètres, résultats, effets et frontières, puis fournir au moins un exemple d'utilisation lorsque l'API est destinée à être appelée directement. +- Une API publique ajoutée ou modifiée n'est pas considérée comme documentée tant que le README de sa crate n'a pas été synchronisé ; les bindings générés seuls ne remplacent pas cette documentation. + +## Nomenclature métier + +- `protocol_code` désigne la famille : `pump`, `raydium`, `meteora`, `orca`, `jupiter`, etc. +- `surface_code` désigne la surface concrète : `pump_swap`, `raydium_amm_v4`, `meteora_dlmm`, etc. +- `event_code` suit le format `.`. +- Les familles d'événements principales sont : `trade`, `liquidity`, `lifecycle`, `fee`, `admin`, `reward`, `orderbook`, `token_account`, `pool_state`, `routing`, `risk`, `audit`, `unknown`. + +## Base de données + +- Les schémas PostgreSQL cibles sont : `raw`, `core`, `obs`, `decode`, `mat`, `catalog`, `agg`, `ops`, `wallet`. +- Les colonnes JSONB doivent se terminer par `_jsonb`. +- Les montants bruts on-chain doivent se terminer par `_raw`. +- La transaction canonique raw reste la source rejouable et ne doit pas être supprimée après traitement sans politique de rétention explicite. + +## Nommage canonique des surfaces + +Les nouvelles surfaces de programmes doivent utiliser un nom canonique basé sur la fonction réelle du programme : + +```text +__[_vN] +``` + +Les crates de décodage doivent utiliser : + +```text +kb_decoder___[_vN] +``` + +Exemples : + +- `kb_decoder_amm_raydium_cpmm` ; +- `kb_decoder_clmm_raydium` ; +- `kb_decoder_dlmm_meteora` ; +- `kb_decoder_router_jupiter_aggregator_v6` ; +- `kb_decoder_orderbook_openbook_v2` ; +- `kb_decoder_metadata_metaplex_token_metadata` ; +- `kb_decoder_nft_metaplex_bubblegum`. + +Les noms historiques ou issus d'IDL doivent être conservés dans le registre, mais ne doivent pas créer de nouvelles crates si une crate canonique existe déjà. + +Aucun renommage massif de crates n'est autorisé sans étape de contrôle dédiée et sans `cargo build` validé. + +## Règles de nommage des surfaces Solana + +- Le nom canonique d'une surface doit commencer par une fonction réelle : `amm`, `clmm`, `dlmm`, `router`, `orderbook`, `launchpad`, `lending`, `vault`, `staking`, `bridge`, `perpetuals`, `oracle`, `nft`, `metadata`, `admin`, etc. +- Le préfixe `program_` est interdit pour les nouveaux noms canoniques. +- Les surfaces non classifiées doivent utiliser `unknown_*` et ne doivent pas avoir de crate cible tant que leur fonction n'est pas validée. +- Les programmes Solana/SPL primitifs doivent rester séparés des surfaces DEX/router dans la documentation de contrôle. +- `damm` ne doit pas être utilisé comme préfixe fonctionnel ; utiliser `amm_meteora_damm_v1` ou `amm_meteora_damm_v2`. + +## Registre des identifiants core + +- Les identifiants Solana/SPL primitifs doivent être tenus à jour dans `registry/core_program_id_seed.toml`. +- Les sysvars et comptes natifs connus ne doivent pas être classés comme surfaces DEX/router. +- `spl_token`, `spl_token_2022` et `associated_token_account` restent dans leurs crates spécialisées. +- `stake_pool` doit être réservé à un futur crate spécialisé plutôt que mélangé avec le programme `stake`. + +## Index court de programme + +- Les noms de crates ne doivent pas commencer par un index hexadécimal. +- Un champ `registry_code` optionnel peut être ajouté au registre pour l'UI, PostgreSQL ou les matrices. +- Le nom canonique reste la source principale : fonction + famille + identifiant + version. + +## Comptes non exécutables + +- Une adresse de compte, de pool, de PDA ou de vault ne doit pas générer une crate de décodeur. +- Le vrai `program_id` propriétaire doit être prouvé avant création d'une surface canonique. + +## Constantes Rust + +- Les fichiers `program_ids.rs` sont interdits dans les nouveaux crates. Utiliser `constants.rs`. +- Les `program_id` publics doivent être réexportés depuis `lib.rs`. +- Dans une crate, les modules internes doivent appeler les constantes réexportées via `crate::CONSTANT_NAME`. +- Les discriminants, sélecteurs, longueurs Borsh et constantes internes futures doivent être placés dans `constants.rs` et rester `pub(crate)` sauf besoin d'API publique explicite. + +## Règles de tracing + +- Une crate est opérationnelle lorsqu’elle effectue des I/O, orchestre un pipeline, décode, matérialise, exécute, applique une politique runtime ou prend une décision mutable observable. +- Toute crate opérationnelle ajoutée ou modifiée doit dépendre de `tracing` depuis le workspace et déclarer exactement un `pub(crate) const TRACING_TARGET` dans `src/constants.rs`. +- La valeur canonique de `TRACING_TARGET` est le nom exact du package Cargo. Les targets historiques `khbot.*`, les suffixes de module et les targets de fenêtre sont interdits dans les nouvelles modifications. +- Les macros `tracing` doivent utiliser `target: crate::TRACING_TARGET` et des champs structurés stables. La granularité interne passe par `action`, `stage`, `window`, `campaign_id`, `signature`, `instruction_path`, `program_id`, `processor_name`, `processor_version`, `status` et `error_code`. +- Les crates passives de types, contrats, DTO, API sans exécution, registres ou constantes restent sans dépendance `tracing`. `kb_config` reste une exception de bootstrap tant que sa validation précède l’installation du subscriber. +- Il est interdit d’ajouter `tracing` sans événement réel ou de conserver un faux target uniquement consommé par `let _target`. +- Une décision interne doit être journalisée par la crate responsable ; `kb_app_demo` ne journalise que les frontières Tauri/UI, les actions utilisateur et les résumés d’orchestration. +- Tout input sélectionné sans décodeur compatible, tout résultat de décodage `failed` ou `unsupported`, tout résultat de matérialisation `failed`, toute validation de résultat invalide et toute erreur de persistance doivent émettre un événement `error` avant le retour ou la persistance terminale. +- Une transaction Solana échouée mais correctement décodée n’est pas une erreur du logiciel. Une décision `ignored`, un refus de matérialisation conforme à la politique ou une annulation coopérative ne doivent pas être promus artificiellement au niveau `error`. +- Les erreurs de décodage et de matérialisation doivent conserver au minimum, lorsque disponibles : `campaign_id`, `signature`, `slot`, `instruction_path`, `program_id`, processor ou materializer avec version, `input_key`, `input_hash` ou hash du payload, statut, code et diagnostic borné. +- Les payloads complets, DSN non masqués, secrets, clés privées et données non bornées sont interdits dans les logs. +- Chaque profil doit router les événements vers les sorties globales `debug.log`, `info.log`, `error.jsonl` et `app.log`, puis vers `debug.log`, `info.log` et `error.jsonl` dans un répertoire propre à chaque crate utilisant `tracing`. +- L’ajout ou la suppression de `tracing.workspace = true` dans une crate impose la mise à jour simultanée de la matrice de routes, de ses tests et de `docs/TRACING_CONTRACT.md`. +- Le contrat détaillé est défini dans `docs/TRACING_CONTRACT.md`. +- L’audit mécanique spécifique au projet est exécuté par `python3 scripts/audit_khadhroony_workspace_rules.py`. Il couvre notamment `TRACING_TARGET` et l’usage obligatoire de `solana_pubkey::Pubkey` à la place de `solana_address::Address`. + +## Règles de réutilisation des interfaces Solana et SPL + +- Les dépendances déclarées dans `[workspace.dependencies]` forment un catalogue de versions et de features autorisées ; elles ne doivent être ajoutées à une crate consommatrice que lorsqu’un type, un encodeur, un décodeur ou un identifiant officiel est réellement utilisé. + +- Dans un `Cargo.toml`, placer dans `[dependencies]` toute crate référencée par le code de bibliothèque compilé en production. Réserver `[dev-dependencies]` aux références contenues exclusivement dans `#[cfg(test)]`, les tests d’intégration, benches ou exemples. Une dépendance de test vers un décodeur ou matérialiseur concret est légitime lorsqu’elle sert uniquement à éprouver une orchestration générique fondée sur les traits API ; elle ne prouve pas qu’une capacité de production manque. Toute promotion de `dev-dependencies` vers `dependencies` doit être motivée par un appel runtime réel, et toute dépendance runtime inutilisée doit être supprimée. +- Les registres de composition runtime des applications doivent énumérer explicitement chaque décodeur et matérialiseur concret activé. Toute nouvelle surface instructionnelle dotée d’un `EventMaterializer` doit être ajoutée au registre applicatif et couverte par un test d’inventaire ordonné ; une crate présente dans le workspace ou dans `kb_pipeline` n’est pas activée automatiquement. Les matérialiseurs exclusivement stateful qui n’implémentent pas `EventMaterializer` restent routés par leurs APIs de snapshots dédiées. +- Les corrélations instruction/état doivent produire une issue explicite (`confirmed`, `contradicted` ou `not_applicable`) et ne doivent jamais transformer automatiquement une configuration observée en violation, score ou conclusion métier. +- Une interface officielle Solana ou SPL étroite doit être préférée à `solana-sdk` lorsque son contrat suffit. +- L’ordre de préférence des formats est : schéma officiel `wincode`, schéma officiel Borsh, puis parseur local borné reproduisant exactement le runtime lorsque l’interface officielle n’expose que `bincode`. +- Aucun nouveau code ne doit dépendre directement de `bincode`. Une interface officielle uniquement disponible derrière une feature `bincode` ne justifie pas l’activation de cette feature ; le layout doit alors être prouvé depuis les sources officielles et implémenté localement avec des bornes et des tests. +- Les exécuteurs doivent utiliser les builders officiels disponibles, préserver l’ordre exact des metas, borner toute liste de comptes variable avant l’appel au builder et refuser les doublons lorsque leur répétition n’a pas de sémantique publiée. +- Les features des interfaces doivent rester minimales et explicites. Une feature `serde`, `wincode`, `borsh`, `std`, `alloc` ou équivalente n’est activée que si la crate consommatrice l’utilise réellement. +- Les crates applicatives ne doivent pas dépendre d’interfaces RPC ou transactionnelles uniquement pour relayer des types ; ces dépendances appartiennent à `kb_rpc`, aux modèles communs justifiés ou à la crate opérationnelle propriétaire. +- Toute exception et toute implémentation locale doivent être documentées dans `docs/SOLANA_INTERFACE_DEPENDENCIES.md` avec la raison, la source officielle et la stratégie de test. + +## Règles des exécuteurs + +- Les crates d'exécution utilisent le préfixe `kb_executor_`. +- Une surface classifiée peut avoir un décodeur `kb_decoder_` et un exécuteur `kb_executor_`. +- Les exécuteurs ne doivent pas dépendre des décodeurs. +- Les exécuteurs doivent passer par `kb_execution_api` pour leur contrat public. +- Les garde-fous communs doivent être placés dans `kb_execution_safety`. +- Aucun exécuteur ne doit envoyer de transaction sans simulation et validation explicite. +- Les surfaces non classifiées ne doivent pas avoir de crate exécuteur. +- Pour chaque programme Solana et contrairement aux décodeurs, les exécuteurs ne construisent pas les opérations obsolètes ou purement historiques. Ils couvrent uniquement les opérations courantes et expérimentales officiellement constructibles, avec un statut exact `Supported` ou `Unsupported(reason)`. +- Le statut expérimental, récent ou non encore déployé partout n'interdit pas un builder universel lorsqu'un wire officiel exact existe. Le déploiement, la simulation et l'autorisation d'envoi restent trois décisions séparées ; la bibliothèque ne doit pas imposer artificiellement un cluster. + + +- Les champs JSON exposés à TypeScript ne doivent pas utiliser directement `serde_json::Value` avec `TS-rs`; utiliser une chaîne JSON sérialisée (`std::string::String`) ou un type Rust typé exportable. +- Les APIs qui gardent des payloads dynamiques doivent fournir des helpers explicites basés sur `serde_json::to_string` et `serde_json::to_string_pretty`. + +## Règles de configuration + +- La configuration applicative commune doit passer par `kb_config`. +- Les fichiers JSON de configuration ne doivent pas contenir de commentaires. +- Les secrets ne doivent pas être écrits en clair dans le dépôt. +- Les valeurs sensibles doivent utiliser des variables d'environnement ou un stockage chiffré dédié. +- Les structures de configuration exposées à Tauri doivent dériver `TS`. + +## Ordre de développement cible + +- `kb_logging` doit être stabilisé avant les logs avancés des autres crates. +- `kb_config` doit être stabilisé avant les stores, RPC, wallet, applications et workers. +- Les contrats SQL et de matérialisation doivent être définis avant les gros décodeurs DEX. +- Les implémentations détaillées des matérialisateurs doivent suivre les sorties réelles des décodeurs correspondants. +- `kb_app_demo` doit fournir des validations live après chaque capacité majeure, sans créer une application Tauri séparée par crate. + +## Règles de livraison ChatGPT + +- Après le squelette initial, ChatGPT doit fournir uniquement des zips delta sauf demande explicite de zip complet. +- Un delta qui modifie la racine du workspace ou plusieurs modules doit être nommé `khadhroony-bot2_vX.Y.Z-pre.abc-delta.zip`. +- Un delta qui ne modifie qu'un seul module Rust doit être nommé `kb_modulename_vX.Y.Z-pre.abc-delta.zip`. +- Lorsqu'un delta `pre.abc` a déjà été livré et qu'un correctif est nécessaire, le numéro `abc` ne doit pas être incrémenté. Le correctif doit être nommé `khadhroony-bot2_vX.Y.Z-pre.abc-delta-fix-001.zip`, puis `-fix-002.zip`, etc. Pour un seul module, utiliser la même règle avec le préfixe `kb_modulename`. +- Un correctif doit indiquer dans `delta.md` le delta de base et les correctifs antérieurs à appliquer. Il ne doit pas réutiliser silencieusement le nom ou l'empreinte d'une archive déjà livrée. +- Le numéro `pre.abc` suivant est réservé à une nouvelle tranche fonctionnelle, pas à la réparation d'une archive existante. +- Chaque zip delta ou correctif doit contenir un fichier `delta.md` non versionné à la racine du zip. +- `delta.md` doit lister les fichiers ajoutés, les fichiers modifiés, les fichiers à supprimer manuellement, les validations exécutées et les validations non exécutées. +- Le zip delta ne doit pas contenir de fichiers inchangés. +- Le zip delta ne doit pas modifier `CHANGELOG.md` sauf validation explicite d'une version. +- Les suppressions de fichiers ou dossiers doivent être indiquées dans `delta.md`, car l'extraction d'un zip ne supprime pas automatiquement les anciens fichiers. +- Les prompts de session doivent rappeler ce format de livraison et la règle `delta-fix-NNN`. + +## Constantes des décodeurs + +- Chaque crate `kb_decoder_*` classifié avec un `program_id` doit avoir un fichier `src/constants.rs`. +- `src/constants.rs` contient les `PROGRAM_ID`, puis les discriminators, sélecteurs, opcodes, constantes Borsh et constantes de décodage quand elles seront connues. +- `src/lib.rs` doit réexporter les constantes nécessaires avec `pub use crate::constants::...`. +- `src/decoder.rs` doit utiliser les constantes réexportées par la crate, par exemple `crate::AMM_PUMP_SWAP_PROGRAM_ID`, et non `crate::constants::AMM_PUMP_SWAP_PROGRAM_ID`. +- Les literals de `program_id` ne doivent pas rester dans `program_ids()`, sauf dans un fichier `constants.rs`. + +## Identifiants de programmes + +Les `program_id` connus doivent être définis une seule fois dans `kb_program_ids`. Les crates de décodeur, d’exécuteur, de store, d’application ou d’outil doivent référencer directement `kb_program_ids::XXX_PROGRAM_ID`. Les fichiers `constants.rs` locaux ne doivent pas redéfinir ces chaînes ; ils restent réservés aux constantes internes du module, par exemple discriminators, opcodes, seeds, index de comptes ou layouts. + +## Validation frontend Tauri + +- Pour `kb_app_demo`, ne pas lancer `npm --prefix kb_app_demo run build` séparément : la validation frontend de développement est réalisée par `cargo tauri dev -c kb_app_demo/tauri.conf.json`, qui démarre et pilote le serveur Vite. diff --git a/olddocs/archivekbot2/RUST_RULES.md b/olddocs/archivekbot2/RUST_RULES.md new file mode 100644 index 0000000..c1262df --- /dev/null +++ b/olddocs/archivekbot2/RUST_RULES.md @@ -0,0 +1,134 @@ + + + +# Règles Rust générales + +Ce fichier contient les règles normatives applicables à tous les projets Rust. Elles sont indépendantes de `khadhroony-bot2` et doivent pouvoir être réutilisées telles quelles dans un autre workspace. + +## En-têtes et versions de fichiers + +- Tout fichier texte qui supporte des commentaires commence par une ligne indiquant son chemin relatif dans le projet, puis une ligne `version` entière. +- La version d'un fichier est incrémentée à chaque modification après validation de sa version précédente. +- Les fichiers Rust utilisent `// file: ...` et `// version: N`. +- Les fichiers Markdown utilisent `` et ``. +- Tous les fichiers texte se terminent par exactement une fin de ligne. + +## Langue et documentation + +- Les commentaires et rustdocs du code sont rédigés en anglais. +- Les documents Markdown du projet sont rédigés dans la langue documentaire choisie par le projet. +- Tout élément `pub` ou `pub(crate)` possède une rustdoc utile au point de déclaration. +- Toute réexportation `pub use` ou `pub(crate) use` dans `lib.rs` ou `main.rs` possède également sa propre rustdoc copiée ou reformulée de manière équivalente. La documentation du point d'entrée doit permettre de comprendre l'API sans ouvrir le module interne. + +## Édition et lints obligatoires + +- L'édition Rust cible est Rust 2024, sauf contrainte explicitement documentée. +- Chaque `lib.rs` et `main.rs` contient : + - `#![warn(missing_docs)]` ; + - `#![deny(unreachable_pub)]` ; + - `#![forbid(unsafe_code)]`. +- Les lints Clippy obligatoires sont déclarés au niveau workspace et hérités par toutes les crates. +- Les règles minimales sont : interdiction de `unwrap`, `expect`, `?`, retours implicites, code `unsafe`, APIs publiques inaccessibles et imports globaux non justifiés. +- Les tests peuvent disposer d'exceptions limitées pour `unwrap` et `expect` uniquement lorsqu'elles sont explicitement autorisées par la configuration Clippy. + +La configuration workspace doit au minimum déclarer : + +```toml +[workspace.lints.rust] +missing_docs = "warn" +unreachable_pub = "deny" +unsafe_code = "forbid" + +[workspace.lints.clippy] +unwrap_used = "deny" +expect_used = "deny" +implicit_return = "deny" +needless_return = "allow" +useless_vec = "deny" +question_mark = "deny" +question_mark_used = "deny" +needless_match = "allow" +manual_ok_err = "allow" +manual_unwrap_or = "allow" +manual_map = "allow" +match_like_matches_macro = "allow" +single_match = "allow" +manual_unwrap_or_default = "allow" +manual_find = "allow" +explicit_counter_loop = "allow" +get_first = "allow" +implicit_saturating_sub = "allow" +``` + +## Formatage + +- `cargo fmt --all` est exécuté après application de chaque delta ou correctif et avant les tests. +- Les fichiers Rust ne contiennent pas de lignes vides à l'intérieur d'une fonction, d'une structure, d'une énumération ou d'une implémentation courte. +- Les lignes vides séparent uniquement les fonctions, blocs `impl`, types et sections logiques. +- Les exports de `lib.rs` ou `main.rs` ne contiennent aucune ligne vide à l'intérieur d'une série homogène de `pub use` ou `pub(crate) use`. +- Les séries `pub use` et `pub(crate) use` forment deux groupes séparés lorsqu'elles coexistent. + +## Imports et chemins + +- `use` est interdit pour les constantes, fonctions, structures, énumérations, unions, alias de types, modules et macros. +- `use` est autorisé uniquement pour un trait lorsque la résolution de méthode, une macro de dérivation ou une contrainte de langage l'exige réellement. +- Un import de trait doit rester étroit et ne doit jamais importer simultanément des éléments non-traits par accolades. +- Les imports globaux, glob imports et imports groupés par accolades sont interdits. +- Pour un élément fourni par une crate externe au workspace, utiliser directement le chemin public le plus court exposé par cette crate. Exemple : utiliser `external_crate::Struct`, jamais `external_crate::module::Struct` si `external_crate::Struct` existe, et jamais `use external_crate::Struct`. +- Pour un élément `pub` déclaré dans le workspace : + - il est réexporté depuis le `lib.rs` ou `main.rs` de sa crate propriétaire ; + - depuis une autre crate, il est appelé via `owner_crate::Item` ; + - depuis sa propre crate, il est appelé via `crate::Item`, même depuis son module de déclaration. +- Pour un élément `pub(crate)` : + - il est réexporté depuis le `lib.rs` ou `main.rs` via `pub(crate) use` ; + - il est appelé via `crate::Item`, même depuis son module de déclaration. +- Un élément strictement privé à un module n'est pas réexporté et est appelé par son nom local uniquement. Il est interdit d'utiliser un chemin long comme `crate::module::helper` ou `owner_crate::module::helper` pour un helper privé du module courant. +- Dans un sous-module de tests, un élément privé du module parent est appelé via `super::Item`. Un élément `pub` ou `pub(crate)` continue d’être appelé via le point d’entrée de crate le plus court, par exemple `crate::Item`. +- Les exports ne sont jamais groupés avec des accolades. Un type, une fonction, une constante ou un alias correspond à une ligne de réexport distincte. + +## Visibilité et API de crate + +- Aucun `pub mod` n'est autorisé. Les modules restent privés et l'API est constituée par des réexports explicites. +- Un élément `pub` inaccessible depuis le point d'entrée de sa crate est une erreur de conception, pas un simple avertissement. +- Un élément `pub(crate)` utilisé hors de son module est réexporté au niveau du point d'entrée de la crate. +- Les chemins internes de modules ne font pas partie de l'API stable. +- Les méthodes inhérentes publiques restent appelées via le type réexporté ; les fonctions libres publiques sont appelées via le point d'entrée de crate. + +## Helpers et réutilisation + +- Un helper répété dans plusieurs modules d'une même crate est déplacé dans un module commun explicite, généralement `helper.rs` ou un module spécialisé plus précis. +- Le nom `helpers.rs` ou `helper.rs` n'est utilisé que si aucune responsabilité métier plus précise ne convient. +- Un helper général réutilisable par plusieurs crates est déplacé dans une crate commune appropriée et exposé publiquement. +- Les types d'erreur généraux, identifiants de programme, primitives de validation et fonctions de sérialisation communes ne doivent pas être dupliqués entre crates. +- La mutualisation ne doit pas créer de dépendance cyclique ni déplacer un comportement métier spécifique dans une crate générique. + +## Gestion des erreurs et contrôle de flux + +- `unwrap`, `expect` et `panic` sont interdits dans le code de production. +- L'opérateur `?` est interdit dans les chemins de production ; utiliser des `match` explicites avec erreurs contextualisées. +- `anyhow` et `thiserror` ne sont pas utilisés par défaut. +- Les erreurs publiques sont typées lorsque leur contrat est stable ; les diagnostics dynamiques restent bornés. +- Les retours sont explicites conformément au lint `clippy::implicit_return`. + +## Sécurité et dépendances + +- Le code `unsafe` est interdit. +- Une dépendance n'est ajoutée que si elle est réellement utilisée dans le chemin de compilation concerné. +- Une dépendance utilisée uniquement dans les tests reste dans `[dev-dependencies]`. +- Les features sont minimales et explicites. + +## Contrôle avant livraison + +Chaque livraison Rust exécute au minimum, dans cet ordre : + +```bash +cargo fmt --all +python3 scripts/audit_rust_general_rules.py +python3 scripts/audit_khadhroony_workspace_rules.py +cargo test --workspace +cargo clippy --workspace --all-targets +``` + +Un projet peut utiliser une sélection de tests plus étroite pendant le développement, mais la fermeture d'une version exige le contrôle global. + +Le wrapper `python3 scripts/audit_rust_workspace_rules.py` exécute les deux audits sans fusionner leurs responsabilités. diff --git a/olddocs/archivekbot2/config/README.md b/olddocs/archivekbot2/config/README.md new file mode 100644 index 0000000..6e80344 --- /dev/null +++ b/olddocs/archivekbot2/config/README.md @@ -0,0 +1,62 @@ + + + +# Configuration locale + +Ce dossier contient les exemples et le schéma de configuration JSON. + +## Règles + +- Le fichier versionné doit rester sans secret. +- Les placeholders de clés restent directement dans les URLs. +- Le champ `active_profile` sélectionne un seul profil actif. +- Un profil actif doit être présent et unique. +- Les profils non actifs peuvent rester dans le fichier pour les tests devnet, mainnet lecture seule, backfill ou future production. +- Le contrat courant couvre HTTP JSON-RPC Solana et WebSocket JSON-RPC générique. +- Helius `transactionSubscribe` et Yellowstone gRPC seront ajoutés plus tard dans `kb_rpc`, avec évolution explicite du schéma quand les transports seront réellement utilisés. +- Les IDLs restent des artefacts de développement et ne font pas partie de la configuration runtime. + +## Fichiers + +- `example.config.json` : exemple complet avec profils `local_devnet`, `mainnet_research` et `mainnet`. +- `schema.config.json` : JSON Schema de validation du fichier de configuration. + +## Phase `0.3.x` + +`0.3.x` utilise les endpoints HTTP des profils de recherche existants pour : + +```text +getSignaturesForAddress +getTransaction +getSignatureStatuses +``` + +Aucun profil Helius payant ou Yellowstone n’est activé à ce stade. + +Les sources futures devront déclarer séparément : + +- provider ; +- protocole ; +- rôle ; +- limites de streams et filtres ; +- authentification ; +- région éventuelle. + +## Évolution du schéma + +`schema.config.json` est le contrat de validation runtime. Il évolue seulement lorsqu’un champ est réellement utilisé par l’exécution. + +## Logging de développement + +L’exemple configure, pour chacun des trois profils, quatre fichiers globaux puis trois fichiers dédiés par crate opérationnelle utilisant `tracing` : `debug.log`, `info.log` et `error.jsonl`. + +`pre.020` rend `kb_materializer_admin` et `kb_materializer_compliance_audit` opérationnelles. `pre.021` active ensuite `kb_materializer_staking`. Elles rejoignent donc la console et disposent de leurs routes propres sous : + +```text +logs//kb_materializer_admin/ +logs//kb_materializer_compliance_audit/ +logs//kb_materializer_staking/ +``` + +Le test de configuration découvre dynamiquement toutes les crates déclarant `tracing.workspace = true` et vérifie leurs trois routes dans chaque profil. Les logs ne doivent contenir ni secret, ni DSN non masqué, ni payload Config ou bytecode complet. + diff --git a/olddocs/archivekbot2/config/example.config.json b/olddocs/archivekbot2/config/example.config.json new file mode 100644 index 0000000..267cae1 --- /dev/null +++ b/olddocs/archivekbot2/config/example.config.json @@ -0,0 +1,5211 @@ +{ + "active_profile": "mainnet_research", + "profiles": [ + { + "name": "local_devnet", + "app": { + "name": "khadhroony-bot2", + "environment": "development", + "auto_reconnect_default": false + }, + "logging": { + "default_level": "warn", + "targets": [ + { + "name": "console_local_devnet_compact", + "enabled": true, + "sink": "console", + "level": "debug", + "path": "", + "rotation": "none", + "format": "compact", + "ansi": true, + "targets": [ + "kb_app_demo", + "kb_decoder_metadata_metaplex_token_metadata", + "kb_decoder_solana_core", + "kb_decoder_spl_associated_token_account", + "kb_decoder_spl_elgamal_registry", + "kb_decoder_spl_memo", + "kb_decoder_spl_token", + "kb_decoder_spl_token_2022", + "kb_execution_solana", + "kb_executor_metadata_metaplex_token_metadata", + "kb_executor_metadata_spl_name_service", + "kb_executor_solana_core", + "kb_executor_spl_account_compression", + "kb_executor_spl_associated_token_account", + "kb_executor_spl_elgamal_registry", + "kb_executor_spl_memo", + "kb_executor_spl_noop", + "kb_executor_spl_single_pool", + "kb_executor_spl_token", + "kb_executor_spl_token_2022", + "kb_logging", + "kb_materializer_admin", + "kb_materializer_compliance_audit", + "kb_materializer_lifecycle", + "kb_materializer_risk", + "kb_materializer_staking", + "kb_materializer_token_accounts", + "kb_materializer_transaction_annotations", + "kb_pipeline", + "kb_rpc", + "kb_store_pg", + "kb_wallet" + ] + }, + { + "name": "file_local_devnet_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "*" + ] + }, + { + "name": "file_local_devnet_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "*" + ] + }, + { + "name": "file_local_devnet_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "*" + ] + }, + { + "name": "file_local_devnet_app", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/app.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_app_demo_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_app_demo/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_app_demo_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_app_demo/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_app_demo_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_app_demo/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_decoder_solana_core_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_decoder_solana_core/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_solana_core" + ] + }, + { + "name": "file_kb_decoder_solana_core_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_decoder_solana_core/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_solana_core" + ] + }, + { + "name": "file_kb_decoder_solana_core_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_decoder_solana_core/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_solana_core" + ] + }, + { + "name": "file_kb_decoder_spl_memo_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_decoder_spl_memo/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_memo" + ] + }, + { + "name": "file_kb_decoder_spl_memo_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_decoder_spl_memo/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_memo" + ] + }, + { + "name": "file_kb_decoder_spl_memo_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_decoder_spl_memo/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_memo" + ] + }, + { + "name": "file_kb_decoder_spl_associated_token_account_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_decoder_spl_associated_token_account/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_associated_token_account" + ] + }, + { + "name": "file_kb_decoder_spl_associated_token_account_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_decoder_spl_associated_token_account/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_associated_token_account" + ] + }, + { + "name": "file_kb_decoder_spl_associated_token_account_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_decoder_spl_associated_token_account/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_associated_token_account" + ] + }, + { + "name": "file_kb_decoder_spl_token_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_decoder_spl_token/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token" + ] + }, + { + "name": "file_kb_decoder_spl_token_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_decoder_spl_token/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token" + ] + }, + { + "name": "file_kb_decoder_spl_token_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_decoder_spl_token/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_token" + ] + }, + { + "name": "file_kb_executor_metadata_spl_name_service_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_metadata_spl_name_service/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_spl_name_service" + ] + }, + { + "name": "file_kb_executor_metadata_spl_name_service_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_metadata_spl_name_service/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_spl_name_service" + ] + }, + { + "name": "file_kb_executor_metadata_spl_name_service_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_metadata_spl_name_service/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_metadata_spl_name_service" + ] + }, + { + "name": "file_kb_executor_solana_core_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_solana_core/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_solana_core" + ] + }, + { + "name": "file_kb_executor_solana_core_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_solana_core/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_solana_core" + ] + }, + { + "name": "file_kb_executor_solana_core_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_solana_core/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_solana_core" + ] + }, + { + "name": "file_kb_execution_solana_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_execution_solana/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_execution_solana" + ] + }, + { + "name": "file_kb_execution_solana_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_execution_solana/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_execution_solana" + ] + }, + { + "name": "file_kb_execution_solana_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_execution_solana/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_execution_solana" + ] + }, + { + "name": "file_kb_executor_spl_account_compression_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_spl_account_compression/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_account_compression" + ] + }, + { + "name": "file_kb_executor_spl_account_compression_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_spl_account_compression/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_account_compression" + ] + }, + { + "name": "file_kb_executor_spl_account_compression_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_spl_account_compression/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_account_compression" + ] + }, + { + "name": "file_kb_executor_spl_memo_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_spl_memo/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_memo" + ] + }, + { + "name": "file_kb_executor_spl_memo_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_spl_memo/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_memo" + ] + }, + { + "name": "file_kb_executor_spl_memo_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_spl_memo/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_memo" + ] + }, + { + "name": "file_kb_executor_spl_associated_token_account_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_spl_associated_token_account/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_associated_token_account" + ] + }, + { + "name": "file_kb_executor_spl_associated_token_account_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_spl_associated_token_account/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_associated_token_account" + ] + }, + { + "name": "file_kb_executor_spl_associated_token_account_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_spl_associated_token_account/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_associated_token_account" + ] + }, + { + "name": "file_kb_executor_spl_token_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_spl_token/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token" + ] + }, + { + "name": "file_kb_executor_spl_token_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_spl_token/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token" + ] + }, + { + "name": "file_kb_executor_spl_token_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_spl_token/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_token" + ] + }, + { + "name": "file_kb_executor_spl_noop_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_spl_noop/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_noop" + ] + }, + { + "name": "file_kb_executor_spl_noop_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_spl_noop/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_noop" + ] + }, + { + "name": "file_kb_executor_spl_noop_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_spl_noop/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_noop" + ] + }, + { + "name": "file_kb_executor_spl_single_pool_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_spl_single_pool/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_single_pool" + ] + }, + { + "name": "file_kb_executor_spl_single_pool_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_spl_single_pool/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_single_pool" + ] + }, + { + "name": "file_kb_executor_spl_single_pool_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_spl_single_pool/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_single_pool" + ] + }, + { + "name": "file_kb_logging_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_logging/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_logging" + ] + }, + { + "name": "file_kb_logging_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_logging/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_logging" + ] + }, + { + "name": "file_kb_logging_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_logging/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_logging" + ] + }, + { + "name": "file_kb_materializer_admin_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_materializer_admin/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_admin" + ] + }, + { + "name": "file_kb_materializer_admin_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_materializer_admin/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_admin" + ] + }, + { + "name": "file_kb_materializer_admin_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_materializer_admin/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_admin" + ] + }, + { + "name": "file_kb_materializer_compliance_audit_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_materializer_compliance_audit/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_compliance_audit" + ] + }, + { + "name": "file_kb_materializer_compliance_audit_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_materializer_compliance_audit/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_compliance_audit" + ] + }, + { + "name": "file_kb_materializer_compliance_audit_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_materializer_compliance_audit/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_compliance_audit" + ] + }, + { + "name": "file_kb_materializer_lifecycle_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_materializer_lifecycle/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_lifecycle" + ] + }, + { + "name": "file_kb_materializer_lifecycle_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_materializer_lifecycle/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_lifecycle" + ] + }, + { + "name": "file_kb_materializer_lifecycle_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_materializer_lifecycle/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_lifecycle" + ] + }, + { + "name": "file_kb_materializer_transaction_annotations_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_materializer_transaction_annotations/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_transaction_annotations" + ] + }, + { + "name": "file_kb_materializer_transaction_annotations_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_materializer_transaction_annotations/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_transaction_annotations" + ] + }, + { + "name": "file_kb_materializer_transaction_annotations_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_materializer_transaction_annotations/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_transaction_annotations" + ] + }, + { + "name": "file_kb_materializer_staking_debug", + "enabled": true, + "level": "debug", + "format": "human", + "path": "logs/devnet/kb_materializer_staking/debug.log", + "targets": [ + "kb_materializer_staking" + ], + "sink": "file", + "rotation": "daily", + "ansi": false + }, + { + "name": "file_kb_materializer_staking_info", + "enabled": true, + "level": "info", + "format": "human", + "path": "logs/devnet/kb_materializer_staking/info.log", + "targets": [ + "kb_materializer_staking" + ], + "sink": "file", + "rotation": "daily", + "ansi": false + }, + { + "name": "file_kb_materializer_staking_error", + "enabled": true, + "level": "error", + "format": "json", + "path": "logs/devnet/kb_materializer_staking/error.jsonl", + "targets": [ + "kb_materializer_staking" + ], + "sink": "file", + "rotation": "daily", + "ansi": false + }, + { + "name": "file_kb_pipeline_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_pipeline/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_pipeline" + ] + }, + { + "name": "file_kb_pipeline_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_pipeline/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_pipeline" + ] + }, + { + "name": "file_kb_pipeline_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_pipeline/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_pipeline" + ] + }, + { + "name": "file_kb_rpc_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_rpc/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_rpc" + ] + }, + { + "name": "file_kb_rpc_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_rpc/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_rpc" + ] + }, + { + "name": "file_kb_rpc_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_rpc/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_rpc" + ] + }, + { + "name": "file_kb_store_pg_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_store_pg/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_store_pg" + ] + }, + { + "name": "file_kb_store_pg_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_store_pg/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_store_pg" + ] + }, + { + "name": "file_kb_store_pg_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_store_pg/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_store_pg" + ] + }, + { + "name": "file_kb_wallet_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_wallet/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_wallet" + ] + }, + { + "name": "file_kb_wallet_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_wallet/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_wallet" + ] + }, + { + "name": "file_kb_wallet_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_wallet/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_wallet" + ] + }, + { + "name": "file_kb_materializer_token_accounts_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_materializer_token_accounts/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_token_accounts" + ] + }, + { + "name": "file_kb_materializer_token_accounts_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_materializer_token_accounts/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_token_accounts" + ] + }, + { + "name": "file_kb_materializer_token_accounts_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_materializer_token_accounts/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_token_accounts" + ] + }, + { + "name": "file_kb_materializer_risk_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_materializer_risk/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_risk" + ] + }, + { + "name": "file_kb_materializer_risk_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_materializer_risk/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_risk" + ] + }, + { + "name": "file_kb_materializer_risk_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_materializer_risk/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_risk" + ] + }, + { + "name": "file_kb_decoder_spl_token_2022_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_decoder_spl_token_2022/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token_2022" + ] + }, + { + "name": "file_kb_decoder_spl_token_2022_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_decoder_spl_token_2022/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token_2022" + ] + }, + { + "name": "file_kb_decoder_spl_token_2022_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_decoder_spl_token_2022/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_token_2022" + ] + }, + { + "name": "file_kb_decoder_metadata_metaplex_token_metadata_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_decoder_metadata_metaplex_token_metadata/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_decoder_metadata_metaplex_token_metadata_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_decoder_metadata_metaplex_token_metadata/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_decoder_metadata_metaplex_token_metadata_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_decoder_metadata_metaplex_token_metadata/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_decoder_spl_elgamal_registry_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_decoder_spl_elgamal_registry/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_decoder_spl_elgamal_registry_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_decoder_spl_elgamal_registry/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_decoder_spl_elgamal_registry_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_decoder_spl_elgamal_registry/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_metadata_metaplex_token_metadata_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_metadata_metaplex_token_metadata/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_executor_metadata_metaplex_token_metadata_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_metadata_metaplex_token_metadata/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_executor_metadata_metaplex_token_metadata_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_metadata_metaplex_token_metadata/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_executor_spl_elgamal_registry_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_spl_elgamal_registry/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_spl_elgamal_registry_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_spl_elgamal_registry/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_spl_elgamal_registry_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_spl_elgamal_registry/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_spl_token_2022_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/devnet/kb_executor_spl_token_2022/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token_2022" + ] + }, + { + "name": "file_kb_executor_spl_token_2022_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/devnet/kb_executor_spl_token_2022/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token_2022" + ] + }, + { + "name": "file_kb_executor_spl_token_2022_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/devnet/kb_executor_spl_token_2022/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_token_2022" + ] + } + ], + "target_filters": [ + { + "target": "hyper", + "level": "warn" + }, + { + "target": "reqwest", + "level": "warn" + }, + { + "target": "tao", + "level": "warn" + }, + { + "target": "wry", + "level": "warn" + } + ] + }, + "database": { + "enabled": true, + "backend": "postgres", + "postgres": { + "url": "postgres://solana:solana@localhost:5432/solana", + "max_connections": 8, + "connect_timeout_ms": 5000, + "auto_initialize_schema": true + }, + "sqlite": { + "path": "data/local.sqlite", + "create_if_missing": true, + "busy_timeout_ms": 5000, + "max_connections": 1, + "auto_initialize_schema": true, + "use_wal": true + } + }, + "data": { + "wallets_directory": "wallets", + "logs_directory": "logs" + }, + "solana": { + "http_endpoints": [ + { + "name": "devnet_public_http", + "enabled": true, + "provider": "solana-public", + "cluster": "devnet", + "url": "https://api.devnet.solana.com", + "connect_timeout_ms": 4000, + "request_timeout_ms": 10000, + "max_idle_connections_per_host": 4, + "roles": [ + { + "role": "http_queries", + "enabled": true, + "request_kinds": [ + "get_account_info", + "get_balance", + "get_block_commitment", + "get_block_height", + "get_block_production", + "get_blocks", + "get_blocks_with_limit", + "get_cluster_nodes", + "get_epoch_info", + "get_epoch_schedule", + "get_fee_for_message", + "get_first_available_block", + "get_genesis_hash", + "get_health", + "get_highest_snapshot_slot", + "get_identity", + "get_inflation_governor", + "get_inflation_rate", + "get_inflation_reward", + "get_largest_accounts", + "get_latest_blockhash", + "get_leader_schedule", + "get_max_retransmit_slot", + "get_max_shred_insert_slot", + "get_minimum_balance_for_rent_exemption", + "get_multiple_accounts", + "get_recent_performance_samples", + "get_recent_prioritization_fees", + "get_signature_statuses", + "get_slot", + "get_slot_leader", + "get_slot_leaders", + "get_stake_activation", + "get_stake_minimum_delegation", + "get_supply", + "get_token_account_balance", + "get_token_accounts_by_delegate", + "get_token_accounts_by_owner", + "get_token_largest_accounts", + "get_token_supply", + "get_transaction", + "get_transaction_count", + "get_version", + "get_vote_accounts", + "is_blockhash_valid", + "request_airdrop" + ], + "priority": 10, + "requests_per_second": 8, + "burst_capacity": 16, + "max_concurrent_requests": 8, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 1500 + }, + { + "role": "http_transactions", + "enabled": true, + "request_kinds": [ + "simulate_transaction", + "send_transaction", + "get_signature_statuses" + ], + "priority": 20, + "requests_per_second": 2, + "burst_capacity": 2, + "max_concurrent_requests": 2, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 3000 + } + ] + } + ], + "ws_endpoints": [ + { + "name": "devnet_public_ws", + "enabled": true, + "provider": "solana-public", + "cluster": "devnet", + "url": "wss://api.devnet.solana.com", + "connect_timeout_ms": 5000, + "request_timeout_ms": 10000, + "unsubscribe_timeout_ms": 1500, + "write_channel_capacity": 256, + "event_channel_capacity": 1024, + "auto_reconnect": false, + "roles": [ + { + "role": "slot_notifications", + "enabled": true, + "request_kinds": [ + "slot_subscribe", + "slots_updates_subscribe" + ], + "priority": 10, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 16, + "pause_after_rate_limit_ms": 3000 + }, + { + "role": "program_logs", + "enabled": true, + "request_kinds": [ + "logs_subscribe_mentions", + "program_subscribe", + "account_subscribe", + "signature_subscribe", + "block_subscribe", + "vote_subscribe" + ], + "priority": 20, + "requests_per_second": 2, + "burst_capacity": 4, + "max_concurrent_requests": 2, + "max_subscriptions": 64, + "pause_after_rate_limit_ms": 3000 + }, + { + "role": "root_notifications", + "enabled": true, + "request_kinds": [ + "root_subscribe" + ], + "priority": 15, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 16, + "pause_after_rate_limit_ms": 3000 + } + ] + } + ], + "listeners": { + "enabled": true, + "default_commitment": "confirmed", + "log_listeners": [ + { + "name": "pump_swap_logs", + "enabled": false, + "endpoint_role": "program_logs", + "program_id": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA", + "purpose": "Détecter les swaps, créations de pool et changements de liquidité Pump Swap." + } + ], + "program_listeners": [ + { + "name": "pump_fun_program_accounts", + "enabled": false, + "endpoint_role": "program_logs", + "program_id": "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", + "purpose": "Détecter les changements de comptes utiles à la création ou migration de tokens Pump Fun." + } + ], + "account_listeners": [] + } + }, + "wallet": { + "wallet_dir": "wallets/temporary/local_devnet", + "cluster": "devnet", + "temporary_wallet_enabled": true, + "temporary_wallet_alias": "local-devnet-operator", + "temporary_wallet_persist": true, + "localnet_send_enabled": false, + "devnet_send_enabled": true, + "testnet_send_enabled": false, + "mainnet_send_enabled": false + }, + "execution": { + "dry_run_default": true, + "require_simulation": true, + "require_operator_confirmation": true, + "localnet_max_spend_lamports": 0, + "devnet_max_spend_lamports": 100000000, + "testnet_max_spend_lamports": 0, + "mainnet_max_spend_lamports": 0, + "max_fee_lamports": 1000000, + "max_compute_unit_price_micro_lamports": 100000, + "recent_blockhash_max_age_slots": 150, + "send_max_retries": 3, + "confirmation_poll_interval_ms": 500, + "confirmation_max_attempts": 120, + "devnet_airdrop_max_lamports": 2000000000 + }, + "demo": { + "live_demo_enabled": true, + "trading_demo_enabled": false + } + }, + { + "name": "mainnet_research", + "app": { + "name": "khadhroony-bot2", + "environment": "research", + "auto_reconnect_default": false + }, + "logging": { + "default_level": "warn", + "targets": [ + { + "name": "console_mainnet_research_compact", + "enabled": true, + "sink": "console", + "level": "debug", + "path": "", + "rotation": "none", + "format": "compact", + "ansi": true, + "targets": [ + "kb_app_demo", + "kb_decoder_metadata_metaplex_token_metadata", + "kb_decoder_solana_core", + "kb_decoder_spl_associated_token_account", + "kb_decoder_spl_elgamal_registry", + "kb_decoder_spl_memo", + "kb_decoder_spl_token", + "kb_decoder_spl_token_2022", + "kb_execution_solana", + "kb_executor_metadata_metaplex_token_metadata", + "kb_executor_metadata_spl_name_service", + "kb_executor_solana_core", + "kb_executor_spl_account_compression", + "kb_executor_spl_associated_token_account", + "kb_executor_spl_elgamal_registry", + "kb_executor_spl_memo", + "kb_executor_spl_noop", + "kb_executor_spl_single_pool", + "kb_executor_spl_token", + "kb_executor_spl_token_2022", + "kb_logging", + "kb_materializer_admin", + "kb_materializer_compliance_audit", + "kb_materializer_lifecycle", + "kb_materializer_risk", + "kb_materializer_staking", + "kb_materializer_token_accounts", + "kb_materializer_transaction_annotations", + "kb_pipeline", + "kb_rpc", + "kb_store_pg", + "kb_wallet" + ] + }, + { + "name": "file_mainnet_research_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "*" + ] + }, + { + "name": "file_mainnet_research_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "*" + ] + }, + { + "name": "file_mainnet_research_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "*" + ] + }, + { + "name": "file_mainnet_research_app", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/app.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_app_demo_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_app_demo/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_app_demo_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_app_demo/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_app_demo_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_app_demo/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_decoder_solana_core_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_decoder_solana_core/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_solana_core" + ] + }, + { + "name": "file_kb_decoder_solana_core_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_decoder_solana_core/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_solana_core" + ] + }, + { + "name": "file_kb_decoder_solana_core_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_decoder_solana_core/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_solana_core" + ] + }, + { + "name": "file_kb_decoder_spl_memo_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_decoder_spl_memo/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_memo" + ] + }, + { + "name": "file_kb_decoder_spl_memo_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_decoder_spl_memo/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_memo" + ] + }, + { + "name": "file_kb_decoder_spl_memo_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_decoder_spl_memo/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_memo" + ] + }, + { + "name": "file_kb_decoder_spl_associated_token_account_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_decoder_spl_associated_token_account/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_associated_token_account" + ] + }, + { + "name": "file_kb_decoder_spl_associated_token_account_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_decoder_spl_associated_token_account/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_associated_token_account" + ] + }, + { + "name": "file_kb_decoder_spl_associated_token_account_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_decoder_spl_associated_token_account/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_associated_token_account" + ] + }, + { + "name": "file_kb_decoder_spl_token_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_decoder_spl_token/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token" + ] + }, + { + "name": "file_kb_decoder_spl_token_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_decoder_spl_token/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token" + ] + }, + { + "name": "file_kb_decoder_spl_token_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_decoder_spl_token/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_token" + ] + }, + { + "name": "file_kb_executor_metadata_spl_name_service_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_metadata_spl_name_service/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_spl_name_service" + ] + }, + { + "name": "file_kb_executor_metadata_spl_name_service_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_metadata_spl_name_service/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_spl_name_service" + ] + }, + { + "name": "file_kb_executor_metadata_spl_name_service_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_metadata_spl_name_service/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_metadata_spl_name_service" + ] + }, + { + "name": "file_kb_executor_solana_core_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_solana_core/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_solana_core" + ] + }, + { + "name": "file_kb_executor_solana_core_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_solana_core/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_solana_core" + ] + }, + { + "name": "file_kb_executor_solana_core_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_solana_core/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_solana_core" + ] + }, + { + "name": "file_kb_execution_solana_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_execution_solana/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_execution_solana" + ] + }, + { + "name": "file_kb_execution_solana_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_execution_solana/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_execution_solana" + ] + }, + { + "name": "file_kb_execution_solana_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_execution_solana/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_execution_solana" + ] + }, + { + "name": "file_kb_executor_spl_account_compression_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_spl_account_compression/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_account_compression" + ] + }, + { + "name": "file_kb_executor_spl_account_compression_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_spl_account_compression/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_account_compression" + ] + }, + { + "name": "file_kb_executor_spl_account_compression_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_spl_account_compression/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_account_compression" + ] + }, + { + "name": "file_kb_executor_spl_memo_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_spl_memo/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_memo" + ] + }, + { + "name": "file_kb_executor_spl_memo_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_spl_memo/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_memo" + ] + }, + { + "name": "file_kb_executor_spl_memo_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_spl_memo/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_memo" + ] + }, + { + "name": "file_kb_executor_spl_associated_token_account_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_spl_associated_token_account/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_associated_token_account" + ] + }, + { + "name": "file_kb_executor_spl_associated_token_account_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_spl_associated_token_account/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_associated_token_account" + ] + }, + { + "name": "file_kb_executor_spl_associated_token_account_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_spl_associated_token_account/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_associated_token_account" + ] + }, + { + "name": "file_kb_executor_spl_token_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_spl_token/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token" + ] + }, + { + "name": "file_kb_executor_spl_token_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_spl_token/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token" + ] + }, + { + "name": "file_kb_executor_spl_token_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_spl_token/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_token" + ] + }, + { + "name": "file_kb_executor_spl_noop_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_spl_noop/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_noop" + ] + }, + { + "name": "file_kb_executor_spl_noop_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_spl_noop/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_noop" + ] + }, + { + "name": "file_kb_executor_spl_noop_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_spl_noop/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_noop" + ] + }, + { + "name": "file_kb_executor_spl_single_pool_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_spl_single_pool/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_single_pool" + ] + }, + { + "name": "file_kb_executor_spl_single_pool_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_spl_single_pool/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_single_pool" + ] + }, + { + "name": "file_kb_executor_spl_single_pool_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_spl_single_pool/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_single_pool" + ] + }, + { + "name": "file_kb_logging_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_logging/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_logging" + ] + }, + { + "name": "file_kb_logging_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_logging/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_logging" + ] + }, + { + "name": "file_kb_logging_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_logging/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_logging" + ] + }, + { + "name": "file_kb_materializer_admin_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_materializer_admin/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_admin" + ] + }, + { + "name": "file_kb_materializer_admin_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_materializer_admin/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_admin" + ] + }, + { + "name": "file_kb_materializer_admin_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_materializer_admin/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_admin" + ] + }, + { + "name": "file_kb_materializer_compliance_audit_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_materializer_compliance_audit/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_compliance_audit" + ] + }, + { + "name": "file_kb_materializer_compliance_audit_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_materializer_compliance_audit/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_compliance_audit" + ] + }, + { + "name": "file_kb_materializer_compliance_audit_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_materializer_compliance_audit/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_compliance_audit" + ] + }, + { + "name": "file_kb_materializer_lifecycle_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_materializer_lifecycle/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_lifecycle" + ] + }, + { + "name": "file_kb_materializer_lifecycle_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_materializer_lifecycle/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_lifecycle" + ] + }, + { + "name": "file_kb_materializer_lifecycle_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_materializer_lifecycle/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_lifecycle" + ] + }, + { + "name": "file_kb_materializer_transaction_annotations_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_materializer_transaction_annotations/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_transaction_annotations" + ] + }, + { + "name": "file_kb_materializer_transaction_annotations_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_materializer_transaction_annotations/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_transaction_annotations" + ] + }, + { + "name": "file_kb_materializer_transaction_annotations_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_materializer_transaction_annotations/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_transaction_annotations" + ] + }, + { + "name": "file_kb_materializer_staking_debug", + "enabled": true, + "level": "debug", + "format": "human", + "path": "logs/mainnet_research/kb_materializer_staking/debug.log", + "targets": [ + "kb_materializer_staking" + ], + "sink": "file", + "rotation": "daily", + "ansi": false + }, + { + "name": "file_kb_materializer_staking_info", + "enabled": true, + "level": "info", + "format": "human", + "path": "logs/mainnet_research/kb_materializer_staking/info.log", + "targets": [ + "kb_materializer_staking" + ], + "sink": "file", + "rotation": "daily", + "ansi": false + }, + { + "name": "file_kb_materializer_staking_error", + "enabled": true, + "level": "error", + "format": "json", + "path": "logs/mainnet_research/kb_materializer_staking/error.jsonl", + "targets": [ + "kb_materializer_staking" + ], + "sink": "file", + "rotation": "daily", + "ansi": false + }, + { + "name": "file_kb_pipeline_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_pipeline/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_pipeline" + ] + }, + { + "name": "file_kb_pipeline_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_pipeline/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_pipeline" + ] + }, + { + "name": "file_kb_pipeline_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_pipeline/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_pipeline" + ] + }, + { + "name": "file_kb_rpc_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_rpc/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_rpc" + ] + }, + { + "name": "file_kb_rpc_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_rpc/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_rpc" + ] + }, + { + "name": "file_kb_rpc_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_rpc/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_rpc" + ] + }, + { + "name": "file_kb_store_pg_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_store_pg/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_store_pg" + ] + }, + { + "name": "file_kb_store_pg_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_store_pg/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_store_pg" + ] + }, + { + "name": "file_kb_store_pg_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_store_pg/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_store_pg" + ] + }, + { + "name": "file_kb_wallet_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_wallet/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_wallet" + ] + }, + { + "name": "file_kb_wallet_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_wallet/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_wallet" + ] + }, + { + "name": "file_kb_wallet_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_wallet/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_wallet" + ] + }, + { + "name": "file_kb_materializer_token_accounts_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_materializer_token_accounts/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_token_accounts" + ] + }, + { + "name": "file_kb_materializer_token_accounts_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_materializer_token_accounts/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_token_accounts" + ] + }, + { + "name": "file_kb_materializer_token_accounts_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_materializer_token_accounts/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_token_accounts" + ] + }, + { + "name": "file_kb_materializer_risk_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_materializer_risk/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_risk" + ] + }, + { + "name": "file_kb_materializer_risk_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_materializer_risk/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_risk" + ] + }, + { + "name": "file_kb_materializer_risk_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_materializer_risk/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_risk" + ] + }, + { + "name": "file_kb_decoder_spl_token_2022_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_decoder_spl_token_2022/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token_2022" + ] + }, + { + "name": "file_kb_decoder_spl_token_2022_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_decoder_spl_token_2022/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token_2022" + ] + }, + { + "name": "file_kb_decoder_spl_token_2022_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_decoder_spl_token_2022/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_token_2022" + ] + }, + { + "name": "file_kb_decoder_metadata_metaplex_token_metadata_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_decoder_metadata_metaplex_token_metadata/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_decoder_metadata_metaplex_token_metadata_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_decoder_metadata_metaplex_token_metadata/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_decoder_metadata_metaplex_token_metadata_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_decoder_metadata_metaplex_token_metadata/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_decoder_spl_elgamal_registry_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_decoder_spl_elgamal_registry/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_decoder_spl_elgamal_registry_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_decoder_spl_elgamal_registry/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_decoder_spl_elgamal_registry_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_decoder_spl_elgamal_registry/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_metadata_metaplex_token_metadata_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_metadata_metaplex_token_metadata/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_executor_metadata_metaplex_token_metadata_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_metadata_metaplex_token_metadata/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_executor_metadata_metaplex_token_metadata_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_metadata_metaplex_token_metadata/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_executor_spl_elgamal_registry_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_spl_elgamal_registry/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_spl_elgamal_registry_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_spl_elgamal_registry/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_spl_elgamal_registry_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_spl_elgamal_registry/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_spl_token_2022_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet_research/kb_executor_spl_token_2022/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token_2022" + ] + }, + { + "name": "file_kb_executor_spl_token_2022_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet_research/kb_executor_spl_token_2022/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token_2022" + ] + }, + { + "name": "file_kb_executor_spl_token_2022_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet_research/kb_executor_spl_token_2022/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_token_2022" + ] + } + ], + "target_filters": [ + { + "target": "hyper", + "level": "warn" + }, + { + "target": "reqwest", + "level": "warn" + }, + { + "target": "tao", + "level": "warn" + }, + { + "target": "wry", + "level": "warn" + } + ] + }, + "database": { + "enabled": true, + "backend": "postgres", + "postgres": { + "url": "postgres://solana:solana@localhost:5432/solana", + "max_connections": 16, + "connect_timeout_ms": 5000, + "auto_initialize_schema": true + }, + "sqlite": { + "path": "data/mainnet-import.sqlite", + "create_if_missing": true, + "busy_timeout_ms": 5000, + "max_connections": 1, + "auto_initialize_schema": true, + "use_wal": true + } + }, + "data": { + "wallets_directory": "wallets", + "logs_directory": "logs" + }, + "solana": { + "http_endpoints": [ + { + "name": "mainnet_public_http", + "enabled": true, + "provider": "solana-public", + "cluster": "mainnet-beta", + "url": "https://api.mainnet.solana.com", + "connect_timeout_ms": 4000, + "request_timeout_ms": 10000, + "max_idle_connections_per_host": 4, + "roles": [ + { + "role": "http_queries", + "enabled": true, + "request_kinds": [ + "get_account_info", + "get_balance", + "get_block_commitment", + "get_block_height", + "get_block_production", + "get_blocks", + "get_blocks_with_limit", + "get_cluster_nodes", + "get_epoch_info", + "get_epoch_schedule", + "get_fee_for_message", + "get_first_available_block", + "get_genesis_hash", + "get_health", + "get_highest_snapshot_slot", + "get_identity", + "get_inflation_governor", + "get_inflation_rate", + "get_inflation_reward", + "get_largest_accounts", + "get_latest_blockhash", + "get_leader_schedule", + "get_max_retransmit_slot", + "get_max_shred_insert_slot", + "get_minimum_balance_for_rent_exemption", + "get_multiple_accounts", + "get_recent_performance_samples", + "get_recent_prioritization_fees", + "get_signature_statuses", + "get_slot", + "get_slot_leader", + "get_slot_leaders", + "get_stake_activation", + "get_stake_minimum_delegation", + "get_supply", + "get_token_account_balance", + "get_token_accounts_by_delegate", + "get_token_accounts_by_owner", + "get_token_largest_accounts", + "get_token_supply", + "get_transaction_count", + "get_version", + "get_vote_accounts", + "is_blockhash_valid", + "request_airdrop" + ], + "priority": 50, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 3000 + }, + { + "role": "http_fallback", + "enabled": true, + "request_kinds": [ + "get_account_info", + "get_balance", + "get_block_commitment", + "get_block_height", + "get_block_production", + "get_blocks", + "get_blocks_with_limit", + "get_cluster_nodes", + "get_epoch_info", + "get_epoch_schedule", + "get_fee_for_message", + "get_first_available_block", + "get_genesis_hash", + "get_health", + "get_highest_snapshot_slot", + "get_identity", + "get_inflation_governor", + "get_inflation_rate", + "get_inflation_reward", + "get_largest_accounts", + "get_latest_blockhash", + "get_leader_schedule", + "get_max_retransmit_slot", + "get_max_shred_insert_slot", + "get_minimum_balance_for_rent_exemption", + "get_multiple_accounts", + "get_recent_performance_samples", + "get_recent_prioritization_fees", + "get_signature_statuses", + "get_slot", + "get_slot_leader", + "get_slot_leaders", + "get_stake_activation", + "get_stake_minimum_delegation", + "get_supply", + "get_token_account_balance", + "get_token_accounts_by_delegate", + "get_token_accounts_by_owner", + "get_token_largest_accounts", + "get_token_supply", + "get_transaction_count", + "get_version", + "get_vote_accounts", + "is_blockhash_valid", + "request_airdrop" + ], + "priority": 90, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 3000 + } + ] + }, + { + "name": "helius_primary_http", + "enabled": true, + "provider": "helius", + "cluster": "mainnet-beta", + "url": "https://mainnet.helius-rpc.com/?api-key=95e73621-b539-4a79-af39-3b0877a13857", + "connect_timeout_ms": 4000, + "request_timeout_ms": 10000, + "max_idle_connections_per_host": 8, + "roles": [ + { + "role": "http_queries", + "enabled": true, + "request_kinds": [ + "get_account_info", + "get_balance", + "get_block_commitment", + "get_block_height", + "get_block_production", + "get_blocks", + "get_blocks_with_limit", + "get_cluster_nodes", + "get_epoch_info", + "get_epoch_schedule", + "get_fee_for_message", + "get_first_available_block", + "get_genesis_hash", + "get_health", + "get_highest_snapshot_slot", + "get_identity", + "get_inflation_governor", + "get_inflation_rate", + "get_inflation_reward", + "get_largest_accounts", + "get_latest_blockhash", + "get_leader_schedule", + "get_max_retransmit_slot", + "get_max_shred_insert_slot", + "get_minimum_balance_for_rent_exemption", + "get_multiple_accounts", + "get_recent_performance_samples", + "get_recent_prioritization_fees", + "get_signature_statuses", + "get_slot", + "get_slot_leader", + "get_slot_leaders", + "get_stake_activation", + "get_stake_minimum_delegation", + "get_supply", + "get_token_account_balance", + "get_token_accounts_by_delegate", + "get_token_accounts_by_owner", + "get_token_largest_accounts", + "get_token_supply", + "get_transaction_count", + "get_version", + "get_vote_accounts", + "is_blockhash_valid", + "request_airdrop" + ], + "priority": 10, + "requests_per_second": 8, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 1500 + }, + { + "role": "http_heavy", + "enabled": true, + "request_kinds": [ + "get_block", + "get_program_accounts", + "get_signatures_for_address", + "get_transaction" + ], + "priority": 20, + "requests_per_second": 2, + "burst_capacity": 1, + "max_concurrent_requests": 2, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 1500 + }, + { + "role": "history_backfill", + "enabled": true, + "request_kinds": [ + "get_block", + "get_program_accounts", + "get_signatures_for_address", + "get_transaction" + ], + "priority": 30, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 1500 + }, + { + "role": "http_transactions", + "enabled": false, + "request_kinds": [ + "simulate_transaction", + "send_transaction", + "get_signature_statuses" + ], + "priority": 40, + "requests_per_second": 1, + "burst_capacity": 1, + "max_concurrent_requests": 1, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 3000 + } + ] + } + ], + "ws_endpoints": [ + { + "name": "mainnet_public_ws_slots", + "enabled": true, + "provider": "solana-public", + "cluster": "mainnet-beta", + "url": "wss://api.mainnet.solana.com", + "connect_timeout_ms": 5000, + "request_timeout_ms": 10000, + "unsubscribe_timeout_ms": 1500, + "write_channel_capacity": 256, + "event_channel_capacity": 1024, + "auto_reconnect": false, + "roles": [ + { + "role": "slot_notifications", + "enabled": true, + "request_kinds": [ + "slot_subscribe", + "slots_updates_subscribe" + ], + "priority": 10, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 16, + "pause_after_rate_limit_ms": 3000 + }, + { + "role": "root_notifications", + "enabled": true, + "request_kinds": [ + "root_subscribe" + ], + "priority": 20, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 16, + "pause_after_rate_limit_ms": 3000 + } + ] + }, + { + "name": "helius_primary_ws_programs", + "enabled": true, + "provider": "helius", + "cluster": "mainnet-beta", + "url": "wss://mainnet.helius-rpc.com/?api-key=95e73621-b539-4a79-af39-3b0877a13857", + "connect_timeout_ms": 5000, + "request_timeout_ms": 10000, + "unsubscribe_timeout_ms": 1500, + "write_channel_capacity": 512, + "event_channel_capacity": 4096, + "auto_reconnect": false, + "roles": [ + { + "role": "logs_subscribe", + "enabled": true, + "request_kinds": [ + "logs_subscribe_mentions" + ], + "priority": 10, + "requests_per_second": 2, + "burst_capacity": 4, + "max_concurrent_requests": 2, + "max_subscriptions": 128, + "pause_after_rate_limit_ms": 3000 + }, + { + "role": "program_subscribe", + "enabled": true, + "request_kinds": [ + "program_subscribe" + ], + "priority": 20, + "requests_per_second": 2, + "burst_capacity": 4, + "max_concurrent_requests": 2, + "max_subscriptions": 128, + "pause_after_rate_limit_ms": 3000 + }, + { + "role": "account_subscribe", + "enabled": true, + "request_kinds": [ + "account_subscribe" + ], + "priority": 30, + "requests_per_second": 2, + "burst_capacity": 4, + "max_concurrent_requests": 2, + "max_subscriptions": 128, + "pause_after_rate_limit_ms": 3000 + } + ] + } + ], + "listeners": { + "enabled": true, + "default_commitment": "confirmed", + "log_listeners": [ + { + "name": "pump_swap_logs", + "enabled": true, + "endpoint_role": "program_logs", + "program_id": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA", + "purpose": "Détecter les swaps, créations de pool et changements de liquidité Pump Swap." + }, + { + "name": "raydium_cpmm_logs", + "enabled": true, + "endpoint_role": "program_logs", + "program_id": "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C", + "purpose": "Détecter les créations de pools et swaps Raydium CPMM." + } + ], + "program_listeners": [ + { + "name": "pump_fun_program_accounts", + "enabled": true, + "endpoint_role": "program_logs", + "program_id": "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", + "purpose": "Détecter les changements de comptes utiles à la création ou migration de tokens Pump Fun." + } + ], + "account_listeners": [] + } + }, + "wallet": { + "wallet_dir": "wallets/temporary/mainnet_research", + "cluster": "mainnet-beta", + "temporary_wallet_enabled": false, + "temporary_wallet_alias": "mainnet_research-disabled", + "temporary_wallet_persist": false, + "localnet_send_enabled": false, + "devnet_send_enabled": false, + "testnet_send_enabled": false, + "mainnet_send_enabled": false + }, + "execution": { + "dry_run_default": true, + "require_simulation": true, + "require_operator_confirmation": true, + "localnet_max_spend_lamports": 0, + "devnet_max_spend_lamports": 0, + "testnet_max_spend_lamports": 0, + "mainnet_max_spend_lamports": 0, + "max_fee_lamports": 1000000, + "max_compute_unit_price_micro_lamports": 100000, + "recent_blockhash_max_age_slots": 150, + "send_max_retries": 3, + "confirmation_poll_interval_ms": 500, + "confirmation_max_attempts": 120, + "devnet_airdrop_max_lamports": 0 + }, + "demo": { + "live_demo_enabled": true, + "trading_demo_enabled": false + } + }, + { + "name": "mainnet", + "app": { + "name": "khadhroony-bot2", + "environment": "mainnet", + "auto_reconnect_default": false + }, + "logging": { + "default_level": "warn", + "targets": [ + { + "name": "console_mainnet_compact", + "enabled": true, + "sink": "console", + "level": "debug", + "path": "", + "rotation": "none", + "format": "compact", + "ansi": true, + "targets": [ + "kb_app_demo", + "kb_decoder_metadata_metaplex_token_metadata", + "kb_decoder_solana_core", + "kb_decoder_spl_associated_token_account", + "kb_decoder_spl_elgamal_registry", + "kb_decoder_spl_memo", + "kb_decoder_spl_token", + "kb_decoder_spl_token_2022", + "kb_execution_solana", + "kb_executor_metadata_metaplex_token_metadata", + "kb_executor_metadata_spl_name_service", + "kb_executor_solana_core", + "kb_executor_spl_account_compression", + "kb_executor_spl_associated_token_account", + "kb_executor_spl_elgamal_registry", + "kb_executor_spl_memo", + "kb_executor_spl_noop", + "kb_executor_spl_single_pool", + "kb_executor_spl_token", + "kb_executor_spl_token_2022", + "kb_logging", + "kb_materializer_admin", + "kb_materializer_compliance_audit", + "kb_materializer_lifecycle", + "kb_materializer_risk", + "kb_materializer_staking", + "kb_materializer_token_accounts", + "kb_materializer_transaction_annotations", + "kb_pipeline", + "kb_rpc", + "kb_store_pg", + "kb_wallet" + ] + }, + { + "name": "file_mainnet_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "*" + ] + }, + { + "name": "file_mainnet_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "*" + ] + }, + { + "name": "file_mainnet_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "*" + ] + }, + { + "name": "file_mainnet_app", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/app.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_app_demo_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_app_demo/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_app_demo_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_app_demo/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_app_demo_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_app_demo/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_app_demo" + ] + }, + { + "name": "file_kb_decoder_solana_core_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_decoder_solana_core/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_solana_core" + ] + }, + { + "name": "file_kb_decoder_solana_core_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_decoder_solana_core/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_solana_core" + ] + }, + { + "name": "file_kb_decoder_solana_core_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_decoder_solana_core/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_solana_core" + ] + }, + { + "name": "file_kb_decoder_spl_memo_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_decoder_spl_memo/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_memo" + ] + }, + { + "name": "file_kb_decoder_spl_memo_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_decoder_spl_memo/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_memo" + ] + }, + { + "name": "file_kb_decoder_spl_memo_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_decoder_spl_memo/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_memo" + ] + }, + { + "name": "file_kb_decoder_spl_associated_token_account_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_decoder_spl_associated_token_account/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_associated_token_account" + ] + }, + { + "name": "file_kb_decoder_spl_associated_token_account_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_decoder_spl_associated_token_account/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_associated_token_account" + ] + }, + { + "name": "file_kb_decoder_spl_associated_token_account_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_decoder_spl_associated_token_account/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_associated_token_account" + ] + }, + { + "name": "file_kb_decoder_spl_token_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_decoder_spl_token/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token" + ] + }, + { + "name": "file_kb_decoder_spl_token_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_decoder_spl_token/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token" + ] + }, + { + "name": "file_kb_decoder_spl_token_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_decoder_spl_token/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_token" + ] + }, + { + "name": "file_kb_executor_metadata_spl_name_service_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_metadata_spl_name_service/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_spl_name_service" + ] + }, + { + "name": "file_kb_executor_metadata_spl_name_service_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_metadata_spl_name_service/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_spl_name_service" + ] + }, + { + "name": "file_kb_executor_metadata_spl_name_service_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_metadata_spl_name_service/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_metadata_spl_name_service" + ] + }, + { + "name": "file_kb_executor_solana_core_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_solana_core/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_solana_core" + ] + }, + { + "name": "file_kb_executor_solana_core_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_solana_core/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_solana_core" + ] + }, + { + "name": "file_kb_executor_solana_core_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_solana_core/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_solana_core" + ] + }, + { + "name": "file_kb_execution_solana_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_execution_solana/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_execution_solana" + ] + }, + { + "name": "file_kb_execution_solana_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_execution_solana/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_execution_solana" + ] + }, + { + "name": "file_kb_execution_solana_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_execution_solana/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_execution_solana" + ] + }, + { + "name": "file_kb_executor_spl_account_compression_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_spl_account_compression/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_account_compression" + ] + }, + { + "name": "file_kb_executor_spl_account_compression_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_spl_account_compression/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_account_compression" + ] + }, + { + "name": "file_kb_executor_spl_account_compression_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_spl_account_compression/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_account_compression" + ] + }, + { + "name": "file_kb_executor_spl_memo_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_spl_memo/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_memo" + ] + }, + { + "name": "file_kb_executor_spl_memo_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_spl_memo/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_memo" + ] + }, + { + "name": "file_kb_executor_spl_memo_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_spl_memo/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_memo" + ] + }, + { + "name": "file_kb_executor_spl_associated_token_account_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_spl_associated_token_account/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_associated_token_account" + ] + }, + { + "name": "file_kb_executor_spl_associated_token_account_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_spl_associated_token_account/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_associated_token_account" + ] + }, + { + "name": "file_kb_executor_spl_associated_token_account_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_spl_associated_token_account/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_associated_token_account" + ] + }, + { + "name": "file_kb_executor_spl_token_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_spl_token/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token" + ] + }, + { + "name": "file_kb_executor_spl_token_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_spl_token/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token" + ] + }, + { + "name": "file_kb_executor_spl_token_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_spl_token/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_token" + ] + }, + { + "name": "file_kb_executor_spl_noop_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_spl_noop/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_noop" + ] + }, + { + "name": "file_kb_executor_spl_noop_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_spl_noop/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_noop" + ] + }, + { + "name": "file_kb_executor_spl_noop_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_spl_noop/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_noop" + ] + }, + { + "name": "file_kb_executor_spl_single_pool_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_spl_single_pool/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_single_pool" + ] + }, + { + "name": "file_kb_executor_spl_single_pool_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_spl_single_pool/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_single_pool" + ] + }, + { + "name": "file_kb_executor_spl_single_pool_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_spl_single_pool/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_single_pool" + ] + }, + { + "name": "file_kb_logging_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_logging/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_logging" + ] + }, + { + "name": "file_kb_logging_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_logging/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_logging" + ] + }, + { + "name": "file_kb_logging_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_logging/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_logging" + ] + }, + { + "name": "file_kb_materializer_admin_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_materializer_admin/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_admin" + ] + }, + { + "name": "file_kb_materializer_admin_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_materializer_admin/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_admin" + ] + }, + { + "name": "file_kb_materializer_admin_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_materializer_admin/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_admin" + ] + }, + { + "name": "file_kb_materializer_compliance_audit_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_materializer_compliance_audit/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_compliance_audit" + ] + }, + { + "name": "file_kb_materializer_compliance_audit_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_materializer_compliance_audit/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_compliance_audit" + ] + }, + { + "name": "file_kb_materializer_compliance_audit_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_materializer_compliance_audit/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_compliance_audit" + ] + }, + { + "name": "file_kb_materializer_lifecycle_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_materializer_lifecycle/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_lifecycle" + ] + }, + { + "name": "file_kb_materializer_lifecycle_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_materializer_lifecycle/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_lifecycle" + ] + }, + { + "name": "file_kb_materializer_lifecycle_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_materializer_lifecycle/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_lifecycle" + ] + }, + { + "name": "file_kb_materializer_transaction_annotations_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_materializer_transaction_annotations/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_transaction_annotations" + ] + }, + { + "name": "file_kb_materializer_transaction_annotations_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_materializer_transaction_annotations/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_transaction_annotations" + ] + }, + { + "name": "file_kb_materializer_transaction_annotations_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_materializer_transaction_annotations/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_transaction_annotations" + ] + }, + { + "name": "file_kb_materializer_staking_debug", + "enabled": true, + "level": "debug", + "format": "human", + "path": "logs/mainnet/kb_materializer_staking/debug.log", + "targets": [ + "kb_materializer_staking" + ], + "sink": "file", + "rotation": "daily", + "ansi": false + }, + { + "name": "file_kb_materializer_staking_info", + "enabled": true, + "level": "info", + "format": "human", + "path": "logs/mainnet/kb_materializer_staking/info.log", + "targets": [ + "kb_materializer_staking" + ], + "sink": "file", + "rotation": "daily", + "ansi": false + }, + { + "name": "file_kb_materializer_staking_error", + "enabled": true, + "level": "error", + "format": "json", + "path": "logs/mainnet/kb_materializer_staking/error.jsonl", + "targets": [ + "kb_materializer_staking" + ], + "sink": "file", + "rotation": "daily", + "ansi": false + }, + { + "name": "file_kb_pipeline_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_pipeline/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_pipeline" + ] + }, + { + "name": "file_kb_pipeline_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_pipeline/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_pipeline" + ] + }, + { + "name": "file_kb_pipeline_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_pipeline/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_pipeline" + ] + }, + { + "name": "file_kb_rpc_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_rpc/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_rpc" + ] + }, + { + "name": "file_kb_rpc_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_rpc/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_rpc" + ] + }, + { + "name": "file_kb_rpc_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_rpc/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_rpc" + ] + }, + { + "name": "file_kb_store_pg_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_store_pg/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_store_pg" + ] + }, + { + "name": "file_kb_store_pg_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_store_pg/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_store_pg" + ] + }, + { + "name": "file_kb_store_pg_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_store_pg/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_store_pg" + ] + }, + { + "name": "file_kb_wallet_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_wallet/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_wallet" + ] + }, + { + "name": "file_kb_wallet_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_wallet/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_wallet" + ] + }, + { + "name": "file_kb_wallet_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_wallet/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_wallet" + ] + }, + { + "name": "file_kb_materializer_token_accounts_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_materializer_token_accounts/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_token_accounts" + ] + }, + { + "name": "file_kb_materializer_token_accounts_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_materializer_token_accounts/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_token_accounts" + ] + }, + { + "name": "file_kb_materializer_token_accounts_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_materializer_token_accounts/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_token_accounts" + ] + }, + { + "name": "file_kb_materializer_risk_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_materializer_risk/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_risk" + ] + }, + { + "name": "file_kb_materializer_risk_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_materializer_risk/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_materializer_risk" + ] + }, + { + "name": "file_kb_materializer_risk_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_materializer_risk/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_materializer_risk" + ] + }, + { + "name": "file_kb_decoder_spl_token_2022_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_decoder_spl_token_2022/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token_2022" + ] + }, + { + "name": "file_kb_decoder_spl_token_2022_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_decoder_spl_token_2022/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_token_2022" + ] + }, + { + "name": "file_kb_decoder_spl_token_2022_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_decoder_spl_token_2022/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_token_2022" + ] + }, + { + "name": "file_kb_decoder_metadata_metaplex_token_metadata_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_decoder_metadata_metaplex_token_metadata/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_decoder_metadata_metaplex_token_metadata_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_decoder_metadata_metaplex_token_metadata/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_decoder_metadata_metaplex_token_metadata_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_decoder_metadata_metaplex_token_metadata/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_decoder_spl_elgamal_registry_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_decoder_spl_elgamal_registry/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_decoder_spl_elgamal_registry_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_decoder_spl_elgamal_registry/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_decoder_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_decoder_spl_elgamal_registry_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_decoder_spl_elgamal_registry/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_decoder_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_metadata_metaplex_token_metadata_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_metadata_metaplex_token_metadata/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_executor_metadata_metaplex_token_metadata_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_metadata_metaplex_token_metadata/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_executor_metadata_metaplex_token_metadata_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_metadata_metaplex_token_metadata/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_metadata_metaplex_token_metadata" + ] + }, + { + "name": "file_kb_executor_spl_elgamal_registry_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_spl_elgamal_registry/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_spl_elgamal_registry_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_spl_elgamal_registry/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_spl_elgamal_registry_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_spl_elgamal_registry/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_elgamal_registry" + ] + }, + { + "name": "file_kb_executor_spl_token_2022_debug", + "enabled": true, + "sink": "file", + "level": "debug", + "path": "logs/mainnet/kb_executor_spl_token_2022/debug.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token_2022" + ] + }, + { + "name": "file_kb_executor_spl_token_2022_info", + "enabled": true, + "sink": "file", + "level": "info", + "path": "logs/mainnet/kb_executor_spl_token_2022/info.log", + "rotation": "daily", + "format": "human", + "ansi": false, + "targets": [ + "kb_executor_spl_token_2022" + ] + }, + { + "name": "file_kb_executor_spl_token_2022_error", + "enabled": true, + "sink": "file", + "level": "error", + "path": "logs/mainnet/kb_executor_spl_token_2022/error.jsonl", + "rotation": "daily", + "format": "json", + "ansi": false, + "targets": [ + "kb_executor_spl_token_2022" + ] + } + ], + "target_filters": [ + { + "target": "hyper", + "level": "warn" + }, + { + "target": "reqwest", + "level": "warn" + }, + { + "target": "tao", + "level": "warn" + }, + { + "target": "wry", + "level": "warn" + } + ] + }, + "database": { + "enabled": true, + "backend": "postgres", + "postgres": { + "url": "postgres://solana:solana@localhost:5432/solana", + "max_connections": 16, + "connect_timeout_ms": 5000, + "auto_initialize_schema": true + }, + "sqlite": { + "path": "data/mainnet.sqlite", + "create_if_missing": true, + "busy_timeout_ms": 5000, + "max_connections": 1, + "auto_initialize_schema": true, + "use_wal": true + } + }, + "data": { + "wallets_directory": "wallets", + "logs_directory": "logs" + }, + "solana": { + "http_endpoints": [ + { + "name": "mainnet_public_http", + "enabled": true, + "provider": "solana-public", + "cluster": "mainnet-beta", + "url": "https://api.mainnet.solana.com", + "connect_timeout_ms": 4000, + "request_timeout_ms": 10000, + "max_idle_connections_per_host": 4, + "roles": [ + { + "role": "http_queries", + "enabled": true, + "request_kinds": [ + "get_account_info", + "get_balance", + "get_block_commitment", + "get_block_height", + "get_block_production", + "get_blocks", + "get_blocks_with_limit", + "get_cluster_nodes", + "get_epoch_info", + "get_epoch_schedule", + "get_fee_for_message", + "get_first_available_block", + "get_genesis_hash", + "get_health", + "get_highest_snapshot_slot", + "get_identity", + "get_inflation_governor", + "get_inflation_rate", + "get_inflation_reward", + "get_largest_accounts", + "get_latest_blockhash", + "get_leader_schedule", + "get_max_retransmit_slot", + "get_max_shred_insert_slot", + "get_minimum_balance_for_rent_exemption", + "get_multiple_accounts", + "get_recent_performance_samples", + "get_recent_prioritization_fees", + "get_signature_statuses", + "get_slot", + "get_slot_leader", + "get_slot_leaders", + "get_stake_activation", + "get_stake_minimum_delegation", + "get_supply", + "get_token_account_balance", + "get_token_accounts_by_delegate", + "get_token_accounts_by_owner", + "get_token_largest_accounts", + "get_token_supply", + "get_transaction_count", + "get_version", + "get_vote_accounts", + "is_blockhash_valid", + "request_airdrop" + ], + "priority": 50, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 3000 + }, + { + "role": "http_fallback", + "enabled": true, + "request_kinds": [ + "get_account_info", + "get_balance", + "get_block_commitment", + "get_block_height", + "get_block_production", + "get_blocks", + "get_blocks_with_limit", + "get_cluster_nodes", + "get_epoch_info", + "get_epoch_schedule", + "get_fee_for_message", + "get_first_available_block", + "get_genesis_hash", + "get_health", + "get_highest_snapshot_slot", + "get_identity", + "get_inflation_governor", + "get_inflation_rate", + "get_inflation_reward", + "get_largest_accounts", + "get_latest_blockhash", + "get_leader_schedule", + "get_max_retransmit_slot", + "get_max_shred_insert_slot", + "get_minimum_balance_for_rent_exemption", + "get_multiple_accounts", + "get_recent_performance_samples", + "get_recent_prioritization_fees", + "get_signature_statuses", + "get_slot", + "get_slot_leader", + "get_slot_leaders", + "get_stake_activation", + "get_stake_minimum_delegation", + "get_supply", + "get_token_account_balance", + "get_token_accounts_by_delegate", + "get_token_accounts_by_owner", + "get_token_largest_accounts", + "get_token_supply", + "get_transaction_count", + "get_version", + "get_vote_accounts", + "is_blockhash_valid", + "request_airdrop" + ], + "priority": 90, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 3000 + } + ] + }, + { + "name": "helius_primary_http", + "enabled": true, + "provider": "helius", + "cluster": "mainnet-beta", + "url": "https://mainnet.helius-rpc.com/?api-key=95e73621-b539-4a79-af39-3b0877a13857", + "connect_timeout_ms": 4000, + "request_timeout_ms": 10000, + "max_idle_connections_per_host": 8, + "roles": [ + { + "role": "http_queries", + "enabled": true, + "request_kinds": [ + "get_account_info", + "get_balance", + "get_block_commitment", + "get_block_height", + "get_block_production", + "get_blocks", + "get_blocks_with_limit", + "get_cluster_nodes", + "get_epoch_info", + "get_epoch_schedule", + "get_fee_for_message", + "get_first_available_block", + "get_genesis_hash", + "get_health", + "get_highest_snapshot_slot", + "get_identity", + "get_inflation_governor", + "get_inflation_rate", + "get_inflation_reward", + "get_largest_accounts", + "get_latest_blockhash", + "get_leader_schedule", + "get_max_retransmit_slot", + "get_max_shred_insert_slot", + "get_minimum_balance_for_rent_exemption", + "get_multiple_accounts", + "get_recent_performance_samples", + "get_recent_prioritization_fees", + "get_signature_statuses", + "get_slot", + "get_slot_leader", + "get_slot_leaders", + "get_stake_activation", + "get_stake_minimum_delegation", + "get_supply", + "get_token_account_balance", + "get_token_accounts_by_delegate", + "get_token_accounts_by_owner", + "get_token_largest_accounts", + "get_token_supply", + "get_transaction_count", + "get_version", + "get_vote_accounts", + "is_blockhash_valid", + "request_airdrop" + ], + "priority": 10, + "requests_per_second": 8, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 1500 + }, + { + "role": "http_heavy", + "enabled": true, + "request_kinds": [ + "get_block", + "get_program_accounts", + "get_signatures_for_address", + "get_transaction" + ], + "priority": 20, + "requests_per_second": 2, + "burst_capacity": 1, + "max_concurrent_requests": 2, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 1500 + }, + { + "role": "history_backfill", + "enabled": true, + "request_kinds": [ + "get_block", + "get_program_accounts", + "get_signatures_for_address", + "get_transaction" + ], + "priority": 30, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 1500 + }, + { + "role": "http_transactions", + "enabled": false, + "request_kinds": [ + "simulate_transaction", + "send_transaction", + "get_signature_statuses" + ], + "priority": 40, + "requests_per_second": 1, + "burst_capacity": 1, + "max_concurrent_requests": 1, + "max_subscriptions": 0, + "pause_after_rate_limit_ms": 3000 + } + ] + } + ], + "ws_endpoints": [ + { + "name": "mainnet_public_ws_slots", + "enabled": true, + "provider": "solana-public", + "cluster": "mainnet-beta", + "url": "wss://api.mainnet.solana.com", + "connect_timeout_ms": 5000, + "request_timeout_ms": 10000, + "unsubscribe_timeout_ms": 1500, + "write_channel_capacity": 256, + "event_channel_capacity": 1024, + "auto_reconnect": false, + "roles": [ + { + "role": "slot_notifications", + "enabled": true, + "request_kinds": [ + "slot_subscribe", + "slots_updates_subscribe" + ], + "priority": 10, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 16, + "pause_after_rate_limit_ms": 3000 + }, + { + "role": "root_notifications", + "enabled": true, + "request_kinds": [ + "root_subscribe" + ], + "priority": 20, + "requests_per_second": 4, + "burst_capacity": 8, + "max_concurrent_requests": 4, + "max_subscriptions": 16, + "pause_after_rate_limit_ms": 3000 + } + ] + }, + { + "name": "helius_primary_ws_programs", + "enabled": true, + "provider": "helius", + "cluster": "mainnet-beta", + "url": "wss://mainnet.helius-rpc.com/?api-key=95e73621-b539-4a79-af39-3b0877a13857", + "connect_timeout_ms": 5000, + "request_timeout_ms": 10000, + "unsubscribe_timeout_ms": 1500, + "write_channel_capacity": 512, + "event_channel_capacity": 4096, + "auto_reconnect": false, + "roles": [ + { + "role": "logs_subscribe", + "enabled": true, + "request_kinds": [ + "logs_subscribe_mentions" + ], + "priority": 10, + "requests_per_second": 2, + "burst_capacity": 4, + "max_concurrent_requests": 2, + "max_subscriptions": 128, + "pause_after_rate_limit_ms": 3000 + }, + { + "role": "program_subscribe", + "enabled": true, + "request_kinds": [ + "program_subscribe" + ], + "priority": 20, + "requests_per_second": 2, + "burst_capacity": 4, + "max_concurrent_requests": 2, + "max_subscriptions": 128, + "pause_after_rate_limit_ms": 3000 + }, + { + "role": "account_subscribe", + "enabled": true, + "request_kinds": [ + "account_subscribe" + ], + "priority": 30, + "requests_per_second": 2, + "burst_capacity": 4, + "max_concurrent_requests": 2, + "max_subscriptions": 128, + "pause_after_rate_limit_ms": 3000 + } + ] + } + ], + "listeners": { + "enabled": true, + "default_commitment": "confirmed", + "log_listeners": [ + { + "name": "pump_swap_logs", + "enabled": true, + "endpoint_role": "program_logs", + "program_id": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA", + "purpose": "Détecter les swaps, créations de pool et changements de liquidité Pump Swap." + }, + { + "name": "raydium_cpmm_logs", + "enabled": true, + "endpoint_role": "program_logs", + "program_id": "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C", + "purpose": "Détecter les créations de pools et swaps Raydium CPMM." + } + ], + "program_listeners": [ + { + "name": "pump_fun_program_accounts", + "enabled": true, + "endpoint_role": "program_logs", + "program_id": "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", + "purpose": "Détecter les changements de comptes utiles à la création ou migration de tokens Pump Fun." + } + ], + "account_listeners": [] + } + }, + "wallet": { + "wallet_dir": "wallets/temporary/mainnet", + "cluster": "mainnet-beta", + "temporary_wallet_enabled": false, + "temporary_wallet_alias": "mainnet-disabled", + "temporary_wallet_persist": false, + "localnet_send_enabled": false, + "devnet_send_enabled": false, + "testnet_send_enabled": false, + "mainnet_send_enabled": false + }, + "execution": { + "dry_run_default": true, + "require_simulation": true, + "require_operator_confirmation": true, + "localnet_max_spend_lamports": 0, + "devnet_max_spend_lamports": 0, + "testnet_max_spend_lamports": 0, + "mainnet_max_spend_lamports": 0, + "max_fee_lamports": 1000000, + "max_compute_unit_price_micro_lamports": 100000, + "recent_blockhash_max_age_slots": 150, + "send_max_retries": 3, + "confirmation_poll_interval_ms": 500, + "confirmation_max_attempts": 120, + "devnet_airdrop_max_lamports": 0 + }, + "demo": { + "live_demo_enabled": true, + "trading_demo_enabled": false + } + } + ] +} diff --git a/olddocs/archivekbot2/config/schema.config.json b/olddocs/archivekbot2/config/schema.config.json new file mode 100644 index 0000000..984b88b --- /dev/null +++ b/olddocs/archivekbot2/config/schema.config.json @@ -0,0 +1,774 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://khadhroony.local/schema/config.schema.json", + "title": "Khadhroony Bot2 configuration", + "type": "object", + "additionalProperties": false, + "required": [ + "active_profile", + "profiles" + ], + "properties": { + "active_profile": { + "$ref": "#/$defs/non_empty_string" + }, + "profiles": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/profile" + } + } + }, + "$defs": { + "non_empty_string": { + "type": "string", + "minLength": 1 + }, + "log_level": { + "type": "string", + "enum": [ + "trace", + "debug", + "info", + "warn", + "error", + "off" + ] + }, + "profile": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "app", + "logging", + "database", + "data", + "solana", + "wallet", + "execution", + "demo" + ], + "properties": { + "name": { + "$ref": "#/$defs/non_empty_string" + }, + "app": { + "$ref": "#/$defs/app_section" + }, + "logging": { + "$ref": "#/$defs/logging" + }, + "database": { + "$ref": "#/$defs/database" + }, + "data": { + "$ref": "#/$defs/data" + }, + "solana": { + "$ref": "#/$defs/solana" + }, + "wallet": { + "$ref": "#/$defs/wallet" + }, + "execution": { + "$ref": "#/$defs/execution" + }, + "demo": { + "$ref": "#/$defs/demo" + } + } + }, + "app_section": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "environment", + "auto_reconnect_default" + ], + "properties": { + "name": { + "$ref": "#/$defs/non_empty_string" + }, + "environment": { + "$ref": "#/$defs/non_empty_string" + }, + "auto_reconnect_default": { + "type": "boolean" + } + } + }, + "logging": { + "type": "object", + "additionalProperties": false, + "required": [ + "default_level", + "targets", + "target_filters" + ], + "properties": { + "default_level": { + "$ref": "#/$defs/log_level" + }, + "targets": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/log_target" + } + }, + "target_filters": { + "type": "array", + "items": { + "$ref": "#/$defs/log_target_filter" + } + } + } + }, + "log_target": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "enabled", + "sink", + "level", + "path", + "rotation", + "format", + "ansi", + "targets" + ], + "properties": { + "name": { + "$ref": "#/$defs/non_empty_string" + }, + "enabled": { + "type": "boolean" + }, + "sink": { + "type": "string", + "enum": [ + "console", + "file" + ] + }, + "level": { + "$ref": "#/$defs/log_level" + }, + "path": { + "type": "string" + }, + "rotation": { + "type": "string", + "enum": [ + "none", + "never", + "daily", + "hourly" + ] + }, + "format": { + "type": "string", + "enum": [ + "human", + "compact", + "pretty", + "json" + ] + }, + "ansi": { + "type": "boolean" + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/$defs/non_empty_string" + } + } + } + }, + "log_target_filter": { + "type": "object", + "additionalProperties": false, + "required": [ + "target", + "level" + ], + "properties": { + "target": { + "$ref": "#/$defs/non_empty_string" + }, + "level": { + "$ref": "#/$defs/log_level" + } + } + }, + "database": { + "type": "object", + "additionalProperties": false, + "required": [ + "enabled", + "backend", + "postgres", + "sqlite" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "backend": { + "type": "string", + "enum": [ + "postgres", + "sqlite" + ] + }, + "postgres": { + "$ref": "#/$defs/postgres" + }, + "sqlite": { + "$ref": "#/$defs/sqlite" + } + } + }, + "postgres": { + "type": "object", + "additionalProperties": false, + "required": [ + "url", + "max_connections", + "connect_timeout_ms", + "auto_initialize_schema" + ], + "properties": { + "url": { + "$ref": "#/$defs/non_empty_string" + }, + "max_connections": { + "type": "integer", + "minimum": 1 + }, + "connect_timeout_ms": { + "type": "integer", + "minimum": 1 + }, + "auto_initialize_schema": { + "type": "boolean" + } + } + }, + "sqlite": { + "type": "object", + "additionalProperties": false, + "required": [ + "path", + "create_if_missing", + "busy_timeout_ms", + "max_connections", + "auto_initialize_schema", + "use_wal" + ], + "properties": { + "path": { + "$ref": "#/$defs/non_empty_string" + }, + "create_if_missing": { + "type": "boolean" + }, + "busy_timeout_ms": { + "type": "integer", + "minimum": 1 + }, + "max_connections": { + "type": "integer", + "minimum": 1 + }, + "auto_initialize_schema": { + "type": "boolean" + }, + "use_wal": { + "type": "boolean" + } + } + }, + "data": { + "type": "object", + "additionalProperties": false, + "required": [ + "wallets_directory", + "logs_directory" + ], + "properties": { + "wallets_directory": { + "$ref": "#/$defs/non_empty_string" + }, + "logs_directory": { + "$ref": "#/$defs/non_empty_string" + } + } + }, + "solana": { + "type": "object", + "additionalProperties": false, + "required": [ + "http_endpoints", + "ws_endpoints", + "listeners" + ], + "properties": { + "http_endpoints": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/http_endpoint" + } + }, + "ws_endpoints": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/ws_endpoint" + } + }, + "listeners": { + "$ref": "#/$defs/listeners" + } + } + }, + "http_endpoint": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "enabled", + "provider", + "cluster", + "url", + "connect_timeout_ms", + "request_timeout_ms", + "max_idle_connections_per_host", + "roles" + ], + "properties": { + "name": { + "$ref": "#/$defs/non_empty_string" + }, + "enabled": { + "type": "boolean" + }, + "provider": { + "$ref": "#/$defs/non_empty_string" + }, + "cluster": { + "$ref": "#/$defs/non_empty_string" + }, + "url": { + "type": "string", + "pattern": "^https?://" + }, + "connect_timeout_ms": { + "type": "integer", + "minimum": 1 + }, + "request_timeout_ms": { + "type": "integer", + "minimum": 1 + }, + "max_idle_connections_per_host": { + "type": "integer", + "minimum": 1 + }, + "roles": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/endpoint_role" + } + } + } + }, + "ws_endpoint": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "enabled", + "provider", + "cluster", + "url", + "connect_timeout_ms", + "request_timeout_ms", + "unsubscribe_timeout_ms", + "write_channel_capacity", + "event_channel_capacity", + "auto_reconnect", + "roles" + ], + "properties": { + "name": { + "$ref": "#/$defs/non_empty_string" + }, + "enabled": { + "type": "boolean" + }, + "provider": { + "$ref": "#/$defs/non_empty_string" + }, + "cluster": { + "$ref": "#/$defs/non_empty_string" + }, + "url": { + "type": "string", + "pattern": "^wss?://" + }, + "connect_timeout_ms": { + "type": "integer", + "minimum": 1 + }, + "request_timeout_ms": { + "type": "integer", + "minimum": 1 + }, + "unsubscribe_timeout_ms": { + "type": "integer", + "minimum": 1 + }, + "write_channel_capacity": { + "type": "integer", + "minimum": 1 + }, + "event_channel_capacity": { + "type": "integer", + "minimum": 1 + }, + "auto_reconnect": { + "type": "boolean" + }, + "roles": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/endpoint_role" + } + } + } + }, + "endpoint_role": { + "type": "object", + "additionalProperties": false, + "required": [ + "role", + "enabled", + "request_kinds", + "priority", + "requests_per_second", + "burst_capacity", + "max_concurrent_requests", + "max_subscriptions", + "pause_after_rate_limit_ms" + ], + "properties": { + "role": { + "$ref": "#/$defs/non_empty_string" + }, + "enabled": { + "type": "boolean" + }, + "request_kinds": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/non_empty_string" + } + }, + "priority": { + "type": "integer" + }, + "requests_per_second": { + "type": "integer", + "minimum": 1 + }, + "burst_capacity": { + "type": "integer", + "minimum": 1 + }, + "max_concurrent_requests": { + "type": "integer", + "minimum": 1 + }, + "max_subscriptions": { + "type": "integer" + }, + "pause_after_rate_limit_ms": { + "type": "integer", + "minimum": 1 + } + } + }, + "listeners": { + "type": "object", + "additionalProperties": false, + "required": [ + "enabled", + "default_commitment", + "log_listeners", + "program_listeners", + "account_listeners" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "default_commitment": { + "$ref": "#/$defs/non_empty_string" + }, + "log_listeners": { + "type": "array", + "items": { + "$ref": "#/$defs/log_listener" + } + }, + "program_listeners": { + "type": "array", + "items": { + "$ref": "#/$defs/program_listener" + } + }, + "account_listeners": { + "type": "array", + "items": { + "$ref": "#/$defs/account_listener" + } + } + } + }, + "log_listener": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "enabled", + "endpoint_role", + "program_id", + "purpose" + ], + "properties": { + "name": { + "$ref": "#/$defs/non_empty_string" + }, + "enabled": { + "type": "boolean" + }, + "endpoint_role": { + "$ref": "#/$defs/non_empty_string" + }, + "program_id": { + "$ref": "#/$defs/non_empty_string" + }, + "purpose": { + "$ref": "#/$defs/non_empty_string" + } + } + }, + "program_listener": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "enabled", + "endpoint_role", + "program_id", + "purpose" + ], + "properties": { + "name": { + "$ref": "#/$defs/non_empty_string" + }, + "enabled": { + "type": "boolean" + }, + "endpoint_role": { + "$ref": "#/$defs/non_empty_string" + }, + "program_id": { + "$ref": "#/$defs/non_empty_string" + }, + "purpose": { + "$ref": "#/$defs/non_empty_string" + } + } + }, + "account_listener": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "enabled", + "endpoint_role", + "account_pubkey", + "purpose" + ], + "properties": { + "name": { + "$ref": "#/$defs/non_empty_string" + }, + "enabled": { + "type": "boolean" + }, + "endpoint_role": { + "$ref": "#/$defs/non_empty_string" + }, + "account_pubkey": { + "$ref": "#/$defs/non_empty_string" + }, + "purpose": { + "$ref": "#/$defs/non_empty_string" + } + } + }, + "wallet": { + "type": "object", + "additionalProperties": false, + "required": [ + "wallet_dir", + "cluster", + "temporary_wallet_enabled", + "temporary_wallet_alias", + "temporary_wallet_persist", + "localnet_send_enabled", + "devnet_send_enabled", + "testnet_send_enabled", + "mainnet_send_enabled" + ], + "properties": { + "wallet_dir": { + "$ref": "#/$defs/non_empty_string" + }, + "cluster": { + "$ref": "#/$defs/non_empty_string" + }, + "temporary_wallet_enabled": { + "type": "boolean" + }, + "temporary_wallet_alias": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$" + }, + "temporary_wallet_persist": { + "type": "boolean" + }, + "localnet_send_enabled": { + "type": "boolean" + }, + "devnet_send_enabled": { + "type": "boolean" + }, + "testnet_send_enabled": { + "type": "boolean" + }, + "mainnet_send_enabled": { + "type": "boolean" + } + } + }, + "execution": { + "type": "object", + "additionalProperties": false, + "required": [ + "dry_run_default", + "require_simulation", + "require_operator_confirmation", + "localnet_max_spend_lamports", + "devnet_max_spend_lamports", + "testnet_max_spend_lamports", + "mainnet_max_spend_lamports", + "max_fee_lamports", + "max_compute_unit_price_micro_lamports", + "recent_blockhash_max_age_slots", + "send_max_retries", + "confirmation_poll_interval_ms", + "confirmation_max_attempts", + "devnet_airdrop_max_lamports" + ], + "properties": { + "dry_run_default": { + "type": "boolean" + }, + "require_simulation": { + "type": "boolean" + }, + "require_operator_confirmation": { + "type": "boolean" + }, + "localnet_max_spend_lamports": { + "type": "integer", + "minimum": 0 + }, + "devnet_max_spend_lamports": { + "type": "integer", + "minimum": 0 + }, + "testnet_max_spend_lamports": { + "type": "integer", + "minimum": 0 + }, + "mainnet_max_spend_lamports": { + "type": "integer", + "minimum": 0 + }, + "max_fee_lamports": { + "type": "integer", + "minimum": 1 + }, + "max_compute_unit_price_micro_lamports": { + "type": "integer", + "minimum": 0 + }, + "recent_blockhash_max_age_slots": { + "type": "integer", + "minimum": 1 + }, + "send_max_retries": { + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + }, + "confirmation_poll_interval_ms": { + "type": "integer", + "minimum": 1, + "maximum": 60000 + }, + "confirmation_max_attempts": { + "type": "integer", + "minimum": 1, + "maximum": 10000 + }, + "devnet_airdrop_max_lamports": { + "type": "integer", + "minimum": 0 + } + } + }, + "demo": { + "type": "object", + "additionalProperties": false, + "required": [ + "live_demo_enabled", + "trading_demo_enabled" + ], + "properties": { + "live_demo_enabled": { + "type": "boolean" + }, + "trading_demo_enabled": { + "type": "boolean" + } + } + } + } +} diff --git a/olddocs/archivekbot2/docs/ACCOUNT_ONLY_CANDIDATES.md b/olddocs/archivekbot2/docs/ACCOUNT_ONLY_CANDIDATES.md new file mode 100644 index 0000000..b235af9 --- /dev/null +++ b/olddocs/archivekbot2/docs/ACCOUNT_ONLY_CANDIDATES.md @@ -0,0 +1,25 @@ + + + +# Candidats qui ne sont pas encore des program_id + +Certains identifiants vus dans les explorateurs peuvent être des comptes de configuration, de pool, d'autorité, de registre, de vault ou de PDA. Ils ne doivent pas devenir des crates de décodeur tant que leur owner executable n'est pas prouvé. + +## Bags + +| Identifiant | Source supposée | Statut | Décision | +|------------------------------------------------|-----------------|-----------------------|-----------------------------------------------------------------------------------------------------------| +| `BAGSB9TpGrZxQbEsrEznv5jXXdwyP6AXerN8aVRiAmcv` | Bags | `account_not_program` | Ne pas créer `kb_decoder_bags` comme surface canonique tant que le vrai `program_id` n'est pas identifié. | + +## Règle + +Avant de créer une crate de décodeur : + +1. vérifier que l'adresse est bien un programme exécutable ; +2. vérifier l'owner et les transactions qui l'invoquent ; +3. rattacher les comptes non exécutables à leur `program_id` propriétaire ; +4. documenter les comptes importants dans une matrice séparée du registre des programmes. + +## Bags Fee Share + +Les programmes Fee Share V1/V2 sont maintenant documentés dans `docs/BAGS_FM.md`. Le compte `BAGSB9TpGrZxQbEsrEznv5jXXdwyP6AXerN8aVRiAmcv` reste un compte observé, pas une surface exécutable canonique. diff --git a/olddocs/archivekbot2/docs/AGAVE_LOCAL_NODE.md b/olddocs/archivekbot2/docs/AGAVE_LOCAL_NODE.md new file mode 100644 index 0000000..e7b3361 --- /dev/null +++ b/olddocs/archivekbot2/docs/AGAVE_LOCAL_NODE.md @@ -0,0 +1,210 @@ + + + +# Nœud Agave local expérimental + +Ce document cadre le jalon `0.3.x`. L'objectif est de mesurer si un nœud Agave local non votant peut devenir une source temps réel utile avant de construire l'ingestion, le backfill et l'extracteur raw vers core en `0.4.x`. + +## Positionnement + +`khadhroony-bot2` ne doit pas embarquer un validateur. Le validateur reste un process externe démarré manuellement ou par script de développement. + +```text +agave-validator local non votant + -> HTTP RPC local + -> WebSocket RPC local + -> demo_ws ou future démo Agave + -> mesures de capacité et de retard + -> décision pour l'ingestion 0.4.x +``` + +Le jalon `0.3.x` est une phase de recherche. Il ne doit pas écrire de raw de production, ne doit pas extraire vers core et ne doit pas déclencher d'achat/revente. + +## Hypothèse à tester + +Un nœud local Agave non votant avec ledger pruné pourrait permettre : + +- `blockSubscribe` local avec transactions complètes ; +- moins de `getTransaction` temps réel ; +- moins de listeners par programme ; +- filtrage local par program id, logs, instructions, balances et discriminators ; +- usage des providers externes surtout pour backfill historique, réparation et `sendTransaction`. + +Cette hypothèse doit être mesurée. Elle ne doit pas devenir une décision d'architecture sans chiffres locaux. + +## Commande de départ + +La commande exacte dépend de la version Agave installée, du snapshot disponible, des ports libres et des ressources locales. La commande de départ à documenter et ajuster est : + +```bash +agave-validator \ + --no-voting \ + --full-rpc-api \ + --enable-rpc-transaction-history \ + --rpc-pubsub-enable-block-subscription \ + --limit-ledger-size \ + --ledger ./data/agave-ledger \ + --accounts ./data/agave-accounts \ + --rpc-port 8899 \ + --dynamic-port-range 8000-8020 +``` + +`` est une limite de shreds, pas une durée exacte ni un nombre exact de blocks. La fenêtre réellement conservée dépend du débit réseau, de la purge, des snapshots, de la vitesse disque et de l'état local du nœud. + +## Préparation locale + +Créer les dossiers explicitement pour éviter de mélanger le ledger expérimental avec d'autres données : + +```bash +mkdir -p ./data/agave-ledger ./data/agave-accounts ./logs/agave_local_research +``` + +Avant chaque essai, noter : + +```text +version agave-validator +commande exacte +valeur N_SHREDS +heure de lancement +état initial du dossier ledger +état initial du dossier accounts +profil de configuration utilisé +endpoint externe de référence +``` + +Ne pas supprimer automatiquement `./data/agave-ledger` ou `./data/agave-accounts` dans le projet. Toute purge doit rester une action manuelle et documentée dans le compte rendu d'essai. + +## Profil de configuration + +`config/example.config.json` contient le profil `agave_local_research`, non actif par défaut. + +```text +HTTP local: http://127.0.0.1:8899 +WS local: ws://127.0.0.1:8900 +``` + +Pour l'utiliser, changer `active_profile` dans un fichier local non versionné ou lancer l'application avec `KB_CONFIG_PATH` pointant vers une copie locale. + +Le profil expose les rôles suivants : + +| Rôle | Usage | +|----------------------|-----------------------------------------------------------| +| `local_node_status` | santé, version et retard du nœud local | +| `http_queries` | lectures RPC légères locales | +| `http_heavy` | `getBlock`, `getTransaction`, `getProgramAccounts` locaux | +| `block_stream` | probe `blockSubscribe` local | +| `slot_notifications` | `slotSubscribe`, `slotsUpdatesSubscribe`, `rootSubscribe` | +| `logs_subscribe` | `logsSubscribe` par mention de programme | +| `program_subscribe` | `programSubscribe` par programme | +| `account_subscribe` | `accountSubscribe` par compte précis | + +Le fallback externe est volontairement séparé. Il ne doit pas masquer un échec local pendant les mesures. + +## Probes minimaux + +Les probes `0.3.2` devront couvrir au minimum : + +| Famille | Méthode | Résultat attendu | +|---------|-------------------------------------------------|--------------------------------------------------| +| HTTP | `getVersion` | version du nœud ou erreur explicite | +| HTTP | `getHealth` | état du nœud ou erreur explicite | +| HTTP | `getSlot` | slot local | +| HTTP | `getBlockHeight` | block height local | +| HTTP | `getMaxShredInsertSlot` | slot maximal de shred inséré | +| WS | `blockSubscribe` avec `transactionDetails=none` | `supported`, `unsupported`, `timeout` ou `error` | +| WS | `slotSubscribe` | subscription id puis notifications | +| WS | `slotsUpdatesSubscribe` | subscription id puis notifications | +| WS | `rootSubscribe` | subscription id puis notifications | +| WS | `logsSubscribe` `mentions` | subscription id ou refus provider | +| WS | `programSubscribe` | subscription id ou refus provider | +| WS | `accountSubscribe` | subscription id ou refus provider | + +Le probe minimal `blockSubscribe` ne doit pas laisser un flux ouvert : + +```text +1. ouvrir la WebSocket ; +2. envoyer blockSubscribe avec transactionDetails=none ; +3. attendre un subscription id ou une erreur ; +4. désabonner immédiatement ; +5. classer supported / unsupported / timeout / error ; +6. journaliser la réponse brute tronquée si nécessaire. +``` + +Paramètres de départ à tester dans `demo_ws` : + +```text +role: block_stream +method: blockSubscribe +filterJson: "all" +configJson: {"commitment":"confirmed","encoding":"json","transactionDetails":"none","showRewards":false} +``` + +Si `"all"` est refusé par la version RPC testée, documenter l'erreur et tester ensuite un filtre plus ciblé par programme dans `0.3.4`. + +## Mesures à collecter + +| Mesure | Commande ou source indicative | Rôle | +|-----------------------------|----------------------------------------------|-----------------------------------| +| taille ledger | `du -sh ./data/agave-ledger` | calibrer `--limit-ledger-size` | +| taille accounts | `du -sh ./data/agave-accounts` | vérifier le coût disque | +| CPU | `pidstat`, `top`, `htop` | mesurer le coût du nœud local | +| RAM | `pidstat`, `free`, `ps` | vérifier la faisabilité locale | +| réseau RX/TX | `nload`, `iftop`, `/proc/net/dev` | mesurer le coût mainnet | +| slot local | `getSlot` local | vérifier l'avancement | +| slot externe | `getSlot` provider de référence | calculer le retard | +| lag slots | slot externe moins slot local | détecter un décrochage | +| lag secondes | lag slots multiplié par estimation slot time | estimer l'impact trading | +| débit WebSocket | compte notifications par seconde | comparer les modes live | +| taille moyenne notification | taille texte JSON ou bytes WS | dimensionner raw_ws_notifications | +| reconnects | logs `kb_app_demo.demo_ws` et nœud | détecter l'instabilité | +| erreurs provider ou Agave | logs et réponses JSON-RPC | classer les limites | + +La mesure de lag secondes reste approximative tant que le slot time local n'est pas calculé sur fenêtre glissante. Le chiffre utile pour la décision reste le couple `lag slots` plus `lag secondes estimées`. + +## Erreurs à documenter sans les masquer + +| Catégorie | Exemples à noter | +|------------|---------------------------------------------------------------------------------------------| +| snapshot | téléchargement lent, snapshot incompatible, absence de snapshot | +| ledger | corruption, purge trop agressive, croissance disque excessive | +| accounts | croissance inattendue, I/O saturée, chemin invalide | +| ports | `8899` occupé, port WS indisponible, `dynamic-port-range` trop étroit | +| ressources | CPU saturé, RAM insuffisante, disque saturé, réseau insuffisant | +| retard | slot local qui n'avance plus, lag croissant, root très en retard | +| RPC | méthode non supportée, timeouts, erreurs JSON-RPC | +| WebSocket | connexion refusée, fermeture serveur, subscription refusée, notifications trop volumineuses | + +Un essai qui échoue est exploitable s'il indique précisément la commande, le contexte, l'erreur et la ressource bloquante. + +## Table de résultats à remplir + +| Date | Agave | N_SHREDS | durée | ledger | accounts | CPU moy/max | RAM moy/max | RX/TX | slot local | slot réf. | lag slots | lag sec. | blockSubscribe none | remarques | +|-----------|-----------|-----------|-----------|-----------|-----------|-------------|-------------|-----------|------------|-----------|-----------|-----------|---------------------|-----------| +| À remplir | À remplir | À remplir | À remplir | À remplir | À remplir | À remplir | À remplir | À remplir | À remplir | À remplir | À remplir | À remplir | À remplir | À remplir | + +## Critères de décision pour `0.4.x` + +Le nœud local peut être retenu comme source live principale uniquement si les conditions suivantes sont mesurées : + +- le slot local suit l'endpoint externe avec un retard stable et acceptable ; +- le ledger et les accounts restent soutenables sur le disque local ; +- `blockSubscribe` est supporté et stable avec au moins `transactionDetails=none` ; +- le mode `full` ou `signatures` ne bloque pas la WebView ni le process Rust lorsqu'il sera testé ; +- les reconnects et timeouts restent rares ou récupérables ; +- un fallback externe reste disponible pour backfill, réparation et envoi de transaction. + +Si une de ces conditions échoue, `0.4.x` doit privilégier `slotSubscribe + getBlock`, les listeners ciblés ou une stratégie hybride, sans dépendance obligatoire à Agave local. + +## Sortie attendue de `0.3.x` + +La fin de `0.3.x` doit produire une décision documentée : + +```text +source temps réel principale retenue +fallback temps réel retenu +politique raw_ws_notifications +faisabilité du nœud local +limites ressources observées +prochain design de l'ingestion 0.4.x +``` + diff --git a/olddocs/archivekbot2/docs/APPLICATION_CRATES.md b/olddocs/archivekbot2/docs/APPLICATION_CRATES.md new file mode 100644 index 0000000..2a060af --- /dev/null +++ b/olddocs/archivekbot2/docs/APPLICATION_CRATES.md @@ -0,0 +1,28 @@ + + + +# Crates applicatifs + +Les crates applicatifs sont les points d'entrée exécutables ou Tauri du workspace. Ils orchestrent les crates internes mais ne portent pas la logique métier profonde. + +## Nomenclature + +- Les applications ponctuelles ou interactives utilisent le préfixe `kb_app_`. +- `kb_app_cli` contient les commandes de contrôle, import, replay et diagnostic. +- `kb_app_demo` contient la démonstration Tauri. +- `kb_worker` est l'exception autorisée, car il représente un processus de travail long-running. + +## Responsabilités autorisées + +- Lire la configuration. +- Initialiser `kb_logging`. +- Appeler les APIs publiques de `kb_pipeline`. +- Afficher ou exposer les résultats. +- Retourner des codes de sortie ou événements UI. + +## Responsabilités interdites + +- Décoder directement une instruction DEX. +- Écrire directement dans PostgreSQL sans passer par les traits de stockage. +- Réimplémenter les règles de matérialisation. +- Charger ou manipuler des secrets wallet hors `kb_wallet`. diff --git a/olddocs/archivekbot2/docs/ARCHITECTURE.md b/olddocs/archivekbot2/docs/ARCHITECTURE.md new file mode 100644 index 0000000..dcb96ec --- /dev/null +++ b/olddocs/archivekbot2/docs/ARCHITECTURE.md @@ -0,0 +1,108 @@ + + + +# Architecture + +L'architecture cible est organisée en couches strictes afin d'éviter de recréer un monolithe. Les noms `raw`, `core`, `obs`, `decode`, `mat`, `agg` et `ops` désignent des couches logiques, pas des schémas PostgreSQL applicatifs. + +## Chaîne principale + +```text +sources RPC HTTP / WebSocket / gRPC + -> kb_rpc + -> kb_model transaction canonique + -> raw + -> core + -> obs + -> decode + -> mat + -> agg + -> strategy + -> execution + +sources historiques déjà indexées + -> kb_external_sources + -> candidats de signatures + -> kb_pipeline + -> hydratation canonique via kb_rpc +``` + +## Responsabilités + +- `kb_rpc` gère les méthodes et flux RPC Solana : JSON-RPC HTTP, WebSocket, Helius/LaserStream et Yellowstone gRPC lorsque ces surfaces seront activées. +- `kb_external_sources` est une crate future réservée aux APIs REST, exports et imports historiques externes, par exemple Solscan Pro ou un CSV officiel. Elle ne produit jamais directement une transaction canonique et ne doit pas être confondue avec un futur index interne PostgreSQL. +- `kb_pipeline` combine la découverte de signatures par `kb_rpc` ou `kb_external_sources` avec l’hydratation canonique par `kb_rpc`. +- `kb_model` définit la transaction Solana canonique indépendante du fournisseur. +- `raw` conserve une transaction canonique unique et rejouable par signature. +- `obs` conserve les observations techniques de source, programme, instruction et discriminator. +- `core` expose les structures Solana normalisées pour les décodeurs. +- `decode` contient les événements protocolairement compris. +- `mat` contient les projections métier. +- `agg` contient les agrégations temporelles ou analytiques. +- `ops` trace les modules, versions et traitements. + +## Acquisition multi-source + +```text +getTransaction JSON-RPC +transactionSubscribe Helius +Yellowstone gRPC +logsSubscribe + hydration + | + v +transaction canonique identique +``` + +Les détails de fournisseur restent dans `kb_sol_obs_transaction_observations`. Ils ne contaminent pas les décodeurs ni les tables core. + +`kb_rpc` ne doit pas être renommée en `kb_com` ou `kb_transport` pour accueillir des sources historiques externes. Ces noms seraient trop génériques et mélangeraient RPC Solana, APIs REST indexées, imports CSV et orchestration métier. Le nom `kb_external_sources` évite la confusion avec l’indexation locale et décrit explicitement une frontière de fournisseurs externes plutôt qu’une simple action de récupération. Si des primitives HTTP réellement communes apparaissent plus tard, elles pourront être extraites dans une crate technique dédiée sans modifier la frontière fonctionnelle entre `kb_rpc` et `kb_external_sources`. + +## Convention DB associée + +Quand une couche logique devient une table Solana PostgreSQL, elle est encodée dans le nom de table : + +```text +kb_sol__ +``` + +Exemples : + +```text +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +kb_sol_core_transactions +kb_sol_obs_program_observations +kb_sol_decode_decoded_events +kb_sol_mat_trade_events +kb_sol_ops_processing_ledger +``` + +Les formes qualifiées héritées, écrites ici avec `DOT` (`raw DOT sol_transactions`, `core DOT sol_instructions`, `obs DOT program_observations`), sont interdites. + +## Frontières interdites + +- Un décodeur ne dépend pas du store concret. +- Un décodeur ne dépend pas du fournisseur ou du transport d’acquisition. +- Un matérialisateur ne dépend pas du RPC. +- Le wallet ne dépend pas des décodeurs. +- L'application de démonstration ne doit pas contourner les APIs de pipeline. +- Une observation de source ne doit pas dupliquer le payload canonique complet. + +## Frontière extraction canonique vers core + +Depuis `0.3.4`, `kb_pipeline` contient un extracteur pur qui dépend de `kb_model` et des contrats `kb_store_core`, mais pas de PostgreSQL ni de Tauri. `kb_store_pg` implémente la transaction atomique et `kb_app_demo` ne fait qu’orchestrer la requête opérateur. + +```text +kb_model::CanonicalTransaction + | + v +kb_pipeline::core_extraction + | CoreExtractionBundle + v +kb_store_core::CoreExtractionStore + | + v +kb_store_pg::PostgresStore +``` + +Les futurs décodeurs consommeront les inputs core contextualisés ; ils ne reliront pas directement le JSON canonique pour reconstruire les comptes, CPI, logs ou balances. diff --git a/olddocs/archivekbot2/docs/BACKFILL_HTTP.md b/olddocs/archivekbot2/docs/BACKFILL_HTTP.md new file mode 100644 index 0000000..db6ce6f --- /dev/null +++ b/olddocs/archivekbot2/docs/BACKFILL_HTTP.md @@ -0,0 +1,145 @@ + + + +# Backfill HTTP transactionnel + +## Objectif + +Le jalon `0.3.3` fournit un moteur de backfill réutilisable qui transforme les réponses HTTP Solana standard en transactions canoniques indépendantes du fournisseur. + +```text +signatures explicites +ou getSignaturesForAddress + -> getTransaction + -> kb_model::CanonicalTransaction + -> kb_sol_raw_transactions + -> kb_sol_obs_transaction_observations +``` + +Aucun décodeur DEX, aucune extraction core et aucune source temps réel payante ne sont exécutés dans ce jalon. + +## Sources de signatures + +Le moteur accepte quatre catégories : + +- liste explicite de signatures, une signature par ligne ; +- historique d’un `program_id` ; +- historique d’un mint de token ; +- historique d’une adresse de pool. + +Les trois modes par adresse utilisent la même méthode standard `getSignaturesForAddress`. La catégorie est conservée dans le `filter_code` des observations afin de distinguer `program_before`, `program_after`, `program_latest`, et les équivalents token/pool. + +## Sens de pagination + +### Avant une signature + +Avec une ancre, le paramètre RPC `before` sélectionne les transactions plus anciennes que cette signature. Sans ancre, le mode `Before` omet `before` et commence sur la page la plus récente retournée par le RPC. Le moteur poursuit la pagination jusqu’à atteindre la limite demandée, une page incomplète, la limite de pages ou une demande d’arrêt. + +### Après une signature + +Le moteur transmet directement la signature d’ancrage dans le paramètre RPC `until`. Les pages suivantes combinent le même `until` avec un curseur `before` correspondant à la dernière signature de la page précédente. + +Le mode `after` utilise des pages RPC de 1 000 signatures afin que la limite par défaut de 20 pages puisse couvrir jusqu’à 20 000 signatures plus récentes que l’ancre. Le moteur ne conserve que les `X` candidates les plus proches de l’ancre, en plus de l’ensemble de déduplication borné par `max_pages × 1 000`. + +Une page incomplète signifie que la borne `until` a été atteinte. Si toutes les pages autorisées sont pleines, la campagne échoue avec le nombre de signatures inspectées et demande d’augmenter `max_pages`. Une erreur RPC de borne inconnue est propagée sans être transformée en résultat vide. + +## Limites et retries + +Le moteur combine : + +- les limites saisies par l’opérateur ; +- `requests_per_second` du rôle sélectionné ; +- `max_concurrent_requests` du rôle sélectionné ; +- `pause_after_rate_limit_ms` après une erreur 429 ; +- un backoff borné pour les autres erreurs temporaires. + +Le rôle HTTP doit supporter à la fois : + +```text +get_signatures_for_address +get_transaction +``` + +Le rôle recommandé reste `history_backfill`. + +## Persistance + +Une signature déjà présente dans `kb_sol_raw_transactions` est ignorée avant l’appel `getTransaction`. + +Chaque tentative d’hydratation produit une observation légère : + +- provider et endpoint ; +- protocole `solana_http_json_rpc` ; +- méthode `getTransaction` ; +- origine `backfill` ; +- commitment, session et filtre ; +- timestamps ; +- taille et hash du payload source lorsque disponibles ; +- statut `persisted`, `missing` ou `failed` ; +- erreur normalisée lorsque nécessaire. + +Le payload source complet n’est jamais dupliqué dans la table d’observations. + +## Démo Tauri et arrêt coopératif + +La fenêtre `demo_backfill` regroupe dans des accordéons Bootstrap 5 : + +1. paramètres communs ; +2. signatures explicites ; +3. programme ; +4. token ; +5. pool ; +6. journal et résumé JSON. + +Une seule campagne peut fonctionner à la fois. Le bouton `Arrêter` pose un drapeau d’annulation coopérative lu entre les pages, les candidats, le pacer et les retries. + +Depuis la préversion de clôture `0.3.4-pre.011`, l’annulation ne se limite plus aux frontières entre appels : les futures RPC `getSignaturesForAddress` et `getTransaction` sont mises en concurrence avec un observateur d’arrêt, l’attente du pacer est annulable et une pause de retry, y compris après un 429, est interrompue par sondage borné. L’abandon de la future HTTP empêche une campagne arrêtée d’attendre un timeout réseau complet. + +Le moteur maintient une file bornée par la concurrence effective et cesse d’admettre de nouveaux candidats dès que l’arrêt est demandé. Les candidats non démarrés ne sont ni journalisés comme traités, ni inclus dans `candidates_completed`. + +Le résumé distingue : + +- `candidates_selected` : candidats découverts ; +- `candidates_started` : candidats admis dans la file d’exécution ; +- `candidates_completed` : candidats arrivés à un résultat terminal ; +- `candidates_cancelled` : candidats démarrés puis interrompus avant un résultat terminal ; +- `candidates_not_started` : candidats jamais admis après la demande d’arrêt. + +Les invariants attendus sont : + +```text +candidates_selected = candidates_started + candidates_not_started +candidates_started = candidates_completed + candidates_cancelled +``` + +Pour une campagne `before`, `resume_before_signature` correspond à la dernière signature terminée dans un préfixe contigu de la liste ordonnée. Une transaction terminée hors ordre ne fait pas avancer seule ce curseur. Si aucun candidat n’a terminé, le curseur reste la signature d’ancrage initiale. Cette règle interdit de sauter les candidats non traités lors d’une reprise. + +Le calcul de cette frontière est couvert par les tests unitaires. Une campagne réelle de 500 candidats a déjà validé l’arrêt et la séparation entre terminés, annulés et non démarrés. Le rejeu manuel depuis `resume_before_signature` reste un contrôle opératoire recommandé, mais il ne constitue plus un jalon séparé ni un blocage pour `0.4.0`. + +## Validation finale `0.3.3` + +Validations locales : + +```text +cargo test -p kb_rpc : 54 tests passés +cargo test -p kb_pipeline : 10 tests passés +cargo test -p kb_store_core: 31 tests passés +cargo test -p kb_store_pg : 32 tests passés +cargo test -p kb_app_demo : 38 tests passés +cargo clippy --all-targets : validé +``` + +Les campagnes Tauri ont validé : + +- signatures explicites ; +- programme avant/après ; +- token avant/après ; +- pool avant/après ; +- parcours profond `program_after` avec 5 516 signatures indexées parcourues pour 5 transactions hydratées ; +- arrêt d’une campagne de 500 candidats avec 7 démarrés, 3 terminés, 4 annulés et 493 non démarrés. + +Les diagnostics PostgreSQL ont confirmé 62 transactions canoniques et 62 observations avant les derniers tests d’arrêt. Les tables core restent volontairement vides jusqu’à `0.3.4`. + +## Recherche latest sans ancre + +Pour programme, token et pool, une direction `before` avec ancre absente produit un filtre `*_latest`. La première page est demandée sans `before`, puis les pages suivantes utilisent normalement la dernière signature reçue comme curseur. Une direction `after` sans ancre est refusée, car la borne `until` ne peut pas être déterminée. En cas d’arrêt avant le premier candidat terminé, une campagne `*_latest` reprend depuis la page la plus récente et ne fabrique aucun curseur. diff --git a/olddocs/archivekbot2/docs/BAGS_FM.md b/olddocs/archivekbot2/docs/BAGS_FM.md new file mode 100644 index 0000000..221e47b --- /dev/null +++ b/olddocs/archivekbot2/docs/BAGS_FM.md @@ -0,0 +1,26 @@ + + + +# Bags.fm + +## Décision de classification + +`BAGSB9TpGrZxQbEsrEznv5jXXdwyP6AXerN8aVRiAmcv` reste classé comme compte observé et non comme `program_id` exécutable prouvé. + +En revanche, la documentation publique Bags liste deux programmes Fee Share : + +| Surface canonique | Program id | Statut | +|--------------------------|------------------------------------------------|---------| +| `fees_bags_fee_share_v1` | `FEEhPbKVKnco9EXnaY3i4R5rQVUx91wgVfu8qokixywi` | legacy | +| `fees_bags_fee_share_v2` | `FEE2tBhCKAt7shrod19QttSVREUYPiyMzoku1mL1gqVK` | current | + +## Crates réservés + +- `kb_decoder_fees_bags_fee_share_v1` +- `kb_executor_fees_bags_fee_share_v1` +- `kb_decoder_fees_bags_fee_share_v2` +- `kb_executor_fees_bags_fee_share_v2` + +## Rôle dans le trading assisté + +Ces surfaces ne sont pas des DEX directs. Elles peuvent cependant être utiles pour détecter des configurations de frais, claims, partenaires, vaults de frais ou comportements liés à des tokens lancés via Bags. diff --git a/olddocs/archivekbot2/docs/CODE_REUSE.md b/olddocs/archivekbot2/docs/CODE_REUSE.md new file mode 100644 index 0000000..2d04b62 --- /dev/null +++ b/olddocs/archivekbot2/docs/CODE_REUSE.md @@ -0,0 +1,41 @@ + + + +# Réutilisation de code + +Ce document liste les composants de l'ancien workspace qui peuvent servir de référence pour le nouveau workspace. Le code ne doit pas être copié mécaniquement : chaque portion reprise doit être adaptée aux nouvelles frontières de crates, aux règles de nommage, aux règles `crate::` et au backend PostgreSQL. + +## Composants candidats + +| Composant | Cible dans le nouveau workspace | Décision provisoire | +|--------------------------------------------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------| +| Client RPC HTTP | `kb_rpc` | Réutiliser les idées : retry, backoff, limites, traces, idempotence. Réécrire l'API selon les nouveaux modèles. | +| Pool RPC HTTP | `kb_rpc` | Reprendre le principe de sélection d'endpoint et de contrôle de débit. Isoler les métriques et les erreurs dans `kb_core`. | +| Client WebSocket | `kb_rpc` | Reprendre la gestion ping/pong, subscribe/unsubscribe, shutdown explicite et reconnexion contrôlée. | +| Pool WebSocket | `kb_rpc` | Garder l'idée de pool, mais éviter toute dépendance vers les décodeurs ou le stockage concret. | +| Ledger de replay | `kb_pipeline` et `kb_store_core` | Réécrire en versionné par module, version, scope et input hash. | +| Validation SQL | `validation_sql/` | Porter seulement les contrôles encore utiles : doublons de signatures, events failed, non-swap vers trade, coverage résiduelle. | +| Découvertes de discriminators | `docs/DECODER_SURFACE_AUDIT.md`, `idls/`, futurs catalogues | Conserver comme corpus de décision, pas comme support automatique. | +| Matérialisations trade/liquidity/lifecycle | `kb_materializer_*` | Reprendre les règles validées, mais séparer strictement decode et materialize. | + +## Interdictions + +- Ne pas importer directement l'ancien schéma SQLite dans les nouveaux décodeurs. +- Ne pas faire dépendre `kb_rpc` de `kb_store_pg`. +- Ne pas faire dépendre un décodeur de `kb_pipeline`. +- Ne pas conserver une fonction monolithique de replay global. + +## Critère d'acceptation + +Une portion reprise est acceptée seulement si elle respecte les règles suivantes : + +- responsabilité limitée à un crate cible ; +- documentation de code en anglais ; +- absence de `use` hors traits nécessaires ; +- erreurs typées via `kb_core` ; +- tracing target stable ; +- tests unitaires ou validation de build. + +## Interfaces officielles actuelles + +La réutilisation prioritaire ne concerne pas uniquement l’ancien code. Les enums, types, IDs et encodeurs publiés dans les interfaces officielles Solana/SPL doivent être utilisés lorsqu’ils exposent un contrat compatible avec les règles du workspace. La matrice, les exceptions `bincode` et l’ordre `wincode`/Borsh/parser borné sont maintenus dans `docs/SOLANA_INTERFACE_DEPENDENCIES.md`. diff --git a/olddocs/archivekbot2/docs/CONFIGURATION.md b/olddocs/archivekbot2/docs/CONFIGURATION.md new file mode 100644 index 0000000..e85e3bd --- /dev/null +++ b/olddocs/archivekbot2/docs/CONFIGURATION.md @@ -0,0 +1,114 @@ + + + +# Configuration + +La configuration sert de contrat commun entre les applications Tauri, les workers, les tests locaux, les stores, le RPC, le wallet et les exécuteurs. + +## Fichier principal + +```text +config/example.config.json +``` + +Ce fichier ne contient pas de commentaires, car JSON ne le permet pas. + +## Profils + +La configuration racine contient plusieurs profils et un seul profil actif : + +```json +{ + "active_profile": "local_devnet", + "profiles": [] +} +``` + +Les profils fournis sont `local_devnet`, `mainnet_research` et `mainnet`. + +## Logging + +Chaque sortie définit son nom, activation, sink, niveau, chemin, rotation, format, ANSI et liste de targets. Toute crate opérationnelle disposant d'un target `tracing` canonique doit recevoir ses fichiers `debug.log`, `info.log` et `error.jsonl` dédiés dans chaque profil. + +`kb_wallet` devient une crate opérationnelle en `0.4.2-pre.003`; ses logs ne contiennent jamais de secret ou d'octets de keypair. + +## Endpoints HTTP et WS + +Le modèle principal conserve les endpoints HTTP JSON-RPC et WebSocket Solana standards. Les rôles permettent de sélectionner un endpoint selon le type de requête et d'appliquer débit, burst, concurrence, subscriptions et pause 429. + +Les transports gRPC, Helius enrichi et LaserStream restent planifiés dans leurs jalons dédiés. + +## URL et clés API + +Une clé API doit rester sous forme de placeholder dans l'URL : + +```text +https://mainnet.helius-rpc.com/?api-key=${HELIUS_API_KEY} +``` + +Aucune clé réelle ne doit être committée. + +## Wallet + +Le bloc `wallet` contient : + +```text +wallet_dir +temporary_wallet_enabled +temporary_wallet_alias +temporary_wallet_persist +cluster +localnet_send_enabled +devnet_send_enabled +testnet_send_enabled +mainnet_send_enabled +``` + +Le profil local devnet persiste le wallet sous : + +```text +wallets/temporary/local_devnet/local-devnet-operator.json +``` + +Cette persistance est nécessaire pour conserver la même adresse entre plusieurs sessions, recevoir un airdrop et signer une séquence de tests. Le fichier contient un keypair Solana standard non chiffré : il est exclu du dépôt, protégé par permissions privées sur Unix et réservé au laboratoire local/devnet. + +La validation refuse : + +- un alias vide, trop long ou contenant un séparateur de chemin ; +- `temporary_wallet_persist = true` lorsque le wallet temporaire est désactivé ; +- un wallet temporaire actif sur `mainnet-beta`. + +## Exécution + +Le bloc `execution` contient : + +```text +dry_run_default +require_simulation +require_operator_confirmation +localnet_max_spend_lamports +devnet_max_spend_lamports +testnet_max_spend_lamports +mainnet_max_spend_lamports +max_fee_lamports +max_compute_unit_price_micro_lamports +recent_blockhash_max_age_slots +send_max_retries +confirmation_poll_interval_ms +confirmation_max_attempts +devnet_airdrop_max_lamports +``` + +Règles : + +- toute dépense configurée exige la simulation ; +- tout envoi activé exige un plafond de dépense positif pour le cluster correspondant ; +- mainnet exige la confirmation opérateur ; +- le plafond de frais et l'âge maximal du blockhash doivent être strictement positifs ; +- l’intervalle et le nombre de polls de confirmation sont strictement bornés ; +- le plafond d’airdrop Devnet doit rester nul dans les profils non Devnet ; +- `dry_run_default` reste actif dans tous les profils fournis. + +## Règle de sécurité + +Aucun secret ne doit être écrit dans le dépôt, les logs, PostgreSQL ou un payload Tauri. Les futurs backends chiffrés ou hardware wallet resteront confinés dans `kb_wallet` et exposeront uniquement une interface de signature. diff --git a/olddocs/archivekbot2/docs/CORE_EXTRACTION_CONTRACTS.md b/olddocs/archivekbot2/docs/CORE_EXTRACTION_CONTRACTS.md new file mode 100644 index 0000000..1a06582 --- /dev/null +++ b/olddocs/archivekbot2/docs/CORE_EXTRACTION_CONTRACTS.md @@ -0,0 +1,148 @@ + + + +# Contrats d’extraction core Solana + +## État de clôture `0.3.4-pre.011` + +Le jalon transforme une transaction canonique déjà persistée en graphe core normalisé et rejouable : + +```text +kb_sol_raw_transactions.canonical_json + -> kb_model::CanonicalTransaction + -> validation version/signature/slot/hash + -> kb_pipeline::extract_raw_transaction_to_core + -> CoreExtractionBundle + -> transaction PostgreSQL atomique +``` + +Le payload fournisseur contenu à l’origine dans une réponse RPC n’est jamais relu depuis les observations. La seule source fonctionnelle de l’extracteur est le document canonique de `kb_sol_raw_transactions`. + +## Unité atomique + +Une signature produit un `CoreExtractionBundle` contenant : + +- une transaction core liée par `raw_transaction_id` ; +- les account keys statiques et chargées par ALT ; +- les instructions top-level ; +- les inner instructions ; +- les logs ordonnés ; +- les changements de balances natifs et token ; +- l’identité du processor dans le ledger. + +Le repository PostgreSQL supprime puis recrée le graphe de la signature dans une transaction unique. Un échec avant le commit laisse intact l’état précédemment validé. Le test PostgreSQL de clôture provoque volontairement une violation d’unicité après insertion de la transaction et d’une première account key, puis vérifie l’absence totale de graphe partiel, de changement raw et de succès ledger. + +## Validation de l’entrée + +L’extraction refuse explicitement : + +- un `canonical_json` absent ; +- un `canonical_json_hash` absent ; +- une version différente de `CANONICAL_TRANSACTION_FORMAT_VERSION` ; +- un JSON non désérialisable en `CanonicalTransaction` ; +- une signature ou un slot différent de la ligne raw ; +- un hash recalculé différent du hash stocké ; +- un indice de programme ou de compte hors de l’espace résolu. + +L’identité du ledger est : + +```text +stage = core_extraction +processor_name = canonical_to_core +processor_version = 1 +input_key = signature +input_hash = canonical_json_hash +``` + +## Account keys + +L’espace d’indices est construit strictement dans cet ordre : + +```text +static account keys +loaded writable addresses +loaded readonly addresses +``` + +Pour les comptes statiques, les flags `signer` et `writable` sont dérivés du header Solana. Les loaded writable sont non-signers et writable. Les loaded readonly sont non-signers et readonly. `executable` reste `NULL`, car cette information n’est pas contenue de manière fiable dans le contrat canonique actuel. + +## Instructions + +Les chemins sont déterministes : + +```text +0 +1 +2 +0/0 +0/1 +2/0 +``` + +`accounts_json` conserve, dans l’ordre original, chaque indice et la clé publique résolue. `payload_json` conserve `programIdIndex`, `dataBase64` et `stackHeight`. Un SHA-256 stable du payload JSON est persisté dans `payload_json_hash`. + +## Logs + +Chaque log conserve : + +- son `log_index` global ; +- son texte original ; +- un SHA-256 du texte ; +- un `program_id` et un `instruction_path` uniquement lorsque la pile `invoke/success/failed` permet un rattachement déterministe. + +Lorsque la reconstruction est ambiguë, le lien reste `NULL` plutôt que d’inventer une relation. + +## Balances + +Les changements natifs utilisent les valeurs entières en lamports et stockent pre, post et delta comme chaînes décimales dans JSONB afin d’éviter toute perte de précision. + +Les changements SPL et Token-2022 utilisent exclusivement `amount` et `decimals`. Les valeurs UI du fournisseur ne sont pas utilisées comme source de calcul. Pour un compte créé ou fermé pendant la transaction, le côté absent est représenté explicitement par un montant brut nul avec les mêmes décimales. + +Le `balance_change_index` est déterministe : balances natives par index de compte, puis balances token triées par `(account_index, mint, program_id)`. + +## Modes de sélection + +La campagne peut sélectionner des transactions raw par signatures explicites, état `received`, plage de slots ou programme déjà présent dans les instructions top-level core. Les filtres, limites et scénarios de validation sont détaillés dans `docs/CORE_EXTRACTION_SELECTION_AND_REPLAY.md`. + +Le mode par programme ne découvre pas un programme nouveau : il dépend des lignes déjà présentes dans `kb_sol_core_instructions` et ne couvre pas actuellement les occurrences exclusivement inner. + +## Idempotence et replay + +En mode normal, une entrée ledger `succeeded` ayant la même version et le même hash provoque un skip. + +Un changement de version ou de hash entraîne une nouvelle extraction. Le mode `force_replay` ignore le skip et remplace atomiquement le graphe existant de la signature. + +## Orchestration + +`kb_pipeline::execute_core_extraction` fournit : + +- sélection par signatures ; +- lot raw en état `received` ; +- plage de slots ; +- replay par program id déjà présent dans core ; +- limite et concurrence bornées ; +- arrêt coopératif avant admission de nouveaux candidats ; +- résumé `selected`, `started`, `completed`, `skipped`, `extracted`, `failed`, `cancelled_candidates` et `not_started`. + +La logique de transformation ne dépend ni de Tauri ni d’un décodeur protocolaire. + +## Transactions échouées + +Une transaction Solana ayant `failed = true` reste extraite intégralement lorsque ses métadonnées sont disponibles. Les instructions, inner instructions et logs exécutés avant l’erreur constituent des observations utiles pour les futurs décodeurs. + +Le futur pipeline doit distinguer : + +```text +observation décodée dans une transaction échouée +mutation d’état confirmée dans une transaction réussie +``` + +Une transaction échouée peut produire des observations d’intention, de cause d’échec, de compute budget ou de surface appelée. Elle ne doit pas produire automatiquement un trade, une modification de liquidité ou une candle présentés comme réussis. + +## Validation réelle + +Le skip et le force replay ont été validés sur 14 signatures : `14 skipped`, puis `14 extracted` avec force replay, puis `14 skipped`. Les tables core restent à 70 transactions et le ledger totalise 84 tentatives. Les requêtes `sql/validation/000_core_integrity.sql` ne retournent aucune anomalie. + +## Hors périmètre + +`0.3.4` n’effectue aucun décodage Solana Core/SPL, aucun décodage DEX, aucune matérialisation métier et aucune compaction du JSON canonique. diff --git a/olddocs/archivekbot2/docs/CORE_EXTRACTION_SELECTION_AND_REPLAY.md b/olddocs/archivekbot2/docs/CORE_EXTRACTION_SELECTION_AND_REPLAY.md new file mode 100644 index 0000000..34aee86 --- /dev/null +++ b/olddocs/archivekbot2/docs/CORE_EXTRACTION_SELECTION_AND_REPLAY.md @@ -0,0 +1,456 @@ + + + +# Sélection et replay de l’extraction core + +## Objet + +Ce document décrit les modes disponibles dans `demo_core_extraction`, leur effet réel sur PostgreSQL et la différence entre : + +- acquisition d’une transaction depuis le réseau ; +- extraction du document canonique vers les tables core ; +- futur décodage protocolaire ; +- future matérialisation métier. + +Dans `0.3.4`, le mot « replay » désigne uniquement le rejeu de l’étape suivante : + +```text +kb_sol_raw_transactions.canonical_json + -> kb_model::CanonicalTransaction + -> CoreExtractionBundle + -> kb_sol_core_transactions + -> kb_sol_core_account_keys + -> kb_sol_core_instructions + -> kb_sol_core_inner_instructions + -> kb_sol_core_logs + -> kb_sol_core_balance_changes + -> kb_sol_ops_processing_ledger +``` + +Aucun appel RPC n’est effectué par cette étape. Aucun décodeur Solana Core, SPL, DEX ou autre protocole n’est exécuté. Aucune ligne métier n’est matérialisée. + +## Cycle complet d’une transaction + +Le cycle prévu est séparé en étapes rejouables : + +```text +réseau RPC + -> acquisition HTTP ou WebSocket + -> transaction canonique raw + -> extraction structurelle core + -> observation et classification + -> décodage protocolaire + -> matérialisation métier + -> agrégations et stratégies +``` + +`0.3.4` couvre uniquement la transition `raw canonique -> core structurel`. + +Les lignes de `kb_sol_core_instructions` sont créées avec `processing_state = pending`. Elles constituent l’entrée des futurs décodeurs prévus à partir de `0.4.x`. + +## Paramètres communs + +### Transactions maximales + +`limit` borne le nombre de transactions sélectionnées par PostgreSQL avant démarrage de la campagne. + +La sélection est ordonnée par : + +```text +slot ASC, signature ASC +``` + +Cette règle s’applique aussi au mode signatures explicites. L’ordre des lignes collées dans la zone de texte n’est donc pas l’ordre d’exécution garanti. + +### Concurrence + +`max_concurrent_extractions` borne le nombre d’extractions admises simultanément. + +Chaque signature reste une unité transactionnelle indépendante. Une transaction Solana produit son graphe core dans une transaction PostgreSQL atomique. + +### Force replay + +Sans `force_replay`, une signature est ignorée lorsque le ledger contient déjà un succès ayant exactement : + +```text +stage = core_extraction +processor_name = canonical_to_core +processor_version = version courante +input_key = signature +input_hash = canonical_json_hash courant +status = succeeded +``` + +Avec `force_replay`, ce skip est désactivé. Le graphe core existant de la signature est supprimé puis recréé dans la même transaction PostgreSQL. Les autres signatures ne sont pas touchées. + +Le force replay ne relance pas `getTransaction` et ne remplace pas le document canonique raw. Il reconstruit uniquement le core depuis le raw déjà présent. + +## Mode signatures explicites + +### Entrée + +La zone de texte accepte une signature par ligne. + +Avant l’appel au pipeline, l’interface : + +- supprime les espaces autour de chaque ligne ; +- ignore les lignes vides ; +- supprime les doublons en conservant la première occurrence ; +- valide chaque valeur comme signature Solana. + +### Sélection PostgreSQL + +Le mode sélectionne uniquement les signatures déjà présentes dans `kb_sol_raw_transactions`. + +Une signature absente de la table raw n’est pas téléchargée automatiquement. Elle n’apparaît simplement pas dans les candidats sélectionnés. Le compteur `selected` peut donc être inférieur au nombre de signatures saisies. + +Aucun filtre de `processing_state` n’est appliqué. Ce mode peut sélectionner une transaction raw : + +- `received` ; +- `core_extracted` ; +- `failed`. + +Le ledger décide ensuite entre skip, extraction ou retry. + +### Usages principaux + +- vérifier l’idempotence sur un échantillon connu ; +- forcer la reconstruction de quelques signatures ; +- retenter explicitement des transactions raw en échec ; +- comparer deux versions de l’extracteur ; +- préparer plus tard un corpus ciblé pour un décodeur. + +### Point d’attention + +Si le nombre de signatures existantes dépasse `limit`, seules les premières selon `slot ASC, signature ASC` sont retenues. + +## Mode transactions en attente + +### Filtre réel + +Le mode pending sélectionne : + +```text +kb_sol_raw_transactions.processing_state = received +``` + +Il ne sélectionne ni les lignes déjà `core_extracted`, ni les lignes `failed`. + +### Transition après succès + +Après commit du graphe core : + +```text +received -> core_extracted +``` + +La même ligne ne sera donc plus sélectionnée lors d’une campagne pending suivante. + +### Transition après échec + +Après un échec d’extraction persistable : + +```text +received -> failed +``` + +La raison est stockée dans `lifecycle_reason` et le ledger reçoit un statut `failed`. + +Une ligne `failed` doit être retentée par signature explicite ou par un futur mode dédié aux erreurs. Une nouvelle campagne pending ne la reprend pas. + +### Usages principaux + +- vider progressivement la file des transactions canoniques nouvellement acquises ; +- exécuter l’extraction courante après un backfill HTTP ; +- traiter un lot borné sans sélectionner manuellement les signatures. + +### Conséquence sur le corpus actuel + +Après la campagne réelle de 70 transactions : + +```text +selected = 70 +extracted = 70 +failed = 0 +``` + +les 70 lignes raw sont normalement passées à `core_extracted`. Une nouvelle campagne pending doit donc sélectionner zéro transaction tant qu’aucune nouvelle transaction raw `received` n’a été acquise. + +## Mode plage de slots + +### Filtre réel + +Le mode sélectionne toutes les transactions raw dont le slot se trouve dans l’intervalle inclusif : + +```text +min_slot <= slot <= max_slot +``` + +Aucun filtre de `processing_state` n’est appliqué. + +### Comportement normal + +Les transactions déjà à jour sont sélectionnées puis comptées comme `skipped` par le ledger. Les transactions reçues, en échec, ou dont la version/hash a changé peuvent être extraites. + +### Comportement avec force replay + +Toutes les transactions sélectionnées sont reconstruites dans la limite configurée. + +### Usages principaux + +- rejouer un intervalle temporel connu ; +- vérifier une régression sur un bloc ou une période ; +- reconstruire un corpus après changement de version de l’extracteur. + +## Mode programme déjà indexé dans core + +### Filtre réel actuel + +Le mode sélectionne les signatures raw pour lesquelles il existe déjà une ligne correspondante dans : + +```text +kb_sol_core_instructions +``` + +avec un `program_id` exactement égal à la valeur demandée. + +La requête actuelle ne recherche pas dans : + +- `kb_sol_core_inner_instructions` ; +- `kb_sol_core_logs` ; +- `kb_sol_core_account_keys` ; +- le document canonique raw. + +### Conséquences + +Ce mode ne peut pas découvrir un programme pour la première fois. Il fonctionne uniquement après une première extraction core ayant déjà résolu au moins une instruction top-level de ce programme. + +Une transaction où le programme apparaît exclusivement en inner instruction n’est pas sélectionnée par ce mode dans son état actuel. + +### Usages principaux + +- reconstruire les transactions d’un programme déjà indexé après changement de version ; +- vérifier une correction de résolution des comptes ou instructions ; +- préparer un sous-corpus structurel avant le futur replay d’un décodeur. + +### Évolution recommandée + +Le futur sélecteur de corpus devrait distinguer explicitement : + +- programme top-level ; +- programme inner ; +- programme observé dans les logs ; +- union de toutes les occurrences core fiables. + +Le mode d’extraction actuel peut rester strictement basé sur les instructions top-level, à condition que cette limite demeure visible dans l’interface. + +## Interprétation des compteurs + +| Compteur | Signification | +|-----------------------|-------------------------------------------------------------| +| `selected` | Candidats retournés par PostgreSQL après filtres et limite. | +| `started` | Candidats admis dans la file d’exécution bornée. | +| `completed` | Candidats arrivés à un résultat terminal. | +| `skipped` | Ledger déjà à jour pour la même version et le même hash. | +| `extracted` | Graphe core écrit et commit réussi. | +| `failed` | Extraction ou persistance terminée en erreur. | +| `cancelledCandidates` | Candidats admis mais annulés avant résultat terminal. | +| `notStarted` | Candidats sélectionnés mais jamais admis après arrêt. | +| `cancelled` | Une demande d’arrêt coopératif a été observée. | + +Pour une campagne terminée normalement : + +```text +completed = skipped + extracted + failed +selected = completed + cancelledCandidates + notStarted +``` + +## Scénarios de validation recommandés + +### Vérifier le skip + +1. Extraire 5 à 10 signatures déjà présentes dans core depuis un outil de sélection. +2. Les coller dans le mode signatures explicites. +3. Laisser `force_replay` désactivé. + +Résultat attendu : + +```text +selected = N +skipped = N +extracted = 0 +failed = 0 +``` + +### Vérifier le force replay + +1. Réutiliser exactement les mêmes signatures. +2. Activer `force_replay`. + +Résultat attendu : + +```text +selected = N +skipped = 0 +extracted = N +failed = 0 +``` + +Les cardinalités globales des tables core doivent rester stables pour ces signatures. Le `attempt_count` du ledger doit augmenter. + +### Vérifier un changement de version ou de hash + +Un changement réel de `processor_version` ou de `canonical_json_hash` doit provoquer une nouvelle extraction même sans `force_replay`. + +Cette vérification doit être effectuée dans une base de test dédiée. Le hash canonique d’une ligne de production ne doit pas être modifié manuellement. + +### Vérifier le rollback + +Le rollback atomique doit être validé par un test PostgreSQL avec injection d’une erreur entre les insertions du graphe et le commit. + +La méthode recommandée est un test d’intégration sur `solana_test`, et non une corruption volontaire de la base principale. + +## Sélecteur de corpus dans l’application + +La fenêtre read-only dédiée est : + +```text +demo_sql_replay_candidates +``` + +Elle est accessible depuis le menu principal et depuis l’en-tête de `demo_core_extraction`. `demo_sql_diag` reste limité à la connexion, au profil actif, aux migrations et aux cardinalités. + +Le sélecteur ne déclenche aucune acquisition RPC, extraction core, opération de décodage ou matérialisation. Il lit uniquement les tables PostgreSQL déjà alimentées. + +## Tableau des transactions et signatures + +Les filtres PostgreSQL disponibles sont : + +- fragment de signature ; +- slot minimum et maximum inclusifs ; +- état raw `received`, `core_extracted`, `decoded`, `materialized` ou `failed` ; +- statut ledger `not_started`, `running`, `succeeded` ou `failed` ; +- program ID exact ; +- portée du programme : `any`, `outer`, `inner` ou `logs` ; +- entité exacte : `mint`, `owner` ou `account_key` ; +- limite ; +- ordre par slot croissant ou décroissant. + +Chaque résultat affiche : + +- signature et slot ; +- état raw et rétention ; +- présence de la transaction core et éventuel échec Solana ; +- dernier statut du ledger `core_extraction` ; +- version et nombre de tentatives ; +- nombres d’instructions et de programmes outer/inner ; +- date de dernière mise à jour raw. + +Le filtre de programme inspecte les instructions outer, les inner instructions et les logs auxquels un `program_id` a pu être rattaché de manière prudente. Une occurrence dans les logs n’est donc visible que lorsque le rattachement core a produit un `program_id` non nul. + +## Tableau des programmes + +Le tableau agrège : + +```text +kb_sol_core_instructions.program_id +kb_sol_core_inner_instructions.program_id +kb_sol_core_logs.program_id +``` + +Pour chaque programme, il expose : + +- le `program_id` ; +- le nombre de transactions distinctes ; +- le nombre d’instructions outer ; +- le nombre d’instructions inner ; +- le nombre de logs reliés ; +- le slot minimum et maximum. + +La sélection d’un programme peut alimenter le filtre programme du tableau des transactions, puis charger les signatures correspondantes. + +## Tableau des entités + +Le tableau agrège trois familles : + +- `mint` depuis `kb_sol_core_balance_changes.mint` ; +- `owner` depuis `kb_sol_core_balance_changes.owner` ; +- `account_key` depuis `kb_sol_core_account_keys.account_key`. + +Chaque ligne indique le nombre de transactions distinctes, le nombre d’occurrences et la plage de slots. Une entité sélectionnée peut alimenter le filtre du tableau des transactions. + +Les account keys ne sont pas présentées comme wallet, pool, mint ou token account sans classification supplémentaire. + +## DataTables, copie et exports + +La fenêtre utilise cinq tableaux DataTables avec intégration Bootstrap 5 et extension Select : + +1. transactions et signatures ; +2. programmes ; +3. mints ; +4. owners ; +5. account keys. + +Chaque tableau affiche 10 lignes par défaut. Une checkbox par ligne et une checkbox de header permettent de sélectionner le jeu filtré. Les filtres possèdent un bouton de reset qui restaure les valeurs par défaut, efface la recherche locale, désélectionne les lignes et recharge PostgreSQL. + +Les signatures, program IDs, mints, owners et account keys sont tronqués visuellement sous la forme `préfixe…suffixe`. La valeur complète reste utilisée par le tri, la recherche, les tooltips, la copie et l’export. Un bouton de copie individuel évite les espaces parasites liés à une sélection manuelle. + +La règle d’export est la suivante : + +1. lorsqu’une ou plusieurs lignes sont sélectionnées, seules ces lignes sont exportées ; +2. sans sélection, toutes les lignes correspondant au filtre local DataTables sont exportées ; +3. la limite PostgreSQL reste la borne supérieure du corpus chargé. + +Le frontend construit un CSV UTF-8 avec BOM, séparateur `;` et fins de ligne CRLF. Une commande Rust l’écrit dans : + +```text +data/exports_csv/ +``` + +Le backend ajoute un suffixe numérique lorsque le nom existe déjà. Ce chemin a été validé sous Tauri/Linux et ne dépend pas du téléchargement HTML du WebView. + +La copie multiligne des signatures est directement compatible avec la zone `Signatures explicites` de `demo_core_extraction`. + +## Garanties et limites + +- commandes Tauri read-only ; +- requêtes SQL statiques et paramétrées ; +- aucune zone permettant d’exécuter du SQL libre ; +- limite obligatoire comprise entre `1` et `5 000` ; +- filtres exacts pour programme et entité afin d’éviter une sélection ambiguë ; +- recherche locale DataTables appliquée après le chargement serveur ; +- aucune découverte de transaction absente du raw ; +- aucun décodage de protocole ; +- aucun changement d’état raw, core ou ledger. + +Les futurs écrans de `0.4.x` pourront réutiliser le même principe pour les replays de décodeurs et de matérialiseurs. +## Utilisation du sélecteur SQL + +`demo_sql_replay_candidates` aide à constituer des corpus sans requête manuelle dans pgAdmin ou DBeaver. Il reste séparé du worker : il lit les tables raw/core/ledger, puis produit des signatures ou des filtres réutilisables. + +Dans l’onglet programmes, « Utiliser comme filtre transactions » prend exactement un programme coché. À défaut de sélection, une unique ligne restant après le filtre local est acceptée. L’action renseigne le program ID exact, choisit la portée `any`, ouvre l’onglet transactions et recharge la liste. + +Le sélecteur des programmes connus est alimenté par `kb_program_ids`, mais la saisie libre reste disponible pour les programmes observés qui ne sont pas encore enregistrés. + +Les exports CSV sont écrits dans `data/exports_csv/` par le backend Rust. Ils servent à l’audit et à la conservation d’un corpus ; pour rejouer immédiatement des signatures, la copie multiligne reste le chemin le plus direct. + +Les notions de pool et de paire ne sont pas encore disponibles à ce stade structurel. Une account key core ne suffit pas à prouver qu’un compte représente un pool ou une paire. Cette navigation sera ajoutée après matérialisation de catalogues sémantiques par les décodeurs. + + +## Validation réelle de l’idempotence + +Un échantillon de 14 signatures a produit les résultats suivants : + +```text +mode normal : extracted=0, skipped=14 +force replay: extracted=14, skipped=0 +mode normal : extracted=0, skipped=14 +``` + +Le nombre de transactions core est resté à 70. Le ledger contient 70 lignes `succeeded` et 84 tentatives, soit les 70 tentatives initiales plus les 14 remplacements forcés. Les requêtes d’intégrité n’ont détecté aucune anomalie. + +## Politique future pour les transactions échouées + +Les transactions on-chain échouées restent candidates au décodage. Elles conservent des informations sur les programmes appelés, les instructions exécutées avant l’erreur, les logs, le compute consommé et la cause d’échec. + +Les décodeurs devront produire des observations marquées par le statut de la transaction. Les matérialiseurs ne devront pas convertir ces observations en mutations d’état réussies, trades confirmés, changements de liquidité ou candles normales. diff --git a/olddocs/archivekbot2/docs/CORE_PROGRAM_IDS.md b/olddocs/archivekbot2/docs/CORE_PROGRAM_IDS.md new file mode 100644 index 0000000..7374b9b --- /dev/null +++ b/olddocs/archivekbot2/docs/CORE_PROGRAM_IDS.md @@ -0,0 +1,63 @@ + + + +# Identifiants core Solana et SPL + +Ce fichier sépare les identifiants primitifs Solana/SPL du registre des surfaces applicatives. Cette séparation évite de traiter `system`, `token`, `memo`, `sysvar` ou les loaders comme des DEX/routers. + +## Règle de classification + +- Les programmes runtime natifs, loaders et précompiles relèvent de `kb_decoder_solana_core`. +- Chaque programme SPL vérifié conserve une frontière spécialisée : Token, Token-2022, ATA, Memo, Stake Pool, Single Pool, Account Compression, Noop ou Name Service. +- Les sysvars sont des comptes connus à reconnaître pendant l'extraction, pas des surfaces DEX à décoder comme des programmes applicatifs. +- `stake_pool` et `single_pool` sont distincts du Stake Program natif et possèdent leurs propres crates. + +## Table de contrôle + +| Canonique | Program ID | Source | Type | Crate cible | Statut | +|--------------------------------------------|------------------------------------------------|-----------------------------------|----------------------|-------------------------------------------|-------------------------------------| +| `core_solana_address_lookup_table_v1` | `AddressLookupTab1e1111111111111111111111111` | `address_lookup_table` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_bpf_loader_deprecated_v1` | `BPFLoader1111111111111111111111111111111111` | `bpf_loader_deprecated` | `loader_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_bpf_loader_v2` | `BPFLoader2111111111111111111111111111111111` | `bpf_loader` | `loader_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_bpf_loader_upgradeable_v1` | `BPFLoaderUpgradeab1e11111111111111111111111` | `bpf_loader_upgradeable` | `loader_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_compute_budget_v1` | `ComputeBudget111111111111111111111111111111` | `compute_budget` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_config_v1` | `Config1111111111111111111111111111111111111` | `config` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_ed25519_v1` | `Ed25519SigVerify111111111111111111111111111` | `ed25519` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_feature_v1` | `Feature111111111111111111111111111111111111` | `feature` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_incinerator_v1` | `1nc1nerator11111111111111111111111111111111` | `incinerator` | `well_known_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_loader_v4` | `LoaderV411111111111111111111111111111111111` | `loader_v4` | `loader_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_native_loader_v1` | `NativeLoader1111111111111111111111111111111` | `native_loader` | `loader_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_secp256k1_v1` | `KeccakSecp256k11111111111111111111111111111` | `secp256k1` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_secp256r1_v1` | `Secp256r1SigVerify1111111111111111111111111` | `secp256r1` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_slashing_v1` | `S1ashing11111111111111111111111111111111111` | `slashing` | `stateless_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_stake_config_v1` | `StakeConfig11111111111111111111111111111111` | `stake_config` | `well_known_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_stake_v1` | `Stake11111111111111111111111111111111111111` | `stake` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_system_v1` | `11111111111111111111111111111111` | `system` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_sysvar_clock_v1` | `SysvarC1ock11111111111111111111111111111111` | `sysvar_clock` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_epoch_rewards_v1` | `SysvarEpochRewards1111111111111111111111111` | `sysvar_epoch_rewards` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_epoch_schedule_v1` | `SysvarEpochSchedu1e111111111111111111111111` | `sysvar_epoch_schedule` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_fees_v1` | `SysvarFees111111111111111111111111111111111` | `sysvar_fees` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_instructions_v1` | `Sysvar1nstructions1111111111111111111111111` | `sysvar_instructions` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_last_restart_slot_v1` | `SysvarLastRestartS1ot1111111111111111111111` | `sysvar_last_restart_slot` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_recent_blockhashes_v1` | `SysvarRecentB1ockHashes11111111111111111111` | `sysvar_recent_blockhashes` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_rent_v1` | `SysvarRent111111111111111111111111111111111` | `sysvar_rent` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_rewards_v1` | `SysvarRewards111111111111111111111111111111` | `sysvar_rewards` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_slot_hashes_v1` | `SysvarS1otHashes111111111111111111111111111` | `sysvar_slot_hashes` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_slot_history_v1` | `SysvarS1otHistory11111111111111111111111111` | `sysvar_slot_history` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_stake_history_v1` | `SysvarStakeHistory1111111111111111111111111` | `sysvar_stake_history` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_v1` | `Sysvar1111111111111111111111111111111111111` | `sysvar` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_vote_v1` | `Vote111111111111111111111111111111111111111` | `vote` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_zk_elgamal_proof_v1` | `ZkE1Gama1Proof11111111111111111111111111111` | `zk_elgamal_proof` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_zk_token_proof_v1` | `ZkTokenProof1111111111111111111111111111111` | `zk_token_proof` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_spl_associated_token_account_v1` | `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL` | `associated_token_account` | `program` | `kb_decoder_spl_associated_token_account` | `core_handled` | +| `core_spl_account_compression_v1` | `cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK` | `spl_account_compression` | `program` | `kb_decoder_spl_account_compression` | `core_specialized_reserved_current` | +| `core_spl_memo_v1` | `Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo` | `spl_memo_v1` | `program` | `kb_decoder_spl_memo` | `core_specialized_reserved_current` | +| `core_spl_memo_v3` | `MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr` | `spl_memo_v3` | `program` | `kb_decoder_spl_memo` | `core_specialized_reserved_current` | +| `core_spl_memo_v4` | `Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH` | `spl_memo_v4` | `program` | `kb_decoder_spl_memo` | `core_specialized_reserved_current` | +| `core_spl_noop_v1` | `noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV` | `spl_noop` | `program` | `kb_decoder_spl_noop` | `core_specialized_reserved_current` | +| `core_spl_single_pool_v1` | `SVSPxpvHdN29nkVg9rPapPNDddN5DipNLRUFhyjFThE` | `spl_single_pool` | `program` | `kb_decoder_spl_single_pool` | `core_specialized_reserved_current` | +| `core_spl_name_service_v1` | `namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX` | `spl_name_service` | `program` | `kb_decoder_metadata_spl_name_service` | `core_specialized_reserved_current` | +| `core_spl_stake_pool_v1` | `SPoo1Ku8WFXoNDMHPsrGSTSG1Y47rzgn41SLUNakuHy` | `stake_pool` | `program` | `kb_decoder_spl_stake_pool` | `core_specialized_reserved_current` | +| `core_spl_token_2022_v2022` | `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` | `token_2022` | `program` | `kb_decoder_spl_token_2022` | `core_handled` | +| `core_spl_token_2022_elgamal_registry_v1` | `regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg` | `spl_token_2022_elgamal_registry` | `program` | `kb_decoder_spl_token_2022` | `core_specialized_reserved_current` | +| `core_spl_token_v1` | `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA` | `token` | `program` | `kb_decoder_spl_token` | `core_handled` | diff --git a/olddocs/archivekbot2/docs/CORE_STORE.md b/olddocs/archivekbot2/docs/CORE_STORE.md new file mode 100644 index 0000000..6cf07fc --- /dev/null +++ b/olddocs/archivekbot2/docs/CORE_STORE.md @@ -0,0 +1,73 @@ + + + +# Store core Solana + +## Évolution `0.3.4` + +Le store core historique devient alimenté par un extracteur transactionnel à partir de `kb_sol_raw_transactions.canonical_json`. + +| Table | Rôle | +|----------------------------------|------------------------------------------------------------| +| `kb_sol_core_transactions` | Transaction normalisée, statut et lien vers la ligne raw. | +| `kb_sol_core_account_keys` | Espace résolu statique + ALT avec flags Solana. | +| `kb_sol_core_instructions` | Instructions top-level et payload canonique hashé. | +| `kb_sol_core_inner_instructions` | Inner instructions rattachées à un chemin parent. | +| `kb_sol_core_logs` | Logs ordonnés, texte hashé et lien d’invocation optionnel. | +| `kb_sol_core_balance_changes` | Deltas natifs, SPL Token et Token-2022. | +| `kb_sol_ops_processing_ledger` | Version, hash, statut et tentatives du processor. | + +## Écriture atomique + +Une extraction réussie exécute dans la même transaction PostgreSQL : + +1. validation du bundle ; +2. recherche d’un graphe core existant ; +3. suppression en cascade de ce graphe pour la signature ; +4. insertion de la transaction et de toutes ses lignes filles ; +5. passage de la ligne raw à `core_extracted` ; +6. upsert du ledger en `succeeded` ; +7. commit. + +Une erreur déclenche le rollback implicite de la transaction. L’enregistrement terminal d’un échec utilise une transaction dédiée et marque la ligne raw `failed` avec un diagnostic rejouable. + +## Clés d’idempotence + +Les contraintes actives restent : + +```text +core transaction : signature +account key : signature + account_index +instruction top-level : signature + instruction_path +inner instruction : signature + instruction_path +log : signature + log_index +balance change : signature + balance_change_index +ledger : stage + processor_name + processor_version + input_key +``` + +Le ledger ajoute `input_hash` à la décision de skip sans l’ajouter à la clé unique. Un nouvel hash met à jour la même identité de processor et augmente `attempt_count`. + +## Sélection raw + +Le contrat `CoreExtractionSelectionFilter` permet : + +- une liste de signatures ; +- une plage inclusive de slots ; +- un état raw ; +- un program id déjà indexé dans les instructions core ; +- une limite stricte. + +Le filtre par program id est un mode de replay. Il ne peut pas découvrir un programme dans une transaction qui n’a jamais encore été extraite. + +## Repositories + +`CoreExtractionStore` isole le pipeline du backend : + +```text +list_raw_transactions_for_core_extraction +is_core_extraction_current +persist_core_extraction +mark_core_extraction_failed +``` + +Les repositories historiques d’insertion unitaire restent disponibles, mais le worker `0.3.4` utilise exclusivement l’écriture atomique du bundle. diff --git a/olddocs/archivekbot2/docs/DATABASE.md b/olddocs/archivekbot2/docs/DATABASE.md new file mode 100644 index 0000000..df13aaa --- /dev/null +++ b/olddocs/archivekbot2/docs/DATABASE.md @@ -0,0 +1,155 @@ + + + +# Base de données + +PostgreSQL est le backend principal prévu pour `khadhroony-bot2`. `0.2.0` fixe uniquement les conventions de stockage : les migrations complètes, repositories SQL et diagnostics applicatifs sont reportés aux jalons suivants. + +## Décision PostgreSQL + +Le projet ne crée pas de schémas PostgreSQL applicatifs explicites. + +Le store utilise le schéma courant du profil PostgreSQL, généralement `public`. Le choix du schéma reste donc une responsabilité de configuration ou d'administration PostgreSQL, pas une responsabilité des migrations applicatives. + +Interdits, écrits avec `DOT` pour que les audits textuels simples ne confondent pas documentation et usage réel : + +```text +raw DOT kb_sol_rpc_transactions +core DOT kb_sol_transactions +obs DOT kb_sol_program_observations +decode DOT kb_sol_decoded_events +mat DOT kb_sol_trade_events +catalog DOT kb_sol_tokens +ops DOT kb_sol_processing_ledger +``` + +Autorisés : + +```text +kb_sol_raw_transactions +kb_sol_core_transactions +kb_sol_obs_program_observations +kb_sol_decode_decoded_events +kb_sol_mat_trade_events +kb_sol_catalog_tokens +kb_sol_ops_processing_ledger +``` + +## Format canonique des tables Solana + +Toutes les tables Solana applicatives suivent ce format : + +```text +kb_sol__ +``` + +Domaines autorisés au départ : + +| Domaine | Rôle logique | Exemple de table | +|-----------|-------------------------------------------------------------------------------------|---------------------------------------| +| `raw` | transactions Solana canoniques, source-indépendantes et rejouables | `kb_sol_raw_transactions` | +| `core` | extraction Solana générique normalisée | `kb_sol_core_instructions` | +| `obs` | observations techniques de source, programmes, instructions, logs et discriminators | `kb_sol_obs_transaction_observations` | +| `decode` | événements décodés par les décodeurs | `kb_sol_decode_decoded_events` | +| `mat` | projections métier matérialisées | `kb_sol_mat_trade_events` | +| `catalog` | tokens, pools, paires et références stables | `kb_sol_catalog_pairs` | +| `agg` | agrégations temporelles ou analytiques | `kb_sol_agg_pair_candles` | +| `ops` | ledger de traitement, migrations applicatives et diagnostics | `kb_sol_ops_processing_ledger` | +| `wallet` | métadonnées wallet non sensibles | `kb_sol_wallet_accounts` | + +Le domaine reste un préfixe de nom de table, jamais un schéma PostgreSQL. + + +## Décision de phasage à partir de `0.3.x` + +`0.3.x` corrige le modèle d’acquisition avant les décodeurs : transaction canonique source-indépendante, observations de source légères, backfill HTTP sur comptes gratuits et extraction vers `core`. + +Les flux payants Helius `transactionSubscribe` et Yellowstone gRPC sont reportés à `0.10.x`, après les décodeurs Core, Pump, Meteora, Raydium, Orca et Jupiter. Ils devront alimenter exactement le même contrat canonique que `getTransaction`. + +## Tables candidates initiales + +Ces tables sont candidates, pas toutes implémentées en `0.2.0`. + +| Table | Jalons pressentis | Rôle | +|---------------------------------------|--------------------|--------------------------------------------------------------------------------------------------------------------------| +| `kb_sol_raw_rpc_transactions` | `0.2.3` historique | Ancienne table validée puis remplacée pendant `0.3.1`; absente de la baseline SQL active. | +| `kb_sol_raw_transactions` | `0.3.1` | Stocker une transaction Solana canonique unique par signature, indépendante de la source. | +| `kb_sol_raw_ws_notifications` | `0.2.3` historique | Ancienne table supprimée pendant `0.3.1` après conversion des métadonnées utiles; absente de la baseline active. | +| `kb_sol_obs_transaction_observations` | `0.3.1` | Stocker source, protocole, méthode, timestamps, taille, latences et statuts sans dupliquer le payload transactionnel. | +| `kb_sol_core_transactions` | `0.2.4` | Ligne transaction normalisée liée à une signature. | +| `kb_sol_core_account_keys` | `0.2.4` | Comptes résolus, y compris loaded addresses. | +| `kb_sol_core_instructions` | `0.2.4` | Instructions top-level normalisées. | +| `kb_sol_core_inner_instructions` | `0.2.4` | Instructions internes normalisées. | +| `kb_sol_core_logs` | `0.2.4` | Logs de transaction et ordre d'apparition. | +| `kb_sol_core_balance_changes` | `0.2.4` | Deltas SOL/SPL dérivés du metadata RPC. | +| `kb_sol_obs_program_observations` | `0.3.4+` | Observations par programme invoqué, après stabilisation de l'ingestion et de l'extraction. | +| `kb_sol_obs_instruction_observations` | `0.3.4+` | Observations par instruction, discriminator et surface candidate, après stabilisation de l'ingestion et de l'extraction. | +| `kb_sol_decode_decoded_events` | `0.4.x+` | Événements décodés par surface et version de décodeur. | +| `kb_sol_mat_trade_events` | `0.5.x+` | Trades matérialisés. | +| `kb_sol_catalog_tokens` | `0.5.x+` | Catalogue de tokens observés. | +| `kb_sol_catalog_pools` | `0.5.x+` | Catalogue de pools observés. | +| `kb_sol_catalog_pairs` | `0.5.x+` | Catalogue de paires tradables. | +| `kb_sol_ops_processing_ledger` | `0.3.4+` | Ledger de traitements par module, version, input et statut, après stabilisation de l'ingestion. | + +## Règles SQL générales + +- `id` est la clé primaire technique, sauf exception explicitement documentée. +- `created_at` est le timestamp d'insertion. +- `updated_at` existe seulement si la table est mutable. +- `slot` est un `BIGINT` côté SQL ; les conversions Rust doivent être explicites. +- `signature` est un texte non vide quand applicable. +- `program_id` est un texte non vide quand applicable. +- `canonical_json` est un `JSONB` réservé à la représentation canonique source-indépendante de la transaction. +- `payload_json` est un `JSONB` réservé au payload décodé, enrichi ou matérialisé. +- Les index minimaux sont ajoutés selon l'usage : `signature`, `slot`, `program_id`, `created_at`. +- Les noms d'index utilisent un préfixe fonctionnel : `ux_` pour les index uniques et `ix_` pour les index non uniques, par exemple `ux_kb_sol_raw_transactions_signature` ou `ix_kb_sol_obs_transaction_observations_signature`. +- Les contraintes de clés nommées utilisent un préfixe fonctionnel : `pk_` pour les clés primaires et `fk_` pour les clés étrangères. Les contraintes de validation peuvent utiliser `ck_`. +- Les contraintes métier doivent rester strictes mais réversibles tant que les corpus ne sont pas stabilisés. + +## Principe raw et cycle de vie + +La couche `raw` conserve une seule représentation canonique de chaque transaction Solana. Elle ne conserve pas une copie complète par transport ou fournisseur. + +Les adaptateurs `kb_rpc` convertissent JSON-RPC, Helius WebSocket ou Yellowstone Protobuf vers le même contrat `kb_model`. Le payload canonique reste la source rejouable pour l’extraction `core`, les décodeurs et les matérialisateurs. + +La couche `obs` conserve les acquisitions successives : fournisseur, endpoint, protocole, méthode, commitment, timestamps, taille et statut. `kb_sol_obs_transaction_observations` ne contient pas de `raw_json` complet. + +Les états de rétention s’appliquent à la transaction canonique. Les observations techniques ont une politique de conservation séparée, car elles sont petites et utiles aux mesures de couverture et de latence. + +Le contrat détaillé est décrit dans `docs/TRANSACTION_ACQUISITION_MODEL.md`. Le cycle de vie est décrit dans `docs/RAW_STORAGE_LIFECYCLE.md`. Le découpage core destiné aux décodeurs est décrit dans `docs/CORE_EXTRACTION_CONTRACTS.md`. + +## Replay partiel + +Le replay ne doit pas être limité à la transaction complète. Après extraction `core`, l'unité de scheduling principale devient l'instruction normalisée. Cela permet de traiter uniquement les instructions `Pending`, `Failed` ou `ReplayRequested`, sans rejouer toute une transaction déjà extraite. + +Le décodage ne doit cependant pas être limité au payload de l'instruction. Les décodeurs doivent recevoir une entrée contextualisée : instruction ciblée, comptes résolus, inner instructions, logs, deltas de balance et statut de transaction. + +Les contrats de replay par instruction sont décrits dans `docs/INSTRUCTION_REPLAY_CONTRACTS.md`. Les contrats d'extraction core sont décrits dans `docs/CORE_EXTRACTION_CONTRACTS.md`. + +Chaque table dérivée doit pouvoir être reconstruite par au moins un des axes suivants quand l'information existe : + +- module et version ; +- signature ; +- plage de slots ; +- `program_id` ; +- surface candidate ; +- discriminator ; +- état dans `kb_sol_ops_processing_ledger`. + +## Frontière Rust store + +`kb_store_core` définit les contrats indépendants du backend : DTOs, entities, health, pagination, erreurs et traits repository. + +`kb_store_pg` implémente PostgreSQL : pool, migrations, requêtes SQL, repositories concrets et diagnostics du schéma courant. + +Les structures Rust ne doivent pas être placées dans `queries/`. Les requêtes SQL, les binds et l'exécution SQL restent dans `queries/`; les types proches des lignes SQL restent dans `entities/`; les contrats applicatifs restent dans `dtos/`; les APIs de stockage restent dans `repositories/`. + +## Statut `0.2.0` + +`0.2.0` est un jalon de cadrage. Il ne doit pas introduire un grand schéma SQL. Les migrations présentes avant cette convention doivent être neutralisées ou remplacées avant d'être exécutées sur une base réelle. + +## Ajout `0.3.4` — ledger de traitement + +La table `kb_sol_ops_processing_ledger` devient la source de vérité de l’idempotence par processor. Pour l’extraction core, elle mémorise la signature, le hash canonique, la version, le statut, le nombre de tentatives et le dernier diagnostic. + +L’écriture du succès ledger, le passage raw à `core_extracted` et le graphe core sont commités ensemble. Un statut `failed` reste rejouable et ne doit jamais être interprété comme une transaction canonique invalide de façon définitive. diff --git a/olddocs/archivekbot2/docs/DECODER_MATERIALIZATION_CONTRACTS.md b/olddocs/archivekbot2/docs/DECODER_MATERIALIZATION_CONTRACTS.md new file mode 100644 index 0000000..a50fc64 --- /dev/null +++ b/olddocs/archivekbot2/docs/DECODER_MATERIALIZATION_CONTRACTS.md @@ -0,0 +1,179 @@ + + + +# Contrats communs de décodage et de matérialisation + +## Objet + +La version `0.4.0` introduit l’infrastructure backend-agnostique utilisée par les futurs décodeurs Solana Core, SPL et protocolaires. Elle ne cherche pas encore à décoder maximalement un protocole précis. + +Le flux commun est : + +```text +core instruction contextualisée + -> dispatch déterministe + -> observation décodée versionnée + -> persistance atomique decode + couverture + ledger + -> matérialisation optionnelle explicitement autorisée + -> persistance atomique mat + ledger +``` + +## Input contextualisé + +`CoreInstructionReplayInput` reste l’unique contrat d’entrée commun. Son contrat passe à la version `2` dans `0.4.1-pre.014`. Il contient la signature, le slot, le statut et l’erreur on-chain, le chemin stable de l’instruction, le program ID, les comptes résolus dans leur ordre original, le payload brut déterministe et son hash, toutes les instructions outer ordonnées par index numérique, les inner instructions descendantes, les logs reliés prudemment, les changements de balances et la version du contrat core. + +`outer_instructions_json` est un tableau stable dont chaque entrée contient `instructionIndex`, `instructionPath`, `programId`, `payloadJson` et `payloadHash`. L’instruction cible est incluse. Cette projection provient des tables core existantes et ne nécessite aucune migration SQL. + +Le hash de replay est calculé à partir de la sérialisation JSON canonique de cet input. Le skip exige la même étape, le même processor, la même version, la même clé d’entrée, le même hash et un statut ledger réussi. + +Le passage au contrat `2` modifie légitimement les hashes existants, car les payloads outer participent désormais à la sérialisation. Le pipeline reste en version `1` : la version du contrat core et le nouveau contexte suffisent à invalider les anciens skips. Un force replay est requis après mise à niveau. + +## Contrat de décodeur + +`InstructionDecoder` expose : + +- une identité stable `name/version` ; +- les programmes et surfaces supportés ; +- une matrice de couverture déclarée ; +- une reconnaissance déterministe ; +- un résultat terminal `decoded`, `ignored`, `unsupported` ou `failed` ; +- zéro ou plusieurs observations typées uniquement pour `decoded` ; +- une preuve, une confiance et des diagnostics structurés. + +Le dispatch est ordonné par compatibilité exacte, priorité déclarée, surface, code d’entrée et identité stable. Il ne dépend ni du nom de la crate ni de l’ordre d’enregistrement implicite. + +Avant la lecture du store, le pipeline calcule le périmètre effectif des programmes à partir de l’union des `program_id` déclarés par les décodeurs activés. Lorsque l’opérateur fournit un filtre explicite, ce filtre doit être un sous-ensemble exact de ces programmes ; une valeur incompatible est refusée avant toute sélection SQL. Cette règle empêche un décodeur natif de consommer par défaut des instructions SPL ou protocolaires et évite de rejouer indéfiniment le même lot `unmatched` sans rapport avec les processors choisis. + +Une instruction inconnue d’un programme reconnu doit être classée sans produire de faux événement. Un `unmatched` reste possible lorsque le program ID est supporté mais que la reconnaissance contextuelle refuse l’input ; il ne modifie pas globalement le lifecycle de l’instruction pour ne pas empêcher un autre décodeur futur de la traiter. + +## Transactions on-chain échouées + +Une transaction échouée reste décodable lorsqu’un input structurel existe. Toute observation conserve : + +```text +transaction_failed +transaction_error +observation_committed +``` + +`observation_committed` doit être faux lorsque la transaction a été annulée. Ces observations peuvent décrire une instruction tentée, un événement loggé avant l’erreur, une classification d’échec, une consommation de compute ou une surface appelée. + +Elles ne peuvent pas produire automatiquement un trade réussi, une modification de liquidité réussie, un changement confirmé de catalogue ou une candle normale. `EventMaterializer` applique une politique explicite par famille. Les familles `trade`, `liquidity` et `lifecycle` sont refusées avant l’appel au matérialiseur lorsque la source est échouée ou non commitée. Une seconde barrière valide ensuite les familles de sortie et n’autorise, dans ce contexte, que les matérialisations d’audit ou de risque. + +## Persistance + +Les tables actives sont : + +- `kb_sol_decode_events` ; +- `kb_sol_decode_coverage_declarations` ; +- `kb_sol_decode_coverage_observations` ; +- `kb_sol_mat_events` ; +- `kb_sol_ops_processing_ledger`. + +Aucun schéma PostgreSQL applicatif explicite n’est créé. Les payloads et preuves JSONB utilisent des colonnes suffixées par `_jsonb`. + +Le décodage persiste dans une transaction unique les observations, la couverture, l’état lifecycle de l’instruction et le ledger. La matérialisation persiste également ses sorties et son ledger dans une transaction unique. Un rollback à la dernière étape doit donc supprimer toutes les écritures précédentes de la même tentative. + +Toute exécution non skippée remplace atomiquement les sorties du même processor, de la même version et de la même clé d’entrée. Le force replay contourne uniquement le skip version/hash ; il ne supprime jamais les sorties d’un autre processor, d’une autre version ou d’une autre clé. Les versions antérieures restent disponibles pour l’audit. + +Lorsqu’un force replay contient une liste explicite de signatures, le pipeline retire le filtre de lifecycle pour cette sélection bornée. Le même contournement est autorisé sans signatures uniquement lorsque l’opérateur active explicitement le mode « toutes les signatures » ; la sélection reste alors limitée par les programmes compatibles, les instruction paths, les slots éventuels et la limite. Sans signatures ni cette autorisation explicite, la requête est refusée. + +Les déclarations de couverture sont synchronisées comme un snapshot du couple processor/version. Le résultat de persistance distingue les lignes réellement insérées, modifiées, supprimées du snapshot ou strictement inchangées ; une déclaration identique est comptée comme `skipped`, pas comme une nouvelle insertion. + +## Couverture + +La couverture compare les entrées déclarées et observées, puis agrège : + +- reconnaissance ; +- décodage ; +- matérialisation ; +- erreurs ; +- inconnues ; +- transactions réussies ; +- transactions échouées. + +Une surface ne peut pas être considérée comme clôturée tant que toutes les instructions, événements et discriminants connus, y compris historiques et non liés au trading, ne sont pas classifiés. + +## Traçabilité structurée + +Chaque campagne reçoit un `campaign_id` process-local stable, propagé de la démo jusqu’aux décisions de dispatch, de ledger, de décodage, de matérialisation et de persistance. Des spans imbriqués de campagne, input et processor transmettent aussi ce contexte aux événements émis par les décodeurs et les stores sans modifier leurs contrats. Elle doit permettre de reconstruire précisément les décisions prises sans requête SQL libre. Les événements `debug` utilisent un champ `action` stable et conservent au minimum, selon l’étape : + +- le nombre de signatures, un échantillon borné et la sélection normalisée ; +- les filtres demandés puis les `program_id` et états effectivement appliqués ; +- la signature, le slot, l’instruction path, le program ID et la clé d’input ; +- le processor et sa version ; +- le hash déterministe pertinent ; +- la décision de dispatch, y compris lorsque `recognize` n’est pas appelé à cause d’un program ID incompatible ; +- le résultat de reconnaissance et de décodage ; +- le contrôle du ledger, le motif exact du skip ou son contournement par force replay ; +- le début et la validation de la persistance PostgreSQL ; +- le statut terminal et les compteurs par processor. + +Les targets stables sont : + +```text +kb_app_demo.demo_decode_replay +kb_app_demo.frontend.demo_decode_replay +kb_pipeline.decode_replay +kb_store_pg.decode_pipeline +kb_decoder_solana_core +``` + +Les signatures, slots, paths et program IDs sont des identifiants publics on-chain. Les listes complètes de signatures ne sont pas répétées à chaque couche : les événements de campagne conservent un compteur et un petit échantillon, tandis que les événements par input conservent la signature exacte. Les traces ne doivent pas enregistrer de DSN, secret, clé privée ni payload brut complet. Le payload d’instruction est représenté par son hash déterministe. + +## Orchestration + +`kb_pipeline::execute_decode_replay` fournit : + +- sélection bornée par signatures, états, slots, program IDs et instruction paths ; +- zéro, un ou plusieurs décodeurs compatibles selon la politique choisie ; +- concurrence bornée ; +- arrêt coopératif ; +- skip version/hash ; +- force replay ; +- résumé par processor et statut ; +- matérialisation optionnelle après succès de la persistance decode. + +La fenêtre Tauri `demo_decode_replay` ne contient aucune logique SQL libre. Elle construit une requête typée, appelle le pipeline et affiche les diagnostics read-only. + +## Projections natives actives + +`kb_materializer_lifecycle::LifecycleMaterializer` est enregistré dans `demo_decode_replay` à partir de `0.4.1-pre.003`. Son applicabilité est filtrée par surface, entrée et paramètres avant toute consultation du ledger ou application de politique. `pre.017` étend ses familles acceptées à `Lifecycle`, `Admin` et `Audit`, mais uniquement pour des observations exactes qui produisent réellement une mutation lifecycle. `pre.018` ajoute l’initialisation/la fermeture des rapports Slashing sous `slashing_violation_report`, sans transformer le rapport en pénalité de stake. Il applique toujours `SuccessfulCommittedOnly`. + +Les sorties stables actives sont : + +- `address_lookup_table::0` pour les cinq mutations ALT ; +- `program_loader:::0` pour les mutations loader stables ; +- `feature_gate:revoke_pending_activation:0` pour la révocation Feature Gate ; +- `durable_nonce_account::0` pour initialize, advance, authorize, upgrade et withdraw du System Program ; +- `zk_proof_context::0` pour l’initialisation d’un contexte ZK ElGamal demandée par une vérification réussie et pour sa fermeture. + +`authorize_nonce_account` reste décodé en famille `Admin`, mais sa mutation d’autorité durable est promue en sortie `Lifecycle`. Les vérifications ZK ElGamal restent des événements `Audit`; elles ne sont acceptées par le matérialiseur que lorsque `contextStateRequested = true`. Une preuve sans contexte n’est jamais proposée au matérialiseur. + +Le retrait d’un nonce account conserve une sémantique conditionnelle. Le runtime détruit le compte lorsque la totalité du solde est retirée ; l’instruction seule ne suffit pas à reconstruire de manière certaine l’état final transactionnel du compte. La projection décrit donc l’opération commitée, conserve le montant demandé et indique explicitement que l’état final n’est pas capturé. Les deltas SOL ne sont pas dupliqués. + +La création d’un contexte ZK conserve le compte cible, son autorité et le type de preuve, sans matérialiser les octets de preuve. La fermeture conserve le compte, la destination des lamports et l’autorité, puis décrit le reset vers le System Program. L’ancien ZK Token Proof Program n’est jamais matérialisé : son runtime actuel est un stub sans effet et sa sémantique historique n’est pas attribuable à une transaction sans preuve de version. + +Le hash d’entrée matérialiseur reste dérivé de l’observation décodée complète. Le ledger conserve séparément les processors `solana_native_lifecycle`, `solana_native_admin` et `solana_native_compliance_audit`, leur version, la clé d’input et le hash. Une transaction échouée ou une observation non commitée est refusée avant toute sortie mutable. + +`pre.020` répartit les responsabilités : create/allocate System restent dans lifecycle ; assignations System, Config `store` et changements d’autorité Loader appartiennent à `kb_materializer_admin` ; writes/copies de bytecode Loader appartiennent à `kb_materializer_compliance_audit`. Les transferts SOL ne sont pas rematérialisés, car les balance changes core en sont la source canonique. + +## Projections natives restantes + +La couverture maximale d’un décodeur n’implique pas une matérialisation systématique. Une projection n’est ajoutée que lorsqu’elle possède une identité stable, un état cible explicite, une politique d’idempotence et suffisamment de contexte pour ne pas reconstruire une mutation fictive. + +Les prochaines projections sont réparties par propriétaire : + +- `kb_materializer_lifecycle` : créations et allocations System, sans dupliquer les deltas SOL ; +- `kb_materializer_admin` : assignations System, écritures Config opaques commitées et changements d’autorité Loader ; +- `kb_materializer_compliance_audit` : écritures et copies de bytecode Loader, avec hash et préfixe borné sans payload complet ; +- `kb_materializer_staking` : intentions/transitions Stake et Vote commitées. `pre.021` active des projections instructionnelles pour comptes Stake/Vote, autorités, lockup, vote state, retraits et rewards ; un snapshot final exige toujours l’état antérieur/suivant du compte, les crédits cumulés et les sysvars ; +- un matérialiseur transactionnel Compute Budget : profil fusionnant toutes les instructions Compute Budget du message. + +Les surfaces suivantes restent volontairement en decode/audit : + +- précompiles de signature, qui décrivent une vérification runtime sans état métier durable ; +- preuves ZK sans compte de contexte, qui n’ont pas de mutation persistante à projeter ; +- ancien ZK Token Proof Program, dont le runtime Agave `v4.1.1` est un stub sans effet. + +Chaque ajout futur doit indiquer le matérialiseur propriétaire, la source d’état et la politique de transaction, au lieu d’étendre automatiquement `solana_native_lifecycle`. diff --git a/olddocs/archivekbot2/docs/DECODER_SURFACE_AUDIT.md b/olddocs/archivekbot2/docs/DECODER_SURFACE_AUDIT.md new file mode 100644 index 0000000..f59f31b --- /dev/null +++ b/olddocs/archivekbot2/docs/DECODER_SURFACE_AUDIT.md @@ -0,0 +1,49 @@ + + + +# Audit des surfaces de décodage + +Ce document suit les noms de crates de décodeurs réservés, les aliases probables et les surfaces à consolider. Il s'appuie sur les IDL locales du dossier `idls/` et sur les matrices de conception historiques importées dans l'archive de travail. + +## Règle de décision + +Un nom de décodeur devient canonique seulement si au moins un des critères suivants est vérifié : + +- une IDL locale existe avec un `program_id` explicite ; +- le `program_id` est prouvé par corpus local ; +- le rôle de la surface est stable : DEX effectif, router, orderbook, launchpad, vault, lending, staking, etc. ; +- le nom respecte la nomenclature `_` sans alias marketing ambigu. + +Un nom historique sans `program_id` local reste en statut `alias_candidate` ou `watchlist`. Il ne doit pas recevoir de logique métier avant consolidation. + +## Aliases et doublons à traiter + +| Groupe | Canonique recommandé | Crates ou noms concurrents | Statut | Décision provisoire | +|------------------------|-----------------------------------------------------|-------------------------------------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| OKX Labs | `kb_decoder_okx_lab_v1` | `kb_decoder_okx_v1`, `kb_decoder_onchain_labs_dex_v1` | `alias_candidate` | L'IDL locale existe pour `okx_lab_v1` avec le programme `6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma`. Les noms `okx_v1` et `onchain_labs_dex_v1` ne doivent pas être implémentés séparément sans preuve contraire. | +| OKX Router | `kb_decoder_okx_dex_router` | `kb_decoder_okx_v2`, `kb_decoder_onchain_labs_dex_v2` | `alias_candidate` | L'IDL locale existe pour `okx_dex_router` avec le programme `proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u`. Les noms `okx_v2` et `onchain_labs_dex_v2` restent des noms historiques à vérifier. | +| GooseFX | `kb_decoder_goosefx_v2`, `kb_decoder_goosefx_gamma` | `kb_decoder_goosefx_v1` | `watchlist` | `goosefx_v2` et `goosefx_gamma` ont des IDL locales et des programmes distincts. `goosefx_v1` reste une entrée historique sans IDL locale dans l'archive courante. | +| Fusion AMM | `kb_decoder_fusion_amm` | `kb_decoder_fusionamm` | `alias_candidate` | L'IDL locale se nomme `fusion_amm`, mais son metadata interne peut utiliser `fusionamm`. Le crate canonique doit rester lisible : `fusion_amm`. | +| PancakeSwap | `kb_decoder_pancakeswap` | `kb_decoder_pancake_swap` | `alias_candidate` | L'IDL locale se nomme `pancakeswap`. Le crate avec underscore supplémentaire doit rester non canonique. | +| Orca Wavebreak | `kb_decoder_orca_wavebreak` | `kb_decoder_wavebreak` | `alias_candidate` | L'IDL locale se nomme `orca_wavebreak`. Le nom sans protocole est trop ambigu. | +| Jupiter Limit Order v2 | `kb_decoder_jupiter_limit_order_v2` | `kb_decoder_jupiter_limit_order_2` | `alias_candidate` | L'IDL locale utilise `jupiter_limit_order_v2`. Le suffixe `_2` ne doit pas être utilisé. | +| dFlow | `kb_decoder_dflow_v4` | `kb_decoder_dflow_aggregator_v4` | `alias_candidate` | L'IDL locale se nomme `dflow_v4`. Le nom `dflow_aggregator_v4` peut rester comme alias historique mais ne doit pas porter une implémentation distincte sans `program_id` différent. | +| Meteora DAMM v1 | `kb_decoder_meteora_damm_v1` | `kb_decoder_meteora_pools_amm` | `alias_candidate` | Les matrices historiques indiquent que `meteora_pools` peut être un alias de DAMM v1. La consolidation doit être décidée par `program_id`, corpus et naming final. | +| Raydium LaunchLab | `kb_decoder_raydium_launchlab` | `kb_decoder_raydium_launchpad` | `naming_mismatch` | L'IDL locale se nomme `raydium_launchlab`. L'ancien nom `launchpad` décrit la famille métier, mais pas forcément la surface canonique. | +| Raydium Lock | `kb_decoder_raydium_lock` | `kb_decoder_raydium_liquidity_locking` | `naming_mismatch` | L'IDL locale se nomme `raydium_lock`. Le nom `liquidity_locking` est descriptif. La surface canonique doit être confirmée avant implémentation. | +| Raydium Pool v4 | `kb_decoder_raydium_amm_v4` | `kb_decoder_raydium_pool_v4` | `audit_only` | La note historique indique que `raydium_pool_v4` ne doit pas être promu comme décodeur autonome sans `program_id` distinct et corpus local. | + +## Actions recommandées + +- Ne pas supprimer immédiatement les crates aliases tant que le squelette sert de matrice de réservation. +- Ne pas implémenter deux décodeurs pour le même `program_id`. +- Ajouter dans chaque décodeur un mapping explicite `surface_code`, `program_code` et `program_id` dès que le corpus commence. +- Déplacer les aliases historiques vers une table de catalogue ou un document de watchlist quand le support réel commence. +- Supprimer ou fusionner les crates aliases seulement dans un delta dédié, avec validation `cargo build` et manifeste de suppression. + +## Surfaces à ajouter ou renommer plus tard + +- Ajouter `kb_decoder_raydium_launchlab` si la décision est de refléter strictement le nom de l'IDL locale. +- Vérifier si `kb_decoder_raydium_launchpad` doit devenir un alias documentaire ou rester une surface métier. +- Vérifier si `kb_decoder_meteora_pools_amm` doit être fusionné dans `kb_decoder_meteora_damm_v1`. +- Vérifier si les crates `okx_v1`, `okx_v2`, `onchain_labs_dex_v1` et `onchain_labs_dex_v2` doivent être supprimés après confirmation des deux programmes OKX canoniques. diff --git a/olddocs/archivekbot2/docs/DELTA_WORKFLOW.md b/olddocs/archivekbot2/docs/DELTA_WORKFLOW.md new file mode 100644 index 0000000..776aafc --- /dev/null +++ b/olddocs/archivekbot2/docs/DELTA_WORKFLOW.md @@ -0,0 +1,58 @@ + + + +# Workflow delta + +Après le squelette initial, les livraisons doivent être faites sous forme de zip delta. + +## Nommage des zips + +Un delta qui touche la racine du workspace ou plusieurs modules doit utiliser : + +```text +khadhroony-bot2_vX.Y.Z-pre.abc.zip +``` + +Un delta qui ne touche qu'un seul module Rust doit utiliser : + +```text +kb_modulename_vX.Y.Z-pre.abc.zip +``` + +Exemples : + +```text +khadhroony-bot2_v0.1.0-pre.001.zip +kb_logging_v0.1.0-pre.002.zip +``` + +## Fichier `delta.md` + +Chaque zip delta doit contenir un fichier `delta.md` non versionné à la racine du zip. + +`delta.md` doit indiquer : + +- les fichiers ajoutés ; +- les fichiers modifiés ; +- les fichiers à supprimer manuellement ; +- les validations exécutées ; +- les validations non exécutées ; +- les remarques de compatibilité ou d'application du delta. + +## Contenu d'un delta + +Un delta contient uniquement : + +- les fichiers ajoutés ; +- les fichiers modifiés ; +- `delta.md`. + +Il ne doit pas contenir de fichiers inchangés. + +## Règles + +- Ne pas renvoyer un zip complet sauf demande explicite. +- Ne pas modifier `CHANGELOG.md` avant validation d'une version. +- Placer les évolutions prévues dans `ROADMAP.md`. +- Garder `README.md` descriptif. +- Documenter les suppressions dans `delta.md`, car un zip ne supprime pas les anciens fichiers à l'extraction. diff --git a/olddocs/archivekbot2/docs/DEVELOPMENT_ORDER.md b/olddocs/archivekbot2/docs/DEVELOPMENT_ORDER.md new file mode 100644 index 0000000..c93464d --- /dev/null +++ b/olddocs/archivekbot2/docs/DEVELOPMENT_ORDER.md @@ -0,0 +1,91 @@ + + + +# Ordre de développement + +## Principe + +La priorité est de rendre chaque transaction exploitable avant de payer un flux temps réel enrichi. Le développement suit donc l’ordre : acquisition gratuite, transaction canonique, extraction core, décodeurs, matérialisations, puis sources live payantes. + +## Ordre cible après `0.2.x` + +- [x] `0.1.x` : logging, configuration, clients HTTP/WS standard, rôles et démos RPC. +- [x] `0.2.0` à `0.2.5` : conventions PostgreSQL, stores raw/core historiques et diagnostics SQL. +- [x] `0.3.0` : cadrage Agave local historique, ensuite abandonné comme axe actif après mesures réelles. +- [x] `0.3.1` : transaction canonique, observations légères, validation PostgreSQL réelle et consolidation de la baseline SQL. +- [x] `0.3.2` : modèle canonique et adaptateur HTTP `getTransaction`. +- [x] `0.3.3` : backfill gratuit par signatures, programme, token et pool, avec parcours avant/après et arrêt coopératif borné. +- [~] `0.3.4` : extraction core, navigateur de candidats, intégrité et replay validés ; derniers tests automatisés de rollback/annulation à exécuter. +- [ ] `0.4.0` : infrastructure commune de décodage et de matérialisation. +- [ ] `0.4.1+` : décodeurs et matérialisations Solana Core/SPL. +- [ ] `0.5.x` : Pump. +- [ ] `0.6.x` : Meteora. +- [ ] `0.7.x` : Raydium. +- [ ] `0.8.x` : Orca. +- [ ] `0.9.x` : Jupiter, routeurs et surfaces complémentaires. +- [ ] `0.10.x` : Helius `transactionSubscribe`, Yellowstone gRPC, fallback standard et comparaison fournisseur. +- [ ] `0.11.x` : wallet, sécurité et démos devnet. +- [ ] `0.12.x` : listeners métier et trading assisté. + +## Ordre technique de stockage + +1. Maintenir une baseline SQL courante ne contenant que les tables actives. +2. Normaliser chaque source vers un contrat canonique dans `kb_model`. +3. Écrire une transaction unique dans `kb_sol_raw_transactions`. +4. Écrire une observation légère dans `kb_sol_obs_transaction_observations`. +5. Extraire les tables `kb_sol_core_*` depuis la transaction canonique. +6. Ajouter les observations programme/instruction nécessaires aux décodeurs. +7. Ajouter les tables `kb_sol_decode_*` et `kb_sol_mat_*` par surface. +8. Ajouter les sources live payantes seulement lorsque les décodeurs peuvent exploiter immédiatement le flux. + +## Séquence par surface + +```text +program ids + -> corpus de signatures + -> backfill gratuit + -> decodeur maximal + -> événements stables + -> matérialisation complète + -> replay et anti-régression + -> listener live +``` + +## Démos + +`kb_app_demo` reste le shell unique pour : + +- diagnostics DB ; +- backfills ; +- inspection canonique/core ; +- couverture des décodeurs ; +- comparaison future des sources live ; +- wallet et sécurité. + +## Contraintes permanentes + +- Ne pas créer de schémas PostgreSQL applicatifs explicites. +- Utiliser le format `kb_sol__`. +- Ne pas placer de structures Rust dans `queries/`. +- Ne pas faire dépendre les décodeurs du store concret. +- Ne pas faire dépendre les décodeurs du fournisseur d’acquisition. +- Intégrer Helius et Yellowstone dans `kb_rpc`, sans crate provider séparée. +- Ne pas modifier `CHANGELOG.md` avant validation locale du jalon. + +## État de clôture `0.3.4-pre.011` + +L’ordre technique est concrétisé jusqu’à l’écriture core et aux outils de replay : + +```text +backfill HTTP +-> transaction canonique +-> sélection raw bornée +-> extraction core pure +-> commit PostgreSQL atomique +-> ledger version/hash +-> sélection et export de corpus +``` + +Les validations réelles couvrent 70 transactions core, l’intégrité SQL, l’écriture CSV, le skip et le force replay sur 14 signatures. `pre.011` automatise le dernier contrôle de rollback PostgreSQL et rend les attentes réseau/retry annulables. + +L’ancien jalon `0.3.5` est supprimé. Après validation de `pre.011` et mise à jour du changelog, la prochaine version active est directement `0.4.0`. diff --git a/olddocs/archivekbot2/docs/DEVNET_EXECUTION.md b/olddocs/archivekbot2/docs/DEVNET_EXECUTION.md new file mode 100644 index 0000000..ad48772 --- /dev/null +++ b/olddocs/archivekbot2/docs/DEVNET_EXECUTION.md @@ -0,0 +1,119 @@ + + + +# Validation d’exécution Devnet + +Ce document décrit le premier parcours réseau réel de la couche d’exécution native et sa fenêtre Tauri Devnet. Le test backend reste opt-in et aucune activation Mainnet n’est autorisée. + +## Périmètre + +Le parcours exécute une instruction System transfer depuis le wallet temporaire persistant du profil `local_devnet` vers un destinataire éphémère créé uniquement pour le test. + +```text +wallet persistant + -> vérification du genesis hash Devnet + -> contrôle du destinataire et du minimum rent-exempt + -> lecture du solde + -> airdrop plafonné si nécessaire + -> plan System transfer + -> blockhash et estimation des frais + -> simulation exacte + -> signature locale + -> envoi avec preflight + -> confirmation bornée + -> getTransaction + -> insertion canonique + -> extraction core + -> decode replay System +``` + +Les clés privées restent dans `kb_wallet`. Elles ne sont ni sérialisées dans les résumés, ni envoyées à une WebView, ni écrites dans PostgreSQL ou les logs. + +## Préconditions + +- le profil `local_devnet` doit rester configuré sur le genesis hash Devnet officiel ; +- `temporary_wallet_enabled`, `temporary_wallet_persist` et `devnet_send_enabled` doivent être actifs ; +- la simulation et la confirmation opérateur doivent rester obligatoires ; +- PostgreSQL doit être disponible pour la validation canonique/core/decode ; +- le rôle `http_queries` doit accepter `getTransaction` et les lectures d’exécution ; +- le rôle `http_transactions` doit accepter simulation, envoi et lecture des statuts. + +Le wallet persistant par défaut est créé sous : + +```text +wallets/temporary/local_devnet/local-devnet-operator.json +``` + +Ce fichier n’est pas chiffré. Il est exclusivement destiné à Localnet/Devnet et ne doit jamais recevoir de fonds réels. + +## Exécution du test réel + +Depuis la racine du workspace : + +```bash +KB_DEVNET_EXECUTION_TEST=1 \ +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana_test' \ +KB_DEVNET_WALLET_DIR='./wallets/temporary/local_devnet' \ +KB_DEVNET_AIRDROP_LAMPORTS=0 \ +KB_DEVNET_TRANSFER_LAMPORTS=1000000 \ +cargo test -p kb_pipeline optional_devnet_system_transfer_from_env -- --nocapture +``` + +Variables : + +- `KB_DEVNET_EXECUTION_TEST=1` autorise explicitement le test réseau ; +- `KB_POSTGRES_TEST_URL` sélectionne la base de validation ; +- `KB_DEVNET_WALLET_DIR` peut isoler le wallet utilisé par le test ; +- `KB_DEVNET_AIRDROP_LAMPORTS` fixe le montant maximal demandé au faucet lorsque le solde est insuffisant ; +- `KB_DEVNET_TRANSFER_LAMPORTS` fixe le transfert System réel. + +Les valeurs restent soumises aux plafonds de `ExecutionConfig`. Une valeur d’airdrop supérieure à `devnet_airdrop_max_lamports` ou un transfert supérieur à `devnet_max_spend_lamports` est refusé avant tout appel mutable. + +## Résultat attendu + +Pour un destinataire inexistant, le pipeline appelle `getAccountInfo`, puis `getMinimumBalanceForRentExemption` avec une longueur de données nulle. Le transfert est refusé avant simulation lorsqu’il est inférieur au minimum retourné. Lorsqu’une simulation échoue malgré ces contrôles, l’erreur remontée conserve l’erreur runtime structurée et les vingt premières lignes de logs. + +Le test doit confirmer : + +- cluster classifié `Devnet` ; +- simulation exacte réussie ; +- signature locale vérifiée ; +- signature RPC identique à la signature calculée ; +- statut `confirmed` ou `finalized` ; +- transaction canonique présente ou déjà existante ; +- extraction core terminée ou déjà courante ; +- decode replay System terminé sans input unmatched ou failed. + +L’airdrop peut être absent lorsque le wallet possède déjà un solde suffisant. Le destinataire reste éphémère et sa clé privée n’est pas persistée. Après signature, tout échec ultérieur conserve la signature dans le résumé avec un diagnostic de l’étape concernée. + +## Fenêtre Tauri + +`demo_execution_solana_core` est accessible depuis la fenêtre principale. Elle expose uniquement les profils Devnet utilisant un wallet temporaire persistant. Elle permet de générer une adresse destinataire jetable, de simuler exactement le message ou de signer/envoyer après confirmation opérateur. Le plan, les comptes, les signataires, la simulation, la confirmation et les résultats canonical/core/decode sont affichés en lecture seule. La clé privée du wallet source reste exclusivement dans le backend Rust. + +Un airdrop demandé par la fenêtre reste soumis au plafond du profil et peut échouer lorsque le faucet public est limité. Un wallet déjà financé peut être utilisé avec une valeur d’airdrop nulle. + +## Limites + +- le faucet Devnet peut appliquer des limites temporaires ; +- `getTransaction` peut devenir disponible après la confirmation de statut, d’où les retries bornés ; +- le parcours utilise actuellement une transaction legacy avec recent blockhash ; +- durable nonce, ALT et transactions v0 seront validés dans des tranches dédiées ; +- aucune opération Mainnet n’est autorisée par ce test. + +## Validation de clôture `0.4.2` + +Le 13 juillet 2026, la commande complète a été exécutée avec : + +```bash +KB_DEVNET_EXECUTION_TEST=1 \ +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana_test' \ +KB_DEVNET_WALLET_DIR='./wallets/temporary/local_devnet' \ +KB_DEVNET_AIRDROP_LAMPORTS=0 \ +KB_DEVNET_TRANSFER_LAMPORTS=1000000 \ +cargo test -p kb_pipeline -- --nocapture +``` + +Les 56 tests de `kb_pipeline` ont réussi, y compris `optional_devnet_system_transfer_from_env`. Le wallet était déjà financé, aucun airdrop n’a été demandé et le parcours a confirmé la chaîne complète jusqu’au replay post-exécution. Les 45 tests de `kb_store_pg` ont également réussi avec PostgreSQL réel. + +Cette validation ne généralise pas l’autorisation à toutes les opérations administratives stateful. Elle prouve le parcours d’orchestration commun ; ALT, Config, Feature, Slashing, ZK, Stake, Vote et loaders restent soumis à leurs contrôles spécifiques avant toute future activation mutable. + diff --git a/olddocs/archivekbot2/docs/EXECUTION_MODEL.md b/olddocs/archivekbot2/docs/EXECUTION_MODEL.md new file mode 100644 index 0000000..95cc292 --- /dev/null +++ b/olddocs/archivekbot2/docs/EXECUTION_MODEL.md @@ -0,0 +1,387 @@ + + + +# Modèle d'exécution + +Ce document décrit la couche d'exécution universelle du workspace. + +## Séparation des responsabilités + +Un décodeur lit une transaction existante. Un exécuteur prépare une opération future. Les deux couches peuvent partager une surface canonique, mais elles ne doivent pas dépendre l'une de l'autre. + +```text +kb_decoder_amm_pump_swap -> observation, décodage, audit +kb_executor_amm_pump_swap -> construction future d'instructions d'achat/vente +``` + +## Bibliothèques universelles + +Le trading est le premier consommateur du workspace, pas la limite de ses crates. Les exécuteurs doivent pouvoir être réutilisés par une CLI, un worker, un outil d'administration, une application de jeu, une application Tauri ou un service autonome. + +Cette universalité implique : + +- un intent typé indépendant de l'interface utilisateur ; +- un plan déterministe sans I/O ; +- des builders couvrant les opérations officiellement appelables, y compris administratives ou dangereuses ; +- des politiques de sécurité séparées du builder ; +- une exposition UI volontairement plus étroite que la capacité de la bibliothèque ; +- aucune dépendance vers les décodeurs pour construire ou signer une transaction. + +Une opération dangereuse ne doit pas être supprimée de l'exécuteur. Elle doit être implémentée, testée, classifiée et soumise à une politique renforcée. `kb_app_demo` peut ne jamais l'exposer. + +## Couches + +- `kb_execution_api` définit les contrats communs des exécuteurs. +- `kb_execution_safety` regroupe les validations avant simulation, signature ou envoi. +- `kb_execution_solana` assemble les plans en messages/transactions Solana et orchestre la signature sans RPC. +- `kb_executor_solana_core` construit les instructions des programmes natifs. +- `kb_wallet` isole les secrets et fournit des signataires. +- `kb_rpc` fournit simulation, envoi et confirmation. +- `kb_pipeline` peut orchestrer la validation post-exécution par réingestion et replay. +- `kb_app_demo` ne fait qu'orchestrer une sélection sûre de ces capacités. + +## Pipeline obligatoire + +```text +intent + -> execution plan + -> policy checks + -> transaction build + -> simulation / dry-run + -> signature + -> send + -> confirmation + -> post-execution decode replay validation +``` + +Construction, signature, envoi et validation ne doivent jamais être fusionnés dans une fonction opaque. + +## Politique de couverture + +`Supported` signifie que le builder et son contrat de comptes/signataires sont implémentés. `Unsupported(reason)` reste acceptable uniquement lorsqu'une surface n'est pas appelable par transaction, a été retirée du runtime, ne dispose pas encore d'une source officielle suffisante ou constitue une dette temporaire explicitement planifiée. + +L'objectif de clôture de `kb_executor_solana_core` est de ne laisser aucune instruction native officiellement appelable oubliée. Les variantes historiques uniquement décodables ne doivent pas être artificiellement réémises. + +## Adaptateurs RPC de simulation + +`0.4.2-pre.004` ajoute dans `kb_rpc` les premières lectures nécessaires avant signature : + +```text +getGenesisHash +getLatestBlockhash +getFeeForMessage +simulateTransaction +``` + +Le genesis hash sert à classifier les clusters publics connus. Le réseau de production est nommé Mainnet dans le contrat public du workspace ; le hash est inchangé et certains endpoints/CLI conservent encore l’alias historique `mainnet-beta`. Un hash inconnu reste explicite et n’est pas automatiquement assimilé à Devnet ou Mainnet. Le blockhash et sa dernière block height valide sont conservés séparément. L’estimation des frais accepte une valeur nulle lorsque le message référence un blockhash expiré. + +La simulation accepte une transaction base64 non signée lorsque `sigVerify = false`; `replaceRecentBlockhash = true` permet au nœud de remplacer le blockhash avant simulation. Les erreurs runtime restent un résultat de simulation typé et ne sont pas confondues avec une erreur HTTP ou JSON-RPC. + +`kb_rpc` ne fabrique pas le contexte de sécurité : cluster attendu, âge du blockhash, nonce account et nonce authority sont fournis explicitement lors de la conversion vers `ExecutionSimulationResult`. Depuis `pre.013`, `getAccountInfo` possède aussi un mode données complètes borné : le mode metadata-only conserve `dataSlice.length = 0`, tandis que `confirmed_with_data(max_data_bytes)` exige un tuple base64 complet dont la longueur décodée égale `space`. + +## Assemblage et signature Solana + +`0.4.2-pre.005` introduit `kb_execution_solana`, frontière commune entre les exécuteurs et les adaptateurs RPC. La crate convertit les `PlannedInstruction` en instructions SDK, compile le message avec son fee payer et sa source de blockhash, puis vérifie que les signataires réellement compilés correspondent exactement au contrat du plan. + +La transaction non signée fournit deux sorties distinctes : + +```text +message base64 -> getFeeForMessage +transaction non signée -> simulateTransaction(sigVerify=false, replaceRecentBlockhash=false) +``` + +Le résultat de simulation est lié au hash exact du message et à la valeur de blockhash ou nonce compilée. Une simulation avec remplacement de blockhash reste utile au diagnostic, mais ne peut pas autoriser la signature du message original. La signature refuse un résultat provenant d’un autre message ou d’une autre valeur nonce, réévalue `kb_execution_safety`, exige la décision `Allow`, puis résout tous les signataires via l’interface Solana `Signer`. Les signataires manquants, supplémentaires ou dupliqués sont refusés. La transaction signée reste en mémoire/backend et n’est ni envoyée ni exposée automatiquement à Tauri. + +La sérialisation transactionnelle utilise le schéma officiel `wincode` fourni par les types Solana et applique la limite réseau de 1 232 octets. Aucun appel direct à `bincode` n’est ajouté. + +### Chemin durable nonce réel — `pre.013` + +Le lifecycle d’un compte nonce et la consommation d’un durable nonce sont deux contrats distincts. Les opérations `initialize`, `advance`, `authorize`, `withdraw` et `upgrade` administrent le compte avec une politique `Latest`. Une transaction métier utilisant un nonce durable suit le chemin stateful suivant : + +```text +getAccountInfo complet et borné à la taille nonce officielle + -> validation owner System Program / non-executable / space exact + -> décodage wincode Versions::Current(State::Initialized) + -> concordance compte et autorité avec ExecutionBlockhashPolicy + -> Message::new_with_nonce + -> AdvanceNonceAccount en instruction 0 + -> valeur nonce comme recent_blockhash du message + -> simulation exacte sans remplacement + -> signature du même hash de message et de la même valeur nonce +``` + +`kb_executor_solana_core` ajoute l’autorité nonce aux signataires requis du plan métier. `kb_execution_solana` refuse les états legacy ou non initialisés, conserve le plan source immuable, expose un plan effectif avec l’avance injectée et exige que le SDK reconnaisse la transaction comme durable nonce. La lecture RPC, l’assemblage, la simulation et la signature restent des étapes séparées. + + +### Builders Address Lookup Table — `pre.015` + +`kb_executor_solana_core` couvre les cinq opérations client de l’interface Address Lookup Table : création, extension, gel, désactivation et fermeture. Le builder stateless garantit le program ID, le payload, l’ordre des comptes et les signataires exacts, mais ne prétend pas connaître l’état courant du compte ni le coût de rent calculé par le runtime. + +```text +intent ALT typé + -> builder officiel exact + -> plan avec autorité/payer explicites + -> lecture RPC stateful du compte et du slot + -> contrôle owner / autorité / état / capacité / cooldown + -> calcul du top-up rent-exempt et simulation exacte + -> politique de dépense + -> signature et envoi +``` + +La création dérive la table depuis l’autorité et un slot récent. L’extension conserve l’ordre des adresses, exige une liste non vide et borne l’input à la capacité maximale officielle ; la capacité restante et le top-up effectif doivent être contrôlés sur le compte réel. Le gel est irréversible. La fermeture n’est autorisée qu’après désactivation et expiration du cooldown lié aux slots. `requested_spend_lamports` reste nul dans le plan ALT parce qu’aucun montant de rent n’est encodé directement dans l’instruction ; l’orchestrateur doit calculer le top-up à partir du compte réel et du minimum rent-exempt, le comparer au plafond de dépense, puis confirmer l’instruction par simulation. + + +### Précompiles de signature — `pre.016` + +Les précompiles Ed25519, secp256k1 et secp256r1 sont des vérifications natives, pas des signatures de transaction. Leur plan ne déclare aucun compte applicatif ni signataire propre ; le fee payer signe uniquement la transaction. Le programme métier qui consomme la preuve doit inspecter l’instruction correspondante et appliquer lui-même son contrat d’autorisation. + +```text +message + signature + clé/adresse + -> builder inline ou table d’offsets officielle + -> instruction précompile sans comptes + -> positionnement transactionnel exact + -> programme consommateur qui inspecte le sysvar d’instructions + -> simulation exacte + -> signature Solana du fee payer et des signataires métier distincts +``` + +Les formes inline Ed25519 et secp256r1 utilisent `u16::MAX` comme référence à leurs propres données. secp256k1 encode des index d’instruction `u8` sans sentinelle ; la forme inline et les références locales du builder exigent donc que l’instruction secp256k1 soit à l’index transactionnel `0`. Un futur assembleur multi-plans doit refuser ou réécrire explicitement toute combinaison qui violerait cette position. + +Les tables avancées acceptent des références externes et un buffer local ajouté après les offsets. Le builder borne le nombre d’entrées à 255, la taille totale à 65 535 octets et les plages locales connues. Il ne lit pas les données des autres instructions : leur cohérence cryptographique est vérifiée par le runtime et leur signification métier par le programme consommateur. + +La signature secp256r1 est fournie au format compact `r || s`; le builder exige des composants non nuls et la forme low-S imposée par le runtime. Le builder secp256k1 reçoit la signature compacte, le recovery ID et l’adresse Ethereum déjà dérivée ; il ne manipule aucune clé privée et n’active aucun helper `bincode`. Le runtime secp256k1 ne garantit pas la canonicalité low-S : lorsqu’elle est requise, cette politique appartient au programme consommateur ou à une validation métier explicite. + + +### Config, Feature, Slashing et ZK ElGamal — `pre.017` + +Les opérations administratives natives restent des plans déterministes sans accès RPC implicite. + +```text +état/rent fourni par l’orchestrateur + -> builder exact + -> plan et signataires + -> lecture stateful de confirmation + -> simulation exacte +``` + +Config encode manuellement le contrat `ConfigKeys + données sérialisées` afin de ne pas activer le helper `bincode` de l’interface. Feature reproduit les séquences officielles d’activation et de révocation. Les montants de rent sont des entrées explicites comptabilisées dans le plafond de dépense. + +La preuve de bloc dupliqué Slashing est indivisible : transfert de préfinancement, instruction Ed25519 et instruction Slashing doivent conserver leurs positions. Le plan refuse donc durable nonce et exige un recent blockhash normal. Le compte de preuve, la fenêtre temporelle, le montant rent-exempt et la rétention avant fermeture relèvent de l’orchestrateur stateful. + +ZK ElGamal accepte une preuve inline ou une preuve dans un compte, avec création optionnelle d’un contexte déjà préalloué. La fermeture exige l’autorité comme signataire. Le builder vérifie discriminant, taille et comptes, mais ne crée pas le contexte et ne recalcule pas la preuve cryptographique. L’ancien ZK Token Proof est historique et reste `decode-only`. + +## Stake et Vote dans la bibliothèque + +`pre.018` ajoute les vingt-quatre helpers clients actuels de `solana-stake-interface 4.3.1` sous forme de plans déterministes. Les formes composées conservent l’ordre officiel : création System puis initialisation Stake, délégation ajoutée en dernier, allocation/assignation avant split. Les rôles staker/withdrawer sont typés par `StakeAuthorizationKind`. + +`pre.019` ajoute les vingt variantes wire Vote actuelles et quatre créations composées legacy/V2. Les autorités Ed25519/BLS, commissions, collecteurs, votes, switch proofs, compact updates et TowerSync sont encodés avec l’enum officielle `VoteInstruction` et `wincode`. Les créations, retraits et dépôts de récompenses déclarent leurs lamports dans le plafond de dépense. + +La construction reste stateless. Avant simulation puis envoi, l’orchestrateur doit charger et valider l’état des comptes Stake/Vote, les autorités, le lockup, le rent, le minimum de délégation, les epochs d’activation/désactivation, la compatibilité merge/split/move, la version Vote, les collecteurs et l’admissibilité runtime de la tour. `Redelegate` reste historique `decode-only`, car l’interface officielle le déclare déprécié et non activable. + +## Loaders dans la bibliothèque + +`pre.020` ajoute onze plans Loader v3 et neuf plans Loader v4. Loader v3 utilise les helpers de `solana-loader-v3-interface 8.x` et leur schéma `wincode` pour créer des buffers, écrire, déployer, upgrader, modifier les autorités, fermer et étendre. Loader v4 conserve le contrat officiel des sept discriminants, mais son wire est construit localement et explicitement parce que les helpers publiés sont conditionnés par `bincode` et qu’aucun schéma `wincode` n’est exposé. + +Les plans de création conservent l’ordre atomique System puis Loader. Les écritures sont bornées, les offsets contrôlés contre les dépassements, les comptes/signataires reproduisent l’interface officielle et les lamports explicitement transférés sont inclus dans `requested_spend_lamports`. Les loyers calculés dynamiquement par le runtime ne sont pas inventés par le builder. + +Avant simulation, l’orchestrateur stateful doit vérifier owner, état courant, autorité, taille/capacité, rent, existence des comptes Program/ProgramData/buffer, relations dérivées et admissibilité de fermeture ou d’extension. Les opérations Loader restent hors de la démo opérateur. BPF Loader v1/v2 sont historiques `decode-only`; Native Loader correspond au déploiement du logiciel validator et n’expose pas d’instruction client autonome. + + +## Préflight stateful natif — `pre.022` + +Les builders restent déterministes et sans I/O. `kb_pipeline::inspect_solana_core_stateful_readiness` ajoute une étape séparée avant la simulation pour les opérations dont l’admissibilité dépend de comptes ou de l’époque courante. + +```text +SolanaCoreOperation + -> plan stateless + -> préflight stateful Localnet/Devnet + -> rapport Ready / Blocked / NotRequired + -> simulation exacte +``` + +Le préflight vérifie le genesis hash attendu et utilise uniquement des RPC typés. Il couvre : + +- ALT : PDA de création, slot récent, owner, autorité, capacité, rent top-up, état actif/désactivé et cooldown de fermeture ; +- Config : absence/réutilisation contrôlée, allocation calculée, owner et espace disponible ; +- Feature : compte absent ou System réutilisable, rent mesuré et état pending avant révocation ; +- Slashing : compte de preuve complet et borné, deux shreds length-prefixed, fenêtre d’un epoch, rent du rapport, destination retenue et délai de fermeture ; +- ZK ElGamal : plage de preuve, owner/space/rent du contexte préalloué, état zéro avant écriture, puis autorité et discriminant avant fermeture. + +Le rapport contient des codes de contrôle stables, des faits mesurés et le plus haut slot de contexte observé. Il ne signe, ne simule et n’envoie aucune transaction. Testnet et Mainnet sont refusés dans cette couche tant que les parcours Localnet/Devnet ne sont pas validés. + +## Préflight stateful SPL Token classique — `0.4.4-pre.005` + +Le même découpage s’applique à SPL Token : `kb_executor_spl_token` construit un plan universel sans I/O, puis `kb_pipeline::inspect_spl_token_stateful_readiness` vérifie l’état Localnet ou Devnet avant simulation. Le décodeur ne réalise aucune lecture RPC. + +Le préflight lit des données complètes bornées et reproduit les layouts classiques Mint, Account et Multisig. Il contrôle notamment owner programme, initialisation, mint/decimals, état frozen, solde et réserve native, delegate/allowance, autorités spécialisées, seuil multisig et rent des comptes préparés. Les montants restent des entiers bruts exacts. Une précondition métier invalide produit `Blocked`; une erreur de transport ou de forme reste une erreur `kb_core`. + +La preuve réseau est séparée en deux niveaux. Le test opt-in de `pre.005` vérifie en lecture seule un `TransferChecked` sur des comptes Devnet fournis explicitement. Le scénario opérateur complet doit ensuite créer des comptes classiques sans ATA, simuler par défaut, et ne signer/envoyer qu’avec une autorisation distincte ; après confirmation, il doit réutiliser hydratation canonique, extraction core, replay, projections et second replay idempotent. + +`pre.005-delta-fix-001` relie ce préflight au chemin d’exécution commun. La simulation constitue une API autonome sans store et conserve le plan, le rapport stateful, le blockhash, les frais et le résultat runtime. La soumission est une seconde API : elle refuse tout signataire absent du wallet de profil, puis applique confirmation, hydratation, extraction, decode replay, requête matérialisée bornée et preuve d’idempotence. Cette restriction de signataire appartient à l’orchestrateur actuel, pas à l’exécuteur universel ni au wire multisig. + +Le 15 juillet 2026, ce parcours a réussi en simulation puis avec un envoi `TransferChecked` réel sur Devnet, entre deux comptes auxiliaires classiques créés sans dépendance ATA. `pre.005-delta-fix-002` durcit la preuve opt-in : résultat d’envoi présent, confirmation `confirmed` ou `finalized`, premier replay sans échec ni refus, matérialisation Token présente, second replay sans échec, refus ou nouvelle sortie, et signature imprimée pour l’audit. + +`0.4.4-pre.006` compose ce contrat sans le contourner. La préparation interne génère trois keypairs éphémères, mesure le rent exact puis construit trois `SystemCreateAccount` officiels avec le propriétaire Token classique et les tailles 82/165/165. Chaque création est simulée, signée par le payeur et le nouveau compte, confirmée, puis relue pour vérifier owner, rent, taille, absence d'executable et données entièrement nulles. Les clés de création peuvent ensuite disparaître : les initialisations Token n'en ont pas besoin. Le lifecycle n'utilise pas ATA. Après autorisation destructive explicite, il exécute onze transactions séparées : initialisation du mint, initialisation des deux comptes, mint checked, transfer checked, approve checked, revoke, burn checked des deux soldes puis fermeture des deux comptes. Une étape incomplète arrête la séquence ; la suivante n'est construite qu'après confirmation, hydratation, extraction, décodage, matérialisation et second replay idempotent de la précédente. + +Une confirmation RPC interrompue ne rend pas la séquence aveuglément rejouable : les initialisations Token ne sont pas idempotentes. La reprise exige donc l'index de la prochaine étape et la signature confirmée de son prédécesseur. Le pipeline hydrate cette signature, extrait le core, impose le decode Token commité, vérifie l'opération matérialisée attendue et un second replay sans sortie avant de construire l'étape suivante. Un délai borné entre étapes réduit les rafales vers le RPC public ; il ne transforme pas un statut inconnu en succès. + +Cette reprise a été exercée sur Devnet le 15 juillet 2026 après un throttling `429` puis une confirmation momentanément incomplète. L'initialisation du compte destination déjà finalisée a été récupérée depuis sa signature canonique ; les étapes 3 à 10 ont ensuite achevé `MintToChecked`, `TransferChecked`, `ApproveChecked`, `Revoke`, deux `BurnChecked` et deux `CloseAccount`. Les neuf étapes récupérées ou envoyées ont chacune validé une matérialisation et un second replay idempotent. + +`0.4.4-pre.007` n'ajoute aucune nouvelle couche d'exécution. La fenêtre Tauri existante construit un intent `TransferChecked` mince, puis appelle le même `execute_devnet_spl_token`. Le journal opérateur interroge au maximum 500 lignes via `MaterializedEventFilter`; les filtres exacts mint, compte et opération sont appliqués au payload typé en mémoire. La frontière UI conserve slots et montants bruts sous forme de chaînes et ne revendique aucun snapshot final ni agrégat OHLC. + +`docs/NATIVE_SOLANA_EXECUTION_MATRIX.json` constitue l’inventaire machine-readable de clôture. Un test Rust de `kb_executor_solana_core` charge cette matrice et impose dix-huit surfaces, 109 opérations appelables exactement égales à `SOLANA_CORE_OPERATION_CODES`, ainsi qu’une justification non vide pour chaque surface sans builder client. Le validateur Python provisoire a été supprimé. + +## Préflight stateful ATA — `0.4.5-pre.004` + +`kb_executor_spl_associated_token_account` construit exactement un builder officiel parmi +`Create`, `CreateIdempotent` et `RecoverNested`. Le Token Program classique ou Token-2022 fait +partie de l’intent et de la dérivation ; la bibliothèque ne lie toujours pas un plan à un endpoint +ou à un wallet concret. + +`kb_pipeline::inspect_spl_associated_token_account_stateful_readiness` est la frontière I/O +Localnet/Devnet. Elle vérifie le genesis, le Program ID ATA, la simulation obligatoire, les mints, +les PDA, l’absence stricte pour `Create`, la compatibilité absence/compte existant pour +`CreateIdempotent`, les trois comptes Token de `RecoverNested`, tous les signataires et le solde du +payer couvrant le plafond rent-plus-frais. + +Les comptes Token-2022 peuvent dépasser 165 octets. Le préflight valide leur préfixe Token Account +commun et laisse les extensions opaques ; il ne commence donc pas `0.4.6`. Le rent minimal du +compte de base et le plafond sont contrôlés avant simulation. La taille et le rent exacts imposés +par des extensions restent vérifiés par le runtime pendant la simulation obligatoire. + +Le rapport `Ready`/`Blocked` ne signe, ne simule et n’envoie rien. L’orchestration de soumission, +confirmation et replay reste une tranche séparée afin qu’un statut RPC inconnu ne provoque jamais +une recréation ATA aveugle. + +## Orchestration ATA Devnet — `0.4.5-pre.005` + +`execute_devnet_spl_associated_token_account` réutilise les frontières communes validées : wallet +persistant de profil, plan typé, préflight stateful, message exact, frais, simulation liée au hash, +signature après autorisation, envoi et confirmation. Après confirmation, la signature déjà connue +est hydratée par tentatives bornées ; chaque tentative RPC autorise deux reprises internes pour les +réponses transitoires telles que `429`, sans reconstruire ni renvoyer l’instruction ATA. + +Le replay sélectionne toujours le Program ID ATA. Pour une cible SPL Token classique, il sélectionne +aussi le Program ID Token afin de décoder les CPI internes, tout en laissant chaque matérialiseur +posséder uniquement ses faits. Pour Token-2022, il ne prétend pas décoder les instructions ou +extensions CPI générales réservées à `0.4.6`. La seconde passe inclut l’état matérialisé et doit ne +produire aucune nouvelle sortie. + +La bibliothèque d’exécution ATA reste indépendante du cluster et du wallet. L’orchestrateur Devnet +fourni ne peut signer qu’avec le wallet persistant du profil ; un `RecoverNested` exigeant une autre +clé est donc refusé comme signataire indisponible. La fenêtre Tauri existante expose seulement les +modes représentatifs `Create` et `CreateIdempotent`, la dérivation readonly et un journal ATA borné. + +Le 16 juillet 2026, le parcours classique `CreateIdempotent` a été confirmé deux fois sur le même +ATA Devnet. La première signature `2H9V…CPbP` et la seconde `3wWT…fv6q` ont chacune réussi +simulation, confirmation, hydratation canonique, extraction, décodage, projection lifecycle unique +et second replay sans nouvelle sortie. La seconde exécution prouve le chemin compte existant +compatible ; elle reste un fait transactionnel distinct et non un doublon de replay. + +Le garde-fou Token-2022 a également refusé correctement le Program ID `TokenzQd…` lorsqu’il était +fourni à la place d’un compte mint : owner, layout Mint et état initialisé ne correspondaient pas. +La preuve positive utilise ensuite le mint contrôlé `3DxK…KTE`, initialisé sur 82 octets et possédé +par Token-2022. `CreateIdempotent` a créé puis réutilisé l’ATA `6WfC…C9Y`, compte de 170 octets +initialisé pour `DwuA…g8B2` avec l’extension `ImmutableOwner`. Les signatures `bMMj…QAJ` au slot +476702448 et `4RZK…VSG` au slot 476703343 ont chacune été simulées, confirmées, hydratées, décodées +et matérialisées une fois, puis ignorées au second replay. L’état préalable observé établit la +réutilisation de la seconde transaction, tandis que la projection parent conserve correctement +`created_or_reused` car l’instruction seule ne distingue pas ces branches. + +`RecoverNested` reste volontairement hors UI. Son parcours contrôlé opt-in reçoit deux mints et une +fixture nested déjà préparée, puis réutilise le même orchestrateur afin de vérifier simulation, +confirmation, fermeture du nested ATA, destination cohérente, deux projections ATA/risk et second +replay idempotent sans introduire de décodeur Token-2022 général. + +La preuve Devnet classique du 16 juillet 2026 utilise `3tdX…FbF5`, ATA wrapped SOL du wallet, +comme owner du nested ATA `AAyv…gti5`. Celui-ci contenait exactement 1 token, soit +1 000 000 000 unités brutes du mint `3fd5…hC9A`, et la destination `69TP…fyWp` était vide. La +signature `37LG…HskM` a transféré le montant complet, fermé le nested ATA, conservé l’owner ATA et +la destination initialisés, produit exactement les deux sorties parent `nested_ata_recovered` et +`nested_ata_anti_pattern_recovered`, puis réussi le second replay sans doublon. Les mutations CPI +Token de transfert et fermeture ne sont pas recopiées dans les projections parent ATA. + +## Soumission et confirmation RPC + +`0.4.2-pre.008` complète la frontière réseau sans fusionner les étapes : + +```text +SignedSolanaTransaction + -> sendTransaction avec preflight obligatoire + -> contrôle de la signature primaire retournée + -> getSignatureStatuses borné + -> getBlockHeight pour détecter l’expiration + -> confirmed / finalized / failed / expired / timed_out +``` + +`sendTransaction` signifie uniquement que le nœud a accepté la transaction signée pour relay. La confirmation reste une opération séparée. La politique borne le nombre de polls et leur intervalle, conserve le dernier slot et la dernière block height observée, puis termine explicitement sur succès, erreur runtime, expiration du recent blockhash ou timeout. + +`requestAirdrop` et `getBalance` sont ajoutés comme primitives génériques de laboratoire. Le plafond d’airdrop Devnet appartient à la configuration et sera appliqué par l’orchestrateur du parcours réel ; la méthode RPC reste indépendante de Tauri et du wallet concret. + +## Wallet temporaire persistant + +`0.4.2-pre.003` introduit un signer de laboratoire dans `kb_wallet` : + +```text +wallets/temporary//.json +``` + +Il peut être généré en mémoire ou persisté afin de conserver la même adresse entre plusieurs démarrages, recevoir un airdrop devnet, créer des comptes et signer les transactions de validation. Le fichier utilise le format JSON Solana standard, reste exclu du dépôt et reçoit des permissions privées sur Unix. + +Ce backend n'est pas un wallet de production : il n'est pas chiffré et les profils fournis l'interdisent sur mainnet. Les futurs backends chiffrés, coffre système et hardware wallet devront conserver la même frontière de signature afin que les exécuteurs ne changent pas. + +## Garde-fous obligatoires + +- dry-run activé par défaut ; +- simulation RPC obligatoire avant envoi ; +- cluster réel comparé au cluster attendu ; +- contrôle du wallet source et des signataires requis ; +- plafond de dépense, de frais et de compute-unit price ; +- fraîcheur du blockhash ou état nonce durable complet, courant, initialisé et concordant ; +- confirmation explicite pour tout envoi mainnet ; +- journalisation séparée des plans et résultats ; +- validation post-exécution par transaction canonique, extraction core, décodage et matérialisation. + +## Exposition dans `kb_app_demo` + +La démo exposera uniquement un sous-ensemble opérationnel sûr : transfert, création/allocate/assign contrôlés, Compute Budget et durable nonce après ajout d’un orchestrateur stateful validé sur cluster. Stake, Vote, loaders, changement d'autorité, Feature, Slashing et opérations ZK peuvent être disponibles dans les crates sans apparaître dans la fenêtre Tauri. + + +## Orchestration Devnet et validation post-exécution + +`0.4.2-pre.009` ajoute dans `kb_pipeline` une orchestration backend bornée pour le premier parcours System transfer sur Devnet. La fonction publique ne remplace aucune couche : elle appelle successivement les contrats existants et conserve leurs résultats séparés. + +```text +classification du genesis hash + -> wallet temporaire persistant + -> solde / airdrop plafonné + -> PreparedExecutionPlan System transfer + -> getLatestBlockhash + -> getFeeForMessage + -> simulateTransaction exact + -> signature locale + -> sendTransaction + -> getSignatureStatuses + getBlockHeight + -> getTransaction + -> transaction canonique + -> extraction core + -> decode replay ciblé +``` + +Le mode par défaut reste une simulation seule. Il ne signe pas, n’envoie pas et ne fabrique pas de signature vide. Le parcours soumis exige simultanément l’autorisation `submit`, la confirmation opérateur lorsque le profil l’impose, l’activation Devnet du wallet, un plafond de dépense et une simulation exacte réussie. + +Le financement par faucet est une étape distincte, uniquement disponible sur Devnet et bornée par `devnet_airdrop_max_lamports`. Il est déclenché seulement lorsque le solde du wallet persistant ne couvre pas le transfert plus le plafond de frais. L’airdrop est lui-même confirmé avant de poursuivre. + +`0.4.2-pre.010` ajoute une précondition liée au destinataire. Le mode metadata-only de `getAccountInfo` détermine si l’adresse existe déjà. Lorsqu’elle est absente, `getMinimumBalanceForRentExemption(0)` fournit le minimum nécessaire à la création implicite d’un compte System sans données ; un transfert inférieur est refusé avant simulation. Les échecs de simulation conservent désormais l’erreur runtime et un extrait borné des logs. La fenêtre `demo_execution_solana_core` ne réimplémente aucune de ces règles : elle sélectionne un profil Devnet, construit la requête et relaie les événements du pipeline. + +Après une confirmation terminale, le pipeline hydrate exclusivement la signature envoyée. Une transaction on-chain échouée reste éligible à l’insertion canonique et au décodage comme intention échouée. Une expiration ou un timeout arrête la validation post-exécution sans prétendre que l’envoi a été confirmé. + +Une erreur avant signature reste un `Err`. Dès qu’une signature locale existe, l’orchestrateur conserve cette signature et transforme les erreurs d’envoi, de confirmation ou de replay en diagnostics dans le résumé. Cette règle évite qu’un appelant perde la référence d’une transaction potentiellement diffusée. + +L’orchestrateur est une API de bibliothèque et ne dépend pas de Tauri. La fenêtre `demo_execution_solana_core` expose uniquement une sélection Devnet réduite de ce backend ; les opérations administratives natives restent disponibles à terme dans les bibliothèques sans être nécessairement proposées dans l’interface. + +## État de clôture `0.4.2` + +Le parcours représentatif Devnet a validé la chaîne plan → simulation exacte → signature → envoi → confirmation → hydratation canonique → extraction core → decode replay. Les builders administratifs supplémentaires restent disponibles dans la bibliothèque, mais ne reçoivent aucune autorisation Mainnet implicite. + +La règle de clôture est donc la suivante : complétude du wire et des plans offline, politique de sécurité et préflight stateful présents, puis preuve cluster obligatoire avant toute exposition mutable supplémentaire. Un statut `future` dans la matrice désigne cette preuve d’activation, pas une instruction manquante. diff --git a/olddocs/archivekbot2/docs/EXECUTOR_SURFACE_MATRIX.md b/olddocs/archivekbot2/docs/EXECUTOR_SURFACE_MATRIX.md new file mode 100644 index 0000000..90c57e6 --- /dev/null +++ b/olddocs/archivekbot2/docs/EXECUTOR_SURFACE_MATRIX.md @@ -0,0 +1,130 @@ + + + +# Matrice des exécuteurs + +## Matrice canonique machine-readable — `pre.022` + +Le fichier `docs/NATIVE_SOLANA_EXECUTION_MATRIX.json` est désormais la source vérifiable pour la clôture de l’exécuteur natif. Il contient exactement : + +- 18 surfaces natives ; +- 14 surfaces `callable` ; +- 4 surfaces `non_invocable` ou historiques ; +- 109 opérations callable, chacune munie de sa source de construction, politique, préflight stateful, contrat de test, décision cluster et exposition UI. + +Les quatre classifications sans builder client sont BPF Loader v1, BPF Loader v2, Native Loader et l’ancien ZK Token Proof historique. Un test Rust charge la matrice et la compare à `SOLANA_CORE_OPERATION_CODES`; toute omission, duplication ou opération inconnue fait échouer `cargo test -p kb_executor_solana_core`. Le validateur Python provisoire a été supprimé. + +Le préflight stateful est actif pour Address Lookup Table, Config, Feature, Slashing et ZK ElGamal. Stake, Vote et Loaders restent marqués `future` dans la matrice pour leur preuve d’activation stateful approfondie ; cela ne retire aucun builder de la surface appelable, mais interdit toute exposition mutable sans validation cluster dédiée. + + +Cette matrice suit la symétrie entre surfaces de décodage et surfaces de construction d’instructions. Elle ne confond pas réservation d’une crate, disponibilité d’un builder, autorisation d’envoi et exposition dans une interface. + +## Socle d’exécution + +| Crate | Rôle | +|-----------------------|------------------------------------------------------------------------------| +| `kb_execution_api` | Contrats provider-neutral des capacités, politiques, plans et résultats. | +| `kb_execution_safety` | Garde-fous stateless avant simulation, signature ou envoi. | +| `kb_execution_solana` | Compilation Solana, blockhash/nonce, preuve de simulation et signature. | +| `kb_rpc` | Acquisition, simulation, envoi et confirmation JSON-RPC ; aucune clé privée. | +| `kb_wallet` | Résolution des signataires derrière un backend explicite. | + +## Règle mécanique + +Pour chaque décodeur de programme ou de protocole classifié : + +```text +kb_decoder_ -> kb_executor_ +``` + +Deux crates de décodage ne suivent volontairement pas cette règle : + +- `kb_decoder_api` est le contrat commun des décodeurs, pas un programme appelable ; +- `kb_decoder_anchor` est un helper technique partagé, pas une surface on-chain autonome. + +L’audit du workspace `0.4.2-pre.014` trouve : + +```text +104 crates kb_decoder_* +102 crates kb_executor_* +102 paires mécaniques exactes +2 exceptions techniques documentées +0 exécuteur orphelin +``` + +## Répartition des 102 surfaces appariées + +| Famille | Paires | +|---------------------------------------------------------------------------------------------------------------|----------:| +| AMM | 26 | +| Launchpad | 9 | +| SPL | 8 | +| Lending | 7 | +| CLMM | 6 | +| Router | 6 | +| Vault | 6 | +| Bridge | 4 | +| Stable | 4 | +| Orderbook | 3 | +| Perpetuals | 3 | +| Staking | 3 | +| Admin | 2 | +| Fees | 2 | +| Adapter, CPMM, DLMM, Governance, Lock, Metadata, NFT, RWA, Solana Core, Treasury, Vesting, Wallet et Weighted | 1 chacune | + +## Niveaux de maturité + +Une paire doit utiliser un statut explicite : + +| Statut | Signification | +|------------------|--------------------------------------------------------------------------------------------------| +| `reserved` | Crate et identité réservées ; aucun builder utilisable. | +| `implementing` | Contrat officiel et politiques en cours de validation. | +| `complete` | Toutes les opérations client officiellement appelables du périmètre sont construites et testées. | +| `not_applicable` | Surface non invocable, retirée ou purement technique, avec justification officielle. | + +`Unsupported(reason)` est acceptable pendant l’implémentation ou pour une impossibilité officielle précise. Il ne doit pas masquer une opération callable oubliée. + +## Politique de jalon + +Chaque version qui active un décodeur doit également : + +1. identifier la crate `kb_executor_` correspondante ; +2. attribuer un statut de maturité à l’exécuteur ; +3. lister les opérations client appelables et les opérations historiques decode-only ; +4. définir autorités, signataires, coûts, slippage ou autres garde-fous ; +5. comparer les payloads et comptes à un builder, une IDL ou un layout officiel ; +6. ajouter les tests offline puis localnet/devnet nécessaires ; +7. documenter l’API publique de la crate dans son README ; +8. décider séparément quelles opérations sont visibles dans `kb_app_demo` ou activables par une stratégie. + +Une opération dangereuse peut rester hors UI, mais elle reste dans le périmètre de la bibliothèque lorsqu’elle est officiellement appelable. + +## Programme Solana Core + +`kb_executor_solana_core` est la première surface passée de `reserved` à une implémentation opérationnelle. Après `pre.021`, elle expose toujours 109 opérations : 17 System, 4 Compute Budget, 5 Address Lookup Table, 6 précompiles de signature, 2 Config, 2 Feature, 2 Slashing, 3 ZK ElGamal, 24 Stake, 24 Vote, 11 Loader v3 et 9 Loader v4. + +| Surface native | Statut à la clôture `0.4.2` | Décision | +|-------------------------------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------| +| System, Compute Budget | `complete` pour les builders client actuels | orchestration durable nonce séparée ; exposition mutable toujours soumise aux politiques | +| Address Lookup Table | `complete` stateless | autorité, rent, capacité et cooldown contrôlés par le préflight stateful | +| Ed25519, secp256k1, secp256r1 | `complete` | formes inline et offsets ; aucune autorisation métier implicite | +| Config | `complete` builder | wire local vérifié sans helper `bincode`; rent/état contrôlés avant envoi | +| Feature | `complete` builder | activation et révocation ; état/rent contrôlés avant envoi | +| Slashing | `complete` builder | close et plan atomique duplicate-block ; compte de preuve et fenêtres epoch stateful | +| ZK ElGamal Proof | `complete` builder | douze preuves inline/account et fermeture de contexte | +| ZK Token Proof historique | `not_applicable` | programme retiré/stub runtime, conservé uniquement pour décodage historique | +| Stake | `complete` pour les 24 helpers clients actuels | validations compte/rent/epoch exigées avant exposition ; Redelegate historique `decode-only` | +| Vote | `complete` pour les 20 variantes wire + 4 créations | validations account/rent/autorités/BLS/tour exigées avant exposition | +| Loader v3 upgradeable | `complete` pour 11 opérations client | interface officielle `wincode`; état, rent, owner et capacité restent stateful | +| Loader v4 | `complete` pour 9 plans client | wire officiel reproduit sans activer les helpers `bincode`; état/autorité/rent restent stateful | +| BPF Loader v1/v2 | `historical_decode_only` | builders dépréciés historiques non promus dans l’exécuteur moderne | +| Native Loader direct | `non_invocable_by_client_instruction` | déploiement lié au logiciel validator, aucun builder transactionnel inventé | + +`pre.021` ne change aucune capacité : elle centralise les validations communes `pub(crate)` et élimine les implémentations identiques détectées dans les modules System, ALT, Config/Feature, Slashing, ZK, Stake, Vote et Loader. + +La clôture `0.4.2` confirme la matrice machine-readable des dix-huit surfaces natives, avec pour chaque opération : builder/layout officiel, politique, tests offline, statut de validation cluster et décision d’exposition UI. + +## Versions futures + +Le `ROADMAP.md` associe désormais explicitement les exécuteurs aux séries Pump, Meteora, Raydium, Orca, Jupiter/routeurs et à chaque jalon ultérieur de décodeur. La symétrie de crates ne vaut pas activation : les listeners et stratégies ne peuvent demander que des capacités explicitement validées et autorisées. diff --git a/olddocs/archivekbot2/docs/FOUNDATION_CLOSURE.md b/olddocs/archivekbot2/docs/FOUNDATION_CLOSURE.md new file mode 100644 index 0000000..2c7d760 --- /dev/null +++ b/olddocs/archivekbot2/docs/FOUNDATION_CLOSURE.md @@ -0,0 +1,78 @@ + + + +# Clôture de la fondation `0.3.x` + +## Décision de version + +Le jalon `0.3.5` n’est plus conservé comme version autonome. Ses outils d’intégrité, de sélection de corpus et de replay ont été réalisés pendant `0.3.4`. + +La séquence retenue est : + +```text +0.3.4 -> clôture raw/canonical/core/replay +0.4.0 -> infrastructure de décodage et matérialisation +``` + +## Validations réelles acquises + +| Contrôle | Résultat | +|-------------------------|--------------------------------------------------| +| Extraction pending | 70 extraites, 0 échec | +| Intégrité SQL | 7 contrôles sans ligne anormale | +| Ledger initial | 70 succès, 70 tentatives | +| Skip sur échantillon | 14 skips, 0 extraction | +| Force replay | 14 extractions, 0 skip | +| Skip après replay | 14 skips, 0 extraction | +| Cardinalité finale | 70 transactions core | +| Ledger final | 70 succès, 84 tentatives | +| CSV natif | écrit dans `data/exports_csv/` sous Tauri/Linux | +| Tests application | `kb_app_demo` 60 tests, `kb_program_ids` 2 tests | +| Tests pipeline finaux | `kb_pipeline` 24 tests | +| Tests PostgreSQL finaux | `kb_store_pg` 39 tests, rollback inclus | +| Clippy final | `cargo clippy --all-targets` sans avertissement | + +Ces résultats confirment que le force-replay remplace le graphe ciblé sans créer de transaction supplémentaire et que le ledger comptabilise la tentative additionnelle. + +## Contrôles automatisés finaux validés + +### Rollback PostgreSQL + +Le test `optional_postgres_core_extraction_rolls_back_partial_graph_from_env` injecte une violation d’unicité après le début de la persistance. Il vérifie : + +- absence de transaction core partielle ; +- absence d’account key partielle ; +- raw toujours `received` ; +- aucune entrée ledger réussie ; +- replay corrigé possible ; +- nettoyage des fixtures. + +### Annulation backfill + +Les appels réseau et attentes suivantes sont maintenant annulables : + +- `getSignaturesForAddress` en vol ; +- `getTransaction` en vol ; +- attente du pacer ; +- pause de retry standard ; +- pause configurée après 429. + +Les tests offline couvrent une attente déjà annulée et l’abandon coopératif d’une future longue. + +## Clôture acquise + +Les commandes finales ont été exécutées avec succès le 7 juillet 2026 : + +```text +kb_pipeline: 24 passed, 0 failed +kb_store_pg avec PostgreSQL réel: 39 passed, 0 failed +cargo clippy --all-targets: aucun avertissement +``` + +`0.3.4` est inscrite dans `CHANGELOG.md`, le jalon `0.3.x` est clôturé et `0.4.0` devient le jalon actif. La session suivante doit démarrer avec `prompts/019_v0_4_0_decoder_infrastructure.md`. + +## Éléments reportés sans blocage + +Les corpus exhaustifs de protocoles ne sont pas nécessaires pour prouver l’indépendance de l’extracteur core. Ils sont constitués dans leurs versions respectives : Pump `0.5.x`, Meteora `0.6.x`, Raydium `0.7.x` et Orca `0.8.x`. + +Le rejeu manuel d’un backfill `before` depuis `resume_before_signature` reste recommandé lors d’une prochaine campagne longue. La logique de frontière contiguë, les compteurs d’arrêt et une campagne réelle interrompue sont déjà validés. diff --git a/olddocs/archivekbot2/docs/HISTORICAL_DATA_ACQUISITION_PLAN.md b/olddocs/archivekbot2/docs/HISTORICAL_DATA_ACQUISITION_PLAN.md new file mode 100644 index 0000000..3a5378a --- /dev/null +++ b/olddocs/archivekbot2/docs/HISTORICAL_DATA_ACQUISITION_PLAN.md @@ -0,0 +1,355 @@ + + + +# Plan différé — acquisition historique gratuite et worker de campagnes + +## Statut + +Ce document conserve un projet futur volontairement retiré du `ROADMAP.md` actif. + +Aucune version n'est attribuée à ce chantier. Il ne doit pas retarder les décodeurs, matérialisateurs et exécuteurs Solana Core, SPL, AMM, launchpads, orderbooks, routers ou autres surfaces prioritaires. + +Le nom **W2** est provisoire. Il désigne ici un worker manuel d'acquisition historique, distinct du worker temps réel destiné au trading. Le nom final des crates et binaires sera décidé au moment de l'activation du chantier. + +## 1. Motivation + +Le projet aura besoin de deux voies d'acquisition complémentaires : + +```text +W1 — temps réel + -> fournisseurs fiables ou payants + -> faible latence + -> détection de créations de tokens, pools et pairs + -> changements de prix/liquidité + -> déclencheurs d'achat, vente et gestion du risque + +W2 — historique manuel + -> sources gratuites ou très économiques + -> campagnes lentes et reprenables + -> corpus vieux d'un an, deux ans ou davantage + -> données destinées à l'analyse, aux tests et à la détection de patterns + -> aucune consommation implicite du budget réservé au trading +``` + +W2 ne remplace ni `kb_rpc`, ni le pipeline canonique, ni les fournisseurs temps réel. Il sert à alimenter progressivement PostgreSQL avec des données historiques dont la latence n'est pas critique. + +## 2. Principes non négociables + +- `kb_rpc` reste la frontière des protocoles Solana : JSON-RPC HTTP/WS standard, extensions fournisseur officiellement prises en charge, Yellowstone/gRPC et transports similaires. +- Une source historique parlant JSON-RPC standard peut réutiliser `kb_rpc`, mais sa politique de campagne, son coût, sa provenance et ses fallbacks restent hors de `kb_rpc`. +- Les APIs REST indexées, exports, datasets analytiques, archives CAR ou outils externes appartiennent à des crates de sources historiques séparées. +- W2 fonctionne en `free_only` par défaut. Aucun fournisseur payant ne doit être interrogé sans autorisation explicite de la campagne. +- Les endpoints et crédits de W1 ne doivent jamais être utilisés comme fallback silencieux de W2. +- Toute donnée destinée au pipeline doit finir par être normalisée dans le contrat canonique existant. +- Une source externe peut découvrir une signature, un slot ou un candidat ; elle ne devient pas pour autant la source canonique de la transaction. +- Les campagnes doivent être bornées, annulables, reprenables, dédupliquées et auditées. +- Une page vide ou une réponse `null` provenant d'une source best-effort ne prouve pas nécessairement l'absence historique de la donnée. + +## 3. Séparation découverte / hydratation + +W2 doit séparer deux responsabilités. + +### 3.1 Découverte + +Trouver des candidats à partir de : + +- adresses ou Program IDs ; +- signatures explicites ; +- plages de slots ou périodes ; +- pools, vaults ou token accounts ; +- programmes DEX/launchpads ; +- datasets indexés capables de filtrer par comptes, instructions ou timestamps. + +### 3.2 Hydratation + +Récupérer la transaction ou le bloc brut correspondant, puis suivre le pipeline existant : + +```text +candidate + -> transaction ou bloc brut + -> insertion raw canonique + -> core extraction + -> decode replay + -> materialization + -> agrégations et corpus d'analyse +``` + +La source de découverte et la source d'hydratation peuvent être différentes. + +Exemple : + +```text +BigQuery découvre les signatures d'une période + -> Old Faithful hydrate les anciennes transactions + -> un RPC public hydrate les transactions encore disponibles + -> PostgreSQL ignore les signatures déjà présentes + -> aucun crédit Helius n'est consommé +``` + +## 4. Architecture candidate + +Les noms ci-dessous sont provisoires et ne constituent pas encore des réservations de crates : + +```text +kb_historical_api + -> capacités, campagnes, candidats, provenance, coût et complétude + +kb_historical_source_rpc + -> profils RPC publics/best-effort utilisant les contrats de kb_rpc + +kb_historical_source_old_faithful + -> intégration avec un processus faithful-cli externe ou une archive locale + +kb_historical_source_bigquery + -> découverte indexée par requêtes analytiques bornées + +kb_historical_source_solscan + -> API officielle optionnelle, avec clé et budget explicites + +kb_worker_historical + -> orchestration manuelle, reprise, quotas, déduplication et import canonique +``` + +Une alternative consiste à garder les contrats et l'orchestration dans des modules internes d'une crate plus compacte. Ce choix devra être tranché après les prototypes et mesures, pas avant. + +## 5. Sources candidates + +### 5.1 RPC utilisé par l'Explorer Solana + +L'Explorer officiel repose sur des appels JSON-RPC Solana standards. Une source `rpc_best_effort` peut donc utiliser des endpoints publics ou communautaires pour : + +- `getSignaturesForAddress` ; +- `getTransaction` ; +- `getBlocks` ; +- `getBlock` ; +- réparations ciblées par signature ou slot. + +Cette source convient aux campagnes étroites et lentes. Elle n'offre pas de SLA, d'index arbitraire ni de garantie de rétention complète. Le site HTML ne doit pas être scrapé. + +Références de recherche : + +- +- +- + +### 5.2 Old Faithful + +Old Faithful est la piste prioritaire pour l'histoire profonde. L'intégration initiale doit privilégier un processus externe `faithful-cli` ou un serveur JSON-RPC local, afin d'éviter un couplage prématuré au format CAR, à l'implémentation Go et à sa licence. + +Usages visés : + +- hydratation de transactions anciennes ; +- scans bornés par époque ou slots ; +- constitution progressive d'un corpus local durable ; +- fallback gratuit lorsque les RPC récents ont purgé les données. + +Références de recherche : + +- +- + +### 5.3 BigQuery ou dataset analytique équivalent + +Un dataset indexé peut servir de moteur de découverte et réduire massivement le nombre d'appels RPC. Il doit être évalué pour : + +- schéma et fraîcheur ; +- instructions outer/inner disponibles ; +- comptes et balances pré/post ; +- précision des filtres ; +- coût réel des requêtes ; +- capacité à exporter des signatures et slots de manière reprenable. + +Il ne remplace pas PostgreSQL ni le pipeline canonique. + +Référence de recherche : + +- + +### 5.4 Solscan + +Solscan fournit un index fonctionnellement intéressant, mais l'intégration durable doit utiliser uniquement son API officielle et respecter ses quotas et conditions. + +Cette source serait : + +- optionnelle ; +- désactivée par défaut ; +- configurée par clé ; +- classée `free_quota` ou `paid` selon le plan ; +- interdite dans une campagne `free_only` si elle entraîne un coût. + +Les endpoints privés du site, cookies, jetons internes et scraping HTML ne doivent pas être utilisés. + +Références de recherche : + +- +- + +### 5.5 Fournisseurs payants + +Helius, Shyft, Chainstack, Triton ou équivalents peuvent être ajoutés ultérieurement comme fallback explicitement autorisé. Ils ne doivent pas être activés dans la politique par défaut de W2 et ne doivent jamais consommer les crédits de W1 à l'insu de l'opérateur. + +## 6. Stablecoins et corpus de marché + +Une campagne naïve `getSignaturesForAddress(MINT)` ne suffit pas à reconstruire toute l'activité d'un stablecoin. Les transferts classiques peuvent référencer les token accounts sans inclure systématiquement le mint dans les comptes de l'instruction. + +Pour constituer des séries utiles à un analyseur de patterns, la stratégie prioritaire doit être : + +```text +stablecoin + -> pools et pairs pertinents + -> vaults et token accounts des pools + -> Program IDs des AMM/CLMM/DLMM/routers + -> transactions candidates + -> décodage des swaps et changements de liquidité + -> matérialisation trades/pools + -> bougies et séries temporelles +``` + +Les transferts génériques du token restent un corpus séparé, beaucoup plus volumineux et moins directement utile au prix. + +## 7. Contrats fonctionnels candidats + +### 7.1 Capacités + +```rust +pub struct HistoricalSourceCapabilities { + pub signatures_by_address: bool, + pub transactions_by_signature: bool, + pub blocks_by_slot: bool, + pub slot_ranges: bool, + pub time_ranges: bool, + pub program_filter: bool, + pub token_filter: bool, + pub instruction_filter: bool, + pub indexed_results: bool, + pub full_history: bool, +} +``` + +### 7.2 Budget + +```rust +pub enum HistoricalSourceCost { + Free, + FreeQuota, + Paid, +} + +pub enum HistoricalBudgetPolicy { + FreeOnly, + FreeThenPaid, + ExplicitSourcesOnly, +} +``` + +`FreeOnly` doit être la valeur de départ de toute campagne manuelle. + +### 7.3 Complétude et provenance + +```rust +pub enum HistoricalCompleteness { + Complete, + Partial, + Unknown, + Pruned, +} + +pub struct HistoricalProvenance { + pub source_name: String, + pub source_kind: String, + pub method: String, + pub fetched_at_unix_ms: i64, + pub paid: bool, +} +``` + +Les types définitifs devront respecter les conventions du workspace, les bornes PostgreSQL et les règles TS-rs si une UI est ajoutée. + +## 8. Campagnes et observabilité + +Une campagne doit conserver au minimum : + +- identifiant stable ; +- cible et filtres ; +- source de découverte et source d'hydratation ; +- politique de coût ; +- curseur et checkpoint de reprise ; +- plage temporelle ou de slots ; +- concurrence, rate limit et backoff ; +- candidats découverts ; +- signatures déjà présentes ; +- transactions hydratées, absentes, pruned ou invalides ; +- erreurs et fallbacks ; +- volume réseau et coût estimé ; +- état `running`, `paused`, `cancelled`, `completed` ou `failed`. + +Les événements `tracing` doivent être émis par les crates responsables. Les secrets, clés API, payloads complets non bornés et URLs contenant des credentials sont interdits dans les logs. + +## 9. Étude préalable obligatoire + +Avant toute activation dans le ROADMAP, exécuter un benchmark reproductible avec : + +- une transaction récente ; +- une transaction vieille d'environ un an ; +- une transaction vieille d'environ deux ans ; +- une adresse peu active ; +- un Program ID très actif ; +- un pool stablecoin ; +- une plage de slots bornée. + +Mesurer pour chaque source : + +- profondeur historique ; +- taux de réponse `null` ou pruned ; +- cohérence de pagination ; +- latence et débit soutenable ; +- limitations et `Retry-After` ; +- filtres disponibles ; +- complétude des transactions et métadonnées ; +- coût ; +- conditions d'utilisation ; +- capacité de reprise et stabilité du contrat. + +## 10. Phases futures sans numéro de version + +### Phase R0 — recherche + +- valider les sources, licences, conditions d'utilisation, coûts et corpus ; +- produire une matrice comparative et un prototype jetable ; +- choisir le nom final de W2. + +### Phase R1 — contrats et ledger de campagne + +- définir les capacités, budgets, candidats, provenance et checkpoints ; +- ajouter les migrations PostgreSQL seulement après stabilisation du contrat. + +### Phase R2 — source RPC gratuite + +- réutiliser `kb_rpc` pour les méthodes standards ; +- ajouter quotas, backoff, déduplication et frontières de complétude. + +### Phase R3 — archive profonde + +- intégrer `faithful-cli` comme processus externe ou service local ; +- valider les imports par époque/slots et la cohérence avec le canonique. + +### Phase R4 — découverte indexée + +- intégrer BigQuery ou une source analytique équivalente après benchmark ; +- exporter uniquement les candidats nécessaires. + +### Phase R5 — sources commerciales facultatives et UI + +- ajouter Solscan ou d'autres APIs officielles avec budget explicite ; +- ajouter une UI de campagne manuelle seulement lorsque les contrats backend sont stables. + +## 11. Conditions avant retour dans le ROADMAP + +Ce chantier ne revient dans le `ROADMAP.md` que lorsque : + +- les décodeurs/matérialisateurs/exécuteurs prioritaires ont suffisamment progressé ; +- au moins deux sources gratuites ont été testées réellement ; +- une stratégie de licence et de conditions d'utilisation est validée ; +- la frontière avec `kb_rpc`, `kb_pipeline` et PostgreSQL est décidée ; +- la politique `free_only` est testable et empêche réellement tout fallback payant ; +- un prompt de session dédié peut être écrit sans hypothèse majeure non vérifiée. diff --git a/olddocs/archivekbot2/docs/IDL_SURFACE_CLASSIFICATION.md b/olddocs/archivekbot2/docs/IDL_SURFACE_CLASSIFICATION.md new file mode 100644 index 0000000..eef15ea --- /dev/null +++ b/olddocs/archivekbot2/docs/IDL_SURFACE_CLASSIFICATION.md @@ -0,0 +1,107 @@ + + + +# Classification des surfaces IDL + +Ce fichier résume les reclassements déduits des fichiers présents dans `idls/`. Il ne remplace pas une validation on-chain ; il sert à stabiliser la nomenclature et les crates réservés. + +## Décisions principales + +- `program_ids.rs` est remplacé par `constants.rs` dans les crates core/SPL, afin de regrouper plus tard les discriminants, sélecteurs et constantes internes non publiques. +- Les constantes réexportées par le `lib.rs` d’une crate doivent être appelées via `crate::CONSTANT_NAME` depuis les modules internes de cette même crate. +- Les surfaces IDL classifiées reçoivent un nom canonique fonctionnel : `amm_*`, `clmm_*`, `router_*`, `vault_*`, `lending_*`, etc. +- Les comptes non prouvés comme `program_id`, comme `BAGSB...`, restent hors workspace de décodage. Les vrais programmes Bags Fee Share V1/V2 sont classés séparément dans `docs/BAGS_FM.md`. + +## Reclassements notables + +| Canonique | Ancien nom/source | Justification IDL | +|--------------------------------------|-------------------------------|----------------------------------------------------------------------------------------| +| `vault_carrot_defi` | `carrot_defi` | IDL orientée vault : `initVault`, `issue`, `redeem`, `addAsset`, `removeStrategy`. | +| `lending_clone` | `clone` | IDL orientée lending : borrow positions, collateral, pool parameters, oracle updates. | +| `clmm_fusion` | `fusion_amm` | IDL avec positions, liquidity, fees et limit orders ; plus proche CLMM que simple AMM. | +| `stable_swap_hylo_exchange` | `hylo_exchange` | IDL stable/levercoin : mint, redeem, swap stable/lever. | +| `vault_hylo_stability_pool` | `hylo_stability_pool` | IDL de stability pool : user deposit/withdraw et rebalances. | +| `wallet_jupiter_apepro_smart_wallet` | `jupiter_apepro_smart_wallet` | IDL smart wallet avec approvals, `postSwap` et withdraw. | +| `vault_kamino_yvaults` | `kamino` | IDL `yvaults`, stratégies, collateral info et shares metadata. | +| `governance_metadao_bid_wall` | `metadao_bid_wall` | Surface MetaDAO liée à la gouvernance/futarchy plutôt qu’à un AMM direct. | +| `stable_swap_numeraire` | `numeraire` | IDL avec pool stable virtuel, add/remove liquidity et metadata LP. | +| `rwa_ondo_global_markets` | `ondo_global_markets` | IDL RWA/roles/attestation/burn ; pas un DEX. | +| `clmm_pancake_swap` | `pancake_swap` | IDL `amm_v3` avec positions et liquidity : classé CLMM. | +| `adapter_saber_decimal_wrapper` | `sabre_decimal_wrapper` | IDL wrapper d’adaptation de décimales : initializeWrapper, deposit, withdraw. | + +## Table IDL triée par canonique + +| Canonique | Source | Program ID | IDL | Crate cible | Statut | +|------------------------------------------------|----------------------------------|------------------------------------------------|---------------------------------------------------------------------------------|-----------------------------------------------------------|---------------------| +| `adapter_saber_decimal_wrapper` | `sabre_decimal_wrapper` | `DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB` | `saber_decimal.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.json` | `kb_decoder_adapter_saber_decimal_wrapper` | `canonical_current` | +| `admin_jupiter_lock` | `jupiter_lock` | `LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn` | `jupiter_locker.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.json` | `kb_decoder_admin_jupiter_lock` | `canonical_current` | +| `admin_pump_fees` | `pump_fees` | `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` | `pump_fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.json` | `kb_decoder_admin_pump_fees` | `canonical_current` | +| `amm_bonk_swap` | `bonk_swap` | `BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p` | `bonkswap.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.json` | `kb_decoder_amm_bonk_swap` | `canonical_current` | +| `amm_goosefx_gamma` | `goose_fx_gamma` | `GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT` | `goosefx_gamma.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.json` | `kb_decoder_amm_goosefx_gamma` | `canonical_current` | +| `amm_goosefx_v2` | `goose_fx_v2` | `GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn` | `goosefx_v2.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.json` | `kb_decoder_amm_goosefx_v2` | `canonical_current` | +| `amm_guac_swap` | `guac_swap` | `Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1` | `guacswap.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.json` | `kb_decoder_amm_guac_swap` | `canonical_current` | +| `amm_lifinity_swap_v2` | `lifinity_swap_v2` | `2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c` | `lifinity_amm_v2.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.json` | `kb_decoder_amm_lifinity_swap_v2` | `canonical_current` | +| `amm_metadao_futarchy_amm` | `metadao_futarchy_amm` | `FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq` | `metadao_futarchy.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.json` | `kb_decoder_amm_metadao_futarchy_amm` | `canonical_current` | +| `amm_metadao_v0_5` | `metadao_amm_v0_5` | `AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ` | `metadao_amm_v0.5.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.json` | `kb_decoder_amm_metadao_v0_5` | `canonical_current` | +| `amm_meteora_damm_v1` | `meteora_damm_v1` | `Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB` | `meteora_pools_amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.json` | `kb_decoder_amm_meteora_damm_v1` | `canonical_current` | +| `amm_meteora_damm_v2` | `meteora_damm_v2` | `cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG` | `meteora_damm_v2.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.json` | `kb_decoder_amm_meteora_damm_v2` | `canonical_current` | +| `amm_pump_swap` | `pump_swap` | `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` | `pump_swap.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json` | `kb_decoder_amm_pump_swap` | `canonical_current` | +| `amm_vertigo` | `vertigo` | `vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ` | `vertigo.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.json` | `kb_decoder_amm_vertigo` | `canonical_current` | +| `amm_virtuals` | `virtuals` | `5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki` | `virtuals.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.json` | `kb_decoder_amm_virtuals` | `canonical_current` | +| `amm_woofi` | `woofi` | `WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb` | `woofi.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.json` | `kb_decoder_amm_woofi` | `canonical_current` | +| `bridge_circle_cctp_token_messenger_minter` | `cctp_token_messenger_minter` | `CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3` | `cctp_v1.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.json` | `kb_decoder_bridge_circle_cctp_token_messenger_minter` | `canonical_current` | +| `bridge_circle_cctp_token_messenger_minter_v2` | `cctp_token_messenger_minter_v2` | `CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe` | `cctp_v2.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.json` | `kb_decoder_bridge_circle_cctp_token_messenger_minter_v2` | `canonical_current` | +| `bridge_layer_zero_endpoint` | `layer_zero_endpoint` | `76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6` | `layerzero_endpoint.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.json` | `kb_decoder_bridge_layer_zero_endpoint` | `canonical_current` | +| `bridge_layer_zero_executor` | `layer_zero_executor` | `6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn` | `layerzero_executor.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.json` | `kb_decoder_bridge_layer_zero_executor` | `canonical_current` | +| `clmm_byreal` | `byreal_clmm` | `REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2` | `byreal_clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.json` | `kb_decoder_clmm_byreal` | `canonical_current` | +| `clmm_fusion` | `fusion_amm` | `fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9` | `fusion_amm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.json` | `kb_decoder_clmm_fusion` | `canonical_current` | +| `clmm_orca_whirlpool` | `orca_whirlpool` | `whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc` | `orca_whirlpool.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.json` | `kb_decoder_clmm_orca_whirlpool` | `canonical_current` | +| `clmm_orca_whirlpool` | `orca_whirlpool` | `whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc` | `orca_whirlpool.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.json` | `kb_decoder_clmm_orca_whirlpool` | `canonical_current` | +| `clmm_pancake_swap` | `pancake_swap` | `HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq` | `pancakeswap.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.json` | `kb_decoder_clmm_pancake_swap` | `canonical_current` | +| `clmm_raydium` | `raydium_clmm` | `CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK` | `raydium_clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.json` | `kb_decoder_clmm_raydium` | `canonical_current` | +| `clmm_stabble` | `stabble_clmm` | `6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6` | `stabble_clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.json` | `kb_decoder_clmm_stabble` | `canonical_current` | +| `cpmm_raydium` | `raydium_cpmm` | `CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C` | `raydium_cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.json` | `kb_decoder_cpmm_raydium` | `canonical_current` | +| `dlmm_meteora` | `meteora_dlmm` | `LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo` | `meteora_dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.json` | `kb_decoder_dlmm_meteora` | `canonical_current` | +| `governance_metadao_bid_wall` | `metadao_bid_wall` | `WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx` | `metdao_bid_wall.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.json` | `kb_decoder_governance_metadao_bid_wall` | `canonical_current` | +| `launchpad_boop_fun` | `boop_fun` | `boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4` | `boop_fun.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.json` | `kb_decoder_launchpad_boop_fun` | `canonical_current` | +| `launchpad_metadao_ico` | `metadao_ico` | `moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM` | `metadao_launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.json` | `kb_decoder_launchpad_metadao_ico` | `canonical_current` | +| `launchpad_meteora_dbc` | `meteora_dbc` | `dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN` | `meteora_dbc.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.json` | `kb_decoder_launchpad_meteora_dbc` | `canonical_current` | +| `launchpad_moonit` | `moonit` | `MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG` | `moonit.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.json` | `kb_decoder_launchpad_moonit` | `canonical_current` | +| `launchpad_orca_wavebreak` | `orca_wavebreak` | `waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF` | `orca_wavebreak.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.json` | `kb_decoder_launchpad_orca_wavebreak` | `canonical_current` | +| `launchpad_printr` | `printr` | `T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint` | `printr.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.json` | `kb_decoder_launchpad_printr` | `canonical_current` | +| `launchpad_pump_fun` | `pump_fun` | `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P` | `pump_fun.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.json` | `kb_decoder_launchpad_pump_fun` | `canonical_current` | +| `launchpad_pump_pumpup_ai` | `pumpup_ai` | `PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd` | `pumpup.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.json` | `kb_decoder_launchpad_pump_pumpup_ai` | `canonical_current` | +| `launchpad_raydium_launchlab` | `raydium_launchlab` | `LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj` | `raydium_launchlab.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.json` | `kb_decoder_launchpad_raydium_launchlab` | `canonical_current` | +| `lending_clone` | `clone` | `C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr` | `clone.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.json` | `kb_decoder_lending_clone` | `canonical_current` | +| `lending_kamino` | `kamino_lending` | `KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD` | `kamino_lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.json` | `kb_decoder_lending_kamino` | `canonical_current` | +| `lending_marginfi_v2` | `marginfi_v2` | `MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA` | `marginfi_v2.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.json` | `kb_decoder_lending_marginfi_v2` | `canonical_current` | +| `lock_raydium_lp` | `raydium_lock_lp` | `LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE` | `raydium_lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.json` | `kb_decoder_lock_raydium_lp` | `canonical_current` | +| `nft_metaplex_bubblegum` | `bubblegum` | `BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY` | `bubblegum.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.json` | `kb_decoder_nft_metaplex_bubblegum` | `canonical_current` | +| `orderbook_jupiter_limit_order` | `jupiter_limit_order` | `jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu` | `jupiter_limit_order.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.json` | `kb_decoder_orderbook_jupiter_limit_order` | `canonical_current` | +| `orderbook_jupiter_limit_order_v2` | `jupiter_limit_order_v2` | `j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X` | `jupiter_limit_order_v2.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.json` | `kb_decoder_orderbook_jupiter_limit_order_v2` | `canonical_current` | +| `orderbook_openbook_v2` | `openbook_v2` | `opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb` | `openbook_v2.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.json` | `kb_decoder_orderbook_openbook_v2` | `canonical_current` | +| `perpetuals_drift_v2` | `drift_v2` | `dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH` | `drift_v2.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.json` | `kb_decoder_perpetuals_drift_v2` | `canonical_current` | +| `perpetuals_jupiter` | `jupiter_perpetuals` | `PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu` | `jupiter_perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.json` | `kb_decoder_perpetuals_jupiter` | `canonical_current` | +| `perpetuals_zeta` | `zeta` | `ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD` | `zeta.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.json` | `kb_decoder_perpetuals_zeta` | `canonical_current` | +| `router_jupiter_aggregator_v4` | `jupiter_agregator_v4` | `JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB` | `jupiter_v4.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.json` | `kb_decoder_router_jupiter_aggregator_v4` | `canonical_current` | +| `router_jupiter_aggregator_v6` | `jupiter_agregator_v6` | `JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4` | `jupiter_v6.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.json` | `kb_decoder_router_jupiter_aggregator_v6` | `canonical_current` | +| `router_jupiter_dca` | `jupiter_dca` | `DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M` | `jupiter_dca.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.json` | `kb_decoder_router_jupiter_dca` | `canonical_current` | +| `router_okx_labs_v1` | `okx_labs_v1` | `6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma` | `okx_lab_v1.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.json` | `kb_decoder_router_okx_labs_v1` | `canonical_current` | +| `router_okx_labs_v2` | `okx_labs_v2` | `proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u` | `okx_dex_router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.json` | `kb_decoder_router_okx_labs_v2` | `canonical_current` | +| `rwa_ondo_global_markets` | `ondo_global_markets` | `XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm` | `ondo_gm.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.json` | `kb_decoder_rwa_ondo_global_markets` | `canonical_current` | +| `stable_swap_hylo_exchange` | `hylo_exchange` | `HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn` | `hylo_exchange.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.json` | `kb_decoder_stable_swap_hylo_exchange` | `canonical_current` | +| `stable_swap_jupiter_stable` | `jupiter_stable` | `JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr` | `jupiter_stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.json` | `kb_decoder_stable_swap_jupiter_stable` | `canonical_current` | +| `stable_swap_numeraire` | `numeraire` | `NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P` | `numeraire.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.json` | `kb_decoder_stable_swap_numeraire` | `canonical_current` | +| `stable_swap_stabble` | `stabble_stable_swap` | `swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ` | `stabble_stable_swap.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.json` | `kb_decoder_stable_swap_stabble` | `canonical_current` | +| `staking_kamino_farm` | `kamino_farm` | `FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr` | `kamino_farms.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.json` | `kb_decoder_staking_kamino_farm` | `canonical_current` | +| `staking_marinade_finance` | `marinade_finance` | `MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD` | `marinade_finance.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.json` | `kb_decoder_staking_marinade_finance` | `canonical_current` | +| `treasury_helium_treasury_management` | `helium_treasury_management` | `treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5` | `helium_treasury_management.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.json` | `kb_decoder_treasury_helium_treasury_management` | `canonical_current` | +| `vault_carrot_defi` | `carrot_defi` | `CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s` | `carrot.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.json` | `kb_decoder_vault_carrot_defi` | `canonical_current` | +| `vault_hylo_stability_pool` | `hylo_stability_pool` | `HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ` | `hylo_stability_pool.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.json` | `kb_decoder_vault_hylo_stability_pool` | `canonical_current` | +| `vault_kamino` | `kamino_vault` | `kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr` | `kamino_vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.json` | `kb_decoder_vault_kamino` | `canonical_current` | +| `vault_kamino_v2` | `kamino_vault_v2` | `KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd` | `kamino_vault_v2.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.json` | `kb_decoder_vault_kamino_v2` | `canonical_current` | +| `vault_kamino_yvaults` | `kamino` | `6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc` | `kamino.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.json` | `kb_decoder_vault_kamino_yvaults` | `canonical_current` | +| `vault_meteora` | `meteora_vault` | `24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi` | `meteora_vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.json` | `kb_decoder_vault_meteora` | `canonical_current` | +| `vesting_streamflow` | `streamflow` | `strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m` | `streamflow.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.json` | `kb_decoder_vesting_streamflow` | `canonical_current` | +| `wallet_jupiter_apepro_smart_wallet` | `jupiter_apepro_smart_wallet` | `JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw` | `jupiter_aprepro_smart_wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.json` | `kb_decoder_wallet_jupiter_apepro_smart_wallet` | `canonical_current` | +| `weighted_swap_stabble` | `stabble_weighted_swap` | `swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW` | `stabble_weighted_swap.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.json` | `kb_decoder_weighted_swap_stabble` | `canonical_current` | diff --git a/olddocs/archivekbot2/docs/INSTRUCTION_REPLAY_CONTRACTS.md b/olddocs/archivekbot2/docs/INSTRUCTION_REPLAY_CONTRACTS.md new file mode 100644 index 0000000..6204d21 --- /dev/null +++ b/olddocs/archivekbot2/docs/INSTRUCTION_REPLAY_CONTRACTS.md @@ -0,0 +1,112 @@ + + + +# Contrats de replay par instruction + +Ce document complète le cadrage `0.2.1`. Il ne crée pas encore le schéma SQL complet, mais il verrouille l'idée suivante : le scheduling de replay doit cibler les instructions normalisées, tandis que le décodage doit recevoir une instruction avec son contexte Solana extrait. + +## Motivation + +Une transaction Solana peut contenir plusieurs instructions top-level et plusieurs inner instructions. Certaines instructions peuvent être déjà décodées, d'autres non. Rejouer toute la transaction à chaque correction de décodeur serait plus coûteux et moins précis. + +Le pipeline doit donc pouvoir faire : + +```text +raw transaction +→ extraction core transaction +→ extraction account keys, instructions, inner instructions, logs, balances +→ sélection des instructions non traitées +→ reconstruction d'un replay input contextualisé +→ decode/materialize uniquement sur ces inputs +``` + +## Scheduling instruction-level + +L'état `CoreInstructionProcessingState` prépare cette granularité. + +| État | Sens | +|-------------------|---------------------------------------------------------------| +| `Pending` | Instruction disponible pour premier traitement. | +| `Decoded` | Instruction décodée par au moins un décodeur. | +| `Materialized` | Instruction ayant produit une projection métier. | +| `Ignored` | Instruction ignorée volontairement par la politique courante. | +| `Failed` | Instruction en échec, à diagnostiquer. | +| `ReplayRequested` | Instruction à rejouer même si un traitement précédent existe. | + +Les états ne remplacent pas le ledger par module/version. Ils servent de vue rapide et de filtre de scheduling. + +## Décodage contextualisé + +Le décodeur ne doit pas être limité à `CoreInstructionRow.payload_json`. + +Certains protocoles Solana exigent de lire : + +- les inner instructions ; +- les logs Anchor ou non Anchor ; +- les balances avant/après ; +- les comptes résolus ; +- les loaded addresses ; +- les erreurs de transaction ; +- des séquences de logs liées à un CPI ; +- des instructions voisines de la même transaction. + +`CoreInstructionReplayInput` représente ce contrat de lecture : une instruction ciblée plus un contexte extrait depuis les tables `core`. Depuis le contrat `2`, ce contexte inclut également toutes les instructions outer de la signature, ordonnées numériquement et munies de leur payload retenu et de son hash. + +## Sélection de replay + +`CoreInstructionReplayFilter` permet de sélectionner les instructions par : + +- état de traitement ; +- `program_id` ; +- plage de slots. + +L'usage standard pour un worker de decode sera : + +```text +processing_state = Pending ou ReplayRequested +program_id = programme ciblé par le décodeur +plage de slots = optionnelle +``` + +Le repository charge les logs, balances, account keys et instructions outer nécessaires pour retourner `CoreInstructionReplayInput`. La liste outer inclut la cible et utilise les champs stables `instructionIndex`, `instructionPath`, `programId`, `payloadJson` et `payloadHash`. Cette extension lit les tables existantes et ne demande aucune migration. + +## Marquage de cycle de vie + +`CoreInstructionLifecycleMark` permet à un module de changer l'état d'une instruction après traitement. + +Exemples : + +- un décodeur reconnu marque l'instruction `Decoded` ; +- un materializer complet marque l'instruction `Materialized` ; +- un décodeur non concerné peut marquer `Ignored` dans un contexte contrôlé ; +- une erreur de parsing marque `Failed` ; +- une correction de décodeur peut remettre `ReplayRequested`. + +## Relation avec `kb_sol_ops_processing_ledger` + +Le processing ledger garde le détail par module, version et input. L'état sur l'instruction reste le dernier état opérationnel visible. + +Pour éviter les doublons, l'input key du ledger devra être stable, par exemple : + +```text +signature:instruction_path:program_id:processor_name:processor_version +``` + +La forme exacte n'est pas figée en `0.2.1`, mais elle doit rester déterministe. + +## Rétention du payload d'instruction et des logs + +Le payload JSON d'une instruction et le texte des logs sont utiles au début. Plus tard, après décodage et matérialisation fiables, ils pourront être compactés ou purgés avec conservation d'un hash. + +Les entities `CoreInstructionRow` et `CoreLogRow` préparent ce cas en autorisant : + +- payload ou texte présent ; +- payload ou texte absent ; +- hash conservé ; +- état de traitement consultable pour replay. + +La purge effective ne doit pas être implémentée avant que les diagnostics de replay soient fiables. + +## Décision pour `0.2.1` + +`0.2.1` ajoute les contrats Rust nécessaires, mais ne crée pas encore les tables SQL. Les migrations réelles restent prévues pour `0.2.3` et `0.2.4`. diff --git a/olddocs/archivekbot2/docs/LIVE_SOURCE_STRATEGY.md b/olddocs/archivekbot2/docs/LIVE_SOURCE_STRATEGY.md new file mode 100644 index 0000000..b9d6bda --- /dev/null +++ b/olddocs/archivekbot2/docs/LIVE_SOURCE_STRATEGY.md @@ -0,0 +1,104 @@ + + + +# Stratégie des sources de transactions + +## Décision actuelle + +Les sources temps réel payantes ne sont plus l’axe actif de `0.3.x`. + +La priorité est : + +```text +backfills HTTP sur comptes gratuits + -> transaction canonique + -> extraction core + -> décodeurs Core/Pump/Meteora/Raydium/Orca/Jupiter +``` + +Helius Developer, Triton, Chainstack, Shyft ou un autre provider seront testés seulement lorsque le pipeline pourra décoder et matérialiser immédiatement les transactions reçues. + +## Sources futures + +### HTTP JSON-RPC + +Usage : + +- backfill historique ; +- hydratation de signatures ; +- réparation ; +- validation ponctuelle. + +Méthodes principales : + +```text +getSignaturesForAddress +getTransaction +getSignatureStatuses +getSlot +``` + +### Helius WebSocket enrichi + +`transactionSubscribe` est une extension Helius, pas une méthode Solana standard. + +Elle sera implémentée dans des modules internes de `kb_rpc`, sans créer de crate séparée, puis convertie vers le modèle canonique commun. + +### Yellowstone gRPC + +Yellowstone fournit l’équivalent fonctionnel d’un flux de transactions complètes filtrées. Les endpoints Triton, Chainstack, Shyft ou compatibles doivent être supportés par configuration dans `kb_rpc`. + +### Solana WebSocket standard + +`logsSubscribe` par mention ou avec filtre `"all"` reste une solution de probe, de fallback ou de comparaison. Une notification de logs ne devient durable qu’après hydratation de la transaction ou enregistrement d’une observation technique légère. + +## Stockage commun + +Toutes les sources convergent vers : + +```text +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +``` + +Les décodeurs ne connaissent ni le fournisseur, ni le protocole, ni la méthode d’acquisition. + +## Ordre de mise en œuvre + +```text +0.3.x transaction canonique, observations, backfill gratuit, extraction core +0.4.x décodeurs Core/SPL +0.5.x Pump +0.6.x Meteora +0.7.x Raydium +0.8.x Orca +0.9.x Jupiter et routeurs +0.10.x Helius transactionSubscribe, Yellowstone gRPC et comparaison +``` + +## Sécurité de reprise + +Pendant toute perte du flux principal : + +```text +trading = disabled +``` + +Le replay ou le backfill après reconnexion sert à remettre la base en cohérence. Un événement `replayed`, `backfilled` ou `repaired` ne doit pas déclencher rétroactivement un ordre. + +## Critères de choix futur + +La décision provider devra comparer : + +- couverture par programme et CPI ; +- latence par signature ; +- coût par Go, crédit ou forfait ; +- nombre de filtres et streams ; +- régions ; +- reconnexion et fenêtre de replay ; +- pertes et backpressure ; +- portabilité du protocole ; +- qualité du support. + +Les timings seront mesurés dans `kb_sol_obs_transaction_observations`. + diff --git a/olddocs/archivekbot2/docs/LOGGING.md b/olddocs/archivekbot2/docs/LOGGING.md new file mode 100644 index 0000000..d7f21b7 --- /dev/null +++ b/olddocs/archivekbot2/docs/LOGGING.md @@ -0,0 +1,106 @@ + + + +# Logging + +La journalisation est centralisée dans `kb_logging` et repose sur des événements `tracing` structurés. + +## Objectifs + +- séparer console, fichiers globaux et fichiers par crate ; +- conserver un fichier JSONL dédié aux erreurs ; +- retrouver immédiatement un échec de décodage ou de matérialisation ; +- corréler RPC, pipeline, store et processor sans dupliquer les décisions dans Tauri ; +- activer le debug d’une crate sans dépendre de son découpage interne en modules. + +## Arborescence d’un profil + +Pour un profil stocké sous `logs//`, la configuration crée : + +```text +logs//debug.log +logs//info.log +logs//error.jsonl +logs//app.log +logs///debug.log +logs///info.log +logs///error.jsonl +``` + +Les routes sont en rotation quotidienne. `tracing-appender` insère la date dans le nom physique produit à partir du préfixe et du suffixe configurés. + +Les niveaux sont cumulatifs : + +- `debug.log` reçoit `debug`, `info`, `warn` et `error` ; +- `info.log` reçoit `info`, `warn` et `error` ; +- `error.jsonl` reçoit uniquement `error` ; +- `app.log` reçoit les événements `kb_app_demo` à partir de `debug`. + +`error.jsonl` utilise le format JSON pour permettre la recherche par champ. Les autres fichiers utilisent le format humain sans ANSI. + +## Targets canoniques + +Le target est exactement le nom de la crate et provient de `src/constants.rs` : + +```text +kb_app_demo +kb_decoder_solana_core +kb_executor_metadata_spl_name_service +kb_executor_solana_core +kb_executor_spl_account_compression +kb_executor_spl_memo +kb_executor_spl_noop +kb_executor_spl_single_pool +kb_logging +kb_materializer_admin +kb_materializer_compliance_audit +kb_materializer_lifecycle +kb_materializer_staking +kb_pipeline +kb_rpc +kb_store_pg +``` + +La granularité passe par les champs `action`, `stage`, `window`, `campaign_id`, `signature`, `instruction_path`, `program_id`, `processor_name`, `status` et `error_code`. + +## Corrélation de campagne + +Les campagnes de backfill, extraction core et replay decode utilisent des identifiants stables : + +```text +capture_session_id +campaign_id +signature +slot +instruction_path +program_id +input_key +input_hash +processor_name +processor_version +``` + +Le pipeline journalise la sélection et l’agrégation. Le RPC journalise le transport et l’endpoint sélectionné sans exposer l’URL secrète. Le store journalise la persistance et les rollbacks. Le décodeur et chacun des matérialiseurs lifecycle, admin et compliance audit journalisent leur décision propre. + +## Fichier d’erreurs + +Les erreurs de décodage et de matérialisation sont émises au niveau `error` par la crate responsable, puis éventuellement par la frontière qui constate l’échec terminal. Elles apparaissent donc dans : + +- `logs//error.jsonl` ; +- `logs///error.jsonl`. + +Cette duplication volontaire fournit une vue globale et une vue isolée par composant. Les champs de corrélation permettent de regrouper les événements d’un même défaut. + +Une transaction on-chain échouée mais correctement décodée n’est pas écrite dans `error.jsonl` uniquement à cause de `meta.err`. En revanche, un payload déclaré compatible mais `failed` ou `unsupported` indique une lacune du code ou une évolution du protocole et doit être visible dans le fichier d’erreurs. + +## Frontend et Tauri + +Le frontend peut continuer à transmettre un identifiant logique tel que `kb_app_demo.frontend.demo_decode_replay`. Le backend le valide et le conserve dans le champ `frontend_target`, mais l’événement est émis avec le target canonique `kb_app_demo`. + +`kb_app_demo` ne doit pas recopier les détails internes d’un retry RPC, d’un parsing binaire ou d’un commit SQL. Il journalise l’invocation, la progression visible et le résumé reçu de la crate opérationnelle. + +## Sécurité + +Les logs ne contiennent jamais de clé privée, seed phrase, DSN non masqué, URL fournisseur secrète ou payload complet non borné. Pour un payload problématique, conserver la taille, un préfixe borné et un SHA-256. + +Le contrat normatif complet se trouve dans `docs/TRACING_CONTRACT.md`. diff --git a/olddocs/archivekbot2/docs/MATERIALIZATIONS.md b/olddocs/archivekbot2/docs/MATERIALIZATIONS.md new file mode 100644 index 0000000..e8eb5c6 --- /dev/null +++ b/olddocs/archivekbot2/docs/MATERIALIZATIONS.md @@ -0,0 +1,68 @@ + + + +# Catalogue des matérialisations + +Les matérialisations transforment des événements décodés en événements métier exploitables par la base de données, les validations, les agrégations et les futurs signaux de stratégie. + +## Matérialisations prioritaires + +- `trade` : swaps, buys, sells, fills et conversions entre actifs. +- `liquidity` : dépôts, retraits, ajout ou retrait de liquidité, bootstrap de pool. +- `lifecycle` : création, initialisation, migration, fermeture ou changement d'état d'un pool, marché, compte ou vault. +- `fee` : collecte, claim, sweep, buyback, mise à jour de configuration de frais. +- `admin` : changement d'autorité, update de config, pause, unpause, transfert de rôle. +- `token_account` : création ATA, transfert, mint, burn, close account, approve, revoke. +- `pool_state` : snapshots de réserves, ticks, bins, prix, liquidité active ou virtual reserves. +- `orderbook` : place order, cancel order, fill, settle funds, consume events. +- `reward` : émission, claim, distribution, farming, incentives. +- `risk` : signaux dérivés à partir des événements admin, liquidité, metadata, authority ou anomalies. + +## Projections natives actives dans `0.4.1` + +`kb_materializer_lifecycle` produit des événements lifecycle idempotents à partir d'observations exactes, réussies et commitées : + +| Domaine | Sortie stable | Entrées couvertes | +|----------------------|--------------------------------------------|--------------------------------------------------------------------------------------------------------------| +| Address Lookup Table | `address_lookup_table::0` | create, freeze, extend, deactivate, close | +| Program loaders | `program_loader:::0` | finalize immuable, initialize/deploy/upgrade/close/extend upgradeable, set length/deploy/retract/finalize v4 | +| Feature Gate | `feature_gate:revoke_pending_activation:0` | revoke pending activation | +| Comptes System | `system_account::0` | create, create with seed, create allow prefund, allocate, allocate with seed | +| Durable nonce System | `durable_nonce_account::0` | initialize, advance, authorize, upgrade, withdraw | +| Contexte ZK ElGamal | `zk_proof_context::0` | initialisation demandée après vérification réussie, fermeture | +| Rapport Slashing | `slashing_violation_report::0` | initialisation après preuve duplicate block acceptée, fermeture après rétention | + +La famille décodée n'impose pas à elle seule la famille matérialisée. `authorize_nonce_account` est un événement `Admin`, tandis qu'une vérification ZK ElGamal est un événement `Audit`; ces observations ne produisent une sortie `Lifecycle` que lorsque leur mutation durable exacte est reconnue. Une transaction échouée ou non commitée est toujours refusée. + +`kb_materializer_admin` produit des sorties `Admin` pour les assignations System, les écritures Config opaques et les changements d’autorité Loader. `kb_materializer_compliance_audit` produit des sorties `ComplianceAudit` pour les écritures/copies de bytecode Loader. `kb_materializer_staking` produit les projections instructionnelles Stake/Vote commitées : comptes stake/vote, autorités, lockup, délégation, vote state, retraits et dépôt de rewards. Les données complètes ne sont jamais recopiées : seules les clés, autorités, offsets, tailles, hashes, préfixes et paramètres bornés disponibles sont conservés. + +Le retrait d'un nonce account conserve une sémantique conditionnelle : le runtime ferme le compte uniquement lorsque la totalité du solde est retirée. La projection décrit l'opération commitée et ne prétend pas reconstruire l'état final transactionnel du compte. Les deltas SOL restent la responsabilité du graphe core. + +Une preuve ZK n'est jamais matérialisée. Seul le lifecycle du compte de contexte est projeté lorsqu'il existe. Un rapport Slashing conserve le signal de violation et son lifecycle, mais pas le contenu du compte de preuve externe ; `penaltyAppliedByProgram` reste faux car le programme ne retire pas lui-même du stake. L'ancien ZK Token Proof Program reste en decode/audit, car le runtime actuel est sans effet et aucun historique mainnet fiable n'a été observé. + +## Matérialisations spécialisées à prévoir + +- `nft` : NFT classiques, programmables et compressés. +- `metadata` : metadata Metaplex, creators, collection, update authority, URI et symbol. +- `oracle` : prix, publisher, confidence, staleness et sources d'oracle. +- `lending` : borrow, repay, collateral, liquidation et health factor. +- `staking` avancé : snapshots de comptes Stake/Vote avant/après, activation par epoch, crédits Vote cumulés et réconciliation avec sysvars. +- `governance` : proposal, vote, execute et update de realm/config. +- `bridge` : lock, mint wrapped asset, burn, redeem et message verification. +- `perpetuals` : position, funding, liquidation, collateral et PnL. +- `vault` : share mint/burn, deposit, withdraw, rebalance et fee collection. +- `routing` : route, route leg, quote, slippage, aggregator hop. +- `compliance_audit` : événements d'audit non directement matérialisables en trading. +- `token_metadata_risk` : signaux de risque issus des métadonnées de tokens, par exemple autorité mutable, creators suspects, symbol/URI incohérents ou changements de metadata. + +## Projections natives encore à terminer avant clôture + +Toutes les sémantiques matérialisables ne sont pas encore projetées. Les lots restants sont explicites : + +- Compute Budget : profil transactionnel agrégé regroupant toutes les instructions Compute Budget du message. + +Les précompiles de signature et les preuves ZK sans contexte restent des observations d'audit déjà suffisantes. Une projection supplémentaire n'est justifiée que si un consommateur `compliance_audit` exige une table dédiée. L'ancien ZK Token Proof no-op reste sans matérialisation. + +## Règle de conception + +Une matérialisation spécialisée ne doit être ajoutée que si la table générique ne suffit pas pour représenter correctement la sémantique du protocole. Le modèle commun reste prioritaire, puis les tables spécialisées complètent ce modèle. Chaque projection doit posséder une identité stable, un état cible explicite, une politique d'idempotence et une règle documentée pour les transactions échouées. diff --git a/olddocs/archivekbot2/docs/METAPLEX_TOKEN_METADATA_MATRIX.json b/olddocs/archivekbot2/docs/METAPLEX_TOKEN_METADATA_MATRIX.json new file mode 100644 index 0000000..ecd2123 --- /dev/null +++ b/olddocs/archivekbot2/docs/METAPLEX_TOKEN_METADATA_MATRIX.json @@ -0,0 +1,1612 @@ +{ + "schema_version": 2, + "milestone": "0.4.7-pre.025", + "surface_code": "metadata_metaplex_token_metadata", + "program_id": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s", + "program_family": "independent_metaplex_foundation_program", + "decode_status": "instruction_inventory_exhaustive_0_through_57_and_account_key_inventory_exhaustive_0_through_14", + "runtime_registration": "not_enabled_in_pre_008", + "official_sources": [ + { + "kind": "repository", + "value": "metaplex-foundation/mpl-token-metadata", + "ref": "main", + "status": "verified_2026-07-20" + }, + { + "kind": "rust_sdk", + "value": "mpl-token-metadata", + "version_requirement": "^5.1", + "observed_release": "5.1.1" + }, + { + "kind": "idl", + "value": "idls/token_metadata.json", + "idl_version": "1.14.0", + "sha": "5df4a24f62c2743125be096cc174680790c92c18" + }, + { + "kind": "generated_instruction_inventory", + "value": "clients/rust/src/generated/instructions/mod.rs", + "sha": "3c42eec629f82e44ba690a7c4bd2177cc78f1d49" + } + ], + "wire_contract": { + "instruction_discriminator": "u8", + "argument_encoding": "borsh", + "unknown_discriminator": "unsupported", + "truncated_payload": "failed", + "non_canonical_suffix": "pending_per_variant", + "foreign_program_id": "incompatible" + }, + "bounds": { + "max_instruction_bytes": 65536, + "max_accounts": 256, + "max_string_bytes": 4096, + "max_uri_bytes": 4096, + "max_creators": 64, + "max_authorization_payload_bytes": 65536, + "max_diagnostics": 64, + "instruction_payload_bytes_max": 16384, + "instruction_accounts_max": 64, + "name_bytes_max": 32, + "symbol_bytes_max": 10, + "uri_bytes_max": 200, + "creators_max": 5, + "seller_fee_basis_points_max": 10000 + }, + "current_sdk_instruction_modules": [ + "approve_collection_authority", + "approve_use_authority", + "bubblegum_set_collection_size", + "burn", + "burn_edition_nft", + "burn_nft", + "burn_v1", + "close_accounts", + "close_escrow_account", + "collect", + "convert_master_edition_v1_to_v2", + "create", + "create_escrow_account", + "create_master_edition_v3", + "create_metadata_account_v3", + "create_v1", + "delegate", + "delegate_authority_item_v1", + "delegate_collection_item_v1", + "delegate_collection_v1", + "delegate_data_item_v1", + "delegate_data_v1", + "delegate_locked_transfer_v1", + "delegate_print_delegate_v1", + "delegate_programmable_config_item_v1", + "delegate_programmable_config_v1", + "delegate_sale_v1", + "delegate_staking_v1", + "delegate_standard_v1", + "delegate_transfer_v1", + "delegate_utility_v1", + "deprecated_mint_new_edition_from_master_edition_via_printing_token", + "freeze_delegated_account", + "lock", + "lock_v1", + "migrate", + "mint", + "mint_new_edition_from_master_edition_via_token", + "mint_new_edition_from_master_edition_via_vault_proxy", + "mint_v1", + "print", + "print_v1", + "print_v2", + "puff_metadata", + "remove_creator_verification", + "resize", + "revoke", + "revoke_authority_item_v1", + "revoke_collection_authority", + "revoke_collection_item_v1", + "revoke_collection_v1", + "revoke_data_item_v1", + "revoke_data_v1", + "revoke_locked_transfer_v1", + "revoke_migration_v1", + "revoke_print_delegate_v1", + "revoke_programmable_config_item_v1", + "revoke_programmable_config_v1", + "revoke_sale_v1", + "revoke_staking_v1", + "revoke_standard_v1", + "revoke_transfer_v1", + "revoke_use_authority", + "revoke_utility_v1", + "set_and_verify_collection", + "set_and_verify_sized_collection_item", + "set_collection_size", + "set_token_standard", + "sign_metadata", + "thaw_delegated_account", + "transfer", + "transfer_out_of_escrow", + "transfer_v1", + "unlock", + "unlock_v1", + "unverify", + "unverify_collection", + "unverify_collection_v1", + "unverify_creator_v1", + "unverify_sized_collection_item", + "update", + "update_as_authority_item_delegate_v2", + "update_as_collection_delegate_v2", + "update_as_collection_item_delegate_v2", + "update_as_data_delegate_v2", + "update_as_data_item_delegate_v2", + "update_as_programmable_config_delegate_v2", + "update_as_programmable_config_item_delegate_v2", + "update_as_update_authority_v2", + "update_metadata_account_v2", + "update_primary_sale_happened_via_token", + "update_v1", + "use", + "use_v1", + "utilize", + "verify", + "verify_collection", + "verify_collection_v1", + "verify_creator_v1", + "verify_sized_collection_item" + ], + "historical_idl": { + "instruction_count": 58, + "discriminator_range": "0..57", + "status": "names_accounts_arguments_and_legacy_optional_rules_pending_exhaustive_extraction" + }, + "pda_families": [ + { + "code": "metadata", + "seed_shape": [ + "metadata", + "program_id", + "mint" + ], + "status": "implemented_pre_025" + }, + { + "code": "edition_or_master_edition", + "seed_shape": [ + "metadata", + "program_id", + "mint", + "edition" + ], + "status": "implemented_pre_026" + }, + { + "code": "edition_marker", + "status": "implemented_pre_027" + }, + { + "code": "collection_authority_record", + "status": "implemented_pre_029" + }, + { + "code": "use_authority_record", + "status": "implemented_pre_029" + }, + { + "code": "token_record", + "status": "implemented_pre_028" + }, + { + "code": "metadata_delegate_record", + "status": "implemented_pre_029", + "seeds": [ + "metadata", + "program_id", + "mint", + "metadata_delegate_role_seed", + "update_authority", + "delegate" + ] + }, + { + "code": "token_owned_escrow", + "status": "implemented_pre_030", + "token_owner_seeds": [ + "metadata", + "program_id", + "base_token", + "0", + "escrow" + ], + "creator_seeds": [ + "metadata", + "program_id", + "base_token", + "1", + "creator", + "escrow" + ] + }, + { + "code": "reservation_list_historical", + "status": "implemented_pre_031" + }, + { + "code": "holder_delegate_record", + "status": "implemented_pre_029", + "seeds": [ + "metadata", + "program_id", + "mint", + "holder_delegate_role_seed", + "owner", + "delegate" + ] + } + ], + "account_layouts": [ + { + "name": "Metadata", + "status": "implemented_pre_025" + }, + { + "name": "MasterEditionV1", + "status": "implemented_pre_026_historical_decode_only" + }, + { + "name": "MasterEditionV2", + "status": "implemented_pre_026" + }, + { + "name": "Edition", + "status": "implemented_pre_026" + }, + { + "name": "EditionMarker", + "status": "implemented_pre_027" + }, + { + "name": "EditionMarkerV2", + "status": "implemented_pre_027_experimental" + }, + { + "name": "TokenRecord", + "status": "implemented_pre_028" + }, + { + "name": "MetadataDelegateRecord", + "status": "implemented_pre_029" + }, + { + "name": "HolderDelegateRecord", + "status": "implemented_pre_029" + }, + { + "name": "CollectionAuthorityRecord", + "status": "implemented_pre_029" + }, + { + "name": "UseAuthorityRecord", + "status": "implemented_pre_029" + }, + { + "name": "TokenOwnedEscrow", + "status": "implemented_pre_030" + }, + { + "name": "ReservationListV1V2", + "status": "implemented_pre_031_decode_only", + "max_entries": 200, + "v1_max_bytes": 6949, + "v2_max_bytes": 9749, + "pda_seeds": [ + "metadata", + "program_id", + "master_edition", + "reservation", + "resource" + ], + "execution": "historical_never_execute" + } + ], + "provenance_boundaries": [ + "metaplex_token_metadata", + "token_2022_embedded_metadata", + "metaplex_core", + "metaplex_bubblegum" + ], + "external_json": { + "enabled": false, + "canonical_replay_dependency": false, + "status": "contract_reserved", + "ssrf_policy": "required_before_activation" + }, + "execution": { + "enabled": false, + "reason": "builders_accounts_preconditions_and_postconditions_not_yet_exhaustively_proved" + }, + "next_proofs": [ + "materialize Metadata facts with one canonical owner per fact and no duplication", + "materialize historical account state with explicit lifecycle and provenance" + ], + "implemented_instruction_groups": [ + { + "pre_release": "0.4.7-pre.002", + "group": "metadata_create_update_v2_v3", + "instructions": [ + { + "name": "UpdateMetadataAccountV2", + "code": "update_metadata_account_v2", + "discriminator": 15, + "status": "current", + "decode": "implemented", + "materialize": "pending", + "execute": "pending" + }, + { + "name": "CreateMetadataAccountV3", + "code": "create_metadata_account_v3", + "discriminator": 33, + "status": "current", + "decode": "implemented", + "materialize": "pending", + "execute": "pending" + } + ], + "wire": "official_borsh_mpl_token_metadata_5_1_1", + "runtime_registration": "pending_full_group_validation" + }, + { + "pre_release": "0.4.7-pre.003", + "group": "collection_verification_legacy_current", + "instructions": [ + { + "name": "VerifyCollection", + "code": "verify_collection", + "discriminator": 18, + "status": "current", + "decode": "implemented", + "materialize": "pending", + "execute": "pending" + }, + { + "name": "UnverifyCollection", + "code": "unverify_collection", + "discriminator": 22, + "status": "current", + "decode": "implemented", + "materialize": "pending", + "execute": "pending" + }, + { + "name": "SetAndVerifyCollection", + "code": "set_and_verify_collection", + "discriminator": 25, + "status": "current", + "decode": "implemented", + "materialize": "pending", + "execute": "pending" + } + ], + "wire": "single_u8_discriminator_official_mpl_token_metadata_5_1_1", + "account_contract": "ordered_required_accounts_plus_optional_collection_authority_record_and_bounded_remaining_accounts", + "runtime_registration": "pending_broader_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.004", + "group": "sized_collection_item_verification", + "instructions": [ + { + "name": "VerifySizedCollectionItem", + "code": "verify_sized_collection_item", + "discriminator": 30, + "status": "current", + "decode": "implemented", + "materialize": "pending", + "execute": "pending" + }, + { + "name": "UnverifySizedCollectionItem", + "code": "unverify_sized_collection_item", + "discriminator": 31, + "status": "current", + "decode": "implemented", + "materialize": "pending", + "execute": "pending" + }, + { + "name": "SetAndVerifySizedCollectionItem", + "code": "set_and_verify_sized_collection_item", + "discriminator": 32, + "status": "current", + "decode": "implemented", + "materialize": "pending", + "execute": "pending" + } + ], + "wire": "single_u8_discriminator_official_mpl_token_metadata_5_1_1", + "account_contract": "ordered_required_accounts_plus_optional_collection_authority_record; collection metadata is writable and collection authority is readonly signer", + "runtime_registration": "pending_broader_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.005", + "group": "collection_authority_administration", + "instructions": [ + { + "name": "ApproveCollectionAuthority", + "code": "approve_collection_authority", + "discriminator": 23, + "status": "current", + "wire": "u8 discriminator only", + "required_accounts": 7, + "optional_accounts": [ + "rent" + ], + "defaulted_accounts": [ + "system_program" + ], + "execution_policy": "future_current_surface" + }, + { + "name": "RevokeCollectionAuthority", + "code": "revoke_collection_authority", + "discriminator": 24, + "status": "current", + "wire": "u8 discriminator only", + "required_accounts": 5, + "optional_accounts": [], + "execution_policy": "future_current_surface" + } + ], + "provenance": "mpl-token-metadata 5.1.1 generated builders", + "materialization": "reserved_for_admin_and_lifecycle_pre_release" + }, + { + "pre_release": "0.4.7-pre.006", + "group": "use_authority_and_utilization", + "instructions": [ + { + "name": "Utilize", + "code": "utilize", + "discriminator": 19, + "status": "current", + "wire": "u8 discriminator + u64 number_of_uses", + "required_accounts": 9, + "optional_accounts": [ + "use_authority_record", + "burner" + ], + "execution_policy": "future_current_surface" + }, + { + "name": "ApproveUseAuthority", + "code": "approve_use_authority", + "discriminator": 20, + "status": "current", + "wire": "u8 discriminator + u64 number_of_uses", + "required_accounts": 10, + "optional_accounts": [ + "rent" + ], + "defaulted_accounts": [ + "token_program", + "system_program" + ], + "execution_policy": "future_current_surface" + }, + { + "name": "RevokeUseAuthority", + "code": "revoke_use_authority", + "discriminator": 21, + "status": "current", + "wire": "u8 discriminator only", + "required_accounts": 8, + "optional_accounts": [ + "rent" + ], + "defaulted_accounts": [ + "token_program", + "system_program" + ], + "execution_policy": "future_current_surface" + } + ], + "provenance": "mpl-token-metadata 5.1.1 generated builders", + "materialization": "reserved_for_metadata_admin_lifecycle_and_risk_audit" + }, + { + "pre_release": "0.4.7-pre.007", + "group": "creator_signature_and_primary_sale", + "instructions": [ + { + "name": "UpdatePrimarySaleHappenedViaToken", + "code": "update_primary_sale_happened_via_token", + "discriminator": 4, + "status": "current", + "wire": "u8 discriminator only", + "required_accounts": 3, + "execution_policy": "future_current_surface" + }, + { + "name": "SignMetadata", + "code": "sign_metadata", + "discriminator": 7, + "status": "current", + "wire": "u8 discriminator only", + "required_accounts": 2, + "execution_policy": "future_current_surface" + } + ], + "provenance": "mpl-token-metadata 5.1.1 generated builders", + "materialization": "reserved_for_metadata_and_creator_state_pre_release" + }, + { + "pre_release": "0.4.7-pre.008", + "group": "metadata_normalization_and_creator_unverification", + "instructions": [ + { + "name": "PuffMetadata", + "code": "puff_metadata", + "discriminator": 14, + "status": "current", + "wire": "u8 discriminator only", + "required_accounts": 1, + "execution_policy": "future_current_surface" + }, + { + "name": "RemoveCreatorVerification", + "code": "remove_creator_verification", + "discriminator": 28, + "status": "current", + "wire": "u8 discriminator only", + "required_accounts": 2, + "execution_policy": "future_current_surface" + }, + { + "name": "SetTokenStandard", + "code": "set_token_standard", + "discriminator": 35, + "status": "current", + "wire": "u8 discriminator only", + "required_accounts": 3, + "optional_accounts": [ + "edition" + ], + "execution_policy": "future_current_surface" + } + ], + "provenance": "mpl-token-metadata 5.1.1 generated builders", + "materialization": "reserved_for_metadata_creator_and_asset_classification_pre_release" + }, + { + "pre_release": "0.4.7-pre.009", + "group": "historical_metadata_create_v2", + "instructions": [ + { + "name": "CreateMetadataAccountV2", + "code": "create_metadata_account_v2", + "discriminator": 16, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_historical" + } + ], + "wire": "u8 discriminator + historical DataV2 + bool is_mutable using Borsh 0.10", + "account_contract": "metadata, mint, mint_authority signer, payer writable signer, update_authority, system_program, optional rent", + "provenance": "historical Metaplex Token Metadata instruction surface; current SDK DataV2 type reused only for exact compatible wire fields", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.010", + "group": "historical_metadata_v1_create_update", + "instructions": [ + { + "name": "CreateMetadataAccount", + "code": "create_metadata_account", + "discriminator": 0, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_historical" + }, + { + "name": "UpdateMetadataAccount", + "code": "update_metadata_account", + "discriminator": 1, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_historical" + } + ], + "wire": "u8 discriminator + historical Data/Option fields using Borsh 0.10", + "provenance": "historical generated Metaplex Token Metadata surface", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.011", + "group": "master_edition_creation_and_v1_conversion", + "instructions": [ + { + "name": "CreateMasterEditionV3", + "code": "create_master_edition_v3", + "discriminator": 17, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "ConvertMasterEditionV1ToV2", + "code": "convert_master_edition_v1_to_v2", + "discriminator": 12, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_historical" + } + ], + "wire": "CreateMasterEditionV3: u8 discriminator + Option max_supply; conversion: u8 discriminator only", + "account_contract": "exact generated Rust SDK account order and signer/writable flags; optional rent accepted for CreateMasterEditionV3", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.012", + "group": "printed_edition_mint_token_and_vault_proxy", + "instructions": [ + { + "name": "MintNewEditionFromMasterEditionViaToken", + "code": "mint_new_edition_from_master_edition_via_token", + "discriminator": 11, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "MintNewEditionFromMasterEditionViaVaultProxy", + "code": "mint_new_edition_from_master_edition_via_vault_proxy", + "discriminator": 13, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_historical" + } + ], + "wire": "u8 discriminator + MintNewEditionFromMasterEditionViaTokenArgs { edition: u64 }", + "account_contract": "exact generated Rust SDK account order and signer/writable flags; optional rent accepted after the required program accounts", + "edition_marker_contract": "edition marker PDA is writable and corresponds to floor(edition / EDITION_MARKER_BIT_SIZE); PDA derivation validation remains planned with account decoding", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.013", + "group": "collection_size_and_bubblegum_bridge", + "instructions": [ + { + "name": "SetCollectionSize", + "code": "set_collection_size", + "discriminator": 34, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "BubblegumSetCollectionSize", + "code": "bubblegum_set_collection_size", + "discriminator": 36, + "status": "bridge_current", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_until_bubblegum_boundary_proof" + } + ], + "wire": "u8 discriminator + SetCollectionSizeArgs { size: u64 }", + "account_contract": "exact generated Rust SDK account order and signer/writable flags; optional collection authority record accepted", + "provenance_boundary": "BubblegumSetCollectionSize is decoded as a Token Metadata bridge instruction and does not claim complete Bubblegum coverage", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.014", + "group": "programmable_delegate_and_revoke", + "instructions": [ + { + "name": "Delegate", + "code": "delegate", + "discriminator": 44, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_and_authorization_rules_proof" + }, + { + "name": "Revoke", + "code": "revoke", + "discriminator": 45, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_and_authorization_rules_proof" + } + ], + "wire": "u8 discriminator + DelegateArgs or RevokeArgs Borsh enum; DelegateArgs may contain optional AuthorizationData", + "account_contract": "14 positional accounts with Metaplex program placeholders for absent optional accounts; exact signer/writable invariants on authority, payer, metadata and optional writable records", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.015", + "group": "programmable_transfer_lock_unlock_burn_close", + "instructions": [ + { + "name": "Burn", + "code": "burn", + "discriminator": 41, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "Lock", + "code": "lock", + "discriminator": 46, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "Unlock", + "code": "unlock", + "discriminator": 47, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "Transfer", + "code": "transfer", + "discriminator": 49, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "CloseAccounts", + "code": "close_accounts", + "discriminator": 57, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + } + ], + "wire": "Borsh enums TransferArgs/LockArgs/UnlockArgs/BurnArgs; CloseAccounts discriminator only", + "account_contract": "exact generated Rust SDK positional accounts and signer/writable invariants; Metaplex program placeholders accepted for absent optional programmable accounts", + "runtime_registration": "pending_full_decoder_and_account_validation" + }, + { + "pre_release": "0.4.7-pre.016", + "group": "legacy_delegated_freeze_thaw_and_inventory_audit", + "instructions": [ + { + "name": "FreezeDelegatedAccount", + "code": "freeze_delegated_account", + "discriminator": 26, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_historical" + }, + { + "name": "ThawDelegatedAccount", + "code": "thaw_delegated_account", + "discriminator": 27, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_historical" + } + ], + "wire": "u8 discriminator only", + "account_contract": "delegate writable signer, token account writable, edition/mint/token program readonly", + "inventory_audit": "official generated Rust SDK instruction module index audited; remaining modules are tracked before account-state decoding", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.017", + "group": "legacy_nft_burn_and_printing_token_mint", + "instructions": [ + { + "name": "BurnNft", + "code": "burn_nft", + "discriminator": 29, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_historical" + }, + { + "name": "BurnEditionNft", + "code": "burn_edition_nft", + "discriminator": 37, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_historical" + }, + { + "name": "DeprecatedMintNewEditionFromMasterEditionViaPrintingToken", + "code": "deprecated_mint_new_edition_from_master_edition_via_printing_token", + "discriminator": 3, + "status": "deprecated_historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden_historical" + } + ], + "wire": "u8 discriminator only", + "account_contract": "exact generated Rust SDK positional signer/writable contracts; BurnNft collection metadata, deprecated printing-token reservation list are optional trailing accounts", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.018", + "group": "escrow_transfer_and_collect", + "instructions": [ + { + "name": "CreateEscrowAccount", + "code": "create_escrow_account", + "discriminator": 38, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "CloseEscrowAccount", + "code": "close_escrow_account", + "discriminator": 39, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "TransferOutOfEscrow", + "code": "transfer_out_of_escrow", + "discriminator": 40, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "Collect", + "code": "collect", + "discriminator": 54, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_authority_proof" + } + ], + "wire": "Create/Close/Collect discriminator only; TransferOutOfEscrow discriminator + amount u64", + "account_contract": "exact generated Rust SDK signer/writable contracts with optional trailing authority on create and transfer", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.019", + "group": "modern_create_wrapper", + "instructions": [ + { + "name": "Create", + "code": "create", + "discriminator": 42, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + } + ], + "wire": "u8 discriminator + CreateArgs enum", + "account_contract": "nine positional accounts with Metaplex placeholders for optional master edition and SPL Token Program", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.020", + "group": "modern_mint_wrapper", + "instructions": [ + { + "name": "Mint", + "code": "mint", + "discriminator": 43, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + } + ], + "wire": "u8 discriminator + MintArgs::V1 { amount: u64, authorization_data: Option }", + "account_contract": "fifteen positional accounts with Metaplex placeholders for optional token owner, master edition, token record, delegate record and authorization-rule accounts", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.021", + "group": "modern_print_wrapper", + "instructions": [ + { + "name": "Print", + "code": "print", + "discriminator": 55, + "variants": [ + "V1", + "V2" + ], + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + } + ], + "wire": "u8 discriminator + PrintArgs::{V1,V2} { edition: u64 }", + "account_contract": "eighteen positional accounts with a Metaplex placeholder or writable Token Record at position 6", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.022", + "group": "modern_update_wrapper", + "instructions": [ + { + "name": "Update", + "code": "update", + "discriminator": 50, + "variants": [ + "V1", + "AsUpdateAuthorityV2", + "AsAuthorityItemDelegateV2", + "AsCollectionDelegateV2", + "AsDataDelegateV2", + "AsProgrammableConfigDelegateV2", + "AsDataItemDelegateV2", + "AsCollectionItemDelegateV2", + "AsProgrammableConfigItemDelegateV2" + ], + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + } + ], + "wire": "u8 discriminator + UpdateArgs enum", + "account_contract": "eleven positional accounts with Metaplex placeholders for optional delegate record, token, edition and authorization-rule accounts", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.023", + "group": "modern_use_verify_unverify_wrappers", + "instructions": [ + { + "name": "Use", + "code": "use", + "discriminator": 51, + "variants": [ + "V1" + ], + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "Verify", + "code": "verify", + "discriminator": 52, + "variants": [ + "CreatorV1", + "CollectionV1" + ], + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "Unverify", + "code": "unverify", + "discriminator": 53, + "variants": [ + "CreatorV1", + "CollectionV1" + ], + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + } + ], + "wire": "u8 discriminator + UseArgs or VerificationArgs enum", + "account_contract": "twelve positional accounts for Use; eight positional accounts for Verify/Unverify, with Metaplex placeholders for optional accounts", + "runtime_registration": "pending_full_decoder_validation" + }, + { + "pre_release": "0.4.7-pre.024", + "group": "final_instruction_inventory_resize_migrate_and_legacy_gaps", + "instructions": [ + { + "name": "DeprecatedCreateMasterEdition", + "code": "deprecated_create_master_edition", + "discriminator": 2, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden" + }, + { + "name": "DeprecatedSetReservationList", + "code": "deprecated_set_reservation_list", + "discriminator": 5, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden" + }, + { + "name": "DeprecatedCreateReservationList", + "code": "deprecated_create_reservation_list", + "discriminator": 6, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden" + }, + { + "name": "DeprecatedMintPrintingTokensViaToken", + "code": "deprecated_mint_printing_tokens_via_token", + "discriminator": 8, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden" + }, + { + "name": "DeprecatedMintPrintingTokens", + "code": "deprecated_mint_printing_tokens", + "discriminator": 9, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden" + }, + { + "name": "CreateMasterEdition", + "code": "create_master_edition", + "discriminator": 10, + "status": "historical", + "decode": "implemented", + "materialize": "planned", + "execute": "forbidden" + }, + { + "name": "Migrate", + "code": "migrate", + "discriminator": 48, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + }, + { + "name": "Resize", + "code": "resize", + "discriminator": 56, + "status": "current", + "decode": "implemented", + "materialize": "planned", + "execute": "planned_after_stateful_proof" + } + ], + "wire": "u8 discriminator only", + "account_contract": "exact IDL/generated positional signer and writable flags", + "runtime_registration": "pending_full_decoder_validation", + "inventory_proof": { + "covered_discriminators": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57 + ], + "missing_discriminators": [], + "coverage_entries": 58 + } + } + ], + "implemented_account_groups": [ + { + "group": "metadata_account_v1", + "layouts": [ + "MetadataV1" + ], + "owner_validation": "exact_metaplex_token_metadata_program", + "pda_seeds": [ + "metadata", + "program_id", + "mint" + ], + "bounds": { + "account_bytes": 1024, + "name_bytes": 32, + "symbol_bytes": 10, + "uri_bytes": 200, + "creators": 5 + }, + "runtime_registration": "not_enabled" + }, + { + "group": "edition_and_master_edition_accounts", + "status": "implemented_pre_026", + "layouts": [ + "DeprecatedMasterEditionV1", + "MasterEditionV2", + "EditionV1" + ], + "owner": "mpl_token_metadata_program", + "pda_seeds": [ + "metadata", + "program_id", + "mint", + "edition" + ], + "bounds": { + "max_account_bytes": 128, + "edition_v1_exact_bytes": 41 + }, + "policy": { + "DeprecatedMasterEditionV1": "historical_decode_only", + "MasterEditionV2": "active_state", + "EditionV1": "active_state" + } + }, + { + "group": "edition_marker_accounts", + "status": "implemented_pre_027", + "layouts": [ + "EditionMarker", + "EditionMarkerV2" + ], + "owner": "mpl_token_metadata_program", + "pda_seeds": { + "EditionMarker": [ + "metadata", + "program_id", + "mint", + "edition", + "edition_div_248_decimal" + ], + "EditionMarkerV2": [ + "metadata", + "program_id", + "mint", + "edition", + "marker" + ] + }, + "bitmap": { + "EditionMarker": { + "ledger_bytes": 31, + "editions_per_group": 248, + "bit_order": "most_significant_bit_first" + }, + "EditionMarkerV2": { + "ledger": "borsh_vec_u8", + "max_decoder_ledger_bytes": 1048576, + "bit_order": "most_significant_bit_first" + } + }, + "runtime_registration": "not_enabled" + }, + { + "group": "token_record_account", + "status": "implemented_pre_028", + "layouts": [ + "TokenRecord" + ], + "owner": "mpl_token_metadata_program", + "length": 80, + "pda_seeds": [ + "metadata", + "program_id", + "mint", + "token_record", + "token_account" + ], + "fields": [ + "bump", + "state", + "rule_set_revision", + "delegate", + "delegate_role", + "locked_transfer" + ], + "token_states": [ + "Unlocked", + "Locked", + "Listed" + ], + "delegate_roles": [ + "Sale", + "Transfer", + "Utility", + "Staking", + "Standard", + "LockedTransfer", + "Migration" + ], + "runtime_registration": "not_enabled" + }, + { + "group": "delegate_and_authority_records", + "status": "implemented_pre_029", + "layouts": [ + "MetadataDelegateRecord", + "HolderDelegateRecord", + "CollectionAuthorityRecord", + "UseAuthorityRecord" + ], + "owner": "mpl_token_metadata_program", + "lengths": { + "MetadataDelegateRecord": 98, + "HolderDelegateRecord": 98, + "CollectionAuthorityRecord": "3_or_35", + "UseAuthorityRecord": 10 + }, + "pda_seeds": { + "MetadataDelegateRecord": [ + "metadata", + "program_id", + "mint", + "metadata_delegate_role_seed", + "update_authority", + "delegate" + ], + "HolderDelegateRecord": [ + "metadata", + "program_id", + "mint", + "holder_delegate_role_seed", + "owner", + "delegate" + ], + "CollectionAuthorityRecord": [ + "metadata", + "program_id", + "mint", + "collection_authority", + "authority" + ], + "UseAuthorityRecord": [ + "metadata", + "program_id", + "mint", + "user", + "authority" + ] + }, + "metadata_delegate_role_seeds": [ + "authority_item_delegate", + "collection_delegate", + "use_delegate", + "data_delegate", + "programmable_config_delegate", + "data_item_delegate", + "collection_item_delegate", + "prog_config_item_delegate" + ], + "holder_delegate_role_seeds": [ + "print_delegate" + ], + "runtime_registration": "not_enabled" + }, + { + "group": "token_owned_escrow_account", + "status": "implemented_pre_030", + "layouts": [ + "TokenOwnedEscrow" + ], + "owner": "mpl_token_metadata_program", + "lengths": { + "TokenOwner": 35, + "Creator": 67 + }, + "fields": [ + "base_token", + "authority", + "bump" + ], + "pda_seeds": { + "TokenOwner": [ + "metadata", + "program_id", + "base_token", + "0", + "escrow" + ], + "Creator": [ + "metadata", + "program_id", + "base_token", + "1", + "creator", + "escrow" + ] + }, + "stateful_instruction_effects": { + "CreateEscrowAccount": "creates canonical escrow snapshot", + "CloseEscrowAccount": "closes canonical escrow snapshot", + "TransferOutOfEscrow": "changes escrow-held attribute state without changing account identity", + "Migrate": "may create or update related programmable records; correlation pending", + "Resize": "changes allocated account bytes without changing canonical identity" + }, + "runtime_registration": "not_enabled" + }, + { + "group": "historical_reservation_lists", + "status": "implemented_pre_031_decode_only", + "layouts": [ + "ReservationListV1", + "ReservationListV2" + ], + "max_entries": 200, + "padding_policy": "zero_only" + }, + { + "release": "0.4.7-pre.032", + "name": "exhaustive_account_key_audit", + "status": "implemented", + "published_discriminants": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + "missing": [], + "future_unknown_policy": "fail_closed" + } + ], + "account_key_inventory": [ + { + "key": "Uninitialized", + "discriminant": 0, + "decoder": "reject_uninitialized", + "lifecycle": "sentinel" + }, + { + "key": "EditionV1", + "discriminant": 1, + "decoder": "decode_edition_account", + "lifecycle": "active" + }, + { + "key": "MasterEditionV1", + "discriminant": 2, + "decoder": "decode_edition_account", + "lifecycle": "historical_materializable" + }, + { + "key": "ReservationListV1", + "discriminant": 3, + "decoder": "decode_reservation_list_account", + "lifecycle": "historical_materializable" + }, + { + "key": "MetadataV1", + "discriminant": 4, + "decoder": "decode_metadata_account", + "lifecycle": "active" + }, + { + "key": "ReservationListV2", + "discriminant": 5, + "decoder": "decode_reservation_list_account", + "lifecycle": "historical_materializable" + }, + { + "key": "MasterEditionV2", + "discriminant": 6, + "decoder": "decode_edition_account", + "lifecycle": "active" + }, + { + "key": "EditionMarker", + "discriminant": 7, + "decoder": "decode_edition_marker_account", + "lifecycle": "active" + }, + { + "key": "UseAuthorityRecord", + "discriminant": 8, + "decoder": "decode_use_authority_record_account", + "lifecycle": "active" + }, + { + "key": "CollectionAuthorityRecord", + "discriminant": 9, + "decoder": "decode_collection_authority_record_account", + "lifecycle": "active" + }, + { + "key": "TokenOwnedEscrow", + "discriminant": 10, + "decoder": "decode_token_owned_escrow_account", + "lifecycle": "active" + }, + { + "key": "TokenRecord", + "discriminant": 11, + "decoder": "decode_token_record_account", + "lifecycle": "active" + }, + { + "key": "MetadataDelegate", + "discriminant": 12, + "decoder": "decode_metadata_delegate_record_account", + "lifecycle": "active" + }, + { + "key": "EditionMarkerV2", + "discriminant": 13, + "decoder": "decode_edition_marker_account", + "lifecycle": "active_experimental" + }, + { + "key": "HolderDelegate", + "discriminant": 14, + "decoder": "decode_holder_delegate_record_account", + "lifecycle": "active" + } + ], + "account_inventory_proof": { + "published_key_discriminants": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + "missing_discriminants": [], + "published_variants": 15, + "decoded_layout_variants": 14, + "explicit_sentinel_rejections": 1, + "unknown_future_policy": "fail_closed_until_inventory_and_decoder_are_updated", + "status": "implemented_pre_032" + }, + "canonical_account_model": { + "status": "implemented_pre_033", + "canonical_version": 1, + "stable_identity": "program_id:account_address", + "lifecycle_classes": [ + "active", + "active_experimental", + "historical" + ], + "materialization_policies": { + "active": "active_state", + "active_experimental": "active_state", + "historical": "historical_state" + }, + "execution_policies": { + "active": "current_candidate", + "active_experimental": "experimental_candidate", + "historical": "never_historical" + }, + "provenance_fields": [ + "source", + "slot", + "write_version", + "signature", + "instruction_index", + "inner_instruction_index", + "committed" + ], + "observation_sources": [ + "live", + "replay", + "backfill", + "repair", + "synthetic" + ], + "historical_policy": "historical layouts remain materializable during backfill/replay but are never executable" + }, + "materialization_policy": { + "decoder_rule": "decode every identifiable historical/current/experimental published wire and account layout", + "materializer_rule": "materialize every stable proven fact including historical/deprecated state with explicit lifecycle and provenance", + "executor_rule": "execute current or experimental callable operations only; historical and obsolete operations are never executable", + "state_authority": "owned account snapshots are authoritative for final state; instruction observations do not duplicate the same state", + "implemented_pre_034": [ + "MetadataV1 canonical active-state projection", + "creator/collection/uses/token-standard/programmable-config bounded payload retention", + "committed provenance requirement", + "stable account-based output identity" + ] + }, + "next_proof": "edition, marker, delegate, token-record, escrow and historical-state materialization without duplicates" +} diff --git a/olddocs/archivekbot2/docs/NATIVE_SOLANA_CLOSURE_AUDIT.md b/olddocs/archivekbot2/docs/NATIVE_SOLANA_CLOSURE_AUDIT.md new file mode 100644 index 0000000..746998f --- /dev/null +++ b/olddocs/archivekbot2/docs/NATIVE_SOLANA_CLOSURE_AUDIT.md @@ -0,0 +1,113 @@ + + + +# Audit de clôture Solana natif `0.4.1` + +## Objet + +Ce document fixe l’état final du jalon `0.4.1` : couverture native, preuves synthétiques, corpus mainnet observés et limites assumées. + +L’absence de transaction mainnet n’autorise ni à supprimer une surface officielle, ni à prétendre qu’elle a été observée. Elle impose une validation synthétique documentée et une tentative de découverte bornée lorsque la surface est officiellement déclarée. + +## Surfaces couvertes + +`kb_decoder_solana_core` couvre 18 surfaces exécutables natives ou assimilées : + +1. System Program ; +2. Vote Program ; +3. Stake Program ; +4. Config Program ; +5. Compute Budget Program ; +6. Address Lookup Table Program ; +7. ZK ElGamal Proof Program ; +8. Feature Program ; +9. ancien ZK Token Proof Program ; +10. Native Loader ; +11. BPF Loader v1 ; +12. BPF Loader v2 ; +13. BPF Loader Upgradeable ; +14. Loader v4 ; +15. Ed25519 precompile ; +16. secp256k1 precompile ; +17. secp256r1 precompile ; +18. Slashing Program. + +`StakeConfig11111111111111111111111111111111` est volontairement classé comme compte natif historique non exécutable. + +## Divergence Slashing corrigée + +Agave `v4.1.1` déclare le programme stateless Slashing sous : + +```text +S1ashing11111111111111111111111111111111111 +``` + +La surface a été ajoutée dans `pre.018` : deux instructions exactes, dispatch sans fallback, couverture déclarée et projection de rapport. Aucun corpus public observable n’a été trouvé ; la validation repose donc sur les sources officielles et les fixtures synthétiques. + +## Invariants automatiques + +Les tests garantissent que : + +- chaque entrée de `kb_program_ids::native_program_ids()` possède exactement une surface de décodeur ; +- chaque surface possède au moins une déclaration de couverture ; +- aucune déclaration n’utilise le fallback `unclassified_native_instruction` ; +- chaque déclaration référence une surface réellement déclarée ; +- les identités programme/surface/entrée sont uniques ; +- le Slashing Program est dispatché vers son parseur exact ; +- ZK Token Proof historique passe par le fallback actuel no-op sans prétendre vérifier une preuve. + +## Corpus et replays validés + +| Programme | Résultat de clôture | +|---------------------------|------------------------------------------------------------------------------| +| System | 817 inputs décodés, 258 sorties, 52 refus attendus sur transactions échouées | +| Config | 96 inputs décodés, 96 sorties admin | +| Stake | 448 inputs décodés, 447 sorties, 1 refus attendu | +| Vote | 600 inputs décodés, 600 sorties | +| Compute Budget | 2 746 inputs décodés, 1 603 profils transactionnels | +| Address Lookup Table | 104 inputs décodés, 104 sorties lifecycle | +| ZK ElGamal | 151 inputs décodés, 139 sorties de contexte | +| Slashing | zéro corpus public observable, validation synthétique | +| Feature | zéro corpus observable dans les campagnes adressées, validation synthétique | +| Loaders rares | zéro corpus observable pour certaines générations, validation synthétique | +| ZK Token Proof historique | zéro corpus public observable, runtime actuel no-op, validation synthétique | + +Les campagnes de clôture rapportées ont `unmatched = 0`, `failedInputs = 0`, `unsupported = 0` et ne produisent pas d’erreurs opérationnelles dans les journaux fournis. + +## Backfills + +Aucun backfill supplémentaire n’est requis pour clôturer `0.4.1`. + +Le mode `program_latest` ajouté dans `pre.019` reste disponible pour de futures recherches sans signature d’ancrage. Il ne doit pas être utilisé pour inventer un corpus absent sur des surfaces feature-gated ou historiquement rares. + +## Matérialisations + +La clôture instructionnelle est documentée dans `docs/NATIVE_SOLANA_MATERIALIZATION_AUDIT.md`. + +Aucune projection native stable immédiatement dérivable du graphe core actuel n’est identifiée comme manquante. Les snapshots finaux de comptes et métriques runtime restent différés. + +## Validations finales + +Validations utilisateur finales rapportées pour la clôture : + +```text +kb_program_ids 5 tests +kb_decoder_solana_core 114 tests +kb_materializer_lifecycle 16 tests +kb_materializer_admin 7 tests +kb_materializer_compliance_audit 7 tests +kb_materializer_staking 8 tests +kb_config 36 tests +kb_pipeline 45 tests +kb_store_pg 45 tests avec PostgreSQL réel +kb_app_demo 78 tests +cargo clippy --all-targets propre +``` + +Le démarrage Tauri validé après `pre.021-fix.001` confirme les 53 routes de logging et l’initialisation PostgreSQL. `pre.022` ne modifie pas la configuration Tauri. + +## Décision + +`0.4.1` est clôturée. + +La prochaine session doit utiliser `prompts/022_v0_4_2_executor_solana_core.md` et démarrer `0.4.2` sur l’infrastructure d’exécution et `kb_executor_solana_core`. diff --git a/olddocs/archivekbot2/docs/NATIVE_SOLANA_DECODER_MATRIX.json b/olddocs/archivekbot2/docs/NATIVE_SOLANA_DECODER_MATRIX.json new file mode 100644 index 0000000..b34fe57 --- /dev/null +++ b/olddocs/archivekbot2/docs/NATIVE_SOLANA_DECODER_MATRIX.json @@ -0,0 +1,155 @@ +{ + "file": "docs/NATIVE_SOLANA_DECODER_MATRIX.json", + "version": 1, + "release": "0.4.2-pre.023", + "surface_count": 18, + "coverage_entry_count": 121, + "registry_contract": "Exact equality with kb_program_ids::native_program_ids and SolanaCoreDecoder::surfaces", + "completeness_contract": "Each surface has exact declared coverage count plus a dedicated official-enum or audited-wire completeness test", + "surfaces": [ + { + "surface_code": "solana_native_address_lookup_table", + "program_id": "AddressLookupTab1e1111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 5, + "source_contract": "solana-address-lookup-table-interface@3.1.x official instruction enum", + "completeness_test": "address_lookup_table::tests::coverage_uses_official_encoder_discriminants" + }, + { + "surface_code": "solana_native_bpf_loader_deprecated", + "program_id": "BPFLoader1111111111111111111111111111111111", + "runtime_status": "historical", + "expected_coverage_entries": 2, + "source_contract": "solana-loader-v2-interface@3.0.0 immutable write/finalize layout", + "completeness_test": "loaders::tests::coverage_declares_every_loader_entry" + }, + { + "surface_code": "solana_native_bpf_loader", + "program_id": "BPFLoader2111111111111111111111111111111111", + "runtime_status": "historical", + "expected_coverage_entries": 2, + "source_contract": "solana-loader-v2-interface@3.0.0 immutable write/finalize layout", + "completeness_test": "loaders::tests::coverage_declares_every_loader_entry" + }, + { + "surface_code": "solana_native_bpf_loader_upgradeable", + "program_id": "BPFLoaderUpgradeab1e11111111111111111111111", + "runtime_status": "current_with_historical_variants", + "expected_coverage_entries": 8, + "source_contract": "solana-loader-v3-interface@8.0.1 with wincode exact wire layout", + "completeness_test": "loaders::tests::coverage_declares_every_loader_entry" + }, + { + "surface_code": "solana_native_compute_budget", + "program_id": "ComputeBudget111111111111111111111111111111", + "runtime_status": "current_with_historical_variants", + "expected_coverage_entries": 6, + "source_contract": "solana-compute-budget-interface@3.0.0 plus historical RequestUnitsDeprecated", + "completeness_test": "compute_budget::tests::coverage_declares_current_and_historical_entries" + }, + { + "surface_code": "solana_native_config", + "program_id": "Config1111111111111111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 1, + "source_contract": "solana-config-interface@2.0.0 generic bounded store contract", + "completeness_test": "config::tests::coverage_declares_one_generic_store_surface" + }, + { + "surface_code": "solana_native_ed25519", + "program_id": "Ed25519SigVerify111111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 1, + "source_contract": "Agave Ed25519 precompile exact offset-table layout", + "completeness_test": "precompiles::tests::coverage_declares_exactly_three_signature_precompile_surfaces" + }, + { + "surface_code": "solana_native_feature", + "program_id": "Feature111111111111111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 1, + "source_contract": "solana-feature-gate-interface revoke-pending-activation instruction contract", + "completeness_test": "feature::tests::coverage_declares_the_single_official_instruction" + }, + { + "surface_code": "solana_native_loader_v4", + "program_id": "LoaderV411111111111111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 7, + "source_contract": "solana-loader-v4-interface@3.1.0 official instruction enum", + "completeness_test": "loaders::tests::coverage_declares_every_loader_entry" + }, + { + "surface_code": "solana_native_loader", + "program_id": "NativeLoader1111111111111111111111111111111", + "runtime_status": "runtime_dispatch", + "expected_coverage_entries": 1, + "source_contract": "Agave native-loader runtime direct-invocation behavior", + "completeness_test": "loaders::tests::coverage_declares_every_loader_entry" + }, + { + "surface_code": "solana_native_secp256k1", + "program_id": "KeccakSecp256k11111111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 1, + "source_contract": "Agave secp256k1 precompile exact offset-table layout", + "completeness_test": "precompiles::tests::coverage_declares_exactly_three_signature_precompile_surfaces" + }, + { + "surface_code": "solana_native_secp256r1", + "program_id": "Secp256r1SigVerify1111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 1, + "source_contract": "Agave secp256r1 precompile exact offset-table layout", + "completeness_test": "precompiles::tests::coverage_declares_exactly_three_signature_precompile_surfaces" + }, + { + "surface_code": "solana_native_slashing", + "program_id": "S1ashing11111111111111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 2, + "source_contract": "SIMD-0204 and Agave Slashing builtin instruction contract", + "completeness_test": "slashing::tests::coverage_declares_exactly_two_official_instructions" + }, + { + "surface_code": "solana_native_stake", + "program_id": "Stake11111111111111111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 18, + "source_contract": "solana-stake-interface@4.3.x official StakeInstruction variants", + "completeness_test": "stake::tests::coverage_declares_every_official_stake_instruction" + }, + { + "surface_code": "solana_native_system", + "program_id": "11111111111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 14, + "source_contract": "solana-system-interface@3.2.x official SystemInstruction variants", + "completeness_test": "system::tests::coverage_declares_all_current_system_variants" + }, + { + "surface_code": "solana_native_vote", + "program_id": "Vote111111111111111111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 20, + "source_contract": "solana-vote-interface@6.0.x official VoteInstruction variants", + "completeness_test": "vote::tests::coverage_declares_every_official_vote_instruction" + }, + { + "surface_code": "solana_native_zk_elgamal_proof", + "program_id": "ZkE1Gama1Proof11111111111111111111111111111", + "runtime_status": "current", + "expected_coverage_entries": 13, + "source_contract": "solana-zk-elgamal-proof-interface official ProofInstruction variants", + "completeness_test": "zk_elgamal::tests::coverage_declares_all_thirteen_official_instructions" + }, + { + "surface_code": "solana_native_zk_token_proof", + "program_id": "ZkTokenProof1111111111111111111111111111111", + "runtime_status": "historical_with_current_noop", + "expected_coverage_entries": 18, + "source_contract": "audited historical ZK Token Proof wire table plus current runtime no-op behavior", + "completeness_test": "zk_token_proof::tests::coverage_declares_seventeen_historical_entries_and_current_noop_fallback" + } + ] +} diff --git a/olddocs/archivekbot2/docs/NATIVE_SOLANA_EXECUTION_MATRIX.json b/olddocs/archivekbot2/docs/NATIVE_SOLANA_EXECUTION_MATRIX.json new file mode 100644 index 0000000..1aabe9f --- /dev/null +++ b/olddocs/archivekbot2/docs/NATIVE_SOLANA_EXECUTION_MATRIX.json @@ -0,0 +1,1279 @@ +{ + "file": "docs/NATIVE_SOLANA_EXECUTION_MATRIX.json", + "version": 1, + "release": "0.4.2-pre.022", + "surface_count": 18, + "callable_operation_count": 109, + "surfaces": [ + { + "surface": "system", + "program_ids": [ + "11111111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.system.transfer", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.transfer_many", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.create_account", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.create_account_with_seed", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.allocate", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.allocate_with_seed", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.assign", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.assign_with_seed", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.transfer_with_seed", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.create_account_allow_prefund", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.nonce.create", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.nonce.create_with_seed", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.nonce.initialize", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.nonce.advance", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.nonce.authorize", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.nonce.withdraw", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.system.nonce.upgrade", + "construction_source": "solana-system-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "spend and signer ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "devnet transfer path validated", + "ui_exposure": "safe_subset" + } + ] + }, + { + "surface": "compute_budget", + "program_ids": [ + "ComputeBudget111111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.compute_budget.request_heap_frame", + "construction_source": "solana-compute-budget-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "resource ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "offline_only", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.compute_budget.set_compute_unit_limit", + "construction_source": "solana-compute-budget-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "resource ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "offline_only", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.compute_budget.set_compute_unit_price", + "construction_source": "solana-compute-budget-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "resource ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "offline_only", + "ui_exposure": "safe_subset" + }, + { + "operation_code": "solana_core.compute_budget.set_loaded_accounts_data_size_limit", + "construction_source": "solana-compute-budget-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "none", + "policy": "resource ceilings", + "unit_test_contract": "builder::tests", + "cluster_validation": "offline_only", + "ui_exposure": "safe_subset" + } + ] + }, + { + "surface": "address_lookup_table", + "program_ids": [ + "AddressLookupTab1e1111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.address_lookup_table.create", + "construction_source": "solana-address-lookup-table-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "required", + "policy": "authority, capacity, rent and cooldown", + "unit_test_contract": "address_lookup_table::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.address_lookup_table.extend", + "construction_source": "solana-address-lookup-table-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "required", + "policy": "authority, capacity, rent and cooldown", + "unit_test_contract": "address_lookup_table::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.address_lookup_table.freeze", + "construction_source": "solana-address-lookup-table-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "required", + "policy": "authority, capacity, rent and cooldown", + "unit_test_contract": "address_lookup_table::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.address_lookup_table.deactivate", + "construction_source": "solana-address-lookup-table-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "required", + "policy": "authority, capacity, rent and cooldown", + "unit_test_contract": "address_lookup_table::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.address_lookup_table.close", + "construction_source": "solana-address-lookup-table-interface official builders", + "construction_kind": "official_builder", + "stateful_preflight": "required", + "policy": "authority, capacity, rent and cooldown", + "unit_test_contract": "address_lookup_table::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "ed25519", + "program_ids": [ + "Ed25519SigVerify111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.ed25519.verify_inline", + "construction_source": "solana-ed25519-program official layout", + "construction_kind": "official_layout", + "stateful_preflight": "none", + "policy": "bounded offsets and payload", + "unit_test_contract": "precompiles::tests", + "cluster_validation": "offline_only", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.ed25519.verify_offsets", + "construction_source": "solana-ed25519-program official layout", + "construction_kind": "official_layout", + "stateful_preflight": "none", + "policy": "bounded offsets and payload", + "unit_test_contract": "precompiles::tests", + "cluster_validation": "offline_only", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "secp256k1", + "program_ids": [ + "KeccakSecp256k11111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.secp256k1.verify_inline", + "construction_source": "solana-secp256k1-program official layout", + "construction_kind": "official_layout", + "stateful_preflight": "none", + "policy": "index zero and bounded offsets", + "unit_test_contract": "precompiles::tests", + "cluster_validation": "offline_only", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.secp256k1.verify_offsets", + "construction_source": "solana-secp256k1-program official layout", + "construction_kind": "official_layout", + "stateful_preflight": "none", + "policy": "index zero and bounded offsets", + "unit_test_contract": "precompiles::tests", + "cluster_validation": "offline_only", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "secp256r1", + "program_ids": [ + "Secp256r1SigVerify1111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.secp256r1.verify_inline", + "construction_source": "solana-secp256r1-program official layout", + "construction_kind": "official_layout", + "stateful_preflight": "none", + "policy": "low-S and bounded offsets", + "unit_test_contract": "precompiles::tests", + "cluster_validation": "offline_only", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.secp256r1.verify_offsets", + "construction_source": "solana-secp256r1-program official layout", + "construction_kind": "official_layout", + "stateful_preflight": "none", + "policy": "low-S and bounded offsets", + "unit_test_contract": "precompiles::tests", + "cluster_validation": "offline_only", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "config", + "program_ids": [ + "Config1111111111111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.config.create_account", + "construction_source": "solana-config-interface wire contract", + "construction_kind": "official_wire", + "stateful_preflight": "required", + "policy": "owner, allocation and rent", + "unit_test_contract": "native_admin::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.config.store", + "construction_source": "solana-config-interface wire contract", + "construction_kind": "official_wire", + "stateful_preflight": "required", + "policy": "owner, allocation and rent", + "unit_test_contract": "native_admin::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "feature", + "program_ids": [ + "Feature111111111111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.feature.activate", + "construction_source": "solana-feature-gate-interface official sequences", + "construction_kind": "official_builder", + "stateful_preflight": "required", + "policy": "pending state and rent", + "unit_test_contract": "native_admin::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.feature.revoke_pending_activation", + "construction_source": "solana-feature-gate-interface official sequences", + "construction_kind": "official_builder", + "stateful_preflight": "required", + "policy": "pending state and rent", + "unit_test_contract": "native_admin::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "slashing", + "program_ids": [ + "S1ashing11111111111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.slashing.close_violation_report", + "construction_source": "solana-slashing-program interface and SIMD-0204", + "construction_kind": "official_wire", + "stateful_preflight": "required", + "policy": "proof shape, epoch window and retention", + "unit_test_contract": "slashing::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.slashing.submit_duplicate_block_proof", + "construction_source": "solana-slashing-program interface and SIMD-0204", + "construction_kind": "official_wire", + "stateful_preflight": "required", + "policy": "proof shape, epoch window and retention", + "unit_test_contract": "slashing::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "zk_elgamal", + "program_ids": [ + "ZkE1Gama1Proof11111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.zk_elgamal.verify_inline", + "construction_source": "solana-zk-elgamal-proof-interface POD contract", + "construction_kind": "official_wire", + "stateful_preflight": "required", + "policy": "proof size and context owner/space/rent", + "unit_test_contract": "zk_elgamal::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.zk_elgamal.verify_from_account", + "construction_source": "solana-zk-elgamal-proof-interface POD contract", + "construction_kind": "official_wire", + "stateful_preflight": "required", + "policy": "proof size and context owner/space/rent", + "unit_test_contract": "zk_elgamal::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.zk_elgamal.close_context_state", + "construction_source": "solana-zk-elgamal-proof-interface POD contract", + "construction_kind": "official_wire", + "stateful_preflight": "required", + "policy": "proof size and context owner/space/rent", + "unit_test_contract": "zk_elgamal::tests", + "cluster_validation": "localnet_devnet_preflight", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "stake", + "program_ids": [ + "Stake11111111111111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.stake.initialize", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.initialize_checked", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.create_account", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.create_account_with_seed", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.create_account_checked", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.create_account_with_seed_checked", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.split", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.split_with_seed", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.merge", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.create_account_and_delegate", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.create_account_with_seed_and_delegate", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.authorize", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.authorize_checked", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.authorize_with_seed", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.authorize_checked_with_seed", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.delegate", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.withdraw", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.deactivate", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.set_lockup", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.set_lockup_checked", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.get_minimum_delegation", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.deactivate_delinquent", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.move_stake", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.stake.move_lamports", + "construction_source": "solana-stake-interface official helpers and wincode wire", + "construction_kind": "official_builder_or_wire", + "stateful_preflight": "future", + "policy": "authority, epoch, lockup and rent", + "unit_test_contract": "stake::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "vote", + "program_ids": [ + "Vote111111111111111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.vote.initialize_account", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.initialize_account_v2", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.create_account", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.create_account_with_seed", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.create_account_v2", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.create_account_with_seed_v2", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.authorize", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.authorize_checked", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.authorize_with_seed", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.authorize_checked_with_seed", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.vote", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.vote_switch", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.withdraw", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.update_validator_identity", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.update_commission", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.update_vote_state", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.update_vote_state_switch", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.compact_update_vote_state", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.compact_update_vote_state_switch", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.tower_sync", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.tower_sync_switch", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.update_commission_collector", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.update_commission_bps", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.vote.deposit_delegator_rewards", + "construction_source": "solana-vote-interface official wire via wincode", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "authority, state version and tower admissibility", + "unit_test_contract": "vote::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "loader_v3", + "program_ids": [ + "BPFLoaderUpgradeab1e11111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.loader_v3.create_buffer", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v3.write", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v3.deploy_with_max_program_len", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v3.upgrade", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v3.set_buffer_authority", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v3.set_buffer_authority_checked", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v3.set_upgrade_authority", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v3.set_upgrade_authority_checked", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v3.close", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v3.close_any", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v3.extend_program", + "construction_source": "solana-loader-v3-interface official helpers and wincode", + "construction_kind": "official_builder", + "stateful_preflight": "future", + "policy": "owner, authority, PDA, state and rent", + "unit_test_contract": "loader_v3::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "loader_v4", + "program_ids": [ + "LoaderV411111111111111111111111111111111111" + ], + "execution_status": "callable", + "classification": "native_runtime_program_or_precompile", + "operations": [ + { + "operation_code": "solana_core.loader_v4.create_buffer", + "construction_source": "solana-loader-v4-interface official discriminants and accounts", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "owner, authority, lifecycle and rent", + "unit_test_contract": "loader_v4::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v4.set_program_length", + "construction_source": "solana-loader-v4-interface official discriminants and accounts", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "owner, authority, lifecycle and rent", + "unit_test_contract": "loader_v4::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v4.write", + "construction_source": "solana-loader-v4-interface official discriminants and accounts", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "owner, authority, lifecycle and rent", + "unit_test_contract": "loader_v4::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v4.copy", + "construction_source": "solana-loader-v4-interface official discriminants and accounts", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "owner, authority, lifecycle and rent", + "unit_test_contract": "loader_v4::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v4.deploy", + "construction_source": "solana-loader-v4-interface official discriminants and accounts", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "owner, authority, lifecycle and rent", + "unit_test_contract": "loader_v4::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v4.deploy_from_source", + "construction_source": "solana-loader-v4-interface official discriminants and accounts", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "owner, authority, lifecycle and rent", + "unit_test_contract": "loader_v4::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v4.retract", + "construction_source": "solana-loader-v4-interface official discriminants and accounts", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "owner, authority, lifecycle and rent", + "unit_test_contract": "loader_v4::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v4.transfer_authority", + "construction_source": "solana-loader-v4-interface official discriminants and accounts", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "owner, authority, lifecycle and rent", + "unit_test_contract": "loader_v4::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + }, + { + "operation_code": "solana_core.loader_v4.finalize", + "construction_source": "solana-loader-v4-interface official discriminants and accounts", + "construction_kind": "official_wire", + "stateful_preflight": "future", + "policy": "owner, authority, lifecycle and rent", + "unit_test_contract": "loader_v4::tests", + "cluster_validation": "future_stateful_validation", + "ui_exposure": "hidden" + } + ] + }, + { + "surface": "bpf_loader_v1", + "program_ids": [ + "BPFLoader1111111111111111111111111111111111" + ], + "execution_status": "non_invocable", + "classification": "historical_decode_only", + "operations": [], + "official_reason": "Deprecated immutable loader generation retained for historical decoding; no current client builder is exposed." + }, + { + "surface": "bpf_loader_v2", + "program_ids": [ + "BPFLoader2111111111111111111111111111111111" + ], + "execution_status": "non_invocable", + "classification": "historical_decode_only", + "operations": [], + "official_reason": "Immutable loader generation retained for historical decoding; deployment administration moved to newer loader interfaces." + }, + { + "surface": "native_loader", + "program_ids": [ + "NativeLoader1111111111111111111111111111111" + ], + "execution_status": "non_invocable", + "classification": "validator_software_loader", + "operations": [], + "official_reason": "Native Loader loads validator-native programs and has no standalone client instruction contract." + }, + { + "surface": "zk_token_proof_historical", + "program_ids": [ + "ZkTokenProof1111111111111111111111111111111" + ], + "execution_status": "non_invocable", + "classification": "historical_decode_only", + "operations": [], + "official_reason": "Historical ZK Token Proof instructions are retained for decoding; the current runtime surface is a no-op stub and no modern builder is invented." + } + ] +} diff --git a/olddocs/archivekbot2/docs/NATIVE_SOLANA_MATERIALIZATION_AUDIT.md b/olddocs/archivekbot2/docs/NATIVE_SOLANA_MATERIALIZATION_AUDIT.md new file mode 100644 index 0000000..5e161e6 --- /dev/null +++ b/olddocs/archivekbot2/docs/NATIVE_SOLANA_MATERIALIZATION_AUDIT.md @@ -0,0 +1,85 @@ + + + +# Audit des matérialisations Solana natives + +## Conclusion + +`0.4.1` clôt les matérialisations natives instructionnelles stables. Les projections actives couvrent les mutations ou profils qui peuvent être déduits de façon déterministe depuis le graphe core transactionnel et les événements décodés. + +Les sorties ne sont pas des snapshots finaux de comptes ou de runtime. Les états finaux qui exigent l’état précédent/suivant d’un compte, les sysvars historiques ou des métriques runtime restent différés jusqu’à enrichissement explicite du contrat core. + +## Projections actives par matérialiseur + +| Matérialiseur | Surfaces | Projection | +|------------------------------------|----------------------|---------------------------------------------------------------------------------------------------------------------| +| `kb_materializer_lifecycle` | Address Lookup Table | lifecycle create/freeze/extend/deactivate/close | +| `kb_materializer_lifecycle` | Feature | révocation de feature gate | +| `kb_materializer_lifecycle` | Loaders | déploiement, finalisation et transitions lifecycle stables | +| `kb_materializer_lifecycle` | System | durable nonce, create account et allocate | +| `kb_materializer_lifecycle` | ZK ElGamal | création ou fermeture d’un compte de contexte | +| `kb_materializer_lifecycle` | Slashing | initialisation ou fermeture d’un rapport de violation | +| `kb_materializer_admin` | System | assign et assign with seed | +| `kb_materializer_admin` | Config | écriture opaque bornée avec clés, taille, SHA-256 et préfixe | +| `kb_materializer_admin` | Loaders | changements d’autorité | +| `kb_materializer_compliance_audit` | Loaders | écritures/copies de bytecode bornées par offsets, tailles, SHA-256 et préfixes | +| `kb_materializer_compliance_audit` | Compute Budget | profil transactionnel agrégé, last-write-wins, une seule sortie par transaction | +| `kb_materializer_staking` | Stake | compte, délégation, désactivation, split, merge, withdraw, move stake/lamports, autorités et lockup instructionnels | +| `kb_materializer_staking` | Vote | compte, autorités, identité, commission, vote state, retraits et dépôt de rewards instructionnels | + +## Politique des transactions échouées + +Les transactions on-chain échouées restent décodables comme intentions ou diagnostics. Les matérialiseurs mutables utilisent la politique `SuccessfulCommittedOnly` et refusent les observations non commitées au lieu de produire une mutation réussie fictive. + +Le profil Compute Budget est une sortie `ComplianceAudit`, pas une mutation d’état ; il peut donc être matérialisé même lorsque la transaction échoue. Il décrit le budget demandé par les instructions, pas les unités réellement consommées. + +## Absences volontaires + +Les surfaces suivantes ne produisent pas de projection dédiée dans `kb_sol_mat_events` à la clôture de `0.4.1` : + +- Ed25519 ; +- secp256k1 ; +- secp256r1 ; +- preuves ZK sans compte de contexte ; +- ancien ZK Token Proof historique/no-op. + +Leur décodage est déjà un événement d’audit borné. Une matérialisation supplémentaire serait une duplication sans consommateur métier dédié. + +## États finaux différés + +Les éléments suivants ne doivent pas être présentés comme disponibles dans `0.4.1` : + +- état final exact d’un compte Stake ou Vote ; +- activation/désactivation Stake par epoch ; +- crédits Vote cumulés ; +- rewards recalculées par epoch ; +- état final d’un compte System après lamport drain conditionnel ; +- bytecode final complet d’un loader ; +- unités compute réellement consommées ; +- frais finaux réellement facturés ; +- résultat cryptographique recalculé pour signature ou preuve ZK. + +Ces états exigent une extension du contexte core ou un audit de comptes/snapshots dédié. + +## Validations finales `0.4.1` + +Les validations utilisateur finales couvrent : + +| Surface | Corpus / preuve | Résultat | +|----------------------|--------------------------------|----------------------------------------------------------------| +| System | replay ciblé | 817 inputs décodés, 258 sorties, 52 refus attendus | +| Config | replay ciblé | 96 inputs décodés, 96 sorties admin | +| Stake | replay ciblé | 448 inputs décodés, 447 sorties, 1 refus attendu | +| Vote | replay ciblé | 600 inputs décodés, 600 sorties | +| Compute Budget | replay ciblé | 2 746 inputs décodés, 1 603 profils | +| ZK ElGamal | replay ciblé | 151 inputs décodés, 139 sorties de contexte | +| Address Lookup Table | inventaire/replay ciblé | 104 inputs décodés, 104 sorties lifecycle | +| Slashing | sources officielles + fixtures | aucun corpus public observable, validation synthétique assumée | + +Toutes les campagnes de clôture rapportées se terminent avec `unmatched = 0`, `failedInputs = 0`, `unsupported = 0` et des journaux `error.jsonl` vides. + +## Décision de clôture + +Aucune projection native instructionnelle stable n’est identifiée comme manquante dans le périmètre `0.4.1`. + +La suite `0.4.2` peut se concentrer sur l’exécution : plans, simulation, signature, envoi et validation post-exécution, sans rouvrir le jalon de décodage/matérialisation natif. diff --git a/olddocs/archivekbot2/docs/NATIVE_SOLANA_PROGRAMS.md b/olddocs/archivekbot2/docs/NATIVE_SOLANA_PROGRAMS.md new file mode 100644 index 0000000..0a9e2ad --- /dev/null +++ b/olddocs/archivekbot2/docs/NATIVE_SOLANA_PROGRAMS.md @@ -0,0 +1,233 @@ + + + +# Inventaire et couverture des programmes Solana natifs + +## Périmètre + +Le registre `kb_program_ids::native_program_ids()` contient dix-huit surfaces exécutables : programmes runtime natifs, loaders, précompiles et programmes historiques encore observables. Les sysvars et comptes natifs non exécutables restent suivis séparément dans `registry/core_program_id_seed.toml`. + +Memo ne fait pas partie de ce périmètre. Les IDs officiels v1 `Memo1U...`, v3 `MemoSq...` et v4 `Memo4c...` sont réservés dans `kb_decoder_spl_memo`. + +## État du phasage + +| Phase | Contenu | État | +|-------|---------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------| +| A | modèle d’événement, lecture bornée, validation des comptes et diagnostics | implémenté dans `0.4.1-pre.001` | +| B | System Program et Compute Budget | implémenté, replay mainnet validé dans `pre.005` | +| C | Address Lookup Table et loaders | implémenté dans `pre.003` puis `pre.006` | +| D | Vote, Stake, Config et programmes historiques | implémenté : Config/Feature `pre.008`, Vote `pre.010` validé dans `pre.011`, Stake `pre.013` validé mainnet | +| E | précompiles et preuves ZK | précompiles signature `pre.014`, ZK ElGamal Proof `pre.015`, ancien ZK Token Proof `pre.016` | +| F | matérialisations justifiées, diagnostics globaux et clôture | nonce System/contextes ZK `pre.017`; Slashing et invariants de couverture `pre.018`; corpus final à valider | + +Le processor conserve l’identité `solana_native_classifier@0.4.1` pendant les deltas préparatoires. Les nouveaux décodeurs nécessitent donc un force replay ciblé ou global ; la version ne sera relevée qu’avec un changement explicite du contrat de processor. + +## Sources normatives couvertes + +| Surface | Source officielle | Sérialisation retenue | Couverture | +|---------------------------|---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|-----------------------------------------| +| System Program | `solana-system-interface 3.2.0`, enum `SystemInstruction` | schéma `wincode` officiel compatible avec le format bincode historique, lecture exacte sans octets suffixes | 14 variantes | +| Compute Budget actuel | `solana-compute-budget-interface 3.0.0` + runtime `solana-compute-budget-instruction 4.1.1` | tag `u8` puis entier little-endian/Borsh ; désérialisation runtime unchecked, suffixe accepté et audité | 5 entrées, dont le tag réservé `Unused` | +| Compute Budget historique | ancien `solana-sdk`, `RequestUnitsDeprecated` | tag `0`, `u32 units`, `u32 additional_fee` | 1 variante historique | +| Address Lookup Table | `solana-address-lookup-table-interface 3.1.0`, enum `ProgramInstruction` | schéma `wincode` officiel, lecture exacte | 5 variantes | +| BPF Loader immuable | `solana-loader-v2-interface 3.0.0`, enum `LoaderInstruction` | tag `u32 LE`, offset `u32`, longueur de vector `u64`, lecture exacte | write, finalize sur deux générations | +| BPF Loader upgradeable | `solana-loader-v3-interface 8.0.1`, enum `UpgradeableLoaderInstruction` | wire format historique compatible bincode, champs booléens suffixes avec valeurs historiques documentées | 8 variantes | +| Loader v4 | `solana-loader-v4-interface 3.1.0`, enum `LoaderV4Instruction` | tag et entiers little-endian, tailles exactes | 7 variantes | +| Config Program | `solana-config-interface 2.0.0` et processor `solana-config-program 2.2.20` | `ConfigKeys` en `solana_short_vec`, clés `(Pubkey, bool)`, puis payload typé opaque pour le décodeur générique | 1 écriture générique `store` | +| Feature Gate | `solana-feature-gate-interface 4.0.0`, `FeatureGateInstruction` | tag `u8` exact `0`, sans suffixe | 1 variante | +| Vote Program | `solana-vote-interface ^6.0`, enum `VoteInstruction` | schéma officiel `wincode`, discriminant historique `u32 LE`, lecture exacte sans octets suffixes | 20 variantes | +| Stake Program | `solana-stake-interface ^4.3`, enum `StakeInstruction` | miroir wire privé `wincode` exact du layout historique ; types sémantiques officiels consommés | 18 variantes | +| ZK ElGamal Proof | `solana-zk-elgamal-proof-interface ^0.1`, `ProofInstruction`, types `Pod`, runtime Agave | tag `u8`; preuve inline de taille officielle ou référence compte `u32 LE` sur instruction exacte de 5 octets | 13 variantes | +| ZK Token Proof historique | miroir wire local audité contre `solana-zk-token-sdk 3.1.14`, Agave `v2.0.0`/`v4.1.1` | tag `u8`; layout historique inline ou offset compte sur 5 octets ; fallback runtime actuel sans effet | 17 variantes + fallback no-op | +| Slashing stateless | Agave `v4.1.1` + `solana-program/slashing@fe8da3a` | tag `u8`; fermeture sur 1 octet ou preuve duplicate block sur 305 octets exacts | 2 variantes | + +Les versions de crates sont utilisées comme références reproductibles. Un futur changement d’interface doit entraîner un changement de version du décodeur et un replay ledger/version/hash. + +## System Program + +Program ID : `11111111111111111111111111111111`. + +| Tag historique compatible bincode/wincode `u32 LE` | Entry code | Paramètres structurés | Comptes principaux | État | +|---------------------------------------------------:|--------------------------------|------------------------------------|----------------------------------------|--------| +| 0 | `create_account` | lamports, space, owner | funding, new account | décodé | +| 1 | `assign` | owner | assigned account | décodé | +| 2 | `transfer` | lamports | funding, recipient | décodé | +| 3 | `create_account_with_seed` | base, seed, lamports, space, owner | funding, new account, base optionnelle | décodé | +| 4 | `advance_nonce_account` | aucun | nonce, recent blockhashes, authority | décodé | +| 5 | `withdraw_nonce_account` | lamports | nonce, recipient, sysvars, authority | décodé | +| 6 | `initialize_nonce_account` | authority | nonce, recent blockhashes, rent | décodé | +| 7 | `authorize_nonce_account` | authority | nonce, authority | décodé | +| 8 | `allocate` | space | allocated account | décodé | +| 9 | `allocate_with_seed` | base, seed, space, owner | derived account, base | décodé | +| 10 | `assign_with_seed` | base, seed, owner | derived account, base | décodé | +| 11 | `transfer_with_seed` | lamports, from seed, from owner | funding, base, recipient | décodé | +| 12 | `upgrade_nonce_account` | aucun | nonce account | décodé | +| 13 | `create_account_allow_prefund` | lamports, space, owner | new account, funding conditionnel | décodé | + +Le décodeur utilise le schéma `wincode` dérivé directement par `solana-system-interface 3.2.0`. `wincode::deserialize_exact` conserve la compatibilité octet pour octet avec le format historique de cette enum et refuse les octets suffixes. Le crate n’utilise aucune dépendance directe à `bincode`. + +`pre.017` matérialise les cinq opérations durable nonce sous `durable_nonce_account::0`. Initialize, advance, authorize et upgrade conservent leur transition explicite. Withdraw conserve le montant demandé et la règle officielle de fermeture conditionnelle : le compte n’est détruit que lorsque la totalité de son solde est retirée. La projection ne prétend pas reconstruire l’état final transactionnel du compte et ne duplique pas les deltas SOL du graphe core. + +Les flags signer/writable sont conservés sous deux formes : privilèges attendus par le contrat officiel et privilèges réellement résolus depuis core. Ils ne sont pas confondus, car une CPI signée par PDA ne se reflète pas nécessairement comme signer statique de la transaction. + +## Compute Budget + +Program ID : `ComputeBudget111111111111111111111111111111`. + +| Tag `u8` | Entry code | Taille décodée minimale | Paramètres | Statut | +|---------:|---------------------------------------|------------------------:|--------------------------|-----------------------| +| 0 | `unused_reserved` | 1 | aucun | `ignored` | +| 0 | `request_units_deprecated` | 9 | units, additional fee | `decoded`, historique | +| 1 | `request_heap_frame` | 5 | bytes `u32` | `decoded` | +| 2 | `set_compute_unit_limit` | 5 | compute unit limit `u32` | `decoded` | +| 3 | `set_compute_unit_price` | 9 | micro-lamports `u64` | `decoded` | +| 4 | `set_loaded_accounts_data_size_limit` | 5 | bytes `u32` | `decoded` | + +Le runtime Agave traite les variantes modernes avec `solana_borsh::v1::try_from_slice_unchecked`. Les octets suffixes sont donc acceptés après les 5 ou 9 octets utiles. Le décodeur reproduit cette règle et conserve `trailingDataByteLength`, `trailingDataSha256`, `trailingDataPrefixHex` et `trailingDataSemantics = ignored_by_runtime_borsh_unchecked`. Les payloads trop courts restent `failed`. Le tag `0` demeure dispatché par taille afin de distinguer le tag réservé actuel de la variante historique à neuf octets ; toute autre taille pour ce tag reste `failed`. Un tag inconnu est `unsupported` avec diagnostic borné et hash du payload disponible pour un replay futur. + + +## Address Lookup Table + +Program ID : `AddressLookupTab1e1111111111111111111111111`. + +| Tag `u32 LE` | Entry code | Paramètres | Comptes | État | +|-------------:|---------------------------|------------------------------------------------------------------|--------------------------------------------------|--------| +| 0 | `create_lookup_table` | recent slot, bump seed, politique historique du signer authority | table, authority, payer, System Program | décodé | +| 1 | `freeze_lookup_table` | aucun | table, authority | décodé | +| 2 | `extend_lookup_table` | adresses ajoutées, count, présence du financement | table, authority, paire optionnelle payer/System | décodé | +| 3 | `deactivate_lookup_table` | aucun | table, authority | décodé | +| 4 | `close_lookup_table` | aucun | table, authority, recipient | décodé | + +Le décodeur refuse une paire optionnelle d’extension incomplète et les octets suffixes. La création conserve `expectedSigner = null` pour l’autorité, car l’encodeur officiel actuel ne la marque plus signer tandis que les runtimes historiques antérieurs à v1.12 l’exigeaient. + +La projection `solana_native_lifecycle` produit une sortie `address_lookup_table::0` uniquement si l’observation est exacte, réussie et commitée. Les intentions issues de transactions échouées restent dans decode et sont refusées avant matérialisation. + +## Programmes runtime natifs principaux + +| Code canonique | Program ID | État au début de `pre.018` | +|--------------------|-----------------------------------------------|--------------------------------------------------------------------------------| +| `vote` | `Vote111111111111111111111111111111111111111` | 20 variantes décodées ; 500 `tower_sync` validés mainnet | +| `stake` | `Stake11111111111111111111111111111111111111` | 18 variantes décodées ; 339 instructions mainnet sur neuf entry codes observés | +| `config` | `Config1111111111111111111111111111111111111` | écriture générique `store` décodée ; corpus ciblé à inventorier | +| `zk_elgamal_proof` | `ZkE1Gama1Proof11111111111111111111111111111` | 13 variantes ; 151 instructions mainnet et 139 contextes matérialisés | + +## Loaders + +| Surface | Program ID | Variantes | Statut `pre.006` | +|------------------------|-----------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------| +| Native Loader | `NativeLoader1111111111111111111111111111111` | invocation directe opaque | `ignored`, historique, aucun faux événement | +| BPF Loader deprecated | `BPFLoader1111111111111111111111111111111111` | write, finalize | décodé | +| BPF Loader v2 | `BPFLoader2111111111111111111111111111111111` | write, finalize | décodé | +| BPF Loader upgradeable | `BPFLoaderUpgradeab1e11111111111111111111111` | initialize buffer, write, deploy with max data length, upgrade, set authority, close, extend program, set authority checked | décodé | +| Loader v4 | `LoaderV411111111111111111111111111111111111` | write, copy, set program length, deploy, retract, transfer authority, finalize | décodé | + +Les payloads `write` ne recopient pas le bytecode dans l’événement : ils conservent offset, longueur et SHA-256. Les tailles de vectors, booléens, octets suffixes et paires de comptes optionnelles sont validés avant toute lecture. Les anciennes formes upgradeable sans le booléen suffixe sont acceptées avec la valeur par défaut officielle et marquées comme telles. + +La projection lifecycle produit `program_loader:::0` pour les mutations réussies et commitées : finalize immuable, initialize/deploy/upgrade/close/extend upgradeable, puis set length/deploy/retract/finalize v4. Les écritures, copies et changements d’autorité restent des événements decode de familles Audit ou Admin. + +## Slashing Program stateless + +Program ID : `S1ashing11111111111111111111111111111111111`. + +Agave `v4.1.1` le déclare comme stateless builtin derrière `enshrine_slashing_program`, avec un hash de build vérifié correspondant à la release officielle `solana-program/slashing@fe8da3a`. + +| Tag `u8` | Entry code | Taille exacte | Effet runtime observé | +|---------:|--------------------------|--------------:|------------------------------------------------------------------------| +| 0 | `close_violation_report` | 1 | ferme le rapport après au moins trois epochs et transfère ses lamports | +| 1 | `duplicate_block_proof` | 305 | vérifie une preuve externe puis stocke un rapport de violation | + +La preuve duplicate block est lue depuis un compte externe à l’offset `u64` de l’instruction. Le replay transactionnel ne possède pas le contenu historique de ce compte. Le décodeur conserve l’offset, le slot, les clés, racines et signatures intégrées à l’instruction, résume l’instruction Ed25519 précédente et ne prétend ni relire le compte ni recalculer les signatures. + +Une transaction réussie prouve seulement l’acceptation runtime, l’assignation/allocation du PDA préfinancé et l’écriture du rapport. Le programme ne brûle ni ne retire lui-même du stake : la projection `slashing_violation_report` conserve donc `penaltyAppliedByProgram = false` et décrit un signal destiné à une application de pénalité externe au programme. + +## Précompiles de signature `pre.014` + +| Code canonique | Program ID | Format | État `pre.014` | +|----------------|-----------------------------------------------|---------------------------------------------------------------------------|-----------------------------------------------------------------------------| +| `ed25519` | `Ed25519SigVerify111111111111111111111111111` | header 2 octets, offsets 14 octets, clé 32, signature 64 | décodé, zéro signature accepté seulement sur 2 octets | +| `secp256k1` | `KeccakSecp256k11111111111111111111111111111` | header 1 octet, offsets 11 octets, adresse 20, signature 64 + recovery ID | décodé, index `u8` explicites, zéro signature accepté seulement sur 1 octet | +| `secp256r1` | `Secp256r1SigVerify1111111111111111111111111` | header 2 octets, offsets 14 octets, clé compressée 33, signature 64 | décodé, zéro signature refusé, maximum 8 | + +Le contrat core `2` fournit les payloads de toutes les instructions outer. Ed25519 et secp256r1 interprètent `u16::MAX` comme la cible ; secp256k1 résout toujours un index explicite. Les références aux inner instructions ne sont pas autorisées. Les offsets et longueurs utilisent des additions vérifiées avant chaque slice. + +Chaque observation conserve les index bruts et résolus, la provenance, les longueurs, SHA-256 et préfixes bornés des composants, ainsi que `runtimeVerification`. Aucun message complet n’est recopié, aucune signature n’est recalculée et aucune sortie métier n’est matérialisée. Une transaction échouée reste `decoded` si le layout est valide, mais porte `not_asserted_transaction_failed` et reste non commitée. + +## Surfaces historiques ou complémentaires + +| Code canonique | Program ID | État après `pre.008` | +|------------------|-----------------------------------------------|-----------------------------------------------------------------------------------------------------| +| `feature` | `Feature111111111111111111111111111111111111` | `revoke_pending_activation` décodé et lifecycle matérialisable | +| `zk_token_proof` | `ZkTokenProof1111111111111111111111111111111` | 17 layouts historiques décodés + fallback `current_runtime_noop_invocation`; validation synthétique | + + + +### Ancien ZK Token Proof Program + +`pre.016` couvre les discriminants `0..16` de l’interface historique : fermeture du contexte, zero balance, withdraw, égalités de ciphertext/commitment, transfer, transfer with fee, validité de pubkey, range proofs simples et batchés, validité de grouped ciphertext à deux ou trois handles et fee sigma. Les tailles de preuve et de contexte sont maintenant conservées dans une table locale auditée contre les types `Pod` de `solana-zk-token-sdk 3.1.14`, sans dépendre de cette crate dépréciée. + +Le runtime historique Agave `v2.0.0` distinguait une preuve inline d’une preuve stockée dans le premier compte lorsque l’instruction faisait exactement cinq octets. Il imposait des arités distinctes pour le contexte, refusait les vérifications comme inner instructions et plaçait certains chemins derrière `enable_zk_proof_from_account` ou `enable_zk_transfer_with_fee`. Le runtime Agave `v4.1.1` est au contraire un stub qui retourne succès sans mutation. Le décodeur conserve ces deux références sans prétendre connaître la version runtime d’une transaction donnée. + +Aucune signature mainnet n’a été trouvée pour ce program ID lors du jalon. La surface est donc validée par fixtures synthétiques et sources officielles, sans critère de backfill. Les preuves inline sont seulement mesurées, hashées et préfixées de façon bornée ; les preuves externes conservent l’offset et la taille attendue. Aucune preuve n’est recalculée et aucune sortie n’est matérialisée. + +### Stake Program + +`pre.013` couvre les dix-huit variantes de `StakeInstruction`, tags `u32 LE` `0..17` : initialize, authorize, delegate, split, withdraw, deactivate, set lockup, merge, autorisations avec seed, variantes checked, minimum delegation, deactivate delinquent, `redelegate`, move stake et move lamports. `Redelegate` reste déclaré historique : le processor actuel renvoie `InvalidInstructionData` avant tout traitement de comptes ; une occurrence réelle doit donc provenir d’une transaction échouée et reste non commitée. + +L’enum officielle de `solana-stake-interface ^4.3` conserve le contrat Serde/Bincode historique, mais n’implémente pas directement `SchemaRead`/`SchemaWrite`. Pour respecter l’interdiction workspace de dépendre de `bincode`, le décodeur utilise un miroir wire privé, ordonné exactement comme l’enum officielle, décodé par `wincode::deserialize_exact`. Les tests vérifient manuellement les tags, pubkeys, entiers, enums imbriquées et longueurs de chaînes du layout historique. Les types sémantiques et le program ID officiels restent consommés depuis l’interface. + +Le processor BPF actuel supporte deux familles de comptes. Les layouts historiques sont détectés par la première sysvar héritée, généralement Clock ou Rent ; les layouts modernes retirent ces sysvars et placent directement les autorités aux positions attendues. `Split`, `SetLockup` et `SetLockupChecked` conservent volontairement les contraintes historiques plus souples du runtime. Le décodeur expose `accountLayout`, conserve les comptes additionnels et les privilèges attendus/observés, mais ne prétend pas rejouer les vérifications dépendant de l’état du stake account, du lockup, de la délégation ou des sysvars courantes. Aucune matérialisation Stake n’est ajoutée dans ce delta. + +### Compte Stake Config historique + +`StakeConfig11111111111111111111111111111111` n’est pas un programme exécutable. L’interface Stake officielle le déclare comme identifiant déprécié du compte de configuration historique du Stake Program. Il reste dans `kb_program_ids` comme `STAKE_CONFIG_ACCOUNT_ID` et dans le registre core avec `identifier_kind = well_known_account`, mais il est exclu des surfaces du décodeur et de l’exécuteur. + +### Config Program + +Le Config Program ne possède pas un enum d’instructions discriminé comparable à System ou Stake. Chaque invocation stocke un préfixe `ConfigKeys` sérialisé avec `solana_short_vec`, suivi d’un payload spécifique au type de configuration. Le décodeur valide la longueur compacte, les clés, les booléens signataires et l’ordre des comptes signataires, puis conserve le reste par taille, préfixe borné et SHA-256 avec la sémantique explicite `opaque_program_specific`. + +### Vote Program + +`pre.010` utilise `solana-vote-interface ^6.0` avec les features `serde` et `wincode`. Le discriminant wire historique reste un `u32` little-endian compris entre `0` et `19`, et `wincode::deserialize_exact` rejette les octets résiduels. `VoteInitV2` contient les autorités, la clé BLS, sa preuve de possession et les deux commissions en points de base ; les collecteurs Inflation Rewards et Block Revenue sont les comptes d’instruction 2 et 3. + +La couverture comprend : initialisations V1/V2, autorisations simples/checked/seed, vote et vote switch, mises à jour d’état normales/compactes, tower sync, retrait, identité, commissions historiques et en points de base, collecteurs différenciés et dépôt de récompenses délégateurs. Les tableaux BLS V2 sont conservés en hexadécimal exact. Les sysvars Rent, Clock et Slot Hashes sont vérifiées aux positions imposées par l’interface. Les privilèges attendus et observés restent distincts afin de ne pas confondre les signataires statiques et les signatures PDA de CPI. + +Aucune projection matérialisée spécifique à Vote n’est ajoutée dans ce delta : la mutation réelle dépend de l’état du vote account et du runtime. Une transaction échouée produit uniquement une observation non commitée. + +## ZK ElGamal Proof `pre.015` + +Program ID : `ZkE1Gama1Proof11111111111111111111111111111`. + +Le décodeur consomme `solana-zk-elgamal-proof-interface ^0.1` pour l’enum `ProofInstruction` et les tailles exactes des types `Pod`. Il couvre `CloseContextState` et les douze preuves : zero ciphertext, égalités ciphertext/ciphertext et ciphertext/commitment, validité de clé publique, percentage with cap, range proofs 64/128/256 bits et validités grouped/batched à deux ou trois handles. + +Deux modes de transport sont distingués conformément au runtime : + +- instruction de cinq octets : tag puis offset `u32 LE` vers un compte contenant la preuve ; +- autre taille exacte : preuve inline immédiatement après le tag, avec taille égale au type `ProofData` officiel. + +Pour une preuve inline, les blocs contexte et preuve sont séparés par leurs tailles `Pod`, puis conservés uniquement sous forme de longueur, SHA-256 et préfixe hexadécimal borné. Le décodeur ne recalcule aucune preuve cryptographique. Pour une transaction réussie, il indique seulement que l’instruction a été acceptée par le runtime. Pour une transaction échouée, aucune validité n’est affirmée et l’observation reste non commitée. + +Le mode référencé par compte a une limite historique structurelle : le graphe core de transaction ne contient pas le contenu du compte à l’instant d’exécution. L’événement conserve donc le compte source, l’offset, le type et la taille attendue, mais marque les octets de preuve comme indisponibles. Il ne tente ni lecture RPC actuelle, qui pourrait être divergente, ni reconstruction. + +Les comptes optionnels de contexte sont résolus selon le mode : positions 0/1 pour une preuve inline et 1/2 après le compte de preuve pour une preuve externe. La fermeture du contexte conserve le contexte, la destination des lamports et l’autorité signataire, accepte les octets suffixes comme le runtime et refuse que contexte et destination désignent le même compte. + +`pre.017` matérialise le lifecycle du compte de contexte sous `zk_proof_context::0`. Une vérification n’est éligible que lorsque `contextStateRequested = true`, que la transaction a réussi et que l’observation est commitée. La sortie conserve le compte, l’autorité et le type de preuve, mais jamais la preuve elle-même. La fermeture réussie décrit la récupération des lamports, la remise à zéro des données et le retour de l’owner au System Program. Les preuves sans contexte restent en decode/audit. + +## Statuts et politique d’échec + +- `decoded` signifie que le format complet a été validé et qu’une observation structurée a été produite. +- `ignored` est réservé à une entrée comprise mais sans événement utile, comme le tag Compute Budget `Unused`. +- `unsupported` conserve une variante inconnue ou une surface non encore implémentée sans faux événement. +- `failed` indique un payload absent, invalide, tronqué, non canonique ou des comptes incohérents. +- `unmatched` reste un défaut de dispatch et ne doit pas apparaître pour une sélection bornée aux surfaces déclarées. + +Une transaction on-chain échouée reste décodable comme intention. L’observation porte `transactionSucceeded = false` et `observation_committed = false`. Le matérialiseur `solana_native_lifecycle` est actif pour ALT, les mutations loader listées, Feature Gate, les durable nonce accounts System et les comptes de contexte ZK ElGamal. Il accepte les familles `Lifecycle`, `Admin` et `Audit` uniquement au niveau exact surface/entrée/paramètres, puis applique `SuccessfulCommittedOnly`. Une observation non commitée est refusée et une preuve ZK sans contexte est exclue avant ledger et politique. + +## Validation mainnet `pre.005` + +Les correctifs de `pre.005` ont été validés par les tests ciblés, `cargo clippy --all-targets` et deux campagnes Tauri. Le force replay ciblé a décodé 3/3 inputs sans échec. Le replay global a sélectionné, démarré et terminé 476 inputs : 476 décodés, zéro `failed`, `unsupported`, `unmatched` et zéro faux `materializationRefused`. Aucun output n’était attendu, car le corpus ne contenait pas d’opération ALT éligible. + +## Validation `pre.006`, `pre.008`, Vote mainnet et anomalie Compute Budget + +Les tests `pre.006`, Clippy et le replay Tauri global ont été validés : 476 inputs sélectionnés, 476 décodés, aucun échec, `unsupported`, `unmatched` ou refus de matérialisation. Les validations utilisateur de `pre.008` couvrent 256 tests ciblés, PostgreSQL réel, Clippy et un démarrage/replay Tauri propre. Le corpus initial ne contenait que System et Compute Budget : loaders, Config et Feature restent en attente d’un corpus réel. + +Le backfill Vote de 500 signatures a inséré 500 transactions et l’extraction core a terminé 500/500 sans échec. Le replay global suivant contient 500 instructions Vote réelles, toutes reconnues et décodées comme `tower_sync`, sans échec Vote. L’unique `failed` de la campagne provient d’un `set_compute_unit_limit` de 12 octets : le runtime l’accepte grâce à la désérialisation Borsh unchecked, alors que le décodeur strict exigeait encore 5 octets exacts. `pre.011` corrige cet écart. Le processor reste `solana_native_classifier@0.4.1` : un force replay est requis pour remplacer le résultat `failed` déjà enregistré. diff --git a/olddocs/archivekbot2/docs/NOMENCLATURE.md b/olddocs/archivekbot2/docs/NOMENCLATURE.md new file mode 100644 index 0000000..b045003 --- /dev/null +++ b/olddocs/archivekbot2/docs/NOMENCLATURE.md @@ -0,0 +1,106 @@ + + + +# Nomenclature + +Ce document fixe les noms internes utilisés dans le workspace. + +## Programmes + +- `program_id` : adresse Solana réelle. +- `program_code` : nom interne stable du programme. +- `protocol_code` : famille protocolaire. +- `surface_code` : surface concrète. + +## Événements + +Le format canonique est : + +```text +. +``` + +Exemples : + +```text +pump_swap.buy +raydium_amm_v4.swap_base_in +meteora_dlmm.swap +jupiter_v6.route +``` + +## Tables Solana PostgreSQL + +Les tables Solana PostgreSQL utilisent le schéma courant du profil PostgreSQL, généralement `public`. Le projet ne crée pas de schémas applicatifs `raw`, `core`, `obs`, `decode`, `mat`, `catalog`, `agg`, `ops` ou `wallet`. + +Le format canonique est : + +```text +kb_sol__ +``` + +Domaines autorisés au départ : + +```text +raw +core +obs +decode +mat +catalog +agg +ops +wallet +``` + +Exemples valides : + +```text +kb_sol_raw_transactions +kb_sol_core_transactions +kb_sol_obs_transaction_observations +kb_sol_obs_program_observations +kb_sol_decode_decoded_events +kb_sol_mat_trade_events +kb_sol_catalog_tokens +kb_sol_ops_processing_ledger +``` + +Exemples interdits, écrits avec `DOT` pour que les audits textuels simples ne confondent pas documentation et usage réel : + +```text +raw DOT kb_sol_rpc_transactions +core DOT kb_sol_transactions +obs DOT kb_sol_program_observations +decode DOT kb_sol_decoded_events +mat DOT kb_sol_trade_events +catalog DOT kb_sol_tokens +ops DOT kb_sol_processing_ledger +``` + +## Surfaces de programmes + +Le nom canonique d'une surface de programme doit suivre le format : + +```text +__[_vN] +``` + +Le nom de crate correspondant doit suivre le format : + +```text +kb_decoder___[_vN] +``` + +Les anciens noms issus des IDL, des explorateurs ou des anciennes matrices doivent être conservés dans le registre sous `source_code` ou `normalized_code`, mais ne doivent pas être utilisés comme nouvelle référence stable si un nom canonique existe. + +Voir aussi : + +- `docs/DATABASE.md` ; +- `docs/PROGRAM_NAMING.md` ; +- `docs/PROGRAM_REGISTRY_CONTROL.md` ; +- `registry/program_registry_seed.toml`. + +Le préfixe `program_` est interdit pour les surfaces canoniques. Les entrées dont la fonction est inconnue doivent rester en `unknown_*` avec un statut de classification, sans création de crate cible. + +Les programmes core Solana/SPL sont documentés séparément des DEX et routers, même s'ils restent dans le registre machine. diff --git a/olddocs/archivekbot2/docs/POSTGRES_STORE.md b/olddocs/archivekbot2/docs/POSTGRES_STORE.md new file mode 100644 index 0000000..356c9e2 --- /dev/null +++ b/olddocs/archivekbot2/docs/POSTGRES_STORE.md @@ -0,0 +1,91 @@ + + + +# Store PostgreSQL canonique + +## Baseline active + +PostgreSQL reste le backend principal. Le store utilise le schéma courant du profil, généralement `public`, et ne qualifie pas les tables par un schéma applicatif explicite. + +La baseline active contient : + +```text +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +kb_sol_core_transactions +kb_sol_core_account_keys +kb_sol_core_instructions +kb_sol_core_inner_instructions +kb_sol_core_logs +kb_sol_core_balance_changes +kb_sol_ops_processing_ledger +kb_sol_decode_events +kb_sol_decode_coverage_declarations +kb_sol_decode_coverage_observations +kb_sol_mat_events +``` + +## Initialisation + +Le projet utilise encore des DDL idempotents gérés par `kb_store_pg`. `_sqlx_migrations` n’est pas requis pour démarrer l’application. + +Les fichiers SQL actifs sont conservés comme représentation lisible de la baseline : + +```text +0001_canonical_transaction_store.sql +0002_core_store.sql +0003_processing_ledger.sql +0004_decode_materialization_store.sql +``` + +Au démarrage Tauri, `initialize_store_schema()` applique une seule fois, dans l’ordre, les DDL raw, core puis decode/mat. Les connexions ouvertes ensuite par les commandes de démo désactivent `auto_initialize_schema` et ne relancent plus les migrations. Les méthodes spécialisées restent disponibles pour les tests et outils qui demandent explicitement l’initialisation d’un sous-ensemble dépendant. + +## Extraction canonique vers core + +`CoreExtractionStore` sélectionne les lignes raw, vérifie le ledger puis persiste un `CoreExtractionBundle` dans une transaction PostgreSQL unique. + +Le mode normal skippe la combinaison déjà réussie : + +```text +processor version + signature + canonical hash +``` + +Le replay forcé remplace uniquement le graphe de la signature ciblée. Les autres signatures ne sont pas modifiées. + +## Tests PostgreSQL + +Les tests qui utilisent `KB_POSTGRES_TEST_URL` doivent être lancés sur une base dédiée ou suivis d’un nettoyage explicite. + +Depuis `0.4.1-pre.021`, les tests optionnels qui partagent une base PostgreSQL réelle acquièrent un verrou process-local test-only. Ce verrou évite les interblocages intermittents entre campagnes de tests parallèles sans changer le code runtime ni le schéma SQL. + +Les tests optionnels couvrent notamment le rollback atomique core/decode, la persistance réelle du ledger et la sémantique exacte des déclarations de couverture. `optional_postgres_core_extraction_rolls_back_partial_graph_from_env` : + +1. insère une ligne raw isolée ; +2. tente de persister un bundle contenant deux account keys avec le même index ; +3. attend une violation de l’index unique après le début de la transaction ; +4. vérifie qu’aucune transaction core, account key ou entrée ledger n’a été conservée et que le raw reste `received` ; +5. rejoue un bundle corrigé ; +6. vérifie le passage à `core_extracted` et le ledger `succeeded` ; +7. nettoie ses lignes de test. + +Commande de clôture : + +```bash +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana_test' \ + cargo test -p kb_store_pg -- --nocapture +``` + +Les contrôles réels déjà effectués sur la base principale ont confirmé : + +- 70 transactions raw et core ; +- 70 entrées ledger `succeeded` ; +- 84 tentatives après un force replay de 14 signatures ; +- aucune duplication ni ligne fille orpheline ; +- cardinalité core inchangée après remplacement forcé. + + +## Couverture et skip decode + +`persist_decode_coverage_declarations()` synchronise le snapshot déclaré d’un processor/version et retourne des compteurs exacts : insertion réelle, modification/suppression du snapshot ou déclaration inchangée. + +Le test PostgreSQL `optional_postgres_same_version_and_hash_is_current_from_env` persiste un résultat `unsupported` puis vérifie que le même stage, processor, version, input key et input hash est reconnu comme courant par le ledger. diff --git a/olddocs/archivekbot2/docs/PROGRAM_CODE_INDEX.md b/olddocs/archivekbot2/docs/PROGRAM_CODE_INDEX.md new file mode 100644 index 0000000..ebf88f7 --- /dev/null +++ b/olddocs/archivekbot2/docs/PROGRAM_CODE_INDEX.md @@ -0,0 +1,42 @@ + + + +# Index court des programmes + +L'idée d'un préfixe hexadécimal `00` à `ff` peut être utile comme identifiant court interne, mais elle ne doit pas remplacer le nom canonique lisible. + +## Décision + +Le nom de crate reste descriptif : + +```text +kb_decoder_amm_pump_swap +kb_decoder_router_jupiter_aggregator_v6 +kb_decoder_clmm_orca_whirlpool +``` + +Un code court optionnel peut être ajouté dans le registre : + +```toml +registry_code = "00" +canonical_surface_code = "amm_pump_swap" +target_crate = "kb_decoder_amm_pump_swap" +``` + +## Pourquoi ne pas mettre `00_` dans les crates + +- Le code `00` ne décrit pas la fonction du programme. +- L'ordre peut changer quand de nouvelles surfaces sont ajoutées. +- Deux cent cinquante-six valeurs peuvent devenir insuffisantes si toutes les surfaces, sysvars, routers, vaults, perps, bridges et variantes historiques sont incluses. +- Les renommages de crates deviendraient fréquents et inutiles. + +## Usage acceptable + +Le code court est acceptable pour : + +- affichage UI compact ; +- clé stable optionnelle dans PostgreSQL ; +- tri manuel dans les matrices ; +- identifiant de configuration humain court. + +Le code court ne doit pas servir de préfixe principal de nommage Rust. diff --git a/olddocs/archivekbot2/docs/PROGRAM_IDS.md b/olddocs/archivekbot2/docs/PROGRAM_IDS.md new file mode 100644 index 0000000..03828c4 --- /dev/null +++ b/olddocs/archivekbot2/docs/PROGRAM_IDS.md @@ -0,0 +1,15 @@ + + + +# Identifiants de programmes + +`kb_program_ids` est la source unique des `program_id` connus du workspace. + +Les décodeurs et exécuteurs ne doivent pas redéfinir les mêmes chaînes dans leurs propres fichiers `constants.rs`. Ils doivent utiliser directement `kb_program_ids::XXX_PROGRAM_ID`. + +Les fichiers `constants.rs` locaux restent utiles pour les constantes propres à une surface : discriminators, opcodes, seeds, index de comptes, tailles de payload ou constantes Borsh. + +## Audit de génération + +Le crate central a été alimenté à partir des constantes existantes des décodeurs/exécuteurs et des fichiers registry. + diff --git a/olddocs/archivekbot2/docs/PROGRAM_ID_CONSTANTS_AUDIT.md b/olddocs/archivekbot2/docs/PROGRAM_ID_CONSTANTS_AUDIT.md new file mode 100644 index 0000000..32df785 --- /dev/null +++ b/olddocs/archivekbot2/docs/PROGRAM_ID_CONSTANTS_AUDIT.md @@ -0,0 +1,18 @@ + + + +# Audit des constantes `PROGRAM_ID` des décodeurs + +Ce document décrit la correction appliquée aux crates de décodeurs classifiés. Chaque décodeur associé à un `program_id` dans `registry/program_registry_seed.toml` doit exposer ce `program_id` via `src/constants.rs`, le réexporter depuis `src/lib.rs`, puis l’utiliser dans `program_ids()` via `crate::XXX_PROGRAM_ID`. + +## Règle retenue + +- `src/constants.rs` contient les identifiants stables du programme, puis plus tard les discriminants, sélecteurs, discriminators Anchor, codes d’instruction et constantes de décodage. +- `src/lib.rs` réexporte les constantes publiques nécessaires. +- `src/decoder.rs` ne doit pas contenir de literal de `program_id` dans `program_ids()`. +- Les décodeurs génériques comme `kb_decoder_anchor` ne doivent pas inventer de `program_id`. + +## Portée + +La correction couvre les décodeurs classifiés présents dans le workspace et associés à un `program_id` non vide dans le registre. Les crates core Solana/SPL disposaient déjà de `constants.rs`. + diff --git a/olddocs/archivekbot2/docs/PROGRAM_NAMING.md b/olddocs/archivekbot2/docs/PROGRAM_NAMING.md new file mode 100644 index 0000000..ace9bad --- /dev/null +++ b/olddocs/archivekbot2/docs/PROGRAM_NAMING.md @@ -0,0 +1,152 @@ + + + +# Nommage canonique des programmes et surfaces + +Le nommage doit permettre de distinguer la fonction réelle du programme, sa famille protocolaire et sa version. + +## Format recommandé + +```text +__[_vN] +``` + +Le nom de crate correspondant est : + +```text +kb_decoder___[_vN] +``` + + +## Préfixes fonctionnels autorisés + +Le préfixe doit décrire la fonction principale du programme, pas seulement le fait qu'il s'agit d'un programme Solana. + +Exemples de préfixes acceptés : + +```text +core +token +amm +cpmm +clmm +dlmm +stable_swap +weighted_swap +orderbook +router +launchpad +lending +vault +staking +bridge +perpetuals +oracle +nft +metadata +admin +fees +governance +treasury +lock +vesting +unknown +``` + +Le préfixe `program` est interdit pour les nouveaux noms canoniques. Une entrée non classifiée doit utiliser `unknown_*` et ne doit pas déclencher la création d'une crate cible avant classification. + +## Cas Meteora DAMM + +`damm` est conservé comme identifiant de surface Meteora, mais pas comme préfixe fonctionnel. La forme attendue est donc `amm_meteora_damm_v1` ou `amm_meteora_damm_v2`. En revanche `cpmm`, `clmm`, `dlmm`, `stable_swap` et `weighted_swap` sont des mécanismes et peuvent être utilisés comme préfixes fonctionnels. + +## Colonnes à conserver + +Le registre ne doit pas perdre les anciens noms. Chaque programme doit conserver : + +- `program_id` : adresse Solana réelle ; +- `source_code` : nom brut issu de la liste, d’un IDL ou d’une ancienne documentation ; +- `normalized_code` : nom nettoyé sans faute évidente ; +- `canonical_surface_code` : nom cible stable ; +- `current_crate` : crate existant si la surface est déjà réservée ; +- `target_crate` : nom de crate à atteindre après migration contrôlée ; +- `registry_status` : statut de contrôle. + +## Exemples de normalisation + +| Nom source | Fonction | Famille | Nom canonique | +|---------------------------|-------------|------------|------------------------------------| +| `raydium_lp_v4` | `amm` | `raydium` | `amm_raydium_lp_v4` | +| `raydium_cpmm` | `cpmm` | `raydium` | `cpmm_raydium` | +| `raydium_clmm` | `clmm` | `raydium` | `clmm_raydium` | +| `meteora_dlmm` | `dlmm` | `meteora` | `dlmm_meteora` | +| `meteora_damm_v2` | `amm` | `meteora` | `amm_meteora_damm_v2` | +| `jupiter_agregator_v6` | `router` | `jupiter` | `router_jupiter_aggregator_v6` | +| `okx_labs_v2` | `router` | `okx` | `router_okx_labs_v2` | +| `openbook_v2` | `orderbook` | `openbook` | `orderbook_openbook_v2` | +| `phoenix` | `orderbook` | `phoenix` | `orderbook_phoenix_v1` | +| `pump_swap` | `amm` | `pump` | `amm_pump_swap` | +| `pump_fun` | `launchpad` | `pump` | `launchpad_pump_fun` | +| `pump_fees` | `admin` | `pump` | `admin_pump_fees` | +| `orca_whirlpool` | `clmm` | `orca` | `clmm_orca_whirlpool` | +| `metaplex_token_metadata` | `metadata` | `metaplex` | `metadata_metaplex_token_metadata` | +| `bubblegum` | `nft` | `metaplex` | `nft_metaplex_bubblegum` | + + +## Exceptions conservées + +Les programmes Solana/SPL de base restent groupés dans des crates techniques déjà lisibles : + +- `kb_decoder_solana_core` ; +- `kb_decoder_spl_token` ; +- `kb_decoder_spl_token_2022` ; +- `kb_decoder_spl_associated_token_account`. + +Ces crates ne sont pas renommées en `kb_decoder_core_*` ou `kb_decoder_token_*`, car elles servent de couche primitive avant les surfaces DEX/router. + +## Politique de migration + +La migration physique des dossiers ne doit pas être faite en masse. Pour chaque rename : + +1. prouver que le `program_id` correspond à la surface ; +2. créer ou renommer une seule crate ; +3. mettre à jour `Cargo.toml` ; +4. mettre à jour le registre ; +5. exécuter `cargo build` ; +6. supprimer l’ancien alias seulement après validation. + + + +## Préfixe hexadécimal + +Les préfixes `00` à `ff` sont interdits comme préfixes principaux de crate. Ils peuvent exister uniquement comme champ de registre optionnel `registry_code`. Le nom canonique doit rester lisible et fonctionnel. + +Exemple accepté : + +```toml +registry_code = "01" +canonical_surface_code = "amm_pump_swap" +target_crate = "kb_decoder_amm_pump_swap" +``` + +Exemple refusé : + +```text +kb_decoder_01_pump_swap +``` + +## Fichiers `constants.rs` + +Les crates peuvent avoir un fichier `src/constants.rs` pour regrouper les `program_id`, discriminants, sélecteurs, longueurs Borsh et autres constantes techniques. Les `program_id` publics sont réexportés dans `lib.rs`. Les constantes internes futures, par exemple des discriminants ou tailles de payload, doivent rester `pub(crate)` sauf besoin explicite d'API publique. + +Depuis un module interne de la même crate, une constante réexportée par `lib.rs` doit être appelée via `crate::CONSTANT_NAME`. Le chemin `crate::constants::CONSTANT_NAME` reste réservé aux constantes non réexportées. + +## Préfixes ajoutés après inspection IDL + +- `adapter` : wrapper technique ou adaptation de format, par exemple `adapter_saber_decimal_wrapper`. +- `rwa` : programme d'actifs réels tokenisés ou marchés globaux, par exemple `rwa_ondo_global_markets`. +- `vesting` : programme de vesting, streaming ou timelock. +- `wallet` : smart wallet applicatif ou surface d'approbation/exécution. + +## Préfixe `fees` + +Le préfixe `fees` est autorisé pour les programmes dont le rôle principal est la configuration, distribution ou réclamation de frais. Il doit être préféré à `admin` lorsque la surface est explicitement centrée sur le partage de frais. diff --git a/olddocs/archivekbot2/docs/PROGRAM_REGISTRY_CONTROL.md b/olddocs/archivekbot2/docs/PROGRAM_REGISTRY_CONTROL.md new file mode 100644 index 0000000..5afb9ab --- /dev/null +++ b/olddocs/archivekbot2/docs/PROGRAM_REGISTRY_CONTROL.md @@ -0,0 +1,328 @@ + + + +# Contrôle du registre des programmes + +Ce document transforme la liste de programmes fournie en registre contrôlable. Il ne valide pas encore chaque `program_id` sur chaîne ; il sert de base interne pour détecter les doublons, les aliases, les surfaces mal nommées et les crates manquantes. + +## Résumé + +- Entrées du registre : 150. +- `program_id` distincts : 149. +- Doublons exacts de `program_id` : 1. +- Registre machine : `registry/program_registry_seed.toml`. +- La colonne `Canonique` est la référence de tri et de migration. + +## Correction de principe + +La table de contrôle est maintenant triée par `Canonique`, avec `Canonique` en première colonne. C'est le nom qui doit piloter les futures crates, les noms de surfaces et les tables de couverture. + +Les programmes Solana/SPL de base ne sont plus mélangés avec les DEX, routers et protocoles applicatifs. Ils sont listés dans un tableau séparé parce qu'ils relèvent de la couche core : `kb_decoder_solana_core`, `kb_decoder_spl_token`, `kb_decoder_spl_token_2022` et futurs décodeurs primitifs. + +## Pourquoi `amm` et pas `damm` en préfixe ? + +Le préfixe doit représenter la fonction générique du programme. `amm` signifie Automated Market Maker. `damm` est un nom de surface Meteora, généralement interprété comme Dynamic AMM. Donc `damm` ne doit pas être utilisé comme préfixe fonctionnel général. + +La forme recommandée est : + +```text +amm_meteora_damm_v1 +amm_meteora_damm_v2 +``` + +et non : + +```text +damm_meteora_v1 +damm_meteora_v2 +``` + +À l'inverse, `dlmm`, `clmm`, `cpmm`, `stable_swap` et `weighted_swap` sont des types de mécanismes et peuvent être utilisés comme préfixes fonctionnels quand ils décrivent mieux la surface. + +## Pourquoi supprimer `program_` ? + +Le préfixe `program_` était un fallback technique. Il n'indique aucune fonction : ni AMM, ni router, ni lending, ni bridge, ni NFT. Il est donc insuffisant pour une nomenclature stable. + +Nouvelle règle : + +- aucune nouvelle surface canonique ne doit commencer par `program_` ; +- une surface non classifiée utilise temporairement `unknown_*` ; +- une surface `unknown_*` ne doit pas devenir une crate cible tant que sa fonction réelle n'est pas décidée ; +- le statut attendu est `needs_classification` ou `current_alias_needs_classification`. + +## Programmes core Solana/SPL + +Ces identifiants sont détaillés dans `docs/CORE_PROGRAM_IDS.md`. Ils sont couverts par les décodeurs core/primitifs ou par des crates spécialisées SPL futures, pas par une crate DEX dédiée. + +| Canonique | Program ID | Source | Type | Crate cible | Statut | +|--------------------------------------------|------------------------------------------------|-----------------------------------|----------------------|-------------------------------------------|-------------------------------------| +| `core_solana_address_lookup_table_v1` | `AddressLookupTab1e1111111111111111111111111` | `address_lookup_table` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_bpf_loader_deprecated_v1` | `BPFLoader1111111111111111111111111111111111` | `bpf_loader_deprecated` | `loader_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_bpf_loader_v2` | `BPFLoader2111111111111111111111111111111111` | `bpf_loader` | `loader_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_bpf_loader_upgradeable_v1` | `BPFLoaderUpgradeab1e11111111111111111111111` | `bpf_loader_upgradeable` | `loader_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_compute_budget_v1` | `ComputeBudget111111111111111111111111111111` | `compute_budget` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_config_v1` | `Config1111111111111111111111111111111111111` | `config` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_ed25519_v1` | `Ed25519SigVerify111111111111111111111111111` | `ed25519` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_feature_v1` | `Feature111111111111111111111111111111111111` | `feature` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_incinerator_v1` | `1nc1nerator11111111111111111111111111111111` | `incinerator` | `well_known_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_loader_v4` | `LoaderV411111111111111111111111111111111111` | `loader_v4` | `loader_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_native_loader_v1` | `NativeLoader1111111111111111111111111111111` | `native_loader` | `loader_program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_secp256k1_v1` | `KeccakSecp256k11111111111111111111111111111` | `secp256k1` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_secp256r1_v1` | `Secp256r1SigVerify1111111111111111111111111` | `secp256r1` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_stake_config_v1` | `StakeConfig11111111111111111111111111111111` | `stake_config` | `well_known_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_stake_v1` | `Stake11111111111111111111111111111111111111` | `stake` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_system_v1` | `11111111111111111111111111111111` | `system` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_sysvar_clock_v1` | `SysvarC1ock11111111111111111111111111111111` | `sysvar_clock` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_epoch_rewards_v1` | `SysvarEpochRewards1111111111111111111111111` | `sysvar_epoch_rewards` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_epoch_schedule_v1` | `SysvarEpochSchedu1e111111111111111111111111` | `sysvar_epoch_schedule` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_fees_v1` | `SysvarFees111111111111111111111111111111111` | `sysvar_fees` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_instructions_v1` | `Sysvar1nstructions1111111111111111111111111` | `sysvar_instructions` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_last_restart_slot_v1` | `SysvarLastRestartS1ot1111111111111111111111` | `sysvar_last_restart_slot` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_recent_blockhashes_v1` | `SysvarRecentB1ockHashes11111111111111111111` | `sysvar_recent_blockhashes` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_rent_v1` | `SysvarRent111111111111111111111111111111111` | `sysvar_rent` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_rewards_v1` | `SysvarRewards111111111111111111111111111111` | `sysvar_rewards` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_slot_hashes_v1` | `SysvarS1otHashes111111111111111111111111111` | `sysvar_slot_hashes` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_slot_history_v1` | `SysvarS1otHistory11111111111111111111111111` | `sysvar_slot_history` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_stake_history_v1` | `SysvarStakeHistory1111111111111111111111111` | `sysvar_stake_history` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_sysvar_v1` | `Sysvar1111111111111111111111111111111111111` | `sysvar` | `sysvar_account` | `kb_decoder_solana_core` | `core_recognized_account` | +| `core_solana_vote_v1` | `Vote111111111111111111111111111111111111111` | `vote` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_zk_elgamal_proof_v1` | `ZkE1Gama1Proof11111111111111111111111111111` | `zk_elgamal_proof` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_solana_zk_token_proof_v1` | `ZkTokenProof1111111111111111111111111111111` | `zk_token_proof` | `program` | `kb_decoder_solana_core` | `core_handled` | +| `core_spl_associated_token_account_v1` | `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL` | `associated_token_account` | `program` | `kb_decoder_spl_associated_token_account` | `core_handled` | +| `core_spl_account_compression_v1` | `cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK` | `spl_account_compression` | `program` | `kb_decoder_spl_account_compression` | `core_specialized_reserved_current` | +| `core_spl_memo_v1` | `Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo` | `spl_memo_v1` | `program` | `kb_decoder_spl_memo` | `core_specialized_reserved_current` | +| `core_spl_memo_v3` | `MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr` | `spl_memo_v3` | `program` | `kb_decoder_spl_memo` | `core_specialized_reserved_current` | +| `core_spl_memo_v4` | `Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH` | `spl_memo_v4` | `program` | `kb_decoder_spl_memo` | `core_specialized_reserved_current` | +| `core_spl_noop_v1` | `noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV` | `spl_noop` | `program` | `kb_decoder_spl_noop` | `core_specialized_reserved_current` | +| `core_spl_single_pool_v1` | `SVSPxpvHdN29nkVg9rPapPNDddN5DipNLRUFhyjFThE` | `spl_single_pool` | `program` | `kb_decoder_spl_single_pool` | `core_specialized_reserved_current` | +| `core_spl_name_service_v1` | `namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX` | `spl_name_service` | `program` | `kb_decoder_metadata_spl_name_service` | `core_specialized_reserved_current` | +| `core_spl_stake_pool_v1` | `SPoo1Ku8WFXoNDMHPsrGSTSG1Y47rzgn41SLUNakuHy` | `stake_pool` | `program` | `kb_decoder_spl_stake_pool` | `core_specialized_reserved_current` | +| `core_spl_token_2022_v2022` | `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` | `token_2022` | `program` | `kb_decoder_spl_token_2022` | `core_handled` | +| `core_spl_token_2022_elgamal_registry_v1` | `regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg` | `spl_token_2022_elgamal_registry` | `program` | `kb_decoder_spl_token_2022` | `core_specialized_reserved_current` | +| `core_spl_token_v1` | `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA` | `token` | `program` | `kb_decoder_spl_token` | `core_handled` | + + +## DEX, AMM, CPMM, CLMM, DLMM, stable swap, weighted swap et orderbooks + +| Canonique | Program ID | Source | Normalisé | Crate actuelle | Crate cible | Statut | +|------------------------------------|------------------------------------------------|--------------------------|--------------------------|-------------------------------------|-----------------------------------------------|------------------------| +| `amm_aldrin_v1` | `AMM55ShdkoGRB5jVYPjWziwk8m5MpwyDgsMWHaMSQWH6` | `aldrin_amm_v1` | `aldrin_amm_v1` | `-` | `kb_decoder_amm_aldrin_v1` | `reserved_missing` | +| `amm_aldrin_v2` | `CURVGoZn8zycx6FXwwevgBTB2gVvdbGTEpvMJDbgs2t4` | `aldrin_amm_v2` | `aldrin_amm_v2` | `-` | `kb_decoder_amm_aldrin_v2` | `reserved_missing` | +| `amm_alphaq` | `ALPHAQmeA7bjrVuccPsYPiCvsi428SNwte66Srvs4pHA` | `alphaq` | `alphaq` | `kb_decoder_alphaq` | `kb_decoder_amm_alphaq` | `current_alias` | +| `amm_believe` | `5qWya6UjwWnGVhdSBL3hyZ7B45jbk6Byt1hwd7ohEGXE` | `believe` | `believe` | `kb_decoder_believe` | `kb_decoder_amm_believe` | `current_alias` | +| `amm_bonk_swap` | `BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p` | `bonk_swap` | `bonk_swap` | `kb_decoder_bonkswap` | `kb_decoder_amm_bonk_swap` | `current_alias` | +| `amm_cropper_finance` | `CTMAxxk34HjKWxQ3QLZK1HpaLXmBveao3ESePXbiyfzh` | `cropper_finance` | `cropper_finance` | `-` | `kb_decoder_amm_cropper_finance` | `reserved_missing` | +| `amm_dexlab_swap` | `DSwpgjMvXhtGn6BsbqmacdBZyfLj6jSWf3HJpdJtmg6N` | `dexlab_swap` | `dexlab_swap` | `-` | `kb_decoder_amm_dexlab_swap` | `reserved_missing` | +| `amm_fluxbeam` | `FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X` | `fluxbeam` | `fluxbeam` | `kb_decoder_fluxbeam` | `kb_decoder_amm_fluxbeam` | `current_alias` | +| `amm_fusion` | `fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9` | `fusion_amm` | `fusion_amm` | `kb_decoder_fusion_amm` | `kb_decoder_amm_fusion` | `current_alias` | +| `amm_goon_fi` | `goonERTdGsjnkZqWuVjs73BZ3Pb9qoCUdBUL17BnS5j` | `goon_fi` | `goon_fi` | `kb_decoder_goonfi` | `kb_decoder_amm_goon_fi` | `current_alias` | +| `amm_goon_fi_v2` | `goonuddtQRrWqqn5nFyczVKaie28f3kDkHWkHtURSLE` | `goon_fi_v2` | `goon_fi_v2` | `-` | `kb_decoder_amm_goon_fi_v2` | `reserved_missing` | +| `amm_goosefx_gamma` | `GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT` | `goose_fx_gamma` | `goosefx_gamma` | `kb_decoder_goosefx_gamma` | `kb_decoder_amm_goosefx_gamma` | `current_alias` | +| `amm_goosefx_v2` | `GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn` | `goose_fx_v2` | `goosefx_v2` | `kb_decoder_goosefx_v2` | `kb_decoder_amm_goosefx_v2` | `current_alias` | +| `amm_guac_swap` | `Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1` | `guac_swap` | `guac_swap` | `kb_decoder_guacswap` | `kb_decoder_amm_guac_swap` | `current_alias` | +| `amm_heaven_dex` | `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` | `heaven_dex` | `heaven_dex` | `-` | `kb_decoder_amm_heaven_dex` | `reserved_missing` | +| `amm_hylo_exchange` | `HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn` | `hylo_exchange` | `hylo_exchange` | `kb_decoder_hylo_exchange` | `kb_decoder_amm_hylo_exchange` | `current_alias` | +| `amm_invariant_swap` | `HyaB3W9q6XdA5xwpU4XnSZV94htfmbmqJXZcEbRaJutt` | `invariant_swap` | `invariant_swap` | `-` | `kb_decoder_amm_invariant_swap` | `reserved_missing` | +| `amm_lifinity_swap` | `EewxydAPCCVuNEyrVN68PuSYdQ7wKn27V9Gjeoi8dy3S` | `lifinity_swap` | `lifinity_swap` | `-` | `kb_decoder_amm_lifinity_swap` | `reserved_missing` | +| `amm_lifinity_swap_v2` | `2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c` | `lifinity_swap_v2` | `lifinity_swap_v2` | `-` | `kb_decoder_amm_lifinity_swap_v2` | `reserved_missing` | +| `amm_marcopolo_swap` | `9tKE7Mbmj4mxDjWatikzGAtkoWosiiZX9y6J4Hfm2R8H` | `marcopolo_swap` | `marcopolo_swap` | `-` | `kb_decoder_amm_marcopolo_swap` | `reserved_missing` | +| `amm_metadao_futarchy_amm` | `FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq` | `metadao_futarchy_amm` | `metadao_futarchy_amm` | `-` | `kb_decoder_amm_metadao_futarchy_amm` | `reserved_missing` | +| `amm_metadao_v0_5` | `AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ` | `metadao_amm_v0_5` | `metadao_amm_v0_5` | `kb_decoder_metadao_amm_v0_5` | `kb_decoder_amm_metadao_v0_5` | `current_alias` | +| `amm_meteora_damm_v1` | `Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB` | `meteora_damm_v1` | `meteora_damm_v1` | `kb_decoder_meteora_damm_v1` | `kb_decoder_amm_meteora_damm_v1` | `current_alias` | +| `amm_meteora_damm_v2` | `cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG` | `meteora_damm_v2` | `meteora_damm_v2` | `kb_decoder_meteora_damm_v2` | `kb_decoder_amm_meteora_damm_v2` | `current_alias` | +| `amm_obric_v2` | `obriQD1zbpyLz95G5n7nJe6a4DPjpFwa5XYPoNm113y` | `obric_v2` | `obric_v2` | `kb_decoder_obric_v2` | `kb_decoder_amm_obric_v2` | `current_alias` | +| `amm_one_dex` | `DEXYosS6oEGvk8uCDayvwEZz4qEyDJRf9nFgYCaqPMTm` | `one_dex` | `one_dex` | `kb_decoder_one_dex` | `kb_decoder_amm_one_dex` | `current_alias` | +| `amm_orca_token_swap` | `DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1` | `orca_token_swap` | `orca_token_swap` | `-` | `kb_decoder_amm_orca_token_swap` | `reserved_missing` | +| `amm_orca_token_swap_v2` | `9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP` | `orca_token_swap_v2` | `orca_token_swap_v2` | `-` | `kb_decoder_amm_orca_token_swap_v2` | `reserved_missing` | +| `amm_pancake_swap` | `HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq` | `pancake_swap` | `pancake_swap` | `kb_decoder_pancake_swap` | `kb_decoder_amm_pancake_swap` | `current_alias` | +| `amm_pump_swap` | `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` | `pump_swap` | `pump_swap` | `kb_decoder_pump_swap` | `kb_decoder_amm_pump_swap` | `current_alias` | +| `amm_raydium_lp_amm` | `5quBtoiQqxF9Jv6KYKctB59NT3gtJD2Y65kdnB1Uev3h` | `raydium_lp_amm` | `raydium_lp_amm` | `-` | `kb_decoder_amm_raydium_lp_amm` | `reserved_missing` | +| `amm_raydium_lp_v2` | `RVKd61ztZW9GUwhRbbLoYVRE5Xf1B2tVscKqwZqXgEr` | `raydium_lp_v2` | `raydium_lp_v2` | `-` | `kb_decoder_amm_raydium_lp_v2` | `reserved_missing` | +| `amm_raydium_lp_v3` | `27haf8L6oxUeXrHrgEgsexjSY5hbVUWEmvv9Nyxg8vQv` | `raydium_lp_v3` | `raydium_lp_v3` | `-` | `kb_decoder_amm_raydium_lp_v3` | `reserved_missing` | +| `amm_raydium_lp_v4` | `675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8` | `raydium_lp_v4` | `raydium_lp_v4` | `-` | `kb_decoder_amm_raydium_lp_v4` | `reserved_missing` | +| `amm_saros` | `SSwapUtytfBdBn1b9NUGG6foMVPtcWgpRU32HToDUZr` | `saros_amm` | `saros_amm` | `-` | `kb_decoder_amm_saros` | `reserved_missing` | +| `amm_solfi` | `SoLFiHG9TfgtdUXUjWAxi3LtvYuFyDLVhBWxdMZxyCe` | `solfi` | `solfi` | `kb_decoder_solfi` | `kb_decoder_amm_solfi` | `current_alias` | +| `amm_solfi_v2` | `SV2EYYJyRz2YhfXwXnhNAevDEui5Q6yrfyo13WtupPF` | `solfi_v2` | `solfi_v2` | `kb_decoder_solfi_v2` | `kb_decoder_amm_solfi_v2` | `current_alias` | +| `amm_step_finance_swap` | `SSwpMgqNDsyV7mAgN9ady4bDVu5ySjmmXejXvy2vLt1` | `step_finance_swap` | `step_finance_swap` | `-` | `kb_decoder_amm_step_finance_swap` | `reserved_missing` | +| `amm_stepn_dooar_swap` | `Dooar9JkhdZ7J3LHN3A7YCuoGRUggXhQaG4kijfLGU2j` | `stepn_dooar_swap` | `stepn_dooar_swap` | `-` | `kb_decoder_amm_stepn_dooar_swap` | `reserved_missing` | +| `amm_swap_v1` | `SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8` | `swap` | `swap` | `-` | `kb_decoder_amm_swap_v1` | `reserved_missing` | +| `amm_vertigo` | `vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ` | `vertigo` | `vertigo` | `kb_decoder_vertigo` | `kb_decoder_amm_vertigo` | `current_alias` | +| `amm_virtuals` | `5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki` | `virtuals` | `virtuals` | `kb_decoder_virtuals` | `kb_decoder_amm_virtuals` | `current_alias` | +| `amm_woofi` | `WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb` | `woofi` | `woofi` | `kb_decoder_woofi` | `kb_decoder_amm_woofi` | `current_alias` | +| `amm_zero_fi` | `ZERor4xhbUycZ6gb9ntrhqscUcZmAbQDjEAtCf4hbZY` | `zero_fi` | `zero_fi` | `kb_decoder_zerofi` | `kb_decoder_amm_zero_fi` | `current_alias` | +| `amm_zora` | `zoRabwLGd5zXaV7Gxacppw8tcceXEiTrSKyNLSaSTUc` | `zora` | `zora` | `kb_decoder_zora` | `kb_decoder_amm_zora` | `current_alias` | +| `clmm_byreal` | `REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2` | `byreal_clmm` | `byreal_clmm` | `kb_decoder_byreal_clmm` | `kb_decoder_clmm_byreal` | `current_alias` | +| `clmm_crema_finance` | `CLMM9tUoggJu2wagPkkqs9eFG4BWhVBZWkP1qv3Sp7tR` | `crema_finance` | `crema_finance` | `-` | `kb_decoder_clmm_crema_finance` | `reserved_missing` | +| `clmm_cropper_whirlpool` | `H8W3ctz92svYg6mkn1UtGfu2aQr2fnUFHM1RhScEtQDt` | `cropper_whirlpool` | `cropper_whirlpool` | `-` | `kb_decoder_clmm_cropper_whirlpool` | `reserved_missing` | +| `clmm_orca_whirlpool` | `whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc` | `orca_whirlpool` | `orca_whirlpool` | `kb_decoder_orca_whirlpool` | `kb_decoder_clmm_orca_whirlpool` | `duplicate_program_id` | +| `clmm_orca_whirlpool` | `whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc` | `orca_whirlpool` | `orca_whirlpool` | `kb_decoder_orca_whirlpool` | `kb_decoder_clmm_orca_whirlpool` | `duplicate_program_id` | +| `clmm_raydium` | `CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK` | `raydium_clmm` | `raydium_clmm` | `kb_decoder_raydium_clmm` | `kb_decoder_clmm_raydium` | `current_alias` | +| `clmm_stabble` | `6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6` | `stabble_clmm` | `stabble_clmm` | `kb_decoder_stabble_clmm` | `kb_decoder_clmm_stabble` | `current_alias` | +| `cpmm_raydium` | `CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C` | `raydium_cpmm` | `raydium_cpmm` | `kb_decoder_raydium_cpmm` | `kb_decoder_cpmm_raydium` | `current_alias` | +| `dlmm_meteora` | `LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo` | `meteora_dlmm` | `meteora_dlmm` | `kb_decoder_meteora_dlmm` | `kb_decoder_dlmm_meteora` | `current_alias` | +| `orderbook_jupiter_limit_order` | `jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu` | `jupiter_limit_order` | `jupiter_limit_order` | `kb_decoder_jupiter_limit_order` | `kb_decoder_orderbook_jupiter_limit_order` | `current_alias` | +| `orderbook_jupiter_limit_order_v2` | `j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X` | `jupiter_limit_order_v2` | `jupiter_limit_order_v2` | `kb_decoder_jupiter_limit_order_v2` | `kb_decoder_orderbook_jupiter_limit_order_v2` | `current_alias` | +| `orderbook_manifest_v1` | `MNFSTqtC93rEfYHB6hF82sKdZpUDFWkViLByLd1k1Ms` | `manifest` | `manifest` | `-` | `kb_decoder_orderbook_manifest_v1` | `reserved_missing` | +| `orderbook_openbook_v2` | `opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb` | `openbook_v2` | `openbook_v2` | `kb_decoder_openbook_v2` | `kb_decoder_orderbook_openbook_v2` | `current_alias` | +| `orderbook_phoenix_v1` | `PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY` | `phoenix` | `phoenix` | `-` | `kb_decoder_orderbook_phoenix_v1` | `reserved_missing` | +| `stable_swap_jupiter_stable` | `JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr` | `jupiter_stable` | `jupiter_stable` | `kb_decoder_jupiter_stable` | `kb_decoder_stable_swap_jupiter_stable` | `current_alias` | +| `stable_swap_mercurial` | `MERLuDFBMmsHnsBPZw2sDQZHvXFMwp8EdjudcU2HKky` | `mercurial_stable_swap` | `mercurial_stable_swap` | `-` | `kb_decoder_stable_swap_mercurial` | `reserved_missing` | +| `stable_swap_saber` | `SSwpkEEcbUqx4vtoEByFjSkhKdCT862DNVb52nZg1UZ` | `sabre_statble_swap` | `sabre_stable_swap` | `-` | `kb_decoder_stable_swap_saber` | `reserved_missing` | +| `stable_swap_stabble` | `swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ` | `stabble_stable_swap` | `stabble_stable_swap` | `kb_decoder_stabble_stable_swap` | `kb_decoder_stable_swap_stabble` | `current_alias` | +| `weighted_swap_stabble` | `swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW` | `stabble_weighted_swap` | `stabble_weighted_swap` | `kb_decoder_stabble_weighted_swap` | `kb_decoder_weighted_swap_stabble` | `current_alias` | + + +## Routers et surfaces de routing + +| Canonique | Program ID | Source | Normalisé | Crate actuelle | Crate cible | Statut | +|--------------------------------|------------------------------------------------|-------------------------|-------------------------|----------------------------------|-------------------------------------------|--------------------| +| `router_dflow_aggregator_v4` | `DF1ow4tspfHX9WJsAb9epbkA8hmpSEAtxXy1V27QBH` | `dflow_agregator_v4` | `dflow_aggregator_v4` | `kb_decoder_dflow_aggregator_v4` | `kb_decoder_router_dflow_aggregator_v4` | `current_alias` | +| `router_jupiter_aggregator_v4` | `JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB` | `jupiter_agregator_v4` | `jupiter_aggregator_v4` | `-` | `kb_decoder_router_jupiter_aggregator_v4` | `reserved_missing` | +| `router_jupiter_aggregator_v6` | `JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4` | `jupiter_agregator_v6` | `jupiter_aggregator_v6` | `-` | `kb_decoder_router_jupiter_aggregator_v6` | `reserved_missing` | +| `router_jupiter_dca` | `DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M` | `jupiter_dca` | `jupiter_dca` | `kb_decoder_jupiter_dca` | `kb_decoder_router_jupiter_dca` | `current_alias` | +| `router_okx_labs_v1` | `6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma` | `okx_labs_v1` | `okx_labs_v1` | `kb_decoder_okx_lab_v1` | `kb_decoder_router_okx_labs_v1` | `current_alias` | +| `router_okx_labs_v2` | `proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u` | `okx_labs_v2` | `okx_labs_v2` | `-` | `kb_decoder_router_okx_labs_v2` | `reserved_missing` | +| `router_raydium_amm_routing` | `routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS` | `raydium_amm_routing` | `raydium_amm_routing` | `-` | `kb_decoder_router_raydium_amm_routing` | `reserved_missing` | +| `router_sanctum` | `stkitrT1Uoy18Dk1fTrgPw8W6MVzoCfYoAFT4MLsmhq` | `sanctum_router` | `sanctum_router` | `-` | `kb_decoder_router_sanctum` | `reserved_missing` | +| `router_tessera_v` | `TessVdML9pBGgG9yGks7o4HewRaXVAMuoVj4x83GLQH` | `tessera_v` | `tessera_v` | `-` | `kb_decoder_router_tessera_v` | `reserved_missing` | +| `router_titan_exchange_router` | `T1TANpTeScyeqVzzgNViGDNrkQ6qHz9KrSBS4aNXvGT` | `titan_exchange_router` | `titan_exchange_router` | `-` | `kb_decoder_router_titan_exchange_router` | `reserved_missing` | + + +## Launchpads et bonding curves + +| Canonique | Program ID | Source | Normalisé | Crate actuelle | Crate cible | Statut | +|--------------------------------------|------------------------------------------------|----------------------------|----------------------------|-----------------------------|-------------------------------------------------|--------------------| +| `launchpad_boop_fun` | `boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4` | `boop_fun` | `boop_fun` | `kb_decoder_boop_fun` | `kb_decoder_launchpad_boop_fun` | `current_alias` | +| `launchpad_letsbonk_fun` | `FfYek5vEz23cMkWsdJwG2oa6EphsvXSHrGpdALN4g6W1` | `letsbonk_fun` | `letsbonk_fun` | `-` | `kb_decoder_launchpad_letsbonk_fun` | `reserved_missing` | +| `launchpad_metadao_ico` | `moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM` | `metadao_ico` | `metadao_ico` | `-` | `kb_decoder_launchpad_metadao_ico` | `reserved_missing` | +| `launchpad_meteora_dbc` | `dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN` | `meteora_dbc` | `meteora_dbc` | `kb_decoder_meteora_dbc` | `kb_decoder_launchpad_meteora_dbc` | `current_alias` | +| `launchpad_moonit` | `MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG` | `moonit` | `moonit` | `kb_decoder_moonit` | `kb_decoder_launchpad_moonit` | `current_alias` | +| `launchpad_moonshot_token_authority` | `7rtiKSUDLBm59b1SBmD9oajcP8xE64vAGSMbAN5CXy1q` | `moonshot_token_authority` | `moonshot_token_authority` | `-` | `kb_decoder_launchpad_moonshot_token_authority` | `reserved_missing` | +| `launchpad_orca_wavebreak` | `waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF` | `orca_wavebreak` | `orca_wavebreak` | `kb_decoder_orca_wavebreak` | `kb_decoder_launchpad_orca_wavebreak` | `current_alias` | +| `launchpad_printr` | `T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint` | `printr` | `printr` | `kb_decoder_printr` | `kb_decoder_launchpad_printr` | `current_alias` | +| `launchpad_pump_fun` | `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P` | `pump_fun` | `pump_fun` | `kb_decoder_pump_fun` | `kb_decoder_launchpad_pump_fun` | `current_alias` | +| `launchpad_pump_pumpup_ai` | `PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd` | `pumpup_ai` | `pumpup_ai` | `-` | `kb_decoder_launchpad_pump_pumpup_ai` | `reserved_missing` | +| `launchpad_raydium_launchlab` | `LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj` | `raydium_launchlab` | `raydium_launchlab` | `-` | `kb_decoder_launchpad_raydium_launchlab` | `reserved_missing` | + + +## Lending, vault, staking, bridge, perps, oracle et treasury + +| Canonique | Program ID | Source | Normalisé | Crate actuelle | Crate cible | Statut | +|---------------------------------------------------|------------------------------------------------|-------------------------------------------|-------------------------------------------|---------------------------------|--------------------------------------------------------------|--------------------| +| `bridge_circle_cctp_token_messenger_minter` | `CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3` | `cctp_token_messenger_minter` | `cctp_token_messenger_minter` | `-` | `kb_decoder_bridge_circle_cctp_token_messenger_minter` | `reserved_missing` | +| `bridge_circle_cctp_token_messenger_minter_v2` | `CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe` | `cctp_token_messenger_minter_v2` | `cctp_token_messenger_minter_v2` | `-` | `kb_decoder_bridge_circle_cctp_token_messenger_minter_v2` | `reserved_missing` | +| `bridge_de_bridge_destination` | `dst5MGcFPoBeREFAA5E3tU5ij8m5uVYwkzkSAbsLbNo` | `de_bridge_destination` | `de_bridge_destination` | `-` | `kb_decoder_bridge_de_bridge_destination` | `reserved_missing` | +| `bridge_de_bridge_source` | `src5qyZHqTqecJV4aY6Cb6zDZLMDzrDKKezs22MPHr4` | `de_bridge_source` | `de_bridge_source` | `-` | `kb_decoder_bridge_de_bridge_source` | `reserved_missing` | +| `bridge_layer_zero_endpoint` | `76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6` | `layer_zero_endpoint` | `layer_zero_endpoint` | `-` | `kb_decoder_bridge_layer_zero_endpoint` | `reserved_missing` | +| `bridge_layer_zero_executor` | `6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn` | `layer_zero_executor` | `layer_zero_executor` | `-` | `kb_decoder_bridge_layer_zero_executor` | `reserved_missing` | +| `bridge_wormhole` | `wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb` | `whormhole_bridge` | `wormhole_bridge` | `-` | `kb_decoder_bridge_wormhole` | `reserved_missing` | +| `lending_jupiter_lend_borrow` | `jupr81YtYssSyPt8jbnGuiWon5f6x9TcDEFxYe3Bdzi` | `jupiter_lend_borrow` | `jupiter_lend_borrow` | `-` | `kb_decoder_lending_jupiter_lend_borrow` | `reserved_missing` | +| `lending_jupiter_lend_earn` | `jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9` | `jupiter_lend_earn` | `jupiter_lend_earn` | `-` | `kb_decoder_lending_jupiter_lend_earn` | `reserved_missing` | +| `lending_jupiter_lend_flash_loan` | `jupgfSgfuAXv4B6R2Uxu85Z1qdzgju79s6MfZekN6XS` | `jupiter_lend_flash_loan` | `jupiter_lend_flash_loan` | `-` | `kb_decoder_lending_jupiter_lend_flash_loan` | `reserved_missing` | +| `lending_jupiter_lend_liquidity` | `jupeiUmn818Jg1ekPURTpr4mFo29p46vygyykFJ3wZC` | `jupiter_lend_liquidity` | `jupiter_lend_liquidity` | `-` | `kb_decoder_lending_jupiter_lend_liquidity` | `reserved_missing` | +| `lending_kamino` | `KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD` | `kamino_lending` | `kamino_lending` | `-` | `kb_decoder_lending_kamino` | `reserved_missing` | +| `lending_marginfi` | `MFLQPPPPjNinkdKoy2odNFBhvpY43XtCDZjBwG2fwn5` | `marginfi` | `marginfi` | `-` | `kb_decoder_lending_marginfi` | `reserved_missing` | +| `lending_marginfi_v2` | `MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA` | `marginfi_v2` | `marginfi_v2` | `-` | `kb_decoder_lending_marginfi_v2` | `reserved_missing` | +| `lending_sharky_fi` | `SHARKobtfF1bHhxD2eqftjHBdVSCbKo9JtgK71FhELP` | `sharky_fi` | `sharky_fi` | `-` | `kb_decoder_lending_sharky_fi` | `reserved_missing` | +| `lending_solend_protocol` | `So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo` | `solend_protocol` | `solend_protocol` | `-` | `kb_decoder_lending_solend_protocol` | `reserved_missing` | +| `oracle_jupiter_prediction_market` | `3ZZuTbwC6aJbvteyVxXUS7gtFYdf7AuXeitx6VyvjvUp` | `jupiter_prediction_market` | `jupiter_prediction_market` | `-` | `kb_decoder_oracle_jupiter_prediction_market` | `reserved_missing` | +| `perpetuals_drift_v2` | `dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH` | `drift_v2` | `drift_v2` | `kb_decoder_drift_v2` | `kb_decoder_perpetuals_drift_v2` | `current_alias` | +| `perpetuals_jupiter` | `PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu` | `jupiter_perpetuals` | `jupiter_perpetuals` | `kb_decoder_jupiter_perpetuals` | `kb_decoder_perpetuals_jupiter` | `current_alias` | +| `perpetuals_zeta` | `ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD` | `zeta` | `zeta` | `kb_decoder_zeta` | `kb_decoder_perpetuals_zeta` | `current_alias` | +| `perpetuals_zeta_matching_engine` | `zDEXqXEG7gAyxb1Kg9mK5fPnUdENCGKzWrM21RMdWRq` | `zeta_matching_engine` | `zeta_matching_engine` | `-` | `kb_decoder_perpetuals_zeta_matching_engine` | `reserved_missing` | +| `staking_jito_tip_distribution` | `4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7` | `jito_tip_distribution` | `jito_tip_distribution` | `-` | `kb_decoder_staking_jito_tip_distribution` | `reserved_missing` | +| `staking_kamino_farm` | `FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr` | `kamino_farm` | `kamino_farm` | `-` | `kb_decoder_staking_kamino_farm` | `reserved_missing` | +| `staking_marinade_finance` | `MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD` | `marinade_finance` | `marinade_finance` | `-` | `kb_decoder_staking_marinade_finance` | `reserved_missing` | +| `staking_sanctum_multi_validator_spl_stake_pool` | `SPMBzsVUuoHA4Jm6KunbsotaahvVikZs1JyTW6iJvbn` | `sanctum_multi_validator_spl_stake_pool` | `sanctum_multi_validator_spl_stake_pool` | `-` | `kb_decoder_staking_sanctum_multi_validator_spl_stake_pool` | `reserved_missing` | +| `staking_sanctum_single_validator_spl_stake_pool` | `SP12tWFxD9oJsVWNavTTBZvMbA6gkAmxtVgxdqvyvhY` | `sanctum_single_validator_spl_stake_pool` | `sanctum_single_validator_spl_stake_pool` | `-` | `kb_decoder_staking_sanctum_single_validator_spl_stake_pool` | `reserved_missing` | +| `staking_solayer` | `sSo1iU21jBrU9VaJ8PJib1MtorefUV4fzC9GURa2KNn` | `solayer` | `solayer` | `kb_decoder_solayer` | `kb_decoder_staking_solayer` | `current_alias` | +| `treasury_helium_treasury_management` | `treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5` | `helium_treasury_management` | `helium_treasury_management` | `-` | `kb_decoder_treasury_helium_treasury_management` | `reserved_missing` | +| `vault_kamino` | `kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr` | `kamino_vault` | `kamino_vault` | `-` | `kb_decoder_vault_kamino` | `reserved_missing` | +| `vault_kamino_v2` | `KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd` | `kamino_vault_v2` | `kamino_vault_v2` | `-` | `kb_decoder_vault_kamino_v2` | `reserved_missing` | +| `vault_meteora` | `24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi` | `meteora_vault` | `meteora_vault` | `kb_decoder_meteora_vault` | `kb_decoder_vault_meteora` | `current_alias` | +| `vesting_streamflow` | `strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m` | `streamflow` | `streamflow` | `-` | `kb_decoder_vesting_streamflow` | `reserved_missing` | + + +## NFT, metadata, admin, governance et locks + +| Canonique | Program ID | Source | Normalisé | Crate actuelle | Crate cible | Statut | +|------------------------------------|------------------------------------------------|---------------------------|---------------------------|------------------------|-----------------------------------------------|--------------------| +| `lock_raydium_lp` | `LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE` | `raydium_lock_lp` | `raydium_lock_lp` | `-` | `kb_decoder_lock_raydium_lp` | `reserved_missing` | +| `admin_jupiter_lock` | `LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn` | `jupiter_lock` | `jupiter_lock` | `-` | `kb_decoder_admin_jupiter_lock` | `reserved_missing` | +| `admin_pump_fees` | `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` | `pump_fees` | `pump_fees` | `kb_decoder_pump_fees` | `kb_decoder_admin_pump_fees` | `current_alias` | +| `metadata_metaplex_token_metadata` | `metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s` | `metaplex_token_metadata` | `metaplex_token_metadata` | `-` | `kb_decoder_metadata_metaplex_token_metadata` | `reserved_missing` | +| `metadata_name_service` | `namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX` | `name_service` | `name_service` | `-` | `kb_decoder_metadata_spl_name_service` | `reserved_missing` | +| `nft_metaplex_bubblegum` | `BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY` | `bubblegum` | `bubblegum` | `-` | `kb_decoder_nft_metaplex_bubblegum` | `reserved_missing` | +| `nft_metaplex_mpl_core` | `CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d` | `mpl_core` | `mpl_core` | `-` | `kb_decoder_nft_metaplex_mpl_core` | `reserved_missing` | + + +## Surfaces à classifier + +Ces entrées ont un `program_id`, mais leur fonction réelle n'est pas encore assez claire pour créer une crate canonique. Elles doivent être étudiées avant renommage. + +| Canonique | Program ID | Source | Normalisé | Crate actuelle | Crate cible | Statut | +|---------------------------------------|------------------------------------------------|-------------------------------|-------------------------------|----------------------------------|-------------|--------------------------------------| +| `unknown_aquifer` | `AQU1FRd7papthgdrwPTTq5JacJh8YtwEXaBfKU3bTz45` | `aquifer` | `aquifer` | `-` | `-` | `needs_classification` | +| `unknown_axiom_trade` | `FLASHX8DrLbgeR8FcfNV1F5krxYcYMUdBkrP1EPBtxB9` | `axiom_trade` | `axiom_trade` | `-` | `-` | `needs_classification` | +| `unknown_bison_fi` | `BiSoNHVpsVZW2F7rx2eQ59yQwKxzU5NvBcmKshCSUypi` | `bison_fi` | `bison_fi` | `kb_decoder_bisonfi` | `-` | `current_alias_needs_classification` | +| `unknown_carrot_defi` | `CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s` | `carrot_defi` | `carrot_defi` | `-` | `-` | `needs_classification` | +| `unknown_clone` | `C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr` | `clone` | `clone` | `kb_decoder_clone` | `-` | `current_alias_needs_classification` | +| `unknown_gavel` | `srAMMzfVHVAtgSJc8iH6CfKzuWuUTzLHVCE81QU1rgi` | `gavel` | `gavel` | `kb_decoder_gavel` | `-` | `current_alias_needs_classification` | +| `unknown_hawk_fi` | `FqGg2Y1FNxMiGd51Q6UETixQWkF5fB92MysbYogRJb3P` | `hawk_fi` | `hawk_fi` | `-` | `-` | `needs_classification` | +| `unknown_humidi_fi` | `9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp` | `humidi_fi` | `humidi_fi` | `-` | `-` | `needs_classification` | +| `unknown_hylo_stability_pool` | `HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ` | `hylo_stability_pool` | `hylo_stability_pool` | `kb_decoder_hylo_stability_pool` | `-` | `current_alias_needs_classification` | +| `unknown_jup_studio_authority` | `8rE9CtCjwhSmbwL5fbJBtRFsS3ohfMcDFeTTC7t4ciUA` | `jup_studio_authority` | `jup_studio_authority` | `-` | `-` | `needs_classification` | +| `unknown_jupiter_apepro_smart_wallet` | `JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw` | `jupiter_apepro_smart_wallet` | `jupiter_apepro_smart_wallet` | `-` | `-` | `needs_classification` | +| `unknown_kamino` | `6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc` | `kamino` | `kamino` | `-` | `-` | `needs_classification` | +| `unknown_metadao_bid_wall` | `WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx` | `metadao_bid_wall` | `metadao_bid_wall` | `-` | `-` | `needs_classification` | +| `unknown_numeraire` | `NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P` | `numeraire` | `numeraire` | `kb_decoder_numeraire` | `-` | `current_alias_needs_classification` | +| `unknown_ondo_global_markets` | `XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm` | `ondo_global_markets` | `ondo_global_markets` | `-` | `-` | `needs_classification` | +| `unknown_ore_v3` | `oreV3EG1i9BEgiAJ8b177Z2S2rMarzak4NMv1kULvWv` | `ore_v3` | `ore_v3` | `-` | `-` | `needs_classification` | +| `unknown_penguin_finance` | `PSwapMdSai8tjrEXcxFeQth87xC4rRsa4VA5mhGhXkP` | `pinguin_finance` | `penguin_finance` | `-` | `-` | `needs_classification` | +| `unknown_sabre_decimal_wrapper` | `DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB` | `sabre_decimal_wrapper` | `sabre_decimal_wrapper` | `-` | `-` | `needs_classification` | +| `unknown_sanctum_s_controller` | `5ocnV1qiCgaQR8Jb8xWnVbApfaygJ8tNoZfgPwsgx9kx` | `sanctum_s_controller` | `sanctum_s_controller` | `-` | `-` | `needs_classification` | +| `unknown_scorch` | `SCoRcH8c2dpjvcJD6FiPbCSQyQgu3PcUAWj2Xxx3mqn` | `scorch` | `scorch` | `kb_decoder_scorch` | `-` | `current_alias_needs_classification` | +| `unknown_swig` | `swigypWHEksbC64pWKwah1WTeh9JXwx8H1rJHLdbQMB` | `swig` | `swig` | `-` | `-` | `needs_classification` | + + +## Autres surfaces + +| Canonique | Program ID | Source | Normalisé | Crate actuelle | Crate cible | Statut | +|-----------|------------|--------|-----------|----------------|-------------|--------| + + +## Doublons et aliases à surveiller + +- Les noms `okx_v1`, `okx_v2`, `onchain_labs_dex_v1`, `onchain_labs_dex_v2` ne doivent pas être retenus comme noms canoniques tant que les `program_id` prouvés sont `okx_labs_v1` et `okx_labs_v2`. +- `goosefx_gamma` et `goosefx_v2` ne doivent pas être fusionnés tant que les `program_id` restent distincts. +- `raydium_pool_v4` doit être traité comme alias de documentation de `amm_raydium_lp_v4` si le `program_id` est `675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8`. +- `meteora_pools_amm` est un alias documentaire probable de `amm_meteora_damm_v1` si le `program_id` est `Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB`. + +## Règle de migration + +Aucun renommage physique massif ne doit être fait dans un delta général. Pour chaque surface : + +1. confirmer le `program_id` ; +2. confirmer la fonction réelle ; +3. choisir le `canonical_surface_code` ; +4. créer ou renommer une seule crate ; +5. mettre à jour `Cargo.toml` ; +6. exécuter `cargo build` ; +7. mettre à jour le registre ; +8. supprimer l'ancien alias seulement après validation. + + +## Comptes qui ne sont pas des programmes + +Les comptes qui ne sont pas prouvés comme programmes exécutables doivent rester hors du registre de surfaces. Le cas `BAGSB9TpGrZxQbEsrEznv5jXXdwyP6AXerN8aVRiAmcv` est documenté dans `docs/ACCOUNT_ONLY_CANDIDATES.md`. + +## Index hexadécimal optionnel + +Un préfixe `00` à `ff` ne doit pas remplacer le nom canonique. Il peut être ajouté comme champ `registry_code` dans le registre, mais les crates doivent rester descriptives. Voir `docs/PROGRAM_CODE_INDEX.md`. + +## Bags Fee Share + +| Canonique | Program id | Source | Fonction | Crate cible | Statut | +|--------------------------|------------------------------------------------|-------------------|----------|-------------------------------------|---------------------| +| `fees_bags_fee_share_v1` | `FEEhPbKVKnco9EXnaY3i4R5rQVUx91wgVfu8qokixywi` | Bags Fee Share V1 | `fees` | `kb_decoder_fees_bags_fee_share_v1` | `canonical_current` | +| `fees_bags_fee_share_v2` | `FEE2tBhCKAt7shrod19QttSVREUYPiyMzoku1mL1gqVK` | Bags Fee Share V2 | `fees` | `kb_decoder_fees_bags_fee_share_v2` | `canonical_current` | diff --git a/olddocs/archivekbot2/docs/PROJECT_OBJECTIVES.md b/olddocs/archivekbot2/docs/PROJECT_OBJECTIVES.md new file mode 100644 index 0000000..820a2c0 --- /dev/null +++ b/olddocs/archivekbot2/docs/PROJECT_OBJECTIVES.md @@ -0,0 +1,20 @@ + + + +# Objectifs du projet + +## Objectif court terme + +L'objectif court terme est de construire un système de trading assisté sur Solana. Le programme doit aider l'opérateur à observer les créations de tokens, créations de pools, migrations, changements de liquidité, swaps, claims de frais et opérations administratives qui peuvent influencer une décision d'achat ou de revente. + +Le système ne doit pas commencer par une stratégie autonome. Il doit d'abord fournir une observation fiable, des démos live, des garde-fous d'exécution et une validation post-transaction. + +## Objectif long terme + +L'objectif long terme est de construire une bibliothèque d'analyse Solana capable de rivaliser progressivement avec des outils d'exploration et d'analyse comme les indexeurs publics : parser la blockchain, classifier les programmes, décoder les instructions, matérialiser les événements métier, agréger les états et rendre les surfaces inconnues auditables. + +Ce second objectif impose de conserver une architecture large : raw immuable, registres de programmes, décodeurs par surface, matérialisateurs transversaux, exécuteurs séparés, tests anti-régression et documentation de classification. + +## Conséquence sur le squelette + +Le squelette doit rester plus large que le besoin immédiat de trading. En revanche, le développement actif doit rester priorisé : logging, configuration, stockage, RPC, wallet, démos live, puis surfaces prioritaires pour les listeners et l'exécution contrôlée. diff --git a/olddocs/archivekbot2/docs/RAW_STORAGE_LIFECYCLE.md b/olddocs/archivekbot2/docs/RAW_STORAGE_LIFECYCLE.md new file mode 100644 index 0000000..8cd800e --- /dev/null +++ b/olddocs/archivekbot2/docs/RAW_STORAGE_LIFECYCLE.md @@ -0,0 +1,115 @@ + + + +# Cycle de vie du stockage transactionnel Solana + +## Principe général + +Le stockage rejouable repose désormais sur une transaction Solana canonique unique par signature. Les formats d’origine JSON-RPC, WebSocket Helius ou Yellowstone Protobuf sont des formats de transport, pas des modèles de stockage métier. + +Le cycle est : + +```text +acquisition + -> normalisation canonique + -> persistance raw canonique + -> extraction core + -> décodage + -> matérialisation + -> compaction / archivage / purge éventuelle +``` + +## Transaction canonique + +`kb_sol_raw_transactions` conserve suffisamment d’information pour : + +- auditer une transaction ; +- reconstruire les tables `core` ; +- rejouer de nouvelles versions de décodeurs ; +- rejouer de nouvelles versions de matérialiseurs ; +- comparer plusieurs sources sans dépendre de leur format. + +La ligne est unique par signature. `canonical_format_version` permet de faire évoluer le contrat sans ambiguïté. + +## Observations d’acquisition + +`kb_sol_obs_transaction_observations` conserve les preuves techniques d’acquisition : + +- fournisseur et endpoint ; +- protocole et méthode ; +- origine live/backfill/replay/réparation ; +- commitment ; +- session et filtre ; +- timestamps de détection, réception, normalisation et persistance ; +- taille du message ; +- statut et erreur éventuelle. + +Cette table ne conserve pas le payload complet. Elle peut contenir plusieurs lignes pour une même signature. + +## Ancienne table WebSocket + +`kb_sol_raw_ws_notifications` est une table historique de `0.2.3`, supprimée pendant la transition validée `0.3.1`. Elle n’existe plus dans la baseline SQL active. + +Les nouvelles notifications WebSocket ne doivent pas être stockées intégralement par défaut. Une notification de logs peut rester temporairement dans une queue mémoire jusqu’à l’hydratation de la transaction. + +## États de rétention + +Les états de rétention de `kb_sol_raw_transactions` sont : + +```text +full +compacted +archived +purged +``` + +### `full` + +Le document canonique complet est présent dans PostgreSQL. + +### `compacted` + +Une représentation réduite ou un stockage externe permet encore l’audit minimal, mais le payload canonique complet n’est plus dans la ligne chaude. + +### `archived` + +Le payload a été déplacé vers un stockage d’archive durable. + +### `purged` + +Le payload n’est plus disponible. Le hash canonique, la signature, le slot et les données dérivées doivent rester suffisants pour les diagnostics autorisés. + +## États de traitement + +```text +received +core_extracted +decoded +materialized +failed +``` + +L’état décrit la progression de la transaction canonique, pas celle de chaque observation de source. + +## Conditions avant compaction ou purge + +Aucune purge destructive ne doit être activée avant validation de : + +- l’extraction core idempotente ; +- la couverture des décodeurs prioritaires ; +- la reconstruction depuis archive ; +- la stabilité du hash canonique ; +- la conservation du ledger de traitement ; +- la stratégie de sauvegarde PostgreSQL. + +## Payloads fournisseur de diagnostic + +Les payloads complets spécifiques à un fournisseur peuvent être exportés temporairement pour une session de test. Ils ne doivent pas devenir une dépendance du replay métier. + +Un export de diagnostic doit être : + +- opt-in ; +- borné en durée et en taille ; +- associé à une session ; +- supprimable indépendamment de PostgreSQL. + diff --git a/olddocs/archivekbot2/docs/RAW_STORE.md b/olddocs/archivekbot2/docs/RAW_STORE.md new file mode 100644 index 0000000..2e84e62 --- /dev/null +++ b/olddocs/archivekbot2/docs/RAW_STORE.md @@ -0,0 +1,147 @@ + + + +# Store transactionnel Solana canonique + +## Historique + +`0.2.3` a créé deux tables minimales : + +```text +kb_sol_raw_rpc_transactions +kb_sol_raw_ws_notifications +``` + +Ces tables restent un jalon historique validé dans `CHANGELOG.md`. La transition a été appliquée et contrôlée sur PostgreSQL réel pendant `0.3.1`. + +Le modèle actif est : + +```text +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +``` + +## Objectif cible + +Le store principal conserve une transaction Solana source-indépendante par signature. Les sources HTTP, WebSocket Helius et Yellowstone gRPC ne doivent pas produire plusieurs copies complètes du même contenu. + +```text +source provider + -> normalisation canonique + -> transaction unique + -> observations multiples +``` + +## Table `kb_sol_raw_transactions` + +Rôle : stocker la représentation canonique rejouable de la transaction et de ses metadata. + +Colonnes principales visées : + +| Colonne | Rôle | +|----------------------------|-----------------------------------------| +| `id` | clé primaire technique | +| `signature` | signature Solana unique | +| `slot` | slot de la transaction | +| `canonical_format_version` | version du contrat canonique | +| `canonical_json` | transaction et metadata normalisées | +| `canonical_json_hash` | hash déterministe du document canonique | +| `retention_state` | état de rétention | +| `processing_state` | état d’extraction et de traitement | +| `lifecycle_reason` | raison technique optionnelle | +| `created_at` | première insertion | +| `updated_at` | dernière évolution autorisée | + +Le contenu canonique ne contient pas de nom de fournisseur, endpoint, subscription id ou format de transport. + +`kb_model::CanonicalTransaction` fournit la sérialisation déterministe et le hash SHA-256. `kb_store_core::RawTransactionInsert::from_canonical` construit le DTO de persistance avec la signature primaire, le slot, `canonical_format_version`, `canonical_json` et `canonical_json_hash`. Le transport RPC ne dépend donc pas du backend PostgreSQL. + +## Table `kb_sol_obs_transaction_observations` + +Rôle : enregistrer chaque détection ou acquisition d’une signature sans recopier le payload complet. + +Colonnes principales visées : + +| Colonne | Rôle | +|-----------------------|-------------------------------------------------------| +| `id` | clé primaire technique | +| `observation_key` | clé idempotente de l’observation | +| `raw_transaction_id` | lien optionnel vers `kb_sol_raw_transactions` | +| `signature` | signature détectée ou reçue | +| `slot` | slot quand connu | +| `provider` | fournisseur | +| `endpoint_code` | endpoint de configuration | +| `protocol` | protocole de transport | +| `acquisition_method` | méthode ou type de stream | +| `origin` | `live`, `backfill`, `replay`, `repair` ou `migration` | +| `commitment` | commitment demandé ou reçu | +| `capture_session_id` | session de mesure ou d’ingestion | +| `filter_code` | filtre logique utilisé | +| `detected_at` | premier signal reçu | +| `received_at` | transaction complète reçue | +| `normalized_at` | fin de normalisation | +| `persisted_at` | fin de persistance | +| `payload_size_bytes` | taille du message source | +| `source_payload_hash` | hash optionnel du message source | +| `status` | résultat technique | +| `error_code` | erreur normalisée optionnelle | +| `error_message` | message de diagnostic optionnel | + +Cette table ne possède pas de `raw_json`, de `canonical_json` ni de payload Protobuf complet. + +## Notifications WebSocket + +`kb_sol_raw_ws_notifications` n’est plus conservée comme cible durable. + +Pour `logsSubscribe` : + +1. recevoir la signature et le slot ; +2. mémoriser temporairement le timestamp de détection ; +3. hydrater par `getTransaction` si nécessaire ; +4. écrire la transaction canonique ; +5. écrire une observation avec `detected_at`, `received_at` et le statut d’hydratation. + +Les payloads complets de notifications peuvent être exportés temporairement pour un benchmark borné, mais ils ne doivent pas être dupliqués en PostgreSQL. + +## Fusion par signature + +La signature est la clé d’unicité de la transaction canonique. + +- hash identique : conserver la ligne et ajouter une observation ; +- metadata plus complètes : appliquer un enrichissement déterministe ; +- différence incompatible : enregistrer un conflit et ne pas écraser silencieusement ; +- transaction absente ou erreur provider : écrire uniquement l’observation technique. + +## Cycle de vie + +Les états de rétention de la transaction canonique restent : + +```text +full +compacted +archived +purged +``` + +Les états de traitement restent : + +```text +received +core_extracted +decoded +materialized +failed +``` + +Les observations sont append-only et suivent une rétention technique distincte. + +## Baseline SQL active + +Après validation de la transition historique, le dossier `kb_store_pg/migrations/` a été consolidé : + +```text +0001_canonical_transaction_store.sql +0002_core_store.sql +``` + +La baseline ne contient que les tables et colonnes actives. Les anciens noms RPC/WS ne sont plus recréés. Le DDL runtime conserve temporairement un chemin de compatibilité idempotent pour les workspaces encore issus de `pre.001`. diff --git a/olddocs/archivekbot2/docs/REPLAY_PIPELINE.md b/olddocs/archivekbot2/docs/REPLAY_PIPELINE.md new file mode 100644 index 0000000..09d7cde --- /dev/null +++ b/olddocs/archivekbot2/docs/REPLAY_PIPELINE.md @@ -0,0 +1,80 @@ + + + +# Pipeline de replay + +Le replay ne doit pas être global par défaut. Chaque campagne reçoit un `campaign_id` et cible un ensemble explicite de processors, une version et un périmètre borné d’inputs. + +## Étapes + +```text +ingest -> extract -> observe -> decode -> materialize -> aggregate -> validate +``` + +Chaque étape doit être rejouable séparément avec son propre ledger versionné. + +## Sélection de décodage + +La sélection opérateur peut utiliser : + +- des signatures ; +- une plage de slots ; +- des `program_id` ; +- des instruction paths ; +- des états lifecycle ; +- une limite stricte. + +Le pipeline calcule ensuite `effective_program_ids` comme l’union des programmes déclarés par les décodeurs activés. Sans filtre program ID explicite, cette union est appliquée automatiquement au store. Avec un filtre explicite, chaque valeur doit être supportée par au moins un décodeur activé, sinon la campagne est refusée avant la requête SQL. + +Cette règle évite qu’un classifieur natif sélectionne des instructions SPL, Jupiter, Pump ou d’autres programmes non compatibles. Elle empêche également la resélection infinie d’un lot entièrement `unmatched` uniquement parce que les processors choisis ne couvrent pas ses programmes. + +## Force replay + +Le force replay contourne le skip processor/version/input/hash, mais reste borné par une liste de signatures explicites ou par une autorisation opérateur « toutes les signatures » combinée aux autres filtres et à la limite. Une requête sans l’un de ces deux scopes est refusée. + +Lorsqu’une campagne contient des signatures explicites, `force_replay=true` retire le filtre lifecycle pour ces signatures. Les inputs déjà terminaux peuvent alors être réellement rejoués. Le mode explicite « toutes les signatures » retire également ce filtre, mais conserve obligatoirement le scope des programmes compatibles, les slots et instruction paths éventuels ainsi que la limite. Sans signatures ni autorisation « toutes les signatures », la requête est refusée. + +Le remplacement ne touche que les sorties du processor, de la version et de l’input ciblés. Les autres processors et les autres versions restent intacts. + +## Skip + +Sans force replay, un input est skippé uniquement lorsque le ledger contient un succès ayant exactement : + +```text +stage +processor_name +processor_version +input_key +input_hash +``` + +Une campagne de validation doit pouvoir montrer successivement : + +```text +premier passage -> decoded/ignored/unsupported +second passage -> skipped +force replay -> exécution sans skip +passage suivant -> skipped +``` + +## Unmatched + +`unmatched` signifie qu’aucun décodeur compatible n’a accepté l’input après le filtre exact de programme. L’instruction n’est pas marquée globalement comme définitivement ignorée, car un futur processor peut la supporter. Les décodeurs doivent classer comme `unsupported` les instructions inconnues de leurs propres programmes afin de produire une couverture exploitable. + +## Traçabilité + +Les logs de campagne conservent : + +```text +campaign_id +signature_count +signature_sample +decoder_names +requested_program_ids +effective_program_ids +requested_processing_states +effective_processing_states +force_replay +``` + +Les logs par input conservent ensuite la signature exacte, le path, le programme, le processor, le hash et la décision terminale. diff --git a/olddocs/archivekbot2/docs/RPC_ENDPOINT_ROLES.md b/olddocs/archivekbot2/docs/RPC_ENDPOINT_ROLES.md new file mode 100644 index 0000000..813116f --- /dev/null +++ b/olddocs/archivekbot2/docs/RPC_ENDPOINT_ROLES.md @@ -0,0 +1,77 @@ + + + +# Rôles des endpoints RPC et streams + +Les rôles servent à sélectionner un endpoint selon l’opération, le provider, le protocole et les limites locales. + +## Rôles HTTP actifs + +| Rôle | Usage | +|---------------------|-----------------------------------------------------------------| +| `http_queries` | lectures courantes | +| `history_backfill` | `getSignaturesForAddress`, `getTransaction` et backfills ciblés | +| `http_transactions` | simulation, envoi et confirmation | +| `http_fallback` | endpoint de secours | +| `http_heavy` | appels lourds | + +`0.3.x` utilise principalement `history_backfill` avec les comptes gratuits. + +## Rôles WebSocket standard existants + +| Rôle | Usage | +|-------------------------|-------------------------------| +| `slot_notifications` | progression et santé du flux | +| `logs_subscribe` | logs ciblés | +| `program_subscribe` | comptes détenus par programme | +| `account_subscribe` | comptes précis | +| `program_logs` | compatibilité historique | +| `account_notifications` | compatibilité historique | + +## Rôles futurs `0.10.x` + +| Rôle | Usage | +|----------------------------------|-----------------------------------------------| +| `helius_transaction_stream` | extension Helius `transactionSubscribe` | +| `yellowstone_transaction_stream` | filtre transactions Yellowstone gRPC | +| `logs_all_probe` | comparaison temporaire `logsSubscribe("all")` | +| `realtime_transaction_hydration` | hydratation HTTP et réparation | + +Les transports Helius et Yellowstone restent implémentés dans `kb_rpc`. Les rôles ne créent pas de dépendance provider dans les décodeurs. + +## Request kinds actifs pour le backfill + +```text +get_signatures_for_address +get_transaction +get_signature_statuses +get_slot +get_version +``` + +## Request kinds futurs + +```text +transaction_subscribe +transaction_unsubscribe +yellowstone_transaction_subscribe +logs_subscribe_all +logs_unsubscribe +``` + +## Limites par rôle + +```text +requests_per_second +burst_capacity +max_concurrent_requests +max_subscriptions +pause_after_rate_limit_ms +``` + +Pour les streams gRPC, la configuration future ajoutera les limites de streams, filtres, adresses et taille de queue sans casser les rôles HTTP/WS existants. + +## Preuve runtime + +Un rôle ou un plan configuré ne garantit pas la capacité distante. La réponse du provider reste la preuve runtime. Les refus de plan, filtres invalides et limitations doivent être normalisés comme erreurs de `kb_rpc`. + diff --git a/olddocs/archivekbot2/docs/RUST_WORKSPACE_RULE_AUDIT.md b/olddocs/archivekbot2/docs/RUST_WORKSPACE_RULE_AUDIT.md new file mode 100644 index 0000000..83206a2 --- /dev/null +++ b/olddocs/archivekbot2/docs/RUST_WORKSPACE_RULE_AUDIT.md @@ -0,0 +1,236 @@ + + + +# Audit des règles Rust du workspace + +Violations détectées : **616**. + +## Synthèse + +| Code | Nombre | +|------------|-------:| +| `RUST010` | 156 | +| `RUST011` | 16 | +| `RUST013` | 19 | +| `RUST021` | 1 | +| `TRACE002` | 32 | +| `TRACE003` | 202 | +| `TRACE004` | 190 | + +## Premiers écarts + +- `RUST010` `kb_app_demo/src/demo_backfill.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_backfill.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_backfill.rs:8` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_config.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_config.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_core_extraction.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_core_extraction.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_core_extraction.rs:8` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_decode_replay.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_decode_replay.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_decode_replay.rs:8` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_execution_solana_core.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_execution_solana_core.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_execution_solana_core.rs:8` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_execution_spl.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_http.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_http.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_spl_ata.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_spl_token.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_spl_token_2022.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_sql_common.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_sql_common.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_sql_diag.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_sql_pg_core.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_sql_pg_raw.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_sql_replay_candidates.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_ws.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_ws.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_ws.rs:8` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/demo_ws.rs:993` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/frontend_log.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/lib.rs:13` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/lib.rs:14` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/main.rs:12` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/splash.rs:9` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_app_demo/src/splash.rs:10` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_config/src/settings.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_config/src/settings.rs:1223` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_api/src/contracts.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_metadata_metaplex_token_metadata/src/canonical.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_metadata_metaplex_token_metadata/src/decoder.rs:144` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_metadata_metaplex_token_metadata/src/instruction.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_metadata_metaplex_token_metadata/src/instruction.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/address_lookup_table.rs:326` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/compute_budget.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/compute_budget.rs:673` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/config.rs:322` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/feature.rs:167` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/loaders.rs:992` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/payload.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/payload.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/slashing.rs:461` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/stake.rs:805` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/system.rs:438` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/vote.rs:707` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/zk_elgamal.rs:522` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_solana_core/src/zk_token_proof.rs:693` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_associated_token_account/src/decoder.rs:335` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_associated_token_account/src/instruction.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_associated_token_account/src/instruction.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_elgamal_registry/src/decoder.rs:95` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_elgamal_registry/src/decoder.rs:162` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_elgamal_registry/src/registry.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_elgamal_registry/src/registry.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_elgamal_registry/src/state.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_elgamal_registry/src/state.rs:49` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_memo/src/decoder.rs:160` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_memo/src/memo.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_memo/src/memo.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_token/src/decoder.rs:144` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_token/src/token.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_token/src/token.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_token_2022/src/decoder.rs:144` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_token_2022/src/state.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_token_2022/src/state.rs:916` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_token_2022/src/token.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_decoder_spl_token_2022/src/token.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_execution_api/src/execution.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_execution_api/src/executor.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_execution_safety/src/safety.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_execution_solana/src/nonce.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_execution_solana/src/transaction.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_execution_solana/src/transaction.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_execution_solana/src/transaction.rs:654` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_execution_solana/src/transaction.rs:655` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/address_lookup_table.rs:321` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/builder.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/builder.rs:1374` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/intent.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/native_admin.rs:381` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/precompiles.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/slashing.rs:346` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/stake.rs:1497` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/validation.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/validation.rs:108` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/vote.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_solana_core/src/vote.rs:1846` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_associated_token_account/src/intent.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_elgamal_registry/src/builder.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_elgamal_registry/src/builder.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_elgamal_registry/src/intent.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_memo/src/builder.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_memo/src/builder.rs:194` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_memo/src/intent.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_token/src/builder.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_token/src/intent.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_token_2022/src/builder.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_token_2022/src/confidential.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_token_2022/src/confidential.rs:425` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_executor_spl_token_2022/src/intent.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_logging/src/tracing_runtime.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_logging/src/tracing_runtime.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_logging/src/tracing_runtime.rs:8` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_logging/src/tracing_runtime.rs:676` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_logging/src/tracing_runtime.rs:677` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_model/src/canonical_transaction.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_model/src/canonical_transaction.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_model/src/decoded.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_model/src/materialized.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_model/src/nomenclature.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_model/src/observation.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_model/src/solana.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/backfill.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/backfill.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/backfill.rs:8` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/core_extraction.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/core_extraction.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/core_extraction.rs:8` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/decode_replay.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/decode_replay.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/solana_elgamal_registry_stateful.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/solana_elgamal_registry_stateful.rs:227` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/solana_stateful.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/solana_token_stateful.rs:392` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_pipeline/src/solana_token_stateful.rs:470` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_rpc/src/execution_rpc.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_rpc/src/execution_rpc.rs:2251` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_rpc/src/get_transaction.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_rpc/src/standard_http.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_rpc/src/ws_client.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_rpc/src/ws_client.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_rpc/src/ws_session.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_rpc/src/ws_session.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_rpc/src/ws_session.rs:1219` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_rpc/src/ws_session.rs:1220` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_store_pg/src/queries/core_extraction_queries.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_store_pg/src/queries/core_queries.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_store_pg/src/queries/decode_pipeline_queries.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_store_pg/src/queries/table_diagnostics_queries.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_wallet/src/wallet.rs:6` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_wallet/src/wallet.rs:7` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_wallet/src/wallet.rs:261` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_wallet/src/wallet.rs:294` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_wallet/src/wallet.rs:299` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_wallet/src/wallet.rs:411` — ordinary `use` requires a trait-import justification marker +- `RUST010` `kb_wallet/src/wallet.rs:524` — ordinary `use` requires a trait-import justification marker +- `RUST011` `kb_executor_solana_core/src/lib.rs:129` — grouped re-export is forbidden +- `RUST011` `kb_executor_solana_core/src/lib.rs:137` — grouped re-export is forbidden +- `RUST011` `kb_executor_solana_core/src/lib.rs:145` — grouped re-export is forbidden +- `RUST011` `kb_executor_solana_core/src/lib.rs:159` — grouped re-export is forbidden +- `RUST011` `kb_executor_spl_token/src/lib.rs:29` — grouped re-export is forbidden +- `RUST011` `kb_executor_spl_token_2022/src/lib.rs:16` — grouped re-export is forbidden +- `RUST011` `kb_executor_spl_token_2022/src/lib.rs:47` — grouped re-export is forbidden +- `RUST011` `kb_rpc/src/lib.rs:167` — grouped re-export is forbidden +- `RUST011` `kb_rpc/src/lib.rs:175` — grouped re-export is forbidden +- `RUST011` `kb_rpc/src/lib.rs:180` — grouped re-export is forbidden +- `RUST011` `kb_rpc/src/lib.rs:188` — grouped re-export is forbidden +- `RUST011` `kb_rpc/src/lib.rs:198` — grouped re-export is forbidden +- `RUST011` `kb_rpc/src/lib.rs:204` — grouped re-export is forbidden +- `RUST011` `kb_rpc/src/lib.rs:209` — grouped re-export is forbidden +- `RUST011` `kb_rpc/src/lib.rs:232` — grouped re-export is forbidden +- `RUST011` `kb_rpc/src/lib.rs:257` — grouped re-export is forbidden +- `RUST013` `kb_decoder_metadata_metaplex_token_metadata/src/canonical.rs:6` — grouped imports are forbidden +- `RUST013` `kb_decoder_spl_token_2022/src/state.rs:916` — grouped imports are forbidden +- `RUST013` `kb_executor_solana_core/src/lib.rs:129` — grouped imports are forbidden +- `RUST013` `kb_executor_solana_core/src/lib.rs:137` — grouped imports are forbidden +- `RUST013` `kb_executor_solana_core/src/lib.rs:145` — grouped imports are forbidden +- `RUST013` `kb_executor_solana_core/src/lib.rs:159` — grouped imports are forbidden +- `RUST013` `kb_executor_spl_token/src/lib.rs:29` — grouped imports are forbidden +- `RUST013` `kb_executor_spl_token_2022/src/confidential.rs:425` — grouped imports are forbidden +- `RUST013` `kb_executor_spl_token_2022/src/lib.rs:16` — grouped imports are forbidden +- `RUST013` `kb_executor_spl_token_2022/src/lib.rs:47` — grouped imports are forbidden +- `RUST013` `kb_rpc/src/lib.rs:167` — grouped imports are forbidden +- `RUST013` `kb_rpc/src/lib.rs:175` — grouped imports are forbidden +- `RUST013` `kb_rpc/src/lib.rs:180` — grouped imports are forbidden +- `RUST013` `kb_rpc/src/lib.rs:188` — grouped imports are forbidden +- `RUST013` `kb_rpc/src/lib.rs:198` — grouped imports are forbidden +- `RUST013` `kb_rpc/src/lib.rs:204` — grouped imports are forbidden +- `RUST013` `kb_rpc/src/lib.rs:209` — grouped imports are forbidden +- `RUST013` `kb_rpc/src/lib.rs:232` — grouped imports are forbidden +- `RUST013` `kb_rpc/src/lib.rs:257` — grouped imports are forbidden +- `RUST021` `kb_app_demo/src/lib.rs:42` — crate-root re-export requires adjacent rustdoc +- `TRACE002` `kb_app_demo/src/lib.rs:1` — TRACING_TARGET must be re-exported with `pub(crate) use` +- `TRACE002` `kb_decoder_metadata_metaplex_token_metadata/src/lib.rs:1` — TRACING_TARGET must be re-exported with `pub(crate) use` +- `TRACE002` `kb_decoder_solana_core/src/lib.rs:1` — TRACING_TARGET must be re-exported with `pub(crate) use` +- `TRACE002` `kb_decoder_spl_associated_token_account/src/lib.rs:1` — TRACING_TARGET must be re-exported with `pub(crate) use` +- `TRACE002` `kb_decoder_spl_elgamal_registry/src/lib.rs:1` — TRACING_TARGET must be re-exported with `pub(crate) use` +- `TRACE002` `kb_decoder_spl_memo/src/lib.rs:1` — TRACING_TARGET must be re-exported with `pub(crate) use` +- `TRACE002` `kb_decoder_spl_token/src/lib.rs:1` — TRACING_TARGET must be re-exported with `pub(crate) use` +- `TRACE002` `kb_decoder_spl_token_2022/src/lib.rs:1` — TRACING_TARGET must be re-exported with `pub(crate) use` + +Le rapport est tronqué aux 200 premiers écarts sur 616. + +## Stratégie de correction + +La mise en conformité est découpée avant toute nouvelle prérelease : + +1. `pre.035-delta-fix-002` : séparation des règles et audit automatisé reproductible ; +2. correctifs suivants : points d'entrée de crates, réexports `pub`/`pub(crate)`, rustdocs et chemins `crate::...` ; +3. correctifs suivants : imports de traits et suppression des imports ordinaires/groupés ; +4. correctifs suivants : `TRACING_TARGET`, dépendances `tracing`, macros et matrice de routes ; +5. correctifs suivants : helpers dupliqués et mutualisation inter-crates ; +6. fermeture : `cargo fmt --all`, audit strict, tests workspace et Clippy global. + +Aucune nouvelle prérelease ne doit être créée tant que cette séquence n'est pas terminée et validée localement. diff --git a/olddocs/archivekbot2/docs/SOLANA_INTERFACE_DEPENDENCIES.md b/olddocs/archivekbot2/docs/SOLANA_INTERFACE_DEPENDENCIES.md new file mode 100644 index 0000000..4b1cd93 --- /dev/null +++ b/olddocs/archivekbot2/docs/SOLANA_INTERFACE_DEPENDENCIES.md @@ -0,0 +1,272 @@ + + + +# Dépendances d’interfaces Solana et SPL + +## Objectif + +Le workspace privilégie les interfaces officielles étroites afin d’éviter de recopier des enums, layouts, IDs ou builders déjà publiés par Solana ou SPL. Les dépendances de `[workspace.dependencies]` constituent un catalogue de versions cohérentes ; elles ne sont pas automatiquement ajoutées à toutes les crates. + +## Règle de consommation + +Une crate ajoute une interface uniquement lorsqu’elle utilise réellement au moins un de ses éléments : + +- enum d’instruction ou d’état ; +- encodeur/décodeur officiel ; +- type de compte ou paramètre ; +- program ID ou sysvar ID ; +- modèle RPC appartenant à sa responsabilité. + +Une déclaration à la racine ne justifie pas une dépendance inutilisée dans une crate feuille. Les features restent minimales et explicites. + +## Ordre des formats + +1. `wincode` lorsqu’il est officiellement exposé par l’interface ; +2. Borsh lorsqu’il correspond au contrat officiel ou au comportement du runtime ; +3. parseur local borné lorsque l’interface officielle ne fournit son helper qu’avec `bincode`. + +### Compatibilité de version `wincode` + +Le workspace reste épinglé sur `wincode ^0.5`. Les crates Solana modulaires actuellement utilisées avec la feature `wincode` publient leurs implémentations `SchemaRead`/`SchemaWrite` contre `wincode 0.5.x`. Ces traits sont nominalement distincts de ceux de `wincode 0.6.x` : une dépendance directe migrée seule vers `0.6` ne peut donc ni désérialiser `solana_nonce::versions::Versions`, ni sérialiser `solana_transaction::Transaction`. Cargo peut charger les deux versions simultanément, mais les implémentations de traits ne sont pas interchangeables et l’orphan rule interdit de les réimplémenter localement pour ces types externes. + +La migration vers `wincode 0.6` doit attendre que l’ensemble des crates Solana consommées migre de façon cohérente. Une double dépendance aliasée n’est acceptable que pour des types propres au workspace ; tous les appels portant sur des types Solana doivent utiliser la même version `0.5.x` que celle employée par leurs crates d’origine. Avant toute migration, vérifier avec `cargo tree -d` et `cargo tree -i wincode@`. + + +Le workspace n’ajoute pas de dépendance directe à `bincode`. Une feature officielle `bincode` seule n’est pas activée pour contourner cette règle. + +## Interfaces utilisées dans `kb_decoder_solana_core` + +| Surface | Interface | Features utiles | Stratégie actuelle | +|---------------------------|---------------------------------------------------|----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------| +| Address Lookup Table | `solana-address-lookup-table-interface ^3.1` | `serde`, `wincode` | enum officielle et `wincode` exact | +| Compute Budget | `solana-compute-budget-interface ^3.0` | `borsh`, `serde` | enum officielle pour les fixtures ; parser borné aligné sur le Borsh unchecked du runtime | +| System Program | `solana-system-interface ^3.2` | `alloc`, `serde`, `std`, `solana-instruction`, `wincode` | enum officielle et `wincode` | +| Vote Program | `solana-vote-interface ^6.0` | `serde`, `wincode` | enum officielle et `wincode::deserialize_exact` | +| Stake Program | `solana-stake-interface ^4.3` | `borsh`, `serde`, `wincode` | types/ID officiels + miroir wire privé `wincode` exact, compatible avec le layout historique | +| Précompiles signature | sources runtime Agave et crates programme `3.0.0` | aucune nouvelle dépendance consommée | parseurs locaux bornés des tables d’offsets, résolution outer via contrat core `2`, sans cryptographie ni `bincode` | +| ZK ElGamal Proof | `solana-zk-elgamal-proof-interface ^0.1` | aucune feature additionnelle | enum `ProofInstruction` et tailles `Pod` officielles ; comportement des comptes vérifié contre le runtime Agave | +| ZK Token Proof historique | aucune dépendance runtime dédiée | miroir wire local borné | tags et tailles historiques audités contre `solana-zk-token-sdk 3.1.14`; comparaison Agave `v2.0.0`/`v4.1.1` | +| Slashing Program | Agave `v4.1.1`, `solana-program/slashing@fe8da3a` | aucune dépendance ajoutée | parseur local borné du contrat release vérifié ; compte de preuve externe non relu et aucune cryptographie locale | + +## Décision pour les précompiles de signature + +Les crates officielles Ed25519, secp256k1 et secp256r1 exposent les IDs, constantes et structures de layout, mais `kb_program_ids` centralise déjà les IDs et le delta n’exécute aucune vérification cryptographique. Ajouter ces dépendances uniquement pour recopier des tailles ou des structures `Pod` constituerait une dépendance sans consommation fonctionnelle. + +`kb_decoder_solana_core` reproduit les layouts exacts depuis les sources runtime Agave : table Ed25519/secp256r1 de 14 octets, table secp256k1 de 11 octets, sentinelle `u16::MAX` uniquement pour Ed25519/secp256r1, index `u8` toujours explicite pour secp256k1, règles zéro signature et limite secp256r1. Les fixtures manuelles rendent chaque offset visible et les tests couvrent les références inter-instructions et les bornes. Aucune dépendance `bincode` n’est ajoutée. + +## Transaction client dans `kb_execution_solana` + +`kb_execution_solana` n’importe plus l’agrégat `solana-sdk`. Sa frontière transactionnelle utilise les crates modulaires réellement consommées : `solana-instruction`, `solana-message`, `solana-transaction`, `solana-hash`, `solana-pubkey`, `solana-keypair`, `solana-signer`, `solana-nonce` et `solana-system-interface`. Les exécuteurs spécifiques conservent la même politique et ajoutent uniquement l’interface de programme nécessaire. + +Le message à signer provient de `solana_transaction::Transaction::message_data()`. La transaction complète utilise `wincode::serialize`, supporté officiellement par les types modulaires `Message` et `Transaction`. Cette stratégie remplace tout appel direct à `bincode` et reproduit le wire attendu par `getFeeForMessage`, `simulateTransaction` et `sendTransaction`. La taille sérialisée est refusée au-delà de 1 232 octets. + +## Identifiants natifs, Vote et loaders dans l’exécuteur + +`solana-sdk-ids` est conservé intentionnellement comme registre officiel modulaire des adresses natives et sysvars. Les chemins `solana_sdk_ids::sysvar::{clock,rent,slot_hashes,instructions}` ne constituent pas un retour au SDK monolithique : ils fournissent uniquement des `Pubkey` canoniques. `solana-instructions-sysvar` ne doit être ajouté que lorsqu’une crate appelle réellement ses fonctions d’introspection d’instructions, pas pour remplacer un simple ID officiel. + +`kb_executor_solana_core` consomme `solana-vote-interface ^6.0` avec `serde` et `wincode` pour construire les vingt variantes wire Vote actuelles. Il utilise `solana-instruction` pour `Instruction`/`AccountMeta`, `solana-pubkey::Pubkey` pour les adresses publiques, `solana-hash::Hash` pour les hashes et `solana-sdk-ids` pour Rent, Clock et SlotHashes. Les quatre créations composées utilisent `solana-system-interface`; aucune dépendance `solana-sdk` ni feature `bincode` n’est ajoutée à la crate. + +`kb_decoder_solana_core` et `kb_executor_solana_core` consomment désormais `solana-loader-v3-interface ^8.0` avec `wincode`. Le décodeur désérialise l’enum officielle de façon exacte tout en conservant la compatibilité du booléen optionnel historique des dernières variantes. L’exécuteur appelle les helpers officiels pour onze plans : création de buffer, écriture, déploiement, upgrade, changements d’autorité, fermetures et extension. + +`solana-loader-v4-interface ^3.1` publie l’enum et les comptes officiels, mais ses helpers de construction sont conditionnés par la feature `bincode` et l’enum ne fournit pas de schéma `wincode`. Pour respecter l’interdiction de `bincode`, `kb_executor_solana_core` reproduit localement le wire borné des sept discriminants (`u32 LE`, champs numériques et vecteur borné) et les métadonnées de comptes exactes pour neuf plans. La crate feuille n’ajoute donc pas une dépendance inutilisée à l’interface v4; le catalogue workspace la conserve comme source normative/versionnée. + +## Interfaces officielles non encore consommées + +| Interface | Propriétaire futur | Décision | +|------------------------------------------|------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------| +| `solana-feature-gate-interface ^4.0` | `kb_decoder_solana_core` | peut fournir les types officiels ; l’instruction actuelle reste un tag d’un octet vérifié depuis le builder/processor | +| `solana-feature-set-interface ^4.0` | classification/diagnostics natifs | ajouter seulement lorsqu’un type est consommé | +| `solana-loader-v4-interface ^3.1` | source normative Loader v4 | helpers officiels conditionnés par `bincode`; conserver le miroir wire local borné tant qu’aucun schéma `wincode` n’est publié | +| interfaces SPL | crates `kb_decoder_spl_*` et `kb_executor_spl_*` correspondantes | ne pas les rattacher au décodeur natif ni à l’application | +| types RPC/account/transaction status | `kb_rpc` | ne pas les ajouter à `kb_app_demo` ; l’application consomme les DTO du workspace | + +## Exceptions locales actuelles + +### SPL Memo v1, v3 et v4 + +`kb_decoder_spl_memo` et `kb_executor_spl_memo` consomment `spl-memo-interface ^2.1` sans feature additionnelle. La version effectivement résolue pendant les validations est 2.1.0. Elle publie les trois IDs exacts et un builder générique recevant explicitement le Program ID. Ce builder place les octets exacts du message dans `Instruction::data` et transforme chaque pubkey fournie en compte readonly signer, sans sérialisation intermédiaire. + +L’exécuteur appelle ce builder pour les trois générations et compare chaque plan au résultat officiel. Les différences runtime restent explicites : v1 ignore les comptes, v3/v4 les vérifient. La bibliothèque ne lie toutefois aucune génération à un cluster ou au dry-run : la simulation obligatoire établit la disponibilité effective du Program ID ciblé, puis les politiques communes gouvernent l’autorisation d’envoi et Mainnet. La démo du jalon retient séparément v4 sur Devnet. La taille packet finale reste contrôlée par `kb_execution_solana` après compilation du message. + +Le décodeur ne dépend pas du builder pour lire le wire : il analyse directement les octets base64 retenus par le core, avec une borne de 4 096 octets, puis valide l’UTF‑8. La source historique v1 prouve que les comptes sont ignorés ; les processors v3/v4 exigent au contraire que chaque compte fourni soit signer avant de valider l’UTF‑8. Ces règles restent séparées dans `docs/SPL_MEMO_MATRIX.json` et les tests comparent les trois IDs locaux aux constantes de l’interface officielle. + +L’archive source `0.4.2` ne contenait pas de `Cargo.lock`. Les compilations et validations `0.4.3` ont résolu `spl-memo-interface 2.1.0`, sans mise à jour automatique de la contrainte workspace. Cette version exacte a construit les trois générations et le parcours v4 Devnet réel. + +### SPL Token classique + +Le catalogue workspace déclare `spl-token-interface ^3.0` sans feature. Le tag officiel +`interface@v3.0.0` publie la version `3.0.0`, sans feature optionnelle ni dépendance à `bincode`. +`kb_decoder_spl_token` consomme l'ID officiel et utilise `TokenInstruction::unpack` dans les tests +différentiels. Le wire de production reste un parseur local borné afin de conserver les tailles +consommées, les suffixes acceptés par les processors, les diagnostics UTF-8 et la structure interne +de `Batch`, que l'enum officielle représente seulement par son tag parent. + +La surface compte 28 tags : `0..24`, `38` (`WithdrawExcessLamports`), `45` +(`UnwrapLamports`) et `255` (`Batch`). L'interface `3.0.0` fournit un builder pour chacun. La source +historique `program/src/processor.rs` ne suffit toutefois pas à prouver les deux nouveaux tags : le +processor p-token `1.0.0` sous le même Program ID implémente explicitement `UnwrapLamports` et +`Batch`. La publication de l'interface, la constructibilité, le binaire déployé par cluster et le +résultat de simulation restent quatre preuves séparées dans `docs/SPL_TOKEN_MATRIX.json`. + +Le processor p-token lit les champs numériques avec des contrôles de longueur minimale et peut +donc ignorer des octets suffixes selon l'opération. Le décodeur les conserve et les signale au lieu +de les accepter silencieusement. `Batch` est découpé selon les paires `account_count/data_len`, +interdit les données enfant vides et appelle uniquement le processor interne, ce qui rend un batch +imbriqué invalide. Le décodeur ajoute des bornes défensives de 64 enfants, 512 comptes cumulés et +16 384 octets par instruction. + +La résolution `3.0.0` et les tests différentiels du décodeur ont été confirmés dans le workspace le +15 juillet 2026. `kb_executor_spl_token` consomme les builders officiels de cette même interface. +Les variantes `InitializeMint`, `InitializeAccount`, `InitializeMultisig` et `InitializeAccount2` +restent decode-only dans la politique d'exécution ; les opérations anciennes toujours publiées et +utilisables, comme `Transfer` ou `SetAuthority`, ne sont pas confondues avec des opérations +obsolètes. + +Les signatures officielles de `unwrap_lamports` et `batch` ont été auditées au commit `46eaacd`. +Leur constructibilité est donc prouvée. Leur déploiement sur le programme classique Devnet a été +observé le 16 juillet 2026 par deux simulations sans signature ni envoi : `Batch` avec un enfant +`TransferChecked` de montant nul a réussi en 270 compute units, puis `UnwrapLamports` d'un lamport +depuis un compte wrapped SOL auxiliaire classique a réussi en 140 compute units. Localnet, Testnet +et Mainnet restent des preuves séparées. L'exécuteur ne bloque aucun cluster et laisse +l'autorisation d'envoi aux politiques communes. + +Sur Devnet, le programme classique a également confirmé un `TransferChecked` complet et un +lifecycle sans ATA couvrant `InitializeAccount3`, `MintToChecked`, `TransferChecked`, +`ApproveChecked`, `Revoke`, `BurnChecked` et `CloseAccount`. Sur Mainnet, un corpus canonique de 370 +instructions a été décodé et matérialisé sans entrée unsupported, failed ou unmatched. Localnet n'a +pas été exercé. La matrice conserve donc indépendamment la version d'interface, le processor de +référence, le builder, les observations réelles et le résultat de simulation/soumission par +instruction. + +### SPL Associated Token Account + +Le catalogue workspace déclare `spl-associated-token-account-interface ^2.0` avec la feature +`borsh`. Cargo a résolu la version `2.0.0` pendant le jalon `0.4.5`. Les crates +`kb_decoder_spl_associated_token_account` et `kb_executor_spl_associated_token_account` consomment +réellement l'enum, les builders, le Program ID et le helper officiel de dérivation ; le pipeline et +la démo consomment ensuite leurs contrats typés sans recopier l'interface. + +L'interface publie exactement trois variantes Borsh actuelles : `Create` (`0`), +`CreateIdempotent` (`1`) et `RecoverNested` (`2`). Le processor accepte aussi historiquement une +donnée vide comme `Create`; cette forme reste décodable mais n'est pas produite par le builder +actuel. La dérivation canonique utilise les seeds `[wallet, Token Program ID, mint]` sous le Program +ID ATA. Le Token Program fait donc partie de l'adresse et distingue nécessairement les ATA +classiques des ATA Token-2022 d'un même wallet et mint. + +Le décodeur conserve les comptes, flags, doublons, chemins outer/inner, transactions échouées, +adresses observées et dérivées, ainsi que les rôles distincts de `RecoverNested`. Les tests +différentiels comparent les trois builders et les vecteurs PDA au helper officiel. L'exécuteur +utilise les mêmes builders pour les trois variantes, impose simulation et dry-run par défaut, puis +laisse au pipeline stateful les contrôles de mint, owner, compte existant, rent, signataires et +postconditions. + +Les preuves Devnet du 16 juillet 2026 couvrent `CreateIdempotent` pour SPL Token classique et +Token-2022, y compris création, réutilisation, replay post-exécution idempotent et ATA Token-2022 +avec extension `ImmutableOwner`. Elles couvrent aussi un `RecoverNested` classique contrôlé : le +solde brut a été transféré vers l'ATA wallet, le compte nested a été fermé et les deux faits +lifecycle/risk ont été matérialisés sans dupliquer les CPI SPL Token. Le décodage général des +instructions et extensions Token-2022 reste réservé à `0.4.6`. + +### Token-2022 — audit initial `0.4.6-pre.001` + +Le catalogue workspace déclare `spl-token-2022-interface ^3.1` avec `serde` et +`spl-elgamal-registry-interface ^0.2` sans feature additionnelle. La résolution opérateur confirme +respectivement `3.1.1` avec `default + serde` et `0.2.1` avec `default`, consommées par +`kb_decoder_spl_token_2022` pour poursuivre l'audit. La matrice inventorie 48 tags de premier +niveau et 29 types TLV de production, dont le récent `PermissionedBurnExtension` `46` et son TLV +`PermissionedBurn` `28`. + +Les sous-discriminants, comptes, layouts, tailles, builders et processors restent explicitement +`pending`. L'interface ElGamal `0.2.1` confirme le Program ID +`regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg` et la seed PDA `elgamal-registry`. Le registre +garde toutefois une matrice, un dispatch et une politique d'exécution séparés du programme natif +ZK ElGamal Proof. Les TLV Token Metadata/Token Group et les pointeurs Transfer Hook ne donnent +aucun Program ID universel aux programmes externes qui implémentent ces interfaces. + +L'interface Token-2022 `3.1.1` publie le commit exact +`e18f9c6f9bf6044b934f48e3090e8e59e4820f02` (`interface@v3.1.1`). Au même commit, le processor +porte la version `11.0.0` et son lock source résout Token Group `0.7.2`, Token Metadata `1.0.0` et +le registre ElGamal `0.2.1`. Son dispatch tente d'abord les 48 tags Token-2022, puis les cinq +discriminants Token Metadata et les quatre discriminants Token Group. Cette incorporation ne donne +pas de Program ID universel aux interfaces : elle décrit seulement leur exécution directe par +Token-2022. L'égalité avec les binaires cluster reste à prouver séparément. + +Le `Cargo.lock` opérateur confirme le graphe réellement consommé par l'interface `3.1.1` : ZK +ElGamal Proof `0.1.3`, extraction de preuve confidentielle `0.6.1`, Token Group `0.7.2`, Token +Metadata `1.0.1` et TLV `0.9.1`. Token Metadata apparaît directement sous +`spl-token-2022-interface` dans `cargo tree -p ... -e features`. Le processor source `11.0.0` +audité figeait encore Token Metadata `1.0.0`. La publication officielle `1.0.1` ne change ni wire, +ni discriminant, ni builder : elle ajoute seulement, avant Borsh, une validation bornée des +longueurs de chaînes de `Initialize`, `UpdateField` et `RemoveKey`. Cette garde plus sûre devient +normative pour le décodeur ; `UpdateAuthority` et `Emit` restent sans chaîne. + +### ZK ElGamal Proof + +`kb_decoder_solana_core` consomme directement `solana-zk-elgamal-proof-interface ^0.1`. L’enum `ProofInstruction` fournit les treize discriminants et les types de `proof_data` fournissent les tailles `Pod` exactes pour séparer le contexte du corps de preuve inline. Le runtime Agave reste la source normative pour la sélection entre preuve inline et preuve stockée dans un compte, les positions de comptes optionnels et l’acceptation des octets suffixes de `CloseContextState`. + +Aucune dépendance à `bytemuck` n’est ajoutée directement : le décodeur ne convertit pas les octets en preuve cryptographique et n’appelle aucun vérificateur. Il utilise uniquement `size_of` sur les types officiels, puis conserve longueur, SHA-256 et préfixe borné. Le contenu d’un compte de preuve externe n’est pas récupéré par RPC pendant un replay historique. + +### ZK Token Proof historique + +`kb_decoder_solana_core` ne dépend plus de `solana-zk-token-sdk`. Cette crate historique est dépréciée et entraînait `bincode` transitivement. Le workspace conserve une table wire locale limitée aux tags `0..16`, aux tailles exactes de contexte/preuve et à l’offset `u32 LE`, auditée contre la version historique `3.1.14`; aucun code de preuve ni sérialiseur historique n’est recopié. + +Le comportement est documenté depuis deux références runtime distinctes : Agave `v2.0.0` pour le vérificateur historique et Agave `v4.1.1` pour le stub actuel sans effet. Aucun corpus mainnet n’ayant été observé, les tests sont synthétiques et n’exigent pas de backfill. + +### Stake Program + +`solana-stake-interface 4.3.1` publie `StakeInstruction` avec Serde et conserve ses builders derrière la feature `bincode`. La feature `wincode` fournit les schémas nécessaires aux types d’état, mais pas directement à l’enum d’instruction. Le décodeur et l’exécuteur consomment donc l’ID et les types sémantiques officiels, avec un miroir wire privé commun dans son ordre de variantes et de champs. Aucun helper `bincode` n’est activé. + +L’exécuteur reproduit les vingt-quatre helpers clients actuels : initialize/create, checked/seed, split/merge, create-and-delegate, quatre authorize, delegate, withdraw, deactivate, lockup, minimum delegation, delinquent deactivation et move. Les helpers `redelegate` et `redelegate_with_seed` sont explicitement exclus parce que la source officielle les marque dépréciés et « will not be enabled » ; ils restent uniquement dans le miroir historique du décodeur. + +Le contrat des comptes est aligné sur les builders officiels. Les contrôles stateful du processor BPF — état de compte, rent, epochs, compatibilité et autorités courantes — restent à l’orchestration localnet/devnet. + +### Config Program + +`solana-config-interface 2.x` expose son module d’instruction derrière sa feature `bincode`. Le décodeur et l’exécuteur conservent donc un wire local borné pour `ConfigKeys` : compact-u16 canonique, booléens stricts, ordre exact des signataires, rejet des doublons et payload métier opaque. Le builder de création reproduit la taille `max_config_space + serialized_size(ConfigKeys)` et l’initialisation `ConfigKeys vide + T::default()` à partir d’octets déjà sérialisés ; il n’active aucun helper `bincode`. + +### BPF Loader v2 + +`solana-loader-v2-interface 3.x` publie ses helpers d’instruction derrière `bincode`. Le décodeur conserve le layout local vérifié tant qu’aucun schéma officiel `wincode` n’est disponible. + +### Feature Gate + +`solana-feature-gate-interface 4.x` publie la séquence d’activation `transfer -> allocate -> assign` et `RevokePendingActivation`, mais les helpers restent derrière sa feature `bincode`. L’exécuteur utilise `Feature::size_of()` et reproduit ces instructions à partir des interfaces System étroites ; la révocation reste exactement `vec![0]` avec feature, incinerator et System Program dans l’ordre officiel. + +### Slashing Program + +La source normative est SIMD-0204 et le contrat du programme Slashing publié : deux instructions, un payload DuplicateBlockProof de 305 octets, un report PDA dérivé de `node_pubkey + slot LE + type`, et une instruction Ed25519 précédente dont les offsets pointent vers le payload Slashing. Aucune crate de sérialisation générale n’est nécessaire. L’exécuteur construit le plan atomique et laisse au pipeline stateful le compte de preuve, le rent et les fenêtres epoch. + +### ZK ElGamal Proof dans l’exécuteur + +`kb_executor_solana_core` dépend directement de `solana-zk-elgamal-proof-interface ^0.1` pour les types POD et leurs tailles. Les layouts d’instruction sont simples et officiels : discriminant + preuve inline, ou discriminant + offset `u32 LE`; les comptes de contexte suivent `ContextStateInfo`. La fermeture reproduit le builder officiel. Aucune vérification cryptographique n’est recalculée côté client. + +### Loaders v3 et v4 + +La migration Loader v3 est terminée dans `pre.020` : le décodeur utilise `wincode::deserialize_exact` et l’exécuteur utilise les helpers officiels de `solana-loader-v3-interface 8.x`. Les payloads tronqués, suffixés, les longueurs et les contrats de comptes restent bornés par les tests. + +Loader v4 conserve un parser et un constructeur locaux limités aux sept discriminants publiés. Le layout est suffisamment petit pour être audité explicitement : tag `u32 LE`, `Write { offset, Vec }`, `Copy { destination_offset, source_offset, length }`, `SetProgramLength { new_size }` et quatre variantes unitaires. Cette exception évite d’activer `bincode` uniquement pour appeler les helpers de l’interface. + +## `solana-sdk` + +`solana-sdk` avec la feature `full` peut rester disponible au niveau workspace pour les applications ou outils qui ont réellement besoin de l’agrégat complet. Les crates feuille doivent préférer les interfaces étroites afin de réduire les features transitives, les temps de compilation et les risques de dépendances inutilisées. + +## Vérification avant ajout + +Pour chaque nouvelle interface : + +1. lire ses features et ses modules réellement compilés ; +2. identifier le format officiel de sérialisation ; +3. confirmer la version compatible avec Agave ciblée ; +4. ajouter la dépendance uniquement à la crate propriétaire ; +5. créer une fixture depuis l’encodeur officiel lorsque disponible ; +6. tester les payloads tronqués, inconnus, suffixés et les comptes invalides ; +7. documenter toute divergence entre l’interface et le runtime. + +### Metaplex Token Metadata — audit et premier décodage `0.4.7-pre.002` + +Le catalogue workspace déclare `mpl-token-metadata ^5.1` avec la seule feature `serde`. La publication officielle résolue reste `5.1.1`; elle fournit les modules générés `accounts`, `instructions`, `types` et `errors` issus de l’IDL Metaplex, sans introduire Anchor. La crate officielle utilise Borsh `< 1.0`; le décodeur référence donc explicitement `borsh 0.10` sous l’alias workspace `borsh_0_10`, distinct de Borsh 1.x utilisé par d’autres interfaces du workspace. + +Le dépôt officiel `metaplex-foundation/mpl-token-metadata` confirme le Program ID `metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s`. L’IDL officiel audité porte la version `1.14.0` et le blob `5df4a24f62c2743125be096cc174680790c92c18`; l’inventaire Rust généré des instructions porte le blob `3c42eec629f82e44ba690a7c4bd2177cc78f1d49`. + +`kb_decoder_metadata_metaplex_token_metadata` implémente désormais `InstructionDecoder` pour `CreateMetadataAccountV3` et `UpdateMetadataAccountV2`. Les arguments sont lus avec les types Borsh officiels et projetés avec la feature `serde`; les payloads, chaînes, créateurs, frais, comptes et suffixes sont bornés. L’enregistrement dans le registre runtime reste différé jusqu’à validation de ce premier groupe. Les metadata Token-2022 incorporées, Metaplex Core, Bubblegum et le JSON externe restent des provenances ou composants distincts. + diff --git a/olddocs/archivekbot2/docs/SOLANA_NATIVE_RPC_CLOSURE_AUDIT.md b/olddocs/archivekbot2/docs/SOLANA_NATIVE_RPC_CLOSURE_AUDIT.md new file mode 100644 index 0000000..5341fe4 --- /dev/null +++ b/olddocs/archivekbot2/docs/SOLANA_NATIVE_RPC_CLOSURE_AUDIT.md @@ -0,0 +1,106 @@ + + + +# Audit de clôture native, exécution et RPC — `0.4.2` + +## Décision + +Le jalon `0.4.2` est clôturé. L’audit distingue quatre contrats indépendants : + +1. les opérations futures constructibles par `kb_executor_solana_core` ; +2. les instructions passées décodables par `kb_decoder_solana_core` ; +3. les méthodes standard HTTP/WebSocket exposées par `kb_rpc` ; +4. l’orchestration de sécurité, de simulation, d’envoi et de replay post-exécution. + +Une méthode transportable via JSON brut n’est pas considérée comme un adaptateur typé. Un builder stateless n’autorise pas à lui seul une opération dépendant d’un compte, d’une autorité, du rent, d’un slot ou d’un epoch. Une opération dangereuse peut être complète dans la bibliothèque tout en restant absente de l’UI et désactivée sur Mainnet. + +## Résultat synthétique + +| Domaine | Inventaire canonique | Contrat final `0.4.2` | +|-------------------------|-------------------------------------------------------------------------:|------------------------------------------------------------------------------------------------| +| Exécuteur natif | 18 surfaces, 14 appelables, 4 non invocables/historiques, 109 opérations | égalité imposée par test Rust ; builders comparés aux interfaces ou layouts officiels | +| Décodeur natif | 18 surfaces, 121 déclarations | égalité imposée avec `kb_program_ids::native_program_ids()` et `SolanaCoreDecoder::coverage()` | +| HTTP JSON-RPC | 52 méthodes | 52 contrats typés configurables, 0 méthode standard limitée au JSON brut | +| WebSocket JSON-RPC | 9 paires / 18 méthodes | 9 requêtes, 9 notifications et 9 runtimes persistants typés | +| Préflight stateful | ALT, Config, Feature, Slashing, ZK ElGamal | rapports `NotRequired` / `Ready` / `Blocked`, Localnet/Devnet uniquement | +| Parcours mutable validé | System transfer Devnet | simulation, signature, envoi, confirmation, canonical, core et decode replay réussis | + +## Exécuteur Solana Core + +`docs/NATIVE_SOLANA_EXECUTION_MATRIX.json` et `SOLANA_CORE_OPERATION_CODES` imposent : + +- exactement 18 surfaces ; +- exactement 14 surfaces appelables et 4 surfaces sans instruction client ; +- exactement 109 codes d’opération uniques ; +- Program IDs présents dans `kb_program_ids` ; +- contrat de construction, politique, tests, validation cluster et décision UI pour chaque opération ; +- distribution des préflights `27 none / 14 required / 68 future`. + +Les surfaces sans builder client sont BPF Loader v1, BPF Loader v2, Native Loader et l’ancien ZK Token Proof Program. Stake `Redelegate` reste historique `decode-only`. Cette classification évite d’inventer des instructions qui ne sont plus ou n’ont jamais été appelables par un client moderne. + +Les entrées `future` ne signifient pas « non implémenté ». Elles signifient que le wire et le plan sont couverts offline, mais que l’activation mutable exige encore une preuve stateful par scénario sur Localnet/Devnet. Aucune de ces opérations n’est activée sur Mainnet par `0.4.2`. + +## Décodeur Solana Core + +`docs/NATIVE_SOLANA_DECODER_MATRIX.json` couvre exactement les 18 surfaces du registre natif et 121 déclarations. Les tests de complétude parcourent les enums officielles ou les tables wire auditées pour System, Compute Budget, ALT, Stake, Vote, loaders, précompiles, Slashing et preuves ZK. + +Stake Config reste un compte bien connu non exécutable. Il ne possède ni dispatch d’instruction ni plan d’exécution. + +## HTTP JSON-RPC standard + +`docs/SOLANA_STANDARD_RPC_MATRIX.json` et `STANDARD_HTTP_METHODS` enregistrent 52 méthodes. Chacune possède un contrat de requête/résultat propre à `kb_rpc`. Les options facultatives restent indépendantes : commitment, `minContextSlot`, encodage, `dataSlice`, filtres, contexte, tri, niveau de détail, rewards et version maximale de transaction. + +Les DTO Agave ne font pas partie de l’API publique. La voie JSON brute reste une primitive interne ou d’extension fournisseur, pas un substitut à une méthode standard absente. + +## WebSocket JSON-RPC standard + +Les neuf paires standard possèdent paramètres, notifications et runtime persistant dans `kb_rpc`. `WsSession` fournit : + +- une socket multiplexée ; +- des identifiants locaux stables et distants remappables ; +- unsubscribe explicite ; +- timeouts bornés ; +- ping/pong et fermeture ; +- reconnexion exponentielle bornée ; +- réabonnement ; +- suppression terminale de `signatureSubscribe`. + +`blockSubscribe`, `slotsUpdatesSubscribe` et `voteSubscribe` sont désactivées par défaut, mais activables lorsqu’un endpoint les annonce explicitement. La première souscription réelle sert de probe paresseux. Une réponse `Method not found`, `not enabled`, `unavailable` ou `unsupported` désactive uniquement la capacité concernée pour la session ; les erreurs de paramètres, d’authentification ou de rate limit ne la désactivent pas. + +## Frontière Tauri et TS-rs + +Les payloads actifs de `kb_app_demo` et `kb_config` transmis par JSON utilisent des `number`, pas des `bigint`. Les valeurs d’identifiants sont contrôlées avec `Number.isSafeInteger` avant invocation. Les types génériques hors frontière Tauri conservent leurs contrats exacts lorsqu’ils ne sont pas sérialisés par `JSON.stringify`. + +Le navigateur SQL applique maintenant la limite maximale reçue du backend avant l’appel Tauri. Une valeur supérieure à 5 000 produit un diagnostic frontend et n’atteint plus PostgreSQL. + +## Preuves de validation + +Validations fournies le 13 juillet 2026 : + +| Crate / contrôle | Résultat | +|------------------------------------|----------:| +| `kb_program_ids` | 5 tests | +| `kb_decoder_solana_core` | 116 tests | +| `kb_executor_solana_core` | 88 tests | +| `kb_execution_api` | 22 tests | +| `kb_execution_safety` | 15 tests | +| `kb_execution_solana` | 12 tests | +| `kb_rpc` | 113 tests | +| `kb_pipeline` | 56 tests | +| `kb_config` | 41 tests | +| `kb_app_demo` | 88 tests | +| `kb_store_pg` avec PostgreSQL réel | 45 tests | +| `cargo clippy --all-targets` | propre | + +Le test Devnet opt-in a exécuté un transfert de 1 000 000 lamports avec airdrop nul depuis un wallet préfinancé. Il a confirmé simulation, signature, envoi, confirmation, hydratation canonique, extraction core et decode replay. `cargo tauri dev` a démarré Vite, initialisé les treize tables attendues et exercé les sessions WebSocket. + +L’archive de logs Mainnet/Tauri confirme des unsubscribe réels pour `slot`, `root` et `program`. Le refus de sélectionner un autre endpoint tant qu’une session est active est un garde-fou volontaire. L’ancien échec `JSON.stringify cannot serialize BigInt` n’est plus présent. + +## Limites conservées après clôture + +- Mainnet reste désactivé par défaut et exige une politique explicite. +- Les opérations stateful administratives non exercées sur cluster restent hors UI et bloquées avant toute future activation mutable. +- Le parcours validé utilise une transaction legacy avec recent blockhash ; durable nonce et transactions v0 sont couverts par les bibliothèques mais nécessitent leurs propres parcours opérateur avant exposition. +- Les méthodes WebSocket instables dépendent du nœud et peuvent être désactivées automatiquement à l’exécution. + +La clôture de `0.4.2` n’ouvre aucune version suivante et ne fixe aucun plan de sources historiques externes. diff --git a/olddocs/archivekbot2/docs/SOLANA_STANDARD_RPC_MATRIX.json b/olddocs/archivekbot2/docs/SOLANA_STANDARD_RPC_MATRIX.json new file mode 100644 index 0000000..440df20 --- /dev/null +++ b/olddocs/archivekbot2/docs/SOLANA_STANDARD_RPC_MATRIX.json @@ -0,0 +1,430 @@ +{ + "file": "docs/SOLANA_STANDARD_RPC_MATRIX.json", + "version": 3, + "release": "0.4.2-pre.025", + "canonical_reference": "https://solana.com/docs/rpc", + "http_method_count": 52, + "http_typed_adapter_count": 52, + "http_raw_json_count": 0, + "ws_subscription_pair_count": 9, + "ws_method_count": 18, + "ws_unstable_subscription_count": 3, + "http_methods": [ + { + "method": "getAccountInfo", + "category": "accounts", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getBalance", + "category": "accounts", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getLargestAccounts", + "category": "accounts", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getMinimumBalanceForRentExemption", + "category": "accounts", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getMultipleAccounts", + "category": "accounts", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getProgramAccounts", + "category": "accounts", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getTokenAccountBalance", + "category": "tokens", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getTokenAccountsByDelegate", + "category": "tokens", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getTokenAccountsByOwner", + "category": "tokens", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getTokenLargestAccounts", + "category": "tokens", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getTokenSupply", + "category": "tokens", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getFeeForMessage", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getLatestBlockhash", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getRecentPrioritizationFees", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getSignaturesForAddress", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getSignatureStatuses", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getTransaction", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getTransactionCount", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "isBlockhashValid", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "requestAirdrop", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "sendTransaction", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "simulateTransaction", + "category": "transactions", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getBlock", + "category": "blocks", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getBlockCommitment", + "category": "blocks", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getBlockHeight", + "category": "blocks", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getBlockProduction", + "category": "blocks", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getBlocks", + "category": "blocks", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getBlocksWithLimit", + "category": "blocks", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getBlockTime", + "category": "blocks", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getFirstAvailableBlock", + "category": "blocks", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getRecentPerformanceSamples", + "category": "blocks", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "minimumLedgerSlot", + "category": "blocks", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getClusterNodes", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getEpochInfo", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getEpochSchedule", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getGenesisHash", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "dedicated execution/acquisition adapter plus HttpClient/HttpEndpointPool" + }, + { + "method": "getHealth", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getHighestSnapshotSlot", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getIdentity", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getLeaderSchedule", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getMaxRetransmitSlot", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getMaxShredInsertSlot", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getSlot", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getSlotLeader", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getSlotLeaders", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getVersion", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getVoteAccounts", + "category": "cluster", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getInflationGovernor", + "category": "economics", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getInflationRate", + "category": "economics", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getInflationReward", + "category": "economics", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getStakeMinimumDelegation", + "category": "economics", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + }, + { + "method": "getSupply", + "category": "economics", + "contract": "typed_adapter", + "implementation": "configurable kb_rpc request/result contract plus typed HttpClient/HttpEndpointPool transport" + } + ], + "ws_subscriptions": [ + { + "subscribe_method": "accountSubscribe", + "unsubscribe_method": "accountUnsubscribe", + "notification_method": "accountNotification", + "stability": "stable", + "request_contract": "typed_adapter", + "persistent_runtime": true, + "library_runtime": "kb_rpc::WsSession multiplexing, explicit unsubscribe, bounded reconnect and resubscription", + "notification_contract": "typed_adapter", + "explicit_capability_required": false + }, + { + "subscribe_method": "blockSubscribe", + "unsubscribe_method": "blockUnsubscribe", + "notification_method": "blockNotification", + "stability": "unstable", + "request_contract": "typed_adapter", + "persistent_runtime": true, + "library_runtime": "kb_rpc::WsSession multiplexing, explicit unsubscribe, bounded reconnect and resubscription", + "notification_contract": "typed_adapter", + "explicit_capability_required": true + }, + { + "subscribe_method": "logsSubscribe", + "unsubscribe_method": "logsUnsubscribe", + "notification_method": "logsNotification", + "stability": "stable", + "request_contract": "typed_adapter", + "persistent_runtime": true, + "library_runtime": "kb_rpc::WsSession multiplexing, explicit unsubscribe, bounded reconnect and resubscription", + "notification_contract": "typed_adapter", + "explicit_capability_required": false + }, + { + "subscribe_method": "programSubscribe", + "unsubscribe_method": "programUnsubscribe", + "notification_method": "programNotification", + "stability": "stable", + "request_contract": "typed_adapter", + "persistent_runtime": true, + "library_runtime": "kb_rpc::WsSession multiplexing, explicit unsubscribe, bounded reconnect and resubscription", + "notification_contract": "typed_adapter", + "explicit_capability_required": false + }, + { + "subscribe_method": "rootSubscribe", + "unsubscribe_method": "rootUnsubscribe", + "notification_method": "rootNotification", + "stability": "stable", + "request_contract": "typed_adapter", + "persistent_runtime": true, + "library_runtime": "kb_rpc::WsSession multiplexing, explicit unsubscribe, bounded reconnect and resubscription", + "notification_contract": "typed_adapter", + "explicit_capability_required": false + }, + { + "subscribe_method": "signatureSubscribe", + "unsubscribe_method": "signatureUnsubscribe", + "notification_method": "signatureNotification", + "stability": "stable", + "request_contract": "typed_adapter", + "persistent_runtime": true, + "library_runtime": "kb_rpc::WsSession multiplexing, explicit unsubscribe, bounded reconnect and resubscription", + "notification_contract": "typed_adapter", + "explicit_capability_required": false + }, + { + "subscribe_method": "slotSubscribe", + "unsubscribe_method": "slotUnsubscribe", + "notification_method": "slotNotification", + "stability": "stable", + "request_contract": "typed_adapter", + "persistent_runtime": true, + "library_runtime": "kb_rpc::WsSession multiplexing, explicit unsubscribe, bounded reconnect and resubscription", + "notification_contract": "typed_adapter", + "explicit_capability_required": false + }, + { + "subscribe_method": "slotsUpdatesSubscribe", + "unsubscribe_method": "slotsUpdatesUnsubscribe", + "notification_method": "slotsUpdatesNotification", + "stability": "unstable", + "request_contract": "typed_adapter", + "persistent_runtime": true, + "library_runtime": "kb_rpc::WsSession multiplexing, explicit unsubscribe, bounded reconnect and resubscription", + "notification_contract": "typed_adapter", + "explicit_capability_required": true + }, + { + "subscribe_method": "voteSubscribe", + "unsubscribe_method": "voteUnsubscribe", + "notification_method": "voteNotification", + "stability": "unstable", + "request_contract": "typed_adapter", + "persistent_runtime": true, + "library_runtime": "kb_rpc::WsSession multiplexing, explicit unsubscribe, bounded reconnect and resubscription", + "notification_contract": "typed_adapter", + "explicit_capability_required": true + } + ], + "ws_typed_request_count": 9, + "ws_typed_notification_count": 9, + "ws_persistent_runtime_count": 9 +} diff --git a/olddocs/archivekbot2/docs/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json b/olddocs/archivekbot2/docs/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json new file mode 100644 index 0000000..646a034 --- /dev/null +++ b/olddocs/archivekbot2/docs/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json @@ -0,0 +1,199 @@ +{ + "file": "docs/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json", + "version": 9, + "schemaVersion": 1, + "programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "systemProgramId": "11111111111111111111111111111111", + "supportedTokenPrograms": [ + {"code": "spl_token", "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "scope": "classic_token_account_lifecycle_only"}, + {"code": "spl_token_2022", "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", "scope": "ata_lifecycle_only_without_general_token_2022_instruction_or_extension_decode"} + ], + "interface": { + "workspaceConstraint": "^2.0", + "resolvedVersion": "2.0.0", + "resolutionEvidence": "docs_rs_latest_published_version_and_official_interface_tag", + "workspaceCargoResolutionStatus": "confirmed_by_operator_cargo_tree_2026-07-16", + "features": ["borsh"], + "bincodeEnabled": false, + "officialTag": "interface@v2.0.0", + "releaseCommit": "250da0e21a9853a7afddba85658ed8a9119c71c9", + "releaseDate": "2025-08-08", + "instructionSource": "https://github.com/solana-program/associated-token-account/blob/interface@v2.0.0/interface/src/instruction.rs", + "addressSource": "https://github.com/solana-program/associated-token-account/blob/interface@v2.0.0/interface/src/address.rs", + "publishedDocumentation": "https://docs.rs/spl-associated-token-account-interface/2.0.0/spl_associated_token_account_interface/" + }, + "processor": { + "auditedRelease": "program@v8.0.0", + "releaseCommit": "0b867b5", + "releaseDate": "2025-10-29", + "source": "https://github.com/solana-program/associated-token-account/blob/program@v8.0.0/program/src/processor.rs", + "deploymentBinaryEquality": {"localnet": "not_tested", "devnet": "not_proven", "mainnet": "not_proven"}, + "note": "Interface publication, processor source, cluster deployment and successful execution are tracked independently." + }, + "wire": { + "format": "Borsh enum with unit variants encoded as one u8 ordinal", + "strictSuffixPolicy": "reject", + "legacyEmptyCreate": {"decodeSupport": true, "builderEmits": false, "encodingHex": "", "status": "historical_runtime_and_transaction_parser_compatibility_to_be_reconfirmed_by_cluster_corpus"}, + "unknownOrTruncatedPolicy": "bounded diagnostic without lifecycle projection" + }, + "pdaDerivation": { + "programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "seedOrder": ["wallet_address_bytes[32]", "token_program_id_bytes[32]", "mint_address_bytes[32]"], + "algorithm": "Pubkey::find_program_address", + "validationPolicy": "preserve observed address and report exact match or mismatch; never replace an observed account silently", + "differentialVectors": [ + {"wallet": "11111111111111111111111111111111", "mint": "So11111111111111111111111111111111111111112", "tokenProgramId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "expectedAta": "aqxoAhCwpy3oB1BpNw9hL1HdLYLgPpbPjzxDrrQj3Fs", "expectedBump": 254, "evidence": "PublicKey.findProgramAddressSync with the canonical official seed order"}, + {"wallet": "11111111111111111111111111111111", "mint": "So11111111111111111111111111111111111111112", "tokenProgramId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", "expectedAta": "2sZUUBGq1i6aE47ZoxCaCW89jmYm2EXLPPmNMgMDXHMS", "expectedBump": 250, "evidence": "PublicKey.findProgramAddressSync with the canonical official seed order"} + ] + }, + "limits": {"exactVariantCount": 3, "createRequiredAccountCount": 6, "recoverNestedRequiredAccountCount": 7, "maximumDiagnosticBytes": 256, "extraAccounts": "preserved_and_reported; never assigned an invented role"}, + "executionPreflight": { + "clusters": ["localnet", "devnet"], + "programIds": ["associated_token_program", "selected_token_program", "system_program_for_creation"], + "stateChecks": ["mint_exists_initialized_and_owned_by_selected_token_program", "canonical_pda_derivation", "strict_create_absence", "idempotent_absence_or_existing_account_compatibility", "recover_nested_three_account_relationships", "required_signers_available", "payer_balance_covers_rent_plus_fee_ceiling"], + "token2022Boundary": "base Mint and Token Account prefixes are validated while suffix extensions remain opaque; simulation determines extension-dependent runtime acceptance and exact account size", + "simulation": "required_before_signing_or_sending", + "defaultMode": "dry_run" + }, + "surfaceEquality": {"matrixVariantCount": 3, "officialInterfaceVariantCount": 3, "compiledDecoderCoverageStatus": "three_exact_compiled_instruction_declarations_operator_validated", "compiledExecutorCapabilityStatus": "three_exact_current_capabilities_operator_validated", "requiredFinalInvariant": "matrix == official interface enum == decoder coverage == executor capability declarations"}, + "instructions": [ + { + "name": "create", + "discriminant": 0, + "canonicalEncodingHex": "00", + "acceptedDecodeEncodingsHex": ["", "00"], + "status": "current_with_legacy_empty_wire_compatibility", + "accounts": [ + {"position": 0, "role": "funding_account", "signer": true, "writable": true, "expectedProgram": "system_account"}, + {"position": 1, "role": "associated_token_account", "signer": false, "writable": true, "expectedProgram": "derived_pda_before_creation_or_supported_token_program_after_creation"}, + {"position": 2, "role": "wallet_owner", "signer": false, "writable": false, "expectedProgram": "unconstrained_wallet_address"}, + {"position": 3, "role": "mint", "signer": false, "writable": false, "expectedProgram": "account_owned_by_token_program_at_runtime"}, + {"position": 4, "role": "system_program", "signer": false, "writable": false, "expectedAddress": "11111111111111111111111111111111"}, + {"position": 5, "role": "token_program", "signer": false, "writable": false, "allowedAddresses": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"]} + ], + "addressRules": ["associated_token_account = PDA(wallet_owner, token_program, mint)", "observed associated_token_account is retained on mismatch"], + "tokenProgramDifferences": {"classic": "create and initialize a classic token account", "token2022": "size is obtained from the Token-2022 mint and immutable-owner initialization is performed before account initialization; extensions themselves remain out of decoder scope"}, + "runtimeRules": ["fails if the associated account already exists", "funding account pays rent and creation cost", "mint and created account must be coherent with the selected token program"], + "event": "spl_associated_token_account.create", + "authorizedProjections": ["token_accounts:ata_created"], + "forbiddenProjections": ["token_balance_snapshot", "duplicate_spl_token_initialize_account_cpi", "token_2022_extension_fact"], + "officialBuilder": {"available": true, "function": "create_associated_token_account", "canonicalWireOnly": true}, + "executorSupport": {"status": "supported", "operationCode": "spl_associated_token_account.create", "builder": "create_associated_token_account", "simulation": "required", "defaultMode": "dry_run"}, + "proofs": {"synthetic": ["canonical_00", "legacy_empty", "classic_token_program", "token_2022_program", "wrong_ata", "missing_account", "extra_account", "duplicate_account", "wrong_flags", "unknown_suffix", "outer", "inner_cpi", "committed", "failed_intent"], "localnet": "not_tested", "devnet": "not_tested", "mainnetSignatures": []} + }, + { + "name": "create_idempotent", + "discriminant": 1, + "canonicalEncodingHex": "01", + "acceptedDecodeEncodingsHex": ["01"], + "status": "current", + "accounts": [ + {"position": 0, "role": "funding_account", "signer": true, "writable": true, "expectedProgram": "system_account"}, + {"position": 1, "role": "associated_token_account", "signer": false, "writable": true, "expectedProgram": "derived_pda_or_supported_token_program"}, + {"position": 2, "role": "wallet_owner", "signer": false, "writable": false}, + {"position": 3, "role": "mint", "signer": false, "writable": false}, + {"position": 4, "role": "system_program", "signer": false, "writable": false, "expectedAddress": "11111111111111111111111111111111"}, + {"position": 5, "role": "token_program", "signer": false, "writable": false, "allowedAddresses": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"]} + ], + "addressRules": ["associated_token_account = PDA(wallet_owner, token_program, mint)", "existing account must retain the selected token program, wallet owner and mint"], + "tokenProgramDifferences": {"classic": "existing classic account is accepted only when owner and mint match", "token2022": "existing Token-2022 account is accepted only when owner and mint match; no extension semantics are inferred"}, + "runtimeRules": ["creates when absent", "succeeds without recreating when an initialized compatible ATA already exists", "fails when an existing account has a different wallet owner, mint or account owner program"], + "event": "spl_associated_token_account.create_idempotent", + "authorizedProjections": ["token_accounts:ata_created_or_reused_idempotently"], + "forbiddenProjections": ["token_balance_snapshot", "duplicate_spl_token_initialize_account_cpi", "token_2022_extension_fact"], + "officialBuilder": {"available": true, "function": "create_associated_token_account_idempotent", "canonicalWireOnly": true}, + "executorSupport": {"status": "supported", "operationCode": "spl_associated_token_account.create_idempotent", "builder": "create_associated_token_account_idempotent", "simulation": "required", "defaultMode": "dry_run"}, + "proofs": {"synthetic": ["canonical_01", "absent_account", "compatible_existing_account", "conflicting_existing_owner", "conflicting_existing_mint", "conflicting_existing_program", "classic_token_program", "token_2022_program", "wrong_ata", "wrong_flags", "unexpected_suffix", "outer", "inner_cpi", "committed", "failed_intent"], "localnet": "not_tested", "devnet": ["5Vw4QFpMa8oJ8MsLrvDg4RFzxqUh27mTFRFzzwJFoA4uAry8rZQc6GP92aidzWugn3CeZ5NYNxDp7tZ6bh8XyN1P", "2H9VfhDySdXMteazm2P3s2fTttJBQzMJinQtKqsLtkjDg7zbFFgiWG81UxRQF4va3bbR2pUV4QGo2qErisR8CPbP", "3wWTkx45LoDR3UaU8VUfsWxwHuLFyJyhrnDrmijCa7pXPdmJKz3rQ1LdyDvb78dvNRiKqw5ee7HuZ6Gjj1Gpfv6q", "bMMjoHcwbaTvLXerdQ4kbGXGb7wydiTyvSEwwmoKKLQcRWWBzqGUMYHZztonNnER1iWZ7yKp9p3neeMhypX4QAJ", "4RZKA3KwEbSqgU8UnemTgvd3fBgJmoSK2nmaaTNP8nJGTVh6DrFwrHVZYCBvLFvhvzUdi9p1KRFe4hHqYt7JbVSG"], "mainnetSignatures": ["2F9RvuCkevfJN7ju252hAWoCE58wagCXCWHQF9Wsdtsxvp3HcuNJQFCwU7zGqe3z3b8pv3vPp4xY5EH7KLcaHQCY"], "realCorpusStatus": "controlled classic and Token-2022 CreateIdempotent creation then compatible-existing reuse confirmed, materialized once per signature and replayed idempotently; search-discovered Token-2022 outer transaction remains additional corpus"} + }, + { + "name": "recover_nested", + "discriminant": 2, + "canonicalEncodingHex": "02", + "acceptedDecodeEncodingsHex": ["02"], + "status": "current_recovery_operation", + "accounts": [ + {"position": 0, "role": "nested_associated_token_account", "signer": false, "writable": true}, + {"position": 1, "role": "nested_mint", "signer": false, "writable": false}, + {"position": 2, "role": "wallet_nested_mint_associated_token_account", "signer": false, "writable": true}, + {"position": 3, "role": "owner_associated_token_account", "signer": false, "writable": false}, + {"position": 4, "role": "owner_mint", "signer": false, "writable": false}, + {"position": 5, "role": "wallet_owner", "signer": true, "writable": true}, + {"position": 6, "role": "token_program", "signer": false, "writable": false, "allowedAddresses": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"]} + ], + "addressRules": ["owner_associated_token_account = PDA(wallet_owner, token_program, owner_mint)", "nested_associated_token_account = PDA(owner_associated_token_account, token_program, nested_mint)", "wallet_nested_mint_associated_token_account = PDA(wallet_owner, token_program, nested_mint)"], + "tokenProgramDifferences": {"classic": "transfer the complete nested balance and close the nested classic token account", "token2022": "same ATA address relationships through Token-2022 CPIs; extension-specific transfer or close restrictions can prevent recovery and are not decoded as ATA facts"}, + "runtimeRules": ["all three derived addresses must match their observed accounts", "owner and nested token accounts must be initialized and coherent with their respective mints", "wallet owner must sign", "complete nested token balance is moved to the wallet destination ATA", "nested account is closed and its lamports are returned to the wallet"], + "event": "spl_associated_token_account.recover_nested", + "authorizedProjections": ["token_accounts:nested_ata_recovered", "risk:nested_ata_anti_pattern_recovered"], + "forbiddenProjections": ["duplicate_spl_token_transfer_cpi", "duplicate_spl_token_close_account_cpi", "token_balance_snapshot", "token_2022_extension_fact"], + "officialBuilder": {"available": true, "function": "recover_nested", "canonicalWireOnly": true}, + "executorSupport": {"status": "supported", "operationCode": "spl_associated_token_account.recover_nested", "builder": "recover_nested", "simulation": "required", "defaultMode": "dry_run"}, + "proofs": {"synthetic": ["canonical_02", "classic_token_program", "token_2022_program", "valid_three_pda_relationships", "wrong_nested_ata", "wrong_destination_ata", "wrong_owner_ata", "owner_and_nested_mints_not_inverted", "missing_account", "extra_account", "duplicate_account", "wrong_flags", "unexpected_suffix", "outer", "inner_cpi", "committed", "failed_intent"], "localnet": "not_tested", "devnet": ["37LG6GdMRp5ECG8qf1RSYxmriJk75UtCwqwzXZWpArebkKo6BQvGhYEnbDh2A6KWiUaHK28Zy1gGGZ5zihvrHskM"], "mainnetSignatures": [], "realCorpusStatus": "controlled classic RecoverNested confirmed with positive raw balance transfer, nested ATA closure, owner and destination post-validation, two distinct ATA lifecycle and risk projections, and idempotent second replay", "controlledDevnetFixture": {"walletOwner": "DwuAapPLg6pEJ4QhmxvPg8rzkavmYdg5FW4dfEMcg8B2", "ownerMint": "So11111111111111111111111111111111111111112", "ownerAssociatedTokenAccount": "3tdXq1W7vEbbkxQmT1r2fc349uYti98zpwLKhp7FFbF5", "nestedMint": "3fd5CqP1w4Y1xeMoAe3apA7Jf5SbL3vboxv7ihyXhC9A", "nestedAssociatedTokenAccount": "AAyvGeKpq6i3kxMcScJLcN2u5iyAsspr731LhgXygti5", "walletNestedMintAssociatedTokenAccount": "69TP2QoSx2inueFAEb6npjumH5o3wGJQDSwwAJLLfyWp", "rawAmountTransferred": "1000000000", "nestedAccountClosed": true, "destinationUiBalanceAfter": "1", "materializedOutputCount": 2}} + } + ], + "offlineCorpus": { + "status": "implemented_and_operator_validated_in_decoder_unit_tests", + "wire": ["create_00", "legacy_empty_create", "create_idempotent_01", "recover_nested_02", "unknown_tag", "rejected_suffix"], + "tokenPrograms": ["spl_token_classic", "token_2022"], + "locations": ["outer", "inner_cpi"], + "transactionOutcomes": ["committed", "failed_uncommitted_intent"], + "accountShapes": ["canonical", "missing", "extra", "duplicate", "wrong_flags", "wrong_derived_address", "unsupported_token_program", "wrong_system_program"], + "derivation": ["create_single_pda", "recover_nested_three_independent_pda_relationships", "official_helper_differential_vectors"], + "limits": "diagnostic count and payload prefix are bounded; no arbitrary payload or account repair" + }, + "materializationContract": { + "committedOnly": true, + "idempotenceIdentity": "signature + instruction_path + program_id + normalized_operation + ata", + "projectionOwners": [ + { + "crate": "kb_materializer_token_accounts", + "facts": [ + "ata_created", + "ata_created_or_reused_idempotently", + "nested_ata_recovered" + ], + "justification": "ATA creation and recovery are stable token-account lifecycle facts; this crate already owns instruction-level token-account mutations." + }, + { + "crate": "kb_materializer_risk", + "facts": [ + "nested_ata_anti_pattern_recovered" + ], + "justification": "A committed RecoverNested proves the distinct stable risk fact that a nested ATA anti-pattern existed and was recovered; no score or speculative severity is added." + } + ], + "explicitNoProjection": [ + { + "crate": "kb_materializer_lifecycle", + "reason": "Native program lifecycle remains owned here; duplicating ATA lifecycle would overlap kb_materializer_token_accounts." + }, + { + "crate": "kb_materializer_admin", + "reason": "ATA instructions do not change a mint authority, freeze authority, close authority or multisig configuration." + }, + { + "crate": "kb_materializer_fees", + "reason": "ATA wire does not prove an exact rent or network-fee amount; core balance changes and execution validation retain those facts." + } + ], + "implementationStatus": "pre_004 executor and stateful preflight operator validated; pre_005 classic and Token-2022 CreateIdempotent Devnet orchestration plus Tauri validated; pre_006 classic RecoverNested Devnet orchestration validated", + "idempotentOutcomeLimit": "CreateIdempotent parent proves successful ensure semantics but cannot distinguish created from reused without sibling CPI correlation; the projection preserves created_or_reused and invents neither boolean.", + "parentChildOwnership": "ATA parent owns only associated-address lifecycle and the distinct nested-ATA risk fact; SPL Token or Token-2022 CPI observations own token initialize, transfer and close mutations.", + "noSnapshotClaim": true, + "databaseMigrationStatus": "not_justified" + }, + "executionContract": {"simulationRequired": true, "dryRunDefault": true, "clusterPolicyOwnedByCommonLayers": true, "rentAndFeeCeilingRequired": true, "signerDeduplicationDoesNotChangeMetaOrder": true, "confirmedStateReadRetryBound": 20, "canonicalHydrationRpcRetryBoundPerAttempt": 2, "postValidation": {"create": "ATA exists, is owned by selected token program, and contains expected wallet owner and mint", "createIdempotent": "same invariant whether the ATA was created or reused", "recoverNested": "owner ATA and destination remain coherent, nested ATA is absent, and no balance value is invented by ATA projection"}}, + "deploymentAudit": { + "localnet": {"status": "not_tested", "evidence": []}, + "devnet": {"status": "classic and Token-2022 CreateIdempotent creation and compatible-existing reuse confirmed; classic RecoverNested positive-balance recovery confirmed", "evidence": ["5Vw4QFpMa8oJ8MsLrvDg4RFzxqUh27mTFRFzzwJFoA4uAry8rZQc6GP92aidzWugn3CeZ5NYNxDp7tZ6bh8XyN1P", "2H9VfhDySdXMteazm2P3s2fTttJBQzMJinQtKqsLtkjDg7zbFFgiWG81UxRQF4va3bbR2pUV4QGo2qErisR8CPbP", "3wWTkx45LoDR3UaU8VUfsWxwHuLFyJyhrnDrmijCa7pXPdmJKz3rQ1LdyDvb78dvNRiKqw5ee7HuZ6Gjj1Gpfv6q", "bMMjoHcwbaTvLXerdQ4kbGXGb7wydiTyvSEwwmoKKLQcRWWBzqGUMYHZztonNnER1iWZ7yKp9p3neeMhypX4QAJ", "4RZKA3KwEbSqgU8UnemTgvd3fBgJmoSK2nmaaTNP8nJGTVh6DrFwrHVZYCBvLFvhvzUdi9p1KRFe4hHqYt7JbVSG", "37LG6GdMRp5ECG8qf1RSYxmriJk75UtCwqwzXZWpArebkKo6BQvGhYEnbDh2A6KWiUaHK28Zy1gGGZ5zihvrHskM"], "controlledToken2022Fixture": {"mint": "3DxKAUfCZkR9oRfMXeRNpiVL464eKbTieymBrVhsoKTE", "mintOwner": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", "mintBaseLength": 82, "walletOwner": "DwuAapPLg6pEJ4QhmxvPg8rzkavmYdg5FW4dfEMcg8B2", "associatedTokenAccount": "6WfCJPt7GZQyMJAUS1AMHJrD7Vid8e9xUEQVgi5Q9C9Y", "accountLength": 170, "accountExtension": "immutable_owner", "creationSlot": 476702448, "existingReuseSlot": 476703343}}, + "mainnet": {"status": "search_discovered_token_2022_create_idempotent_not_yet_replayed", "evidence": ["2F9RvuCkevfJN7ju252hAWoCE58wagCXCWHQF9Wsdtsxvp3HcuNJQFCwU7zGqe3z3b8pv3vPp4xY5EH7KLcaHQCY"]}, + "rateLimitRecovery": "preserve confirmed signatures and resume bounded hydration; never recreate accounts blindly after HTTP 429" + }, + "nonClaims": [ + "No general Token-2022 instruction or extension decoding is implemented in 0.4.5.", + "No Token balance or final account snapshot is reconstructed from ATA instructions.", + "No cluster binary equality is inferred from interface publication.", + "The controlled Token-2022 proof covers ATA lifecycle only and does not claim general Token-2022 instruction or extension decoding.", + "No dedicated SQL table is justified by this audit tranche." + ] +} diff --git a/olddocs/archivekbot2/docs/SPL_ELGAMAL_REGISTRY_MATRIX.json b/olddocs/archivekbot2/docs/SPL_ELGAMAL_REGISTRY_MATRIX.json new file mode 100644 index 0000000..2320573 --- /dev/null +++ b/olddocs/archivekbot2/docs/SPL_ELGAMAL_REGISTRY_MATRIX.json @@ -0,0 +1,121 @@ +{ + "file": "docs/SPL_ELGAMAL_REGISTRY_MATRIX.json", + "version": 1, + "programId": "regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg", + "interface": { + "crate": "spl-elgamal-registry-interface", + "resolvedVersion": "0.2.1", + "auditedCommitPrefix": "e18f9c6" + }, + "technicalBoundaries": { + "token2022ProgramId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "zkElgamalProofProgramId": "ZkE1Gama1Proof11111111111111111111111111111", + "registryDecodesProofInstructions": false, + "token2022DecoderOwnsRegistryInstructions": false + }, + "pda": { + "seedUtf8": "elgamal-registry", + "ownerAddressIsSeed": true, + "programIdIsDerivationProgram": true + }, + "instructions": [ + { + "name": "create_registry", + "tag": 0, + "wire": { + "exactLengthBytes": 2, + "fields": [ + { + "name": "tag", + "type": "u8", + "value": 0 + }, + { + "name": "proofInstructionOffset", + "type": "i8" + } + ] + }, + "accounts": [ + { + "position": 0, + "role": "registry_account", + "writable": true, + "signer": false + }, + { + "position": 1, + "role": "wallet_owner", + "writable": false, + "signer": true + }, + { + "position": 2, + "role": "system_program", + "writable": false, + "signer": false + }, + { + "position": 3, + "role": "instructions_sysvar_or_proof_context", + "writable": false, + "signer": false + } + ], + "builder": "create_registry", + "status": "current" + }, + { + "name": "update_registry", + "tag": 1, + "wire": { + "exactLengthBytes": 2, + "fields": [ + { + "name": "tag", + "type": "u8", + "value": 1 + }, + { + "name": "proofInstructionOffset", + "type": "i8" + } + ] + }, + "accounts": [ + { + "position": 0, + "role": "registry_account", + "writable": true, + "signer": false + }, + { + "position": 1, + "role": "instructions_sysvar_or_proof_context", + "writable": false, + "signer": false + }, + { + "position": 2, + "role": "registry_owner", + "writable": false, + "signer": true + } + ], + "builder": "update_registry", + "status": "current" + } + ], + "proofLocationSemantics": { + "offsetZero": "context_state_account", + "offsetNonZero": "relative_zk_proof_instruction", + "publishedInlineBuilderOffset": 1 + }, + "decoder": { + "crate": "kb_decoder_spl_elgamal_registry", + "coverageEqualityRequired": true, + "unknownTagPolicy": "failed", + "trailingBytesPolicy": "failed", + "failedTransactionCommitted": false + } +} diff --git a/olddocs/archivekbot2/docs/SPL_MEMO_MATRIX.json b/olddocs/archivekbot2/docs/SPL_MEMO_MATRIX.json new file mode 100644 index 0000000..5a14217 --- /dev/null +++ b/olddocs/archivekbot2/docs/SPL_MEMO_MATRIX.json @@ -0,0 +1,266 @@ +{ + "file": "docs/SPL_MEMO_MATRIX.json", + "version": 8, + "matrixVersion": 4, + "scope": "SPL Memo v1, v3 et v4", + "interface": { + "crate": "spl-memo-interface", + "requestedVersion": "^2.1", + "auditedPublishedVersion": "2.1.0", + "lockfilePresentInInputArchive": false, + "builder": "spl_memo_interface::instruction::build_memo", + "builderAcceptsExplicitProgramId": true, + "wire": "octets exacts du message, sans préfixe ni discriminator", + "accountMetas": "ordre fourni, readonly, signer=true" + }, + "generations": [ + { + "generation": "v1", + "programId": "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo", + "surfaceCode": "spl_memo_v1", + "status": "historique immuable", + "instructionData": "octets UTF-8 bruts", + "emptyPayload": "accepte", + "accounts": "acceptes mais ignores par le runtime v1", + "signerRequirement": "aucune", + "accountOrder": "sans effet runtime mais conserve par le decodeur", + "duplicateAccounts": "sans effet runtime mais conserves par le decodeur", + "runtimeLogs": [], + "utf8Failure": "InvalidInstructionData", + "builderOfficial": "builder generique 2.1.0 avec program ID v1 explicite", + "currentInvocation": { + "mainnet": "transactions reelles observees et rejouees; aucun envoi execute dans cette tranche", + "devnet": "non verifie", + "localnet": "binaire historique non embarque" + }, + "realCorpusSignatures": [ + "imGSCgR83S3tFPTcZPqWLWRcL1piFX1vkYMRVsRdJeBM4p7viDb4V6Hq2x51ovTmbMgGBMdn8kyeNiAg9Ph6MfE", + "65J2cmiZAB5h7B3kyzhponNZQzMCbbxVn1A8cydvKKq1FYxYLEarG7ydjuuxFatXCG7Foju21XMUdRkT96jYBS3C" + ] + }, + { + "generation": "v3", + "programId": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr", + "surfaceCode": "spl_memo_v3", + "status": "historique encore largement observe", + "instructionData": "octets UTF-8 bruts", + "emptyPayload": "accepte", + "accounts": "zero ou plusieurs; chaque compte fourni doit etre signer", + "signerRequirement": "tous les comptes fournis", + "accountOrder": "ordre de parcours et de logs conserve", + "duplicateAccounts": "parcourus et journalises dans leur ordre; aucun rejet dedie", + "runtimeLogs": [ + "Signed by pour chaque compte signer", + "Invalid UTF-8, from byte en cas d'erreur", + "Memo (len ): en cas de succes" + ], + "utf8Failure": "InvalidInstructionData", + "missingSignerFailure": "MissingRequiredSignature avant validation UTF-8", + "builderOfficial": "builder generique 2.1.0 avec program ID v3 explicite", + "currentInvocation": { + "mainnet": "transactions reelles observees et rejouees; aucun envoi execute dans cette tranche", + "devnet": "non verifie", + "localnet": "possible avec binaire officiel, non execute" + }, + "realCorpusSignatures": [ + "2DkiJJVAyJ1aJHn2ff8JhKA5C8wbakw76LZvgxmcQ1qtHNDprGvA6TntXXK5FSAeRMZyrDt8ujAkGMgBVcEhjsmT", + "3G18ZUSP29Aw12NwnAYRYgix87fa559nMzaBa3LSkCQZjJ5AYEjSDnQHLbgU3QZax2efmeJHdxu1LamSCxCJzg37" + ] + }, + { + "generation": "v4", + "programId": "Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH", + "surfaceCode": "spl_memo_v4", + "status": "generation courante publiee avec implementation Pinocchio", + "instructionData": "octets UTF-8 bruts", + "emptyPayload": "accepte", + "accounts": "zero ou plusieurs; chaque compte fourni doit etre signer", + "signerRequirement": "tous les comptes fournis", + "accountOrder": "ordre de parcours et de logs conserve", + "duplicateAccounts": "aucun rejet dedie prouve; ordre et doublons conserves", + "runtimeLogs": [ + "signataires puis diagnostic UTF-8 ou memo selon l'implementation officielle" + ], + "utf8Failure": "InvalidInstructionData", + "missingSignerFailure": "MissingRequiredSignature avant validation UTF-8", + "builderOfficial": "builder generique 2.1.0 avec program ID v4 explicite", + "currentInvocation": { + "mainnet": "transactions reelles observees et rejouees; aucun envoi execute dans cette tranche", + "devnet": "simulation et trois executions v4 confirmees avec post-validation complete le 2026-07-15", + "localnet": "binaire officiel disponible, non execute" + }, + "realCorpusSignatures": [ + "2vgR56q2NR6ehu1uNnpt3te3RqhX2sXryXi4SpBHKUyVaeERr1HLYSLvDFRzd3eDeNejjLX9hVZJZ5GvtsTtBr1c", + "53aHhj6rt77hCkadHedpWS7GstdER5XqQrHDutZ7gAQrDvAxcDcktrUtwxZcCbTV2FnLzELqfwoJgvabjdLPWkQ5", + "3NxmPdF9W3GBiD8qF2VzvUhEDrTM48EEkaosTtzVceRhQc4sGEojDFppBsXYgqK9GCrCUo4wzAWciprsqZEmRyee", + "2njzDJUBar6TTPPcuwEDdkiW8kVLUsZXfdvUQNP7TC6La44E4kZtLFfdJ1Q8nPNJbKa9Vuby4TtiuLX2rQQTa65C" + ] + } + ], + "decoderContract": { + "maximumRetainedPayloadBytes": 4096, + "diagnosticHexPrefixBytes": 32, + "completeTextRetainedWhenUtf8Valid": true, + "failedTransactionRuntimeValidation": "not_proven_transaction_failed", + "failedTransactionCommitted": false, + "unknownProgramProducesObservation": false + }, + "materializationContract": { + "crate": "kb_materializer_transaction_annotations", + "processorName": "transaction_annotations", + "materializedFamily": "transaction_annotation", + "acceptedEntries": ["add_memo", "memo_intent", "invalid_memo_attempt"], + "projectedEntry": "add_memo", + "transactionPolicy": "SuccessfulCommittedOnly", + "failedOrUncommittedOutput": false, + "store": "kb_sol_mat_events", + "newMigrationRequired": false, + "idempotence": "ledger processor/version/input hash plus deterministic output key", + "readModel": { + "contract": "DecodePipelineStore.list_materialized_events", + "demo": "demo_decode_replay transaction annotation journal", + "boundedMaximumRows": 500, + "filters": ["processor exact", "family exact", "partial signature"], + "visualization": "table journal, not OHLC" + }, + "decodedOnlyFields": [ + "complete accounts and writable flags", + "payload hex diagnostic prefix", + "UTF-8 error offset", + "transaction error", + "decoder proof" + ] + }, + "executorContract": { + "crate": "kb_executor_spl_memo", + "operationCode": "spl_memo.add_memo", + "typedIntent": "SplMemoExecutionIntent", + "officialBuilder": "spl_memo_interface::instruction::build_memo", + "supportedGenerations": ["v4"], + "decodeOnlyGenerations": ["v1", "v3"], + "maximumMessageBytes": 566, + "maximumSignerOccurrences": 32, + "preserveSignerOrderAndDuplicates": true, + "inventWritableAccounts": false, + "requestedSpendLamports": 0, + "simulationRequired": true, + "dryRunDefault": true, + "allClustersConstructible": true, + "historicalGenerationSendEnabled": false, + "mainnetSendGovernedByCommonPolicy": true, + "clusterAvailabilityProvenBySimulation": true, + "demoCluster": "devnet", + "demoGeneration": "v4", + "postExecutionValidation": [ + "canonical_insert", + "core_extraction", + "memo_decode_replay", + "transaction_annotation_materialization" + ] + }, + "requiredCorpusCases": [ + "empty_payload", + "ascii", + "unicode_multibyte", + "near_practical_transaction_limit", + "invalid_utf8", + "zero_signer", + "one_signer", + "multiple_signers", + "non_signer_account", + "duplicate_accounts", + "additional_writable_account", + "outer_instruction", + "inner_instruction", + "successful_transaction", + "failed_transaction", + "malformed_base64", + "payload_over_decoder_limit" + ], + "mainnetReplayValidation": { + "date": "2026-07-14", + "acquisition": { + "programCampaigns": 3, + "canonicalTransactionsInserted": 300, + "missingTransactions": 0 + }, + "coreExtraction": { + "selected": 300, + "extracted": 300, + "failed": 0 + }, + "generations": [ + { + "generation": "v1", + "decodedInstructions": 102, + "materializedAnnotations": 69, + "refusedUncommittedIntents": 33 + }, + { + "generation": "v3", + "decodedInstructions": 439, + "materializedAnnotations": 422, + "refusedUncommittedIntents": 17, + "secondNonForcedReplaySelected": 0 + }, + { + "generation": "v4", + "decodedInstructions": 100, + "materializedAnnotations": 100, + "refusedUncommittedIntents": 0 + } + ], + "decodeFailures": 0, + "unmatchedInstructions": 0, + "operationalErrorLogEntries": 0 + }, + "devnetExecutionValidation": { + "date": "2026-07-15", + "generation": "v4", + "programId": "Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH", + "simulationOnlyValidated": true, + "submittedTransactions": 3, + "confirmedTransactions": 3, + "canonicalTransactionsInserted": 3, + "coreTransactionsExtracted": 3, + "decodedInstructions": 3, + "materializedAnnotations": 3, + "annotationPayloadLengthBytes": 34, + "secondReplaySkipped": 3, + "secondReplayNewMaterializedOutputs": 0, + "decodeFailures": 0, + "materializationRefusals": 0, + "signatures": [ + "53aHhj6rt77hCkadHedpWS7GstdER5XqQrHDutZ7gAQrDvAxcDcktrUtwxZcCbTV2FnLzELqfwoJgvabjdLPWkQ5", + "3NxmPdF9W3GBiD8qF2VzvUhEDrTM48EEkaosTtzVceRhQc4sGEojDFppBsXYgqK9GCrCUo4wzAWciprsqZEmRyee", + "2njzDJUBar6TTPPcuwEDdkiW8kVLUsZXfdvUQNP7TC6La44E4kZtLFfdJ1Q8nPNJbKa9Vuby4TtiuLX2rQQTa65C" + ] + }, + "sources": [ + { + "kind": "official_interface_source", + "url": "https://docs.rs/spl-memo-interface/2.1.0/src/spl_memo_interface/instruction.rs.html" + }, + { + "kind": "official_interface_ids", + "url": "https://docs.rs/spl-memo-interface/2.1.0/src/spl_memo_interface/lib.rs.html" + }, + { + "kind": "official_v1_historical_source", + "url": "https://github.com/solana-program/memo/commit/479839141a99b7d0c3a35bc648c0fa1e4704ea3e" + }, + { + "kind": "official_v3_published_source", + "url": "https://docs.rs/spl-memo/3.0.0/src/spl_memo/processor.rs.html" + }, + { + "kind": "official_current_source", + "url": "https://github.com/solana-program/memo/blob/main/program/src/processor.rs" + } + ], + "documentedLimitations": [ + "v1 et v3 restent decodees depuis un corpus Mainnet reel et leur wire officiel reste audite, mais l'executeur les classe decode-only et ne construit que v4", + "l'invocabilite Localnet depend du deploiement explicite du binaire de generation demande", + "les differences de cout v3/v4 ne sont pas transformees en garantie statique; chaque plan reste soumis a la simulation et au plafond de frais" + ] +} diff --git a/olddocs/archivekbot2/docs/SPL_TOKEN_2022_CONFIDENTIAL_EXECUTION_AUDIT.md b/olddocs/archivekbot2/docs/SPL_TOKEN_2022_CONFIDENTIAL_EXECUTION_AUDIT.md new file mode 100644 index 0000000..f7670fa --- /dev/null +++ b/olddocs/archivekbot2/docs/SPL_TOKEN_2022_CONFIDENTIAL_EXECUTION_AUDIT.md @@ -0,0 +1,110 @@ + + + +# Audit d’exécution Confidential Transfer Token-2022 + +## Frontières de programme + +Les instructions Confidential Transfer restent des instructions du programme Token-2022. Les preuves associées sont des instructions distinctes du programme natif ZK ElGamal Proof ou des comptes de contexte déjà vérifiés. Le registre ElGamal reste une troisième surface avec son propre Program ID. + +Aucun builder Token-2022 ne doit incorporer silencieusement une preuve, déchiffrer un solde ou générer une clé privée. + +## Modes de preuve + +Chaque preuve est fournie selon un seul mode explicite : + +- `instruction_offset` : offset relatif signé non nul vers une instruction ZK distincte de la même transaction ; +- `context_state_account` : compte readonly contenant le contexte public d’une preuve déjà vérifiée ; le wire Token-2022 encode alors l’offset `0`. + +Un offset inline égal à zéro est invalide dans le contrat de l’exécuteur, car il rendrait le mode ambigu. + +## Inventaire audité + +| Opération | Preuves ordonnées | Classe d’exécution | +|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------| +| InitializeMint | aucune | builder public | +| UpdateMint | aucune | builder public | +| ConfigureAccount | PubkeyValidity | entrées cryptographiques appelant | +| ApproveAccount | aucune | builder public | +| EmptyAccount | ZeroCiphertext | entrées cryptographiques appelant | +| Deposit | aucune | builder public | +| Withdraw | CiphertextCommitmentEquality, BatchedRangeProofU64 | entrées cryptographiques appelant | +| Transfer | CiphertextCommitmentEquality, BatchedGroupedCiphertext3HandlesValidity, BatchedRangeProofU128 | entrées cryptographiques appelant | +| ApplyPendingBalance | aucune | builder public | +| EnableConfidentialCredits | aucune | builder public | +| DisableConfidentialCredits | aucune | builder public | +| EnableNonConfidentialCredits | aucune | builder public | +| DisableNonConfidentialCredits | aucune | builder public | +| TransferWithFee | CiphertextCommitmentEquality, BatchedGroupedCiphertext3HandlesValidity, PercentageWithFee, BatchedGroupedCiphertext2HandlesValidity, BatchedRangeProofU256 | entrées cryptographiques appelant | +| ConfigureAccountWithRegistry | PubkeyValidity | entrées cryptographiques appelant | + +La classe « builder public » signifie seulement que l’instruction Token-2022 ne nécessite pas de ciphertext ou preuve nouvellement généré. Elle ne dispense ni du préflight, ni de la simulation, ni des autorités et postconditions. + +## Plan de livraison + +- `pre.048` : types, modes de preuve, ordre des preuves et classification de support ; +- `pre.049` : builders publics Initialize/Update/Approve/Deposit/Apply/credit toggles ; +- `pre.050` : clés ElGamal et balances déchiffrables opaques, Initialize/Update Mint et Apply Pending Balance ; +- `pre.051` : Configure Account et Configure Account With Registry ; +- `pre.052` : Empty Account avec preuve ZeroCiphertext inline ou context-state ; +- `pre.053` : Withdraw avec Equality et Range U64 ; +- `pre.054` : Transfer avec Equality, Grouped Ciphertext Validity à trois handles et Range U128 ; +- `pre.055` : audit exact de Transfer With Fee, cinq preuves, comptes et payload ; +- `pre.056` : builder Transfer With Fee ; +- tranches ultérieures : Confidential Transfer Fee, Confidential Mint/Burn et Permissioned Confidential Burn. + +## `pre.053` — Withdraw + +`Withdraw` exige deux références de preuve dans l’ordre officiel : `CiphertextCommitmentEquality`, puis `BatchedRangeProofU64`. Les modes inline et context-state peuvent être combinés. L’exécuteur transporte la nouvelle balance déchiffrable opaque sans produire ni vérifier localement les secrets ou preuves. + + +## `pre.054` — Transfer + +`Transfer` transporte une nouvelle balance source déchiffrable de 36 octets et deux ciphertexts auditeur ElGamal de 64 octets. Il exige exactement trois références de preuve dans l'ordre officiel : `CiphertextCommitmentEquality`, `BatchedGroupedCiphertext3HandlesValidity`, puis `BatchedRangeProofU128`. Chaque preuve peut être inline ou context-state ; l'Instructions Sysvar n'est ajouté qu'une fois lorsqu'au moins un offset est utilisé. Aucune donnée cryptographique n'est générée par l'exécuteur. + + +## `pre.055` — audit Transfer With Fee + +`TransferWithFee` conserve le même payload cryptographique Token-2022 que `Transfer` : une balance source déchiffrable de 36 octets et deux ciphertexts auditeur ElGamal de 64 octets. Il n’ajoute pas de ciphertext withheld ou de montant de frais au payload Token-2022. Les informations de frais et le ciphertext de frais appartiennent aux contextes publics des preuves `PercentageWithFee` et `BatchedGroupedCiphertext2HandlesValidity`. + +Le wire exact contient le tag externe `27`, le sous-tag `13`, puis 169 octets de payload : `36 + 64 + 64 + 5 offsets i8`. La donnée complète mesure donc 171 octets. + +Les cinq preuves restent ordonnées : + +1. `CiphertextCommitmentEquality` ; +2. `BatchedGroupedCiphertext3HandlesValidity` pour le montant transféré ; +3. `PercentageWithFee` ; +4. `BatchedGroupedCiphertext2HandlesValidity` pour le ciphertext de frais ; +5. `BatchedRangeProofU256`. + +L’ordre des comptes est source writable, mint readonly, destination writable, Instructions Sysvar si au moins une preuve est inline, comptes context-state dans l’ordre des cinq preuves, autorité, puis signataires multisig. Aucun type opaque Token-2022 supplémentaire n’est nécessaire avant le builder de `pre.056`. + +## Builder Transfer With Fee — pre.056 + +Le builder `inner_transfer_with_fee` est activé avec les cinq preuves dans l’ordre officiel. Le payload reste limité à la nouvelle balance déchiffrable, aux deux ciphertexts auditeur et aux cinq offsets. Les comptes context-state suivent le même ordre que les preuves et l’Instructions Sysvar n’est présent qu’une fois lorsqu’au moins un offset inline est utilisé. + +## Confidential Transfer Fee public builder tranche (`pre.057`) + +The proof-free builder surface is restricted to subdiscriminants 0, 3, 4 and 5 +of the Token-2022 `ConfidentialTransferFeeExtension` envelope (external tag 37). +Initialization accepts one writable mint, an optional configuration authority +and one exact 32-byte ElGamal public key. Enable/disable harvest preserve simple +or multisig authority metas. Permissionless harvest preserves an ordered, +non-empty, duplicate-free source list bounded to 255 accounts. Withdrawals remain +separate because they require ciphertext-equality proof context. + +## Confidential Transfer Fee — retrait depuis plusieurs comptes (`pre.059`) + +Le builder `inner_withdraw_withheld_tokens_from_accounts` conserve l’ordre officiel suivant : Mint readonly, destination writable, Instructions Sysvar ou compte context-state, autorité withdraw-withheld, signataires multisig, puis sources writable. Le payload encode `num_token_accounts: u8`, l’offset de preuve et la nouvelle balance déchiffrable destination. + +La preuve requise est `CiphertextCiphertextEquality`. La liste des sources est non vide, unique, ordonnée et limitée à 255 comptes. Cette opération est explicitement sensible au front-running : une mutation d’un withheld ciphertext source après génération de la preuve fait échouer la transaction. Le parcours harvest-vers-Mint puis retrait-depuis-Mint reste l’alternative recommandée lorsque la stabilité des comptes sources ne peut pas être garantie. + +## `pre.060` — audit Confidential Mint/Burn + +L'interface publie six sous-instructions contiguës : `InitializeMint = 0`, `RotateSupplyElGamalPubkey = 1`, `UpdateDecryptableSupply = 2`, `Mint = 3`, `Burn = 4` et `ApplyPendingBurn = 5`. Cette famille reste dans l'enveloppe Token-2022 Confidential Mint/Burn et ne doit pas être confondue avec Permissioned Burn. + +`InitializeMint` transporte une clé publique ElGamal de supply et une supply déchiffrable initiale. `RotateSupplyElGamalPubkey` transporte la nouvelle clé et exige `CiphertextCiphertextEquality`. `UpdateDecryptableSupply` et `ApplyPendingBurn` n'exigent aucune preuve, mais restent soumis aux autorités et préconditions d'état. + +`Mint` et `Burn` exigent exactement trois preuves dans l'ordre : `CiphertextCommitmentEquality`, `BatchedGroupedCiphertext3HandlesValidity`, puis `BatchedRangeProofU128`. Les deux opérations transportent deux ciphertexts auditeur ; `Mint` transporte la nouvelle supply déchiffrable, tandis que `Burn` transporte la nouvelle balance disponible déchiffrable du compte source. Aucun secret, ciphertext ou preuve n'est généré par l'exécuteur. + +Le découpage prévu est : builders publics et rotation dans `pre.061`, puis Mint/Burn prouvés dans `pre.062`. Permissioned Confidential Burn reste une tranche indépendante. diff --git a/olddocs/archivekbot2/docs/SPL_TOKEN_2022_MATRIX.json b/olddocs/archivekbot2/docs/SPL_TOKEN_2022_MATRIX.json new file mode 100644 index 0000000..2639640 --- /dev/null +++ b/olddocs/archivekbot2/docs/SPL_TOKEN_2022_MATRIX.json @@ -0,0 +1,2698 @@ +{ + "file": "docs/SPL_TOKEN_2022_MATRIX.json", + "version": "0.4.6-pre.026", + "schemaVersion": 1, + "matrixStatus": "exact_decoder_leaf_coverage_proven_pending_materialization_executor_preflight_and_cluster_corpus_completion", + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "strictProgramBoundary": { + "acceptedProgramIds": [ + "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + ], + "rejectedDistinctSurfaces": [ + "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "ZkE1Gama1Proof11111111111111111111111111111", + "regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg" + ], + "externalInterfaceRule": "Transfer Hook, Token Group and Token Metadata implementations are dispatched only by an independently audited executable Program ID. A Token-2022 TLV pointer remains a link, not a decode of its target program." + }, + "interfaceAudit": { + "workspaceConstraint": "^3.1", + "workspaceFeatures": [ + "serde" + ], + "workspaceCargoLockPresentInProvidedArchive": true, + "workspaceCargoLockSha256": "248c02af8c78d3bb6ad747460fee0011f8141feef83364cf697e35e44bd4ceb9", + "workspaceCargoToolAvailableInAuditEnvironment": false, + "resolvedVersion": "3.1.1", + "resolutionStatus": "confirmed_by_operator_cargo_tree_2026-07-16", + "resolvedFeatures": [ + "default", + "serde" + ], + "leafConsumer": "kb_decoder_spl_token_2022", + "operatorEvidence": "cargo tree -i spl-token-2022-interface -e features", + "publishedCandidateAudited": "3.1.1", + "publishedCandidateStatus": "matches_confirmed_workspace_resolution", + "publishedDocumentation": "https://docs.rs/spl-token-2022-interface/3.1.1/spl_token_2022_interface/", + "officialRepository": "https://github.com/solana-program/token-2022", + "sourcePaths": [ + "interface/src/instruction.rs", + "interface/src/extension/mod.rs", + "interface/src/extension/*/instruction.rs", + "program/src/processor.rs", + "program/src/extension/*/processor.rs" + ], + "candidateDirectDependenciesRelevantToAudit": { + "solana-zk-elgamal-proof-interface": "^0.1.3", + "spl-token-confidential-transfer-proof-extraction": "^0.6.0", + "spl-token-group-interface": "^0.7.2", + "spl-token-metadata-interface": "^1.0.0", + "spl-type-length-value": "^0.9.1" + }, + "operatorWorkspaceResolvedDependencies": { + "solana-zk-elgamal-proof-interface": "0.1.3", + "spl-token-confidential-transfer-proof-extraction": "0.6.1", + "spl-token-group-interface": "0.7.2", + "spl-token-metadata-interface": "1.0.1", + "spl-type-length-value": "0.9.1" + }, + "operatorWorkspaceDependencyEvidence": { + "source": "attached Cargo.lock plus cargo tree -p spl-token-2022-interface -e features", + "tokenGroupConsumption": "direct dependency of spl-token-2022-interface 3.1.1", + "tokenMetadataConsumption": "direct dependency of spl-token-2022-interface 3.1.1", + "processorSourceLockMetadataVersion": "1.0.0", + "operatorWorkspaceMetadataVersion": "1.0.1", + "metadataVersionDriftStatus": "unpack_hardening_only_wire_and_builders_unchanged_by_source_diff" + }, + "operatorCommandsRequired": [ + "cargo tree -p kb_decoder_spl_token_2022 -e features", + "cargo tree -p kb_executor_spl_token_2022 -e features", + "cargo tree -i spl-token-2022-interface -e features", + "cargo tree -i spl-elgamal-registry-interface -e features", + "cargo metadata --format-version 1 --locked", + "cargo test -p kb_decoder_spl_token_2022", + "cargo clippy --all-targets" + ], + "sourceCommit": "e18f9c6f9bf6044b934f48e3090e8e59e4820f02", + "sourceTag": "interface@v3.1.1", + "sourceCommitDate": "2026-06-26" + }, + "operatorValidation": { + "date": "2026-07-16", + "cargoTestPackage": { + "command": "cargo test -p kb_decoder_spl_token_2022", + "status": "passed", + "passed": 8, + "failed": 0 + }, + "cargoClippyAllTargets": { + "command": "cargo clippy --all-targets", + "status": "clean" + } + }, + "tokenMetadataVersionDriftAudit": { + "processorSourceVersion": "1.0.0", + "operatorWorkspaceVersion": "1.0.1", + "releaseDate": "2026-06-29", + "releaseCommit": "7038969", + "changePullRequest": 87, + "mergedCommit": "fc97c60", + "changedProductionFile": "interface/src/instruction.rs", + "productionDiff": { + "additions": 78, + "deletions": 0 + }, + "wireDiscriminantsChanged": false, + "buildersChanged": false, + "changeKind": "pre_borsh_string_length_validation_before_existing_try_from_slice", + "affectedInstructions": { + "initialize": [ + "name", + "symbol", + "uri" + ], + "update_field": [ + "field_key_when_tag_3", + "value" + ], + "remove_key": [ + "key" + ] + }, + "unaffectedInstructions": [ + "update_authority", + "emit" + ], + "decoderRequirement": "validate every little_endian_u32 string length against remaining bounded input before allocation or UTF-8 materialization", + "malformedPolicy": "bounded invalid_instruction diagnostic without semantic event", + "evidence": "official interface@v1.0.1 release and solana-program/token-metadata pull request 87 files diff" + }, + "processorAudit": { + "auditedVersion": "11.0.0", + "sourceCommit": "e18f9c6f9bf6044b934f48e3090e8e59e4820f02", + "sourceAnchor": "same repository commit as interface@v3.1.1", + "programManifestInterfaceRequirement": "3.1.0 path dependency resolved to workspace interface 3.1.1 at the audited commit", + "dispatchStatus": "top_level_extension_and_embedded_interface_fallbacks_confirmed", + "resolvedInterfaceDependenciesFromSourceCargoLock": { + "spl-token-group-interface": "0.7.2", + "spl-token-metadata-interface": "1.0.0", + "spl-elgamal-registry-interface": "0.2.1" + }, + "deploymentBinaryEquality": { + "localnet": "not_tested", + "devnet": "not_proven", + "mainnet": "not_proven" + }, + "corpus": { + "offline": "not_started", + "devnet": "not_started", + "mainnet": "not_started" + }, + "rule": "Interface publication, processor implementation, builder constructibility, cluster deployment, observation, simulation and submission are independent proofs." + }, + "wireContract": { + "topLevelEncoding": "ordered_union: first try one_u8_PodTokenInstruction; if it fails try exact_8_byte_TokenMetadataInstruction discriminator; if that fails try exact_8_byte_TokenGroupInstruction discriminator", + "topLevelSuffixPolicy": "processor-specific exact decode: fixed Pod payloads use exact bytemuck sizes; metadata uses bounded Borsh and try_from_slice; group uses exact bytemuck sizes; remaining per-variant proof suffix rules pending", + "outerAndInner": true, + "failedTransactionPolicy": "preserve a bounded structured intent when the wire is readable; committed remains false", + "unknownInstructionPolicy": "bounded opaque diagnostic without semantic event", + "batch": { + "tag": 255, + "recordPrefix": [ + "account_count_u8", + "instruction_data_length_u8" + ], + "nestedBatchAllowed": false, + "bounds": "pending_workspace_policy_and_processor_audit" + } + }, + "baseInstructionWireAudit": { + "status": "published_interface_3_1_1_pack_and_unpack_exact_processor_suffix_acceptance_pending_per_variant", + "rowCount": 33, + "scope": "top-level u8 forms that are not extension-family envelopes", + "sizeIncludesTopLevelTag": true, + "sizeRuleMeaning": "canonical TokenInstruction::pack output for fixed forms; public unpack may accept a longer buffer when interfaceConsumption says its returned suffix is discarded", + "integerEndianness": "little_endian", + "compactOptions": { + "pubkey": { + "none": "one byte 0", + "some": "one byte 1 followed by 32-byte pubkey" + }, + "u64": { + "none": "one byte 0", + "some": "one byte 1 followed by u64_le" + }, + "invalidDiscriminantPolicy": "interface_unpack_rejects_values_other_than_0_or_1" + }, + "publicUnpackContract": { + "entryPoint": "TokenInstruction::unpack calls unpack_with_rest and discards the returned remainder", + "fixedPrefixConsequence": "a successful public interface unpack is not proof that the whole instruction buffer was consumed", + "decoderRequirement": "retain and diagnose every unconsumed bounded suffix until the exact processor path proves acceptance or rejection", + "runtimeClaim": "none_from_public_unpack_alone" + }, + "rows": [ + { + "tag": 0, + "name": "initialize_mint", + "sizeRule": "35_or_67", + "payload": "decimals_u8+mint_authority_32+compact_freeze_authority", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_mint" + }, + { + "tag": 1, + "name": "initialize_account", + "sizeRule": "exact_1", + "payload": "unit", + "interfaceConsumption": "tag_only_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_account" + }, + { + "tag": 2, + "name": "initialize_multisig", + "sizeRule": "exact_2", + "payload": "m_u8", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_multisig" + }, + { + "tag": 3, + "name": "transfer", + "sizeRule": "exact_9", + "payload": "amount_u64_le", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "transfer", + "status": "deprecated" + }, + { + "tag": 4, + "name": "approve", + "sizeRule": "exact_9", + "payload": "amount_u64_le", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "approve" + }, + { + "tag": 5, + "name": "revoke", + "sizeRule": "exact_1", + "payload": "unit", + "interfaceConsumption": "tag_only_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "revoke" + }, + { + "tag": 6, + "name": "set_authority", + "sizeRule": "3_or_35", + "payload": "authority_type_u8+compact_new_authority", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "set_authority" + }, + { + "tag": 7, + "name": "mint_to", + "sizeRule": "exact_9", + "payload": "amount_u64_le", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "mint_to" + }, + { + "tag": 8, + "name": "burn", + "sizeRule": "exact_9", + "payload": "amount_u64_le", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "burn" + }, + { + "tag": 9, + "name": "close_account", + "sizeRule": "exact_1", + "payload": "unit", + "interfaceConsumption": "tag_only_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "close_account" + }, + { + "tag": 10, + "name": "freeze_account", + "sizeRule": "exact_1", + "payload": "unit", + "interfaceConsumption": "tag_only_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "freeze_account" + }, + { + "tag": 11, + "name": "thaw_account", + "sizeRule": "exact_1", + "payload": "unit", + "interfaceConsumption": "tag_only_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "thaw_account" + }, + { + "tag": 12, + "name": "transfer_checked", + "sizeRule": "exact_10", + "payload": "amount_u64_le+decimals_u8", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "transfer_checked" + }, + { + "tag": 13, + "name": "approve_checked", + "sizeRule": "exact_10", + "payload": "amount_u64_le+decimals_u8", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "approve_checked" + }, + { + "tag": 14, + "name": "mint_to_checked", + "sizeRule": "exact_10", + "payload": "amount_u64_le+decimals_u8", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "mint_to_checked" + }, + { + "tag": 15, + "name": "burn_checked", + "sizeRule": "exact_10", + "payload": "amount_u64_le+decimals_u8", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "burn_checked" + }, + { + "tag": 16, + "name": "initialize_account2", + "sizeRule": "exact_33", + "payload": "owner_pubkey_32", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_account2" + }, + { + "tag": 17, + "name": "sync_native", + "sizeRule": "exact_1", + "payload": "unit", + "interfaceConsumption": "tag_only_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "sync_native" + }, + { + "tag": 18, + "name": "initialize_account3", + "sizeRule": "exact_33", + "payload": "owner_pubkey_32", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_account3" + }, + { + "tag": 19, + "name": "initialize_multisig2", + "sizeRule": "exact_2", + "payload": "m_u8", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_multisig2" + }, + { + "tag": 20, + "name": "initialize_mint2", + "sizeRule": "35_or_67", + "payload": "decimals_u8+mint_authority_32+compact_freeze_authority", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_mint2" + }, + { + "tag": 21, + "name": "get_account_data_size", + "sizeRule": "1_plus_2n_n_greater_or_equal_0", + "payload": "all_remaining_known_extension_type_u16_le", + "interfaceConsumption": "entire_remainder_rejected_if_odd_or_unknown_extension_type", + "officialBuilder": "get_account_data_size" + }, + { + "tag": 22, + "name": "initialize_immutable_owner", + "sizeRule": "exact_1", + "payload": "unit", + "interfaceConsumption": "tag_only_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_immutable_owner" + }, + { + "tag": 23, + "name": "amount_to_ui_amount", + "sizeRule": "exact_9", + "payload": "amount_u64_le", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "amount_to_ui_amount" + }, + { + "tag": 24, + "name": "ui_amount_to_amount", + "sizeRule": "minimum_1", + "payload": "entire_remaining_utf8_bytes_empty_allowed_by_interface", + "interfaceConsumption": "entire_remainder_utf8_validated", + "officialBuilder": "ui_amount_to_amount", + "decoderBound": "required_before_utf8_materialization" + }, + { + "tag": 25, + "name": "initialize_mint_close_authority", + "sizeRule": "2_or_34", + "payload": "compact_close_authority", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_mint_close_authority" + }, + { + "tag": 29, + "name": "reallocate", + "sizeRule": "1_plus_2n_n_greater_or_equal_0", + "payload": "all_remaining_known_extension_type_u16_le", + "interfaceConsumption": "entire_remainder_rejected_if_odd_or_unknown_extension_type", + "officialBuilder": "reallocate" + }, + { + "tag": 31, + "name": "create_native_mint", + "sizeRule": "exact_1", + "payload": "unit", + "interfaceConsumption": "tag_only_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "create_native_mint" + }, + { + "tag": 32, + "name": "initialize_non_transferable_mint", + "sizeRule": "exact_1", + "payload": "unit", + "interfaceConsumption": "tag_only_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_non_transferable_mint" + }, + { + "tag": 35, + "name": "initialize_permanent_delegate", + "sizeRule": "exact_33", + "payload": "delegate_pubkey_32", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "initialize_permanent_delegate" + }, + { + "tag": 38, + "name": "withdraw_excess_lamports", + "sizeRule": "exact_1", + "payload": "unit", + "interfaceConsumption": "tag_only_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "withdraw_excess_lamports" + }, + { + "tag": 45, + "name": "unwrap_lamports", + "sizeRule": "2_or_10", + "payload": "compact_amount_u64_le", + "interfaceConsumption": "fixed_prefix_suffix_returned_then_discarded_by_public_unpack", + "officialBuilder": "unwrap_lamports" + }, + { + "tag": 255, + "name": "batch", + "sizeRule": "minimum_1", + "payload": "entire_remaining_batch_record_wire", + "interfaceConsumption": "entire_remainder_preserved_as_batch_payload", + "officialBuilder": "no_dedicated_rust_interface_helper_identified", + "processorRecordAudit": "pending_bounds_accounts_and_nested_batch_rejection" + } + ], + "remainingProof": "exact processor helper path, suffix acceptance, accounts and flags for every row" + }, + "baseInstructionProcessorSuffixAudit": { + "status": "confirmed_from_exact_processor_11_0_0_source_commit", + "sourceCommit": "e18f9c6f9bf6044b934f48e3090e8e59e4820f02", + "sources": [ + { + "path": "interface/src/instruction.rs", + "sha256": "672b3890cb58e5700a67f202491069ed44dffcbfa0e7d0b83a0cfbbb05b3a287" + }, + { + "path": "program/src/pod_instruction.rs", + "sha256": "7b546580a90ab8d1f52143c21da931d26f8b68c7d2050b4eaf7307fc9c49c7e5" + }, + { + "path": "program/src/processor.rs", + "sha256": "9d11b834aabdb8c824ca59f7ea7bda4d217565a58359fbfaf37e5a35e8f3032d" + } + ], + "partition": [ + { + "policy": "exact_total_length_via_decode_instruction_data", + "tags": [ + 2, + 3, + 4, + 7, + 8, + 12, + 13, + 14, + 15, + 16, + 18, + 19, + 23, + 35 + ], + "count": 14, + "suffix": "rejected", + "proof": "decode_instruction_data requires input length equal to one plus size_of Pod payload" + }, + { + "policy": "compact_option_prefix_only", + "tags": [ + 0, + 6, + 20, + 25, + 45 + ], + "count": 5, + "suffix": "accepted_after_complete_none_or_some_prefix", + "proof": "specialized Pod plus compact-option helpers read the required prefix and do not require exhaustion" + }, + { + "policy": "tag_only_dispatch", + "tags": [ + 1, + 5, + 9, + 10, + 11, + 17, + 22, + 31, + 32, + 38 + ], + "count": 10, + "suffix": "accepted_without_inspection", + "proof": "processor branch invokes no instruction-data decoder after decode_instruction_type reads byte zero" + }, + { + "policy": "entire_remainder_is_payload", + "tags": [ + 21, + 24, + 29 + ], + "count": 3, + "suffix": "not_applicable_remainder_consumed", + "proof": "extension-type vectors parse all two-byte chunks; UI amount parses all remaining bytes as UTF-8", + "constraints": { + "extensionTypeVectors": "empty allowed; odd final chunk or unknown ExtensionType rejected", + "uiAmount": "empty allowed by UTF-8 parser; malformed UTF-8 rejected" + } + }, + { + "policy": "batch_record_stream", + "tags": [ + 255 + ], + "count": 1, + "suffix": "entire_remainder_must_be_complete_record_stream", + "proof": "top-level process routes tag 255 to process_batch and nested _process_inner rejects tag 255", + "record": { + "headerBytes": 2, + "accountCount": "u8", + "instructionDataLengthIncludingDiscriminator": "u8", + "minimumOuterInstructionBytes": 4, + "zeroInstructionDataLength": "rejected_by_inner_dispatch", + "truncatedHeaderOrPayload": "rejected", + "nestedBatch": "rejected", + "embeddedMetadataOrGroupFallback": "processor_dispatch_allows_when_record_length_fits_u8", + "maximumAccountsPerRecordFromWire": 255, + "maximumInstructionDataBytesPerRecordFromWire": 255, + "recordCountProcessorBound": "none_explicit_beyond_transaction_instruction_data_and_compute_limits", + "decoderRecordCountBound": "required" + } + } + ], + "partitionTagCount": 33, + "partitionTagsUnique": true, + "decoderPolicy": { + "exactPod": "reject suffix", + "acceptedRuntimeSuffix": "preserve bounded suffix and emit an explicit accepted_suffix diagnostic without inventing fields", + "fullRemainder": "decode only after global byte and element bounds", + "batch": "bound record count, account count, per-record data and total data before nested leaf decode" + }, + "remainingProof": "exact account order, signer and writable flags, optional and multisig tails for every base form" + }, + "baseInstructionBuilderAccountAudit": { + "status": "exact_official_interface_3_1_1_builder_metas_for_32_constructible_forms_and_explicit_batch_gap", + "source": { + "path": "interface/src/instruction.rs", + "commit": "e18f9c6f9bf6044b934f48e3090e8e59e4820f02", + "sha256": "672b3890cb58e5700a67f202491069ed44dffcbfa0e7d0b83a0cfbbb05b3a287" + }, + "rowCount": 33, + "flagLegend": { + "writable": "canonical AccountMeta writable flag emitted by the official builder", + "signer": "canonical AccountMeta signer flag; conditional_authority means true only when the multisig signer tail is empty" + }, + "multisigAuthorityTail": { + "builderAcceptedRange": "zero selects a single signing authority; a non-empty signer_pubkeys slice is appended without an explicit builder length check", + "runtimeStoredMultisigPositions": "1..11", + "meta": { + "role": "multisig_signer", + "writable": false, + "signer": true + }, + "authorityMetaWhenTailPresent": { + "writable": false, + "signer": false + }, + "authorityMetaWhenTailEmpty": { + "writable": false, + "signer": true + }, + "duplicatesPreserved": true + }, + "rows": [ + { + "tag": 0, + "name": "initialize_mint", + "builder": "initialize_mint", + "accounts": [ + { + "index": 0, + "role": "mint", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "rent_sysvar", + "writable": false, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 1, + "name": "initialize_account", + "builder": "initialize_account", + "accounts": [ + { + "index": 0, + "role": "token_account", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "mint", + "writable": false, + "signer": false + }, + { + "index": 2, + "role": "owner", + "writable": false, + "signer": false + }, + { + "index": 3, + "role": "rent_sysvar", + "writable": false, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 2, + "name": "initialize_multisig", + "builder": "initialize_multisig", + "accounts": [ + { + "index": 0, + "role": "multisig", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "rent_sysvar", + "writable": false, + "signer": false + } + ], + "tail": "multisig_configuration_keys_readonly_non_signer_1_to_11" + }, + { + "tag": 3, + "name": "transfer", + "builder": "transfer", + "accounts": [ + { + "index": 0, + "role": "source", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "destination", + "writable": true, + "signer": false + }, + { + "index": 2, + "role": "authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail", + "status": "deprecated" + }, + { + "tag": 4, + "name": "approve", + "builder": "approve", + "accounts": [ + { + "index": 0, + "role": "source", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "delegate", + "writable": false, + "signer": false + }, + { + "index": 2, + "role": "owner", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 5, + "name": "revoke", + "builder": "revoke", + "accounts": [ + { + "index": 0, + "role": "source", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "owner_or_delegate", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 6, + "name": "set_authority", + "builder": "set_authority", + "accounts": [ + { + "index": 0, + "role": "owned_account_or_mint", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "current_authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 7, + "name": "mint_to", + "builder": "mint_to", + "accounts": [ + { + "index": 0, + "role": "mint", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "destination", + "writable": true, + "signer": false + }, + { + "index": 2, + "role": "mint_authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 8, + "name": "burn", + "builder": "burn", + "accounts": [ + { + "index": 0, + "role": "source", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "mint", + "writable": true, + "signer": false + }, + { + "index": 2, + "role": "authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 9, + "name": "close_account", + "builder": "close_account", + "accounts": [ + { + "index": 0, + "role": "source_account_or_mint", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "destination", + "writable": true, + "signer": false + }, + { + "index": 2, + "role": "close_authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 10, + "name": "freeze_account", + "builder": "freeze_account", + "accounts": [ + { + "index": 0, + "role": "token_account", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "mint", + "writable": false, + "signer": false + }, + { + "index": 2, + "role": "freeze_authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 11, + "name": "thaw_account", + "builder": "thaw_account", + "accounts": [ + { + "index": 0, + "role": "token_account", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "mint", + "writable": false, + "signer": false + }, + { + "index": 2, + "role": "freeze_authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 12, + "name": "transfer_checked", + "builder": "transfer_checked", + "accounts": [ + { + "index": 0, + "role": "source", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "mint", + "writable": false, + "signer": false + }, + { + "index": 2, + "role": "destination", + "writable": true, + "signer": false + }, + { + "index": 3, + "role": "authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 13, + "name": "approve_checked", + "builder": "approve_checked", + "accounts": [ + { + "index": 0, + "role": "source", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "mint", + "writable": false, + "signer": false + }, + { + "index": 2, + "role": "delegate", + "writable": false, + "signer": false + }, + { + "index": 3, + "role": "owner", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 14, + "name": "mint_to_checked", + "builder": "mint_to_checked", + "accounts": [ + { + "index": 0, + "role": "mint", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "destination", + "writable": true, + "signer": false + }, + { + "index": 2, + "role": "mint_authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 15, + "name": "burn_checked", + "builder": "burn_checked", + "accounts": [ + { + "index": 0, + "role": "source", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "mint", + "writable": true, + "signer": false + }, + { + "index": 2, + "role": "authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 16, + "name": "initialize_account2", + "builder": "initialize_account2", + "accounts": [ + { + "index": 0, + "role": "token_account", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "mint", + "writable": false, + "signer": false + }, + { + "index": 2, + "role": "rent_sysvar", + "writable": false, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 17, + "name": "sync_native", + "builder": "sync_native_or_sync_native_with_rent_sysvar", + "accounts": [ + { + "index": 0, + "role": "native_token_account", + "writable": true, + "signer": false + } + ], + "optionalAccounts": [ + { + "index": 1, + "role": "rent_sysvar", + "writable": false, + "signer": false + } + ], + "tail": "none_after_optional_rent" + }, + { + "tag": 18, + "name": "initialize_account3", + "builder": "initialize_account3", + "accounts": [ + { + "index": 0, + "role": "token_account", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "mint", + "writable": false, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 19, + "name": "initialize_multisig2", + "builder": "initialize_multisig2", + "accounts": [ + { + "index": 0, + "role": "multisig", + "writable": true, + "signer": false + } + ], + "tail": "multisig_configuration_keys_readonly_non_signer_1_to_11" + }, + { + "tag": 20, + "name": "initialize_mint2", + "builder": "initialize_mint2", + "accounts": [ + { + "index": 0, + "role": "mint", + "writable": true, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 21, + "name": "get_account_data_size", + "builder": "get_account_data_size", + "accounts": [ + { + "index": 0, + "role": "mint", + "writable": false, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 22, + "name": "initialize_immutable_owner", + "builder": "initialize_immutable_owner", + "accounts": [ + { + "index": 0, + "role": "token_account", + "writable": true, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 23, + "name": "amount_to_ui_amount", + "builder": "amount_to_ui_amount", + "accounts": [ + { + "index": 0, + "role": "mint", + "writable": false, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 24, + "name": "ui_amount_to_amount", + "builder": "ui_amount_to_amount", + "accounts": [ + { + "index": 0, + "role": "mint", + "writable": false, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 25, + "name": "initialize_mint_close_authority", + "builder": "initialize_mint_close_authority", + "accounts": [ + { + "index": 0, + "role": "mint", + "writable": true, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 29, + "name": "reallocate", + "builder": "reallocate", + "accounts": [ + { + "index": 0, + "role": "token_account", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "payer", + "writable": true, + "signer": true + }, + { + "index": 2, + "role": "system_program", + "writable": false, + "signer": false + }, + { + "index": 3, + "role": "owner", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail", + "processorAccountProof": "pending_exact_reallocate_module_reconfirmation" + }, + { + "tag": 31, + "name": "create_native_mint", + "builder": "create_native_mint", + "accounts": [ + { + "index": 0, + "role": "payer", + "writable": true, + "signer": true + }, + { + "index": 1, + "role": "native_mint_pda", + "writable": true, + "signer": false + }, + { + "index": 2, + "role": "system_program", + "writable": false, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 32, + "name": "initialize_non_transferable_mint", + "builder": "initialize_non_transferable_mint", + "accounts": [ + { + "index": 0, + "role": "mint", + "writable": true, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 35, + "name": "initialize_permanent_delegate", + "builder": "initialize_permanent_delegate", + "accounts": [ + { + "index": 0, + "role": "mint", + "writable": true, + "signer": false + } + ], + "tail": "none" + }, + { + "tag": 38, + "name": "withdraw_excess_lamports", + "builder": "withdraw_excess_lamports", + "accounts": [ + { + "index": 0, + "role": "source_account_or_mint", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "destination", + "writable": true, + "signer": false + }, + { + "index": 2, + "role": "authority", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 45, + "name": "unwrap_lamports", + "builder": "unwrap_lamports", + "accounts": [ + { + "index": 0, + "role": "native_source", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "destination", + "writable": true, + "signer": false + }, + { + "index": 2, + "role": "owner_or_delegate", + "writable": false, + "signer": "conditional_authority" + } + ], + "tail": "multisig_authority_tail" + }, + { + "tag": 255, + "name": "batch", + "builder": null, + "accounts": "concatenated_record_slices_each_sized_by_account_count_u8", + "tail": "outer_accounts_not_assigned_to_a_record_are_not_rejected_by_processor", + "builderStatus": "enum_pack_only_no_dedicated_rust_account_meta_builder" + } + ], + "processorFactsAlreadyConfirmed": { + "authorityValidation": "runtime-recognized 355-byte Token, inline Token or Token-2022 multisig consumes the remaining accounts as signer candidates; otherwise the authority account itself must sign and remaining accounts are ignored", + "multisigCandidateMatching": "only initialized stored signer positions count; candidate must carry signer flag; a stored position is counted at most once", + "initializeMultisig": "all accounts after multisig and optional rent become configuration keys; runtime validates m and n independently in 1..11 but does not enforce builder rule m <= n", + "syncNative": "second account is optional; when present it is parsed as Rent; accounts after it are ignored", + "batch": "each record receives its declared account prefix; a nested Batch is rejected; outer accounts left after the final record are not checked for exhaustion" + }, + "decoderRequirements": [ + "preserve_original_account_order_flags_and_duplicates", + "separate_builder_canonical_flags_from_processor_runtime_acceptance", + "preserve_multisig_candidate_tail_even_when_single_authority_runtime_ignores_it", + "diagnose_initialize_multisig_m_greater_than_n_as_processor_accepted_but_builder_rejected", + "diagnose_batch_unassigned_outer_accounts", + "never_invent_owner_mint_or_authority_from_state_not_present_in_wire_or_account_contract" + ], + "remainingProof": "processor account consumption for reallocate and exhaustive extra-account behavior by each row" + }, + "accountStateContract": { + "baseLengths": { + "mint": 82, + "account": 165, + "multisig": 355 + }, + "extendedMintPrefix": "82-byte Mint, padding through byte 164, AccountType at byte 165, then TLV", + "extendedAccountPrefix": "165-byte Account, AccountType at byte 165, then TLV", + "multisigRule": "identified by exact 355-byte base length and never treated as an extended Mint or Account", + "accountType": { + "encoding": "u8", + "values": [ + { + "value": 0, + "name": "uninitialized" + }, + { + "value": 1, + "name": "mint" + }, + { + "value": 2, + "name": "account" + } + ] + }, + "tlvHeader": { + "type": "u16_le", + "length": "u16_le", + "headerBytes": 4 + }, + "parserRequirements": [ + "bounded_iteration", + "preserve_order", + "preserve_unknown_type_and_bounded_bytes", + "detect_duplicate_types", + "detect_truncation", + "detect_invalid_padding", + "validate_account_type", + "validate_known_fixed_length", + "preserve_variable_length_without_invention" + ], + "finalSnapshotClaimedFromInstruction": false + }, + "surfaceEquality": { + "topLevelInstructionCount": 48, + "productionExtensionTypeCount": 29, + "compiledDecoderCoverage": "exact_100_of_100_routable_leaves", + "compiledExecutorCoverage": "partial_by_explicit_capability", + "materializationOwnership": "partial_by_unique_owner_phase_d", + "requiredFinalInvariant": "matrix == resolved interface == resolved processor dispatch == decoder coverage == projection ownership == executor capabilities", + "extensionDispatchFamilyCount": 15, + "extensionSubInstructionCount": 58, + "baseAndStandaloneTopLevelLeafCount": 33, + "embeddedTokenMetadataInstructionCount": 5, + "embeddedTokenGroupInstructionCount": 4, + "embeddedInterfaceFallbackCount": 9, + "processorRoutableLeafInstructionCount": 100 + }, + "instructionDefaults": { + "encoding": "u8_tag_plus_variant_payload", + "minimumSize": "pending_per_variant_audit", + "exactSizeOrSuffixRule": "pending_per_variant_audit", + "accounts": "pending_exact_order_flags_and_optional_accounts", + "stateTarget": "pending", + "decodedFields": "pending", + "authorizedProjections": [], + "executorSupport": { + "status": "not_started", + "reason": "decoder_matrix_and_projection_validation_required_first" + }, + "outer": true, + "inner": true, + "success": "decode", + "failure": "decode_as_uncommitted_intent_when_readable", + "proofs": { + "synthetic": [], + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested", + "realSignatures": [] + } + }, + "instructions": [ + { + "tag": 0, + "name": "initialize_mint", + "family": "base", + "status": "published_candidate_current", + "payload": "decimals_u8_mint_authority_pubkey_freeze_authority_coption" + }, + { + "tag": 1, + "name": "initialize_account", + "family": "base", + "status": "published_candidate_current", + "payload": "unit" + }, + { + "tag": 2, + "name": "initialize_multisig", + "family": "base", + "status": "published_candidate_current", + "payload": "m_u8" + }, + { + "tag": 3, + "name": "transfer", + "family": "base", + "status": "published_candidate_deprecated", + "payload": "amount_u64_le" + }, + { + "tag": 4, + "name": "approve", + "family": "base", + "status": "published_candidate_current", + "payload": "amount_u64_le" + }, + { + "tag": 5, + "name": "revoke", + "family": "base", + "status": "published_candidate_current", + "payload": "unit" + }, + { + "tag": 6, + "name": "set_authority", + "family": "base", + "status": "published_candidate_current", + "payload": "authority_type_u8_and_coption_pubkey" + }, + { + "tag": 7, + "name": "mint_to", + "family": "base", + "status": "published_candidate_current", + "payload": "amount_u64_le" + }, + { + "tag": 8, + "name": "burn", + "family": "base", + "status": "published_candidate_current", + "payload": "amount_u64_le" + }, + { + "tag": 9, + "name": "close_account", + "family": "base", + "status": "published_candidate_current", + "payload": "unit" + }, + { + "tag": 10, + "name": "freeze_account", + "family": "base", + "status": "published_candidate_current", + "payload": "unit" + }, + { + "tag": 11, + "name": "thaw_account", + "family": "base", + "status": "published_candidate_current", + "payload": "unit" + }, + { + "tag": 12, + "name": "transfer_checked", + "family": "base", + "status": "published_candidate_current", + "payload": "amount_u64_le_decimals_u8" + }, + { + "tag": 13, + "name": "approve_checked", + "family": "base", + "status": "published_candidate_current", + "payload": "amount_u64_le_decimals_u8" + }, + { + "tag": 14, + "name": "mint_to_checked", + "family": "base", + "status": "published_candidate_current", + "payload": "amount_u64_le_decimals_u8" + }, + { + "tag": 15, + "name": "burn_checked", + "family": "base", + "status": "published_candidate_current", + "payload": "amount_u64_le_decimals_u8" + }, + { + "tag": 16, + "name": "initialize_account2", + "family": "base", + "status": "published_candidate_current", + "payload": "owner_pubkey" + }, + { + "tag": 17, + "name": "sync_native", + "family": "base", + "status": "published_candidate_current", + "payload": "unit" + }, + { + "tag": 18, + "name": "initialize_account3", + "family": "base", + "status": "published_candidate_current", + "payload": "owner_pubkey" + }, + { + "tag": 19, + "name": "initialize_multisig2", + "family": "base", + "status": "published_candidate_current", + "payload": "m_u8" + }, + { + "tag": 20, + "name": "initialize_mint2", + "family": "base", + "status": "published_candidate_current", + "payload": "decimals_u8_mint_authority_pubkey_freeze_authority_coption" + }, + { + "tag": 21, + "name": "get_account_data_size", + "family": "base", + "status": "published_candidate_current", + "payload": "zero_or_more_extension_type_u16_le" + }, + { + "tag": 22, + "name": "initialize_immutable_owner", + "family": "immutable_owner", + "status": "published_candidate_current", + "payload": "unit" + }, + { + "tag": 23, + "name": "amount_to_ui_amount", + "family": "base", + "status": "published_candidate_current", + "payload": "amount_u64_le" + }, + { + "tag": 24, + "name": "ui_amount_to_amount", + "family": "base", + "status": "published_candidate_current", + "payload": "utf8_remainder" + }, + { + "tag": 25, + "name": "initialize_mint_close_authority", + "family": "mint_close_authority", + "status": "published_candidate_current", + "payload": "coption_pubkey" + }, + { + "tag": 26, + "name": "transfer_fee_extension", + "family": "transfer_fee", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 27, + "name": "confidential_transfer_extension", + "family": "confidential_transfer", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 28, + "name": "default_account_state_extension", + "family": "default_account_state", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 29, + "name": "reallocate", + "family": "account_extension_management", + "status": "published_candidate_current", + "payload": "zero_or_more_extension_type_u16_le" + }, + { + "tag": 30, + "name": "memo_transfer_extension", + "family": "memo_transfer", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 31, + "name": "create_native_mint", + "family": "native_mint", + "status": "published_candidate_current", + "payload": "unit" + }, + { + "tag": 32, + "name": "initialize_non_transferable_mint", + "family": "non_transferable", + "status": "published_candidate_current", + "payload": "unit" + }, + { + "tag": 33, + "name": "interest_bearing_mint_extension", + "family": "interest_bearing_mint", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 34, + "name": "cpi_guard_extension", + "family": "cpi_guard", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 35, + "name": "initialize_permanent_delegate", + "family": "permanent_delegate", + "status": "published_candidate_current", + "payload": "delegate_pubkey" + }, + { + "tag": 36, + "name": "transfer_hook_extension", + "family": "transfer_hook", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 37, + "name": "confidential_transfer_fee_extension", + "family": "confidential_transfer_fee", + "status": "published_candidate_current", + "payload": "exact_subdiscriminant_and_variant_payload", + "decoderStatus": "structured_exact_wire", + "publicWire": { + "initializeConfidentialTransferFeeConfig": "tag,sub=0,authority[32],withdrawWithheldAuthorityElgamalPubkey[32]", + "withdrawWithheldTokensFromMint": "tag,sub=1,proofInstructionOffset[i8],newDecryptableAvailableBalance[36]", + "withdrawWithheldTokensFromAccounts": "tag,sub=2,numTokenAccounts[u8],proofInstructionOffset[i8],newDecryptableAvailableBalance[36]", + "harvestWithheldTokensToMint": "tag,sub=3", + "enableHarvestToMint": "tag,sub=4", + "disableHarvestToMint": "tag,sub=5" + } + }, + { + "tag": 38, + "name": "withdraw_excess_lamports", + "family": "base", + "status": "published_candidate_current", + "payload": "unit" + }, + { + "tag": 39, + "name": "metadata_pointer_extension", + "family": "metadata_pointer", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 40, + "name": "group_pointer_extension", + "family": "group_pointer", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 41, + "name": "group_member_pointer_extension", + "family": "group_member_pointer", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 42, + "name": "confidential_mint_burn_extension", + "family": "confidential_mint_burn", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 43, + "name": "scaled_ui_amount_extension", + "family": "scaled_ui_amount", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 44, + "name": "pausable_extension", + "family": "pausable", + "status": "published_candidate_current", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 45, + "name": "unwrap_lamports", + "family": "native_mint", + "status": "published_candidate_current", + "payload": "coption_u64_le" + }, + { + "tag": 46, + "name": "permissioned_burn_extension", + "family": "permissioned_burn", + "status": "published_candidate_recent", + "payload": "subdiscriminant_and_variant_payload_pending" + }, + { + "tag": 255, + "name": "batch", + "family": "batch", + "status": "published_candidate_current", + "payload": "bounded_sequence_pending_processor_limits" + } + ], + "extensionTypeDefaults": { + "encoding": "u16_le", + "tlvHeaderBytes": 4, + "length": "pending_exact_size_of_audit", + "padding": "pending_exact_account_len_audit", + "repeatAllowed": false, + "unknownPolicy": "preserve_bounded_opaque_entry", + "instructionFamilies": [], + "authoritiesAndFields": "pending_exact_layout_audit", + "authorizedProjections": [], + "executorSupport": "not_started", + "proofs": { + "synthetic": [], + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + } + }, + "extensionTypes": [ + { + "type": 0, + "name": "uninitialized", + "accountType": "uninitialized", + "length": 0, + "variableLength": false, + "status": "padding_sentinel" + }, + { + "type": 1, + "name": "transfer_fee_config", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 2, + "name": "transfer_fee_amount", + "accountType": "account", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 3, + "name": "mint_close_authority", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 4, + "name": "confidential_transfer_mint", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 5, + "name": "confidential_transfer_account", + "accountType": "account", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 6, + "name": "default_account_state", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 7, + "name": "immutable_owner", + "accountType": "account", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 8, + "name": "memo_transfer", + "accountType": "account", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 9, + "name": "non_transferable", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 10, + "name": "interest_bearing_config", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 11, + "name": "cpi_guard", + "accountType": "account", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 12, + "name": "permanent_delegate", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 13, + "name": "non_transferable_account", + "accountType": "account", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 14, + "name": "transfer_hook", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 15, + "name": "transfer_hook_account", + "accountType": "account", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 16, + "name": "confidential_transfer_fee_config", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 17, + "name": "confidential_transfer_fee_amount", + "accountType": "account", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 18, + "name": "metadata_pointer", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 19, + "name": "token_metadata", + "accountType": "mint", + "length": "variable", + "variableLength": true, + "status": "published_external_interface_state" + }, + { + "type": 20, + "name": "group_pointer", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 21, + "name": "token_group", + "accountType": "mint", + "variableLength": false, + "status": "published_external_interface_state" + }, + { + "type": 22, + "name": "group_member_pointer", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 23, + "name": "token_group_member", + "accountType": "mint", + "variableLength": false, + "status": "published_external_interface_state" + }, + { + "type": 24, + "name": "confidential_mint_burn", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 25, + "name": "scaled_ui_amount", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 26, + "name": "pausable", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 27, + "name": "pausable_account", + "accountType": "account", + "variableLength": false, + "status": "published_candidate" + }, + { + "type": 28, + "name": "permissioned_burn", + "accountType": "mint", + "variableLength": false, + "status": "published_candidate_recent" + } + ], + "knownExtensionCompatibility": { + "requiredAccountExtensions": { + "transfer_fee_config": [ + "transfer_fee_amount" + ], + "non_transferable": [ + "non_transferable_account", + "immutable_owner" + ], + "transfer_hook": [ + "transfer_hook_account" + ], + "pausable": [ + "pausable_account" + ] + }, + "invalidMintCombinations": [ + "confidential_transfer_fee_config_without_transfer_fee_config_and_confidential_transfer_mint", + "transfer_fee_config_plus_confidential_transfer_mint_without_confidential_transfer_fee_config", + "confidential_mint_burn_without_confidential_transfer_mint", + "scaled_ui_amount_with_interest_bearing_config", + "non_transferable_plus_confidential_transfer_mint_without_confidential_mint_burn" + ] + }, + "materializationAudit": { + "existingOwnersInspected": [ + "token_accounts", + "admin", + "fees", + "compliance_audit", + "risk", + "lifecycle" + ], + "currentToken2022InstructionClaims": [], + "provisionalOwnership": { + "token_accounts": [ + "committed_instructional_mint_and_account_lifecycle" + ], + "admin": [ + "committed_authority_and_configuration_changes" + ], + "fees": [ + "instruction_proven_transfer_fee_parameters_and_withheld_movements_only" + ], + "compliance_audit": [ + "memo_hook_cpi_guard_and_confidential_operation_facts" + ], + "risk": [ + "stable_fact_only_no_score" + ], + "lifecycle": [ + "no_token_2022_claim_until_non_overlap_is_proven" + ] + }, + "forbiddenClaims": [ + "final_balance_snapshot", + "final_withheld_total", + "accrued_interest", + "decrypted_confidential_state", + "duplicate_parent_and_cpi_fact" + ] + }, + "elgamalRegistryBoundary": { + "workspaceConstraint": "^0.2", + "resolvedVersion": "0.2.1", + "resolvedFeatures": [ + "default" + ], + "resolutionStatus": "confirmed_by_operator_cargo_tree_2026-07-16", + "leafConsumer": "kb_decoder_spl_token_2022_for_audit_only_pending_dedicated_crate_decision", + "operatorEvidence": "cargo tree -i spl-elgamal-registry-interface -e features", + "programId": "regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg", + "programIdEvidence": "spl-elgamal-registry-interface 0.2.1 declare_id", + "registryAddressSeedUtf8": "elgamal-registry", + "status": "identity_confirmed_separate_instruction_processor_and_cluster_audit_pending", + "matrix": "separate_matrix_required", + "sharedInstructionEnum": false, + "sharedDecoder": false, + "sharedExecutor": false, + "nativeZkElgamalProofProgramId": "ZkE1Gama1Proof11111111111111111111111111111", + "requiredInstructionAudit": [ + "instruction discriminants and exact wire", + "registry PDA derivation and wallet ownership relation", + "ElGamal public key and proof-account references", + "create_or_update lifecycle and authority/signature contract", + "cluster deployment and constructible builder status" + ], + "token2022DependencyAudit": "Confidential Token-2022 instructions may reference registry accounts or ElGamal public keys, but registry instructions remain a separate Program ID surface." + }, + "processorDispatch": { + "precedence": [ + "pod_token_instruction_u8", + "token_metadata_interface_8_byte_discriminator", + "token_group_interface_8_byte_discriminator", + "invalid_instruction" + ], + "source": "program/src/processor.rs Processor::_process_inner at commit e18f9c6f9bf6044b934f48e3090e8e59e4820f02", + "extensionFamilies": [ + { + "tag": 26, + "family": "transfer_fee", + "subInstructionCount": 6, + "subInstructions": [ + "initialize_transfer_fee_config", + "transfer_checked_with_fee", + "withdraw_withheld_tokens_from_mint", + "withdraw_withheld_tokens_from_accounts", + "harvest_withheld_tokens_to_mint", + "set_transfer_fee" + ] + }, + { + "tag": 27, + "family": "confidential_transfer", + "subInstructionCount": 15, + "subInstructions": [ + "initialize_mint", + "update_mint", + "configure_account", + "approve_account", + "empty_account", + "deposit", + "withdraw", + "transfer", + "apply_pending_balance", + "enable_confidential_credits", + "disable_confidential_credits", + "enable_non_confidential_credits", + "disable_non_confidential_credits", + "transfer_with_fee", + "configure_account_with_registry" + ] + }, + { + "tag": 28, + "family": "default_account_state", + "subInstructionCount": 2, + "subInstructions": [ + "initialize", + "update" + ] + }, + { + "tag": 30, + "family": "memo_transfer", + "subInstructionCount": 2, + "subInstructions": [ + "enable", + "disable" + ] + }, + { + "tag": 33, + "family": "interest_bearing_mint", + "subInstructionCount": 2, + "subInstructions": [ + "initialize", + "update_rate" + ] + }, + { + "tag": 34, + "family": "cpi_guard", + "subInstructionCount": 2, + "subInstructions": [ + "enable", + "disable" + ] + }, + { + "tag": 36, + "family": "transfer_hook", + "subInstructionCount": 2, + "subInstructions": [ + "initialize", + "update" + ] + }, + { + "tag": 37, + "family": "confidential_transfer_fee", + "subInstructionCount": 6, + "subInstructions": [ + "initialize_confidential_transfer_fee_config", + "withdraw_withheld_tokens_from_mint", + "withdraw_withheld_tokens_from_accounts", + "harvest_withheld_tokens_to_mint", + "enable_harvest_to_mint", + "disable_harvest_to_mint" + ] + }, + { + "tag": 39, + "family": "metadata_pointer", + "subInstructionCount": 2, + "subInstructions": [ + "initialize", + "update" + ] + }, + { + "tag": 40, + "family": "group_pointer", + "subInstructionCount": 2, + "subInstructions": [ + "initialize", + "update" + ] + }, + { + "tag": 41, + "family": "group_member_pointer", + "subInstructionCount": 2, + "subInstructions": [ + "initialize", + "update" + ] + }, + { + "tag": 42, + "family": "confidential_mint_burn", + "subInstructionCount": 6, + "subInstructions": [ + "initialize_mint", + "rotate_supply_elgamal_pubkey", + "update_decryptable_supply", + "mint", + "burn", + "apply_pending_burn" + ] + }, + { + "tag": 43, + "family": "scaled_ui_amount", + "subInstructionCount": 2, + "subInstructions": [ + "initialize", + "update_multiplier" + ] + }, + { + "tag": 44, + "family": "pausable", + "subInstructionCount": 3, + "subInstructions": [ + "initialize", + "pause", + "resume" + ] + }, + { + "tag": 46, + "family": "permissioned_burn", + "subInstructionCount": 4, + "subInstructions": [ + "initialize", + "burn", + "burn_checked", + "confidential_burn" + ] + } + ], + "embeddedInterfaceFallbacks": [ + { + "interface": "spl-token-metadata-interface", + "resolvedByProcessorCargoLock": "1.0.0", + "name": "initialize", + "discriminatorHex": "d2e11ea258b84d8d", + "encoding": "8_byte_sha256_prefix_plus_bounded_borsh", + "accounts": [ + { + "index": 0, + "role": "metadata", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "update_authority", + "writable": false, + "signer": false + }, + { + "index": 2, + "role": "mint", + "writable": false, + "signer": false + }, + { + "index": 3, + "role": "mint_authority", + "writable": false, + "signer": true + } + ] + }, + { + "interface": "spl-token-metadata-interface", + "resolvedByProcessorCargoLock": "1.0.0", + "name": "update_field", + "discriminatorHex": "dde9312db5cadcc8", + "encoding": "8_byte_sha256_prefix_plus_bounded_borsh", + "accounts": [ + { + "index": 0, + "role": "metadata", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "update_authority", + "writable": false, + "signer": true + } + ] + }, + { + "interface": "spl-token-metadata-interface", + "resolvedByProcessorCargoLock": "1.0.0", + "name": "remove_key", + "discriminatorHex": "ea122038598d25b5", + "encoding": "8_byte_sha256_prefix_plus_bounded_borsh", + "accounts": [ + { + "index": 0, + "role": "metadata", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "update_authority", + "writable": false, + "signer": true + } + ] + }, + { + "interface": "spl-token-metadata-interface", + "resolvedByProcessorCargoLock": "1.0.0", + "name": "update_authority", + "discriminatorHex": "d7e4a6e45464567b", + "encoding": "8_byte_sha256_prefix_plus_exact_borsh", + "accounts": [ + { + "index": 0, + "role": "metadata", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "current_update_authority", + "writable": false, + "signer": true + } + ] + }, + { + "interface": "spl-token-metadata-interface", + "resolvedByProcessorCargoLock": "1.0.0", + "name": "emit", + "discriminatorHex": "faa6b4fa0d0cb846", + "encoding": "8_byte_sha256_prefix_plus_exact_borsh", + "accounts": [ + { + "index": 0, + "role": "metadata", + "writable": false, + "signer": false + } + ] + }, + { + "interface": "spl-token-group-interface", + "resolvedByProcessorCargoLock": "0.7.2", + "name": "initialize_group", + "discriminatorHex": "79716c2736330004", + "encoding": "8_byte_sha256_prefix_plus_exact_pod", + "accounts": [ + { + "index": 0, + "role": "group", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "mint", + "writable": false, + "signer": false + }, + { + "index": 2, + "role": "mint_authority", + "writable": false, + "signer": true + } + ] + }, + { + "interface": "spl-token-group-interface", + "resolvedByProcessorCargoLock": "0.7.2", + "name": "update_group_max_size", + "discriminatorHex": "6c25ab8ff81e126e", + "encoding": "8_byte_sha256_prefix_plus_exact_pod", + "accounts": [ + { + "index": 0, + "role": "group", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "update_authority", + "writable": false, + "signer": true + } + ] + }, + { + "interface": "spl-token-group-interface", + "resolvedByProcessorCargoLock": "0.7.2", + "name": "update_group_authority", + "discriminatorHex": "a1695801edddd8cb", + "encoding": "8_byte_sha256_prefix_plus_exact_pod", + "accounts": [ + { + "index": 0, + "role": "group", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "current_update_authority", + "writable": false, + "signer": true + } + ] + }, + { + "interface": "spl-token-group-interface", + "resolvedByProcessorCargoLock": "0.7.2", + "name": "initialize_member", + "discriminatorHex": "9820deb0dfed7486", + "encoding": "8_byte_sha256_prefix_plus_exact_pod", + "accounts": [ + { + "index": 0, + "role": "member", + "writable": true, + "signer": false + }, + { + "index": 1, + "role": "member_mint", + "writable": false, + "signer": false + }, + { + "index": 2, + "role": "member_mint_authority", + "writable": false, + "signer": true + }, + { + "index": 3, + "role": "group", + "writable": true, + "signer": false + }, + { + "index": 4, + "role": "group_update_authority", + "writable": false, + "signer": true + } + ] + } + ], + "ownershipRule": "These nine interface instructions belong to the Token-2022 decoder only when the outer or inner executable program ID is Tokenz. A CPI to a third-party implementation belongs to that third-party Program ID decoder." + }, + "extensionImplementationStatus": { + "status": "all_published_extension_instruction_leaves_exact_wire_decoded", + "decodedLeafCount": 58, + "groups": [ + { + "envelopeTag": 26, + "group": "transfer_fee", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_transfer_fee_config", + "transfer_checked_with_fee", + "withdraw_withheld_tokens_from_mint", + "withdraw_withheld_tokens_from_accounts", + "harvest_withheld_tokens_to_mint", + "set_transfer_fee" + ], + "executorStatus": "pending_after_projection" + }, + { + "envelopeTag": 28, + "group": "default_account_state", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_default_account_state", + "update_default_account_state" + ], + "executorStatus": "pending_after_projection" + }, + { + "envelopeTag": 30, + "group": "memo_transfer", + "status": "exact_wire_decoded", + "leafInstructions": [ + "enable_required_transfer_memos", + "disable_required_transfer_memos" + ], + "executorStatus": "pending_after_projection" + }, + { + "envelopeTag": 34, + "group": "cpi_guard", + "status": "exact_wire_decoded", + "leafInstructions": [ + "enable_cpi_guard", + "disable_cpi_guard" + ], + "executorStatus": "pending_after_projection" + }, + { + "envelopeTag": 33, + "group": "interest_bearing_mint", + "status": "exact_wire_decoded_projected_and_official_builders_enabled", + "leafInstructions": [ + "initialize_interest_bearing_mint", + "update_interest_bearing_rate" + ], + "executorStatus": "official_interface_builders_enabled" + } + ], + "remainingOpaqueEnvelopeTags": [], + "nonClaim": "All 58 published extension instruction leaves and all nine embedded Metadata/Group interface leaves are decoded exactly; this does not claim materialization, executor, proof-context, cluster availability, or stateful preflight completion.", + "baseExtensionOperations": { + "status": "decoded_projected_and_official_builders_enabled", + "operations": [ + "reallocate", + "initialize_non_transferable_mint", + "initialize_permanent_delegate" + ] + }, + "embeddedInterfaceDecodedLeafCount": 9, + "processorDispatchEquality": "33 base leaves + 58 extension leaves + 5 metadata leaves + 4 group leaves = 100 routable leaves", + "embeddedInterfaceStatus": "exact_decoder_dispatch_added_for_all_nine_fallbacks", + "decodedExtensionGroups": [ + { + "envelopeTag": 27, + "group": "confidential_transfer", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_confidential_transfer_mint", + "update_confidential_transfer_mint", + "configure_confidential_transfer_account", + "approve_confidential_transfer_account", + "empty_confidential_transfer_account", + "deposit_confidential_tokens", + "withdraw_confidential_tokens", + "transfer_confidential_tokens", + "apply_confidential_pending_balance", + "enable_confidential_credits", + "disable_confidential_credits", + "enable_non_confidential_credits", + "disable_non_confidential_credits", + "transfer_confidential_tokens_with_fee", + "configure_confidential_transfer_account_with_registry" + ], + "executorStatus": "public_and_confidential_transfer_builders_progressively_enabled_through_transfer" + }, + { + "envelopeTag": 36, + "group": "transfer_hook", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_transfer_hook", + "update_transfer_hook_program_id" + ], + "executorStatus": "pending_after_projection" + }, + { + "envelopeTag": 37, + "group": "confidential_transfer_fee", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_confidential_transfer_fee_config", + "withdraw_confidential_withheld_tokens_from_mint", + "withdraw_confidential_withheld_tokens_from_accounts", + "harvest_confidential_withheld_tokens_to_mint", + "enable_confidential_harvest_to_mint", + "disable_confidential_harvest_to_mint" + ], + "executorStatus": "pending_after_projection_and_stateful_preflight" + }, + { + "envelopeTag": 39, + "group": "metadata_pointer", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_metadata_pointer", + "update_metadata_pointer" + ], + "executorStatus": "pending_after_projection" + }, + { + "envelopeTag": 40, + "group": "group_pointer", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_group_pointer", + "update_group_pointer" + ], + "executorStatus": "pending_after_projection" + }, + { + "envelopeTag": 41, + "group": "group_member_pointer", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_group_member_pointer", + "update_group_member_pointer" + ], + "executorStatus": "pending_after_projection" + }, + { + "envelopeTag": 42, + "group": "confidential_mint_burn", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_confidential_mint_burn", + "rotate_confidential_supply_elgamal_pubkey", + "update_confidential_decryptable_supply", + "confidential_mint", + "confidential_burn", + "apply_pending_confidential_burn" + ], + "executorStatus": "pending_after_projection_and_stateful_preflight" + }, + { + "envelopeTag": 43, + "group": "scaled_ui_amount", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_scaled_ui_amount", + "update_scaled_ui_amount_multiplier" + ], + "executorStatus": "pending_after_projection" + }, + { + "envelopeTag": 44, + "group": "pausable", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_pausable_config", + "pause_token_mint", + "resume_token_mint" + ], + "executorStatus": "pending_after_projection" + }, + { + "envelopeTag": 46, + "group": "permissioned_burn", + "status": "exact_wire_decoded", + "leafInstructions": [ + "initialize_permissioned_burn", + "permissioned_burn", + "permissioned_burn_checked", + "permissioned_confidential_burn" + ], + "executorStatus": "pending_after_projection_and_stateful_preflight" + } + ], + "exactExtensionLeafCount": 30 + } +} diff --git a/olddocs/archivekbot2/docs/SPL_TOKEN_2022_SOURCE_AUDIT.md b/olddocs/archivekbot2/docs/SPL_TOKEN_2022_SOURCE_AUDIT.md new file mode 100644 index 0000000..00d2b2a --- /dev/null +++ b/olddocs/archivekbot2/docs/SPL_TOKEN_2022_SOURCE_AUDIT.md @@ -0,0 +1,251 @@ + + + +# Audit des sources Token-2022 résolues + +## Ancrage reproductible + +L'interface Cargo résolue `spl-token-2022-interface 3.1.1` publie le commit +`e18f9c6f9bf6044b934f48e3090e8e59e4820f02`, tagué `interface@v3.1.1` le 26 juin 2026. +L'audit est effectué sur ce commit détaché, jamais sur la branche `main` mouvante. + +Le `Cargo.lock` du workspace opérateur, SHA-256 +`248c02af8c78d3bb6ad747460fee0011f8141feef83364cf697e35e44bd4ceb9`, confirme que +`kb_decoder_spl_token_2022 0.4.5` consomme directement les interfaces Token-2022 et registre +ElGamal. Pour `spl-token-2022-interface 3.1.1`, il résout exactement : + +- `solana-zk-elgamal-proof-interface 0.1.3` ; +- `spl-token-confidential-transfer-proof-extraction 0.6.1` ; +- `spl-token-group-interface 0.7.2` ; +- `spl-token-metadata-interface 1.0.1` ; +- `spl-type-length-value 0.9.1`. + +La sortie `cargo tree -p spl-token-2022-interface -e features` prouve en particulier le chemin de +consommation direct de Token Metadata `1.0.1`. Cette version diffère du `1.0.0` figé dans le +`Cargo.lock` du processor source audité : les discriminants, layouts et builders devront donc être +comparés différentiellement avant le décodeur, sans supposer leur égalité. + +La comparaison officielle clôt cette dérive : `interface@v1.0.1`, publiée le 29 juin 2026 au +commit court `7038969`, contient le correctif fusionné `fc97c60` de la pull request `87`. Le diff +de production ajoute 78 lignes dans `interface/src/instruction.rs` sans suppression. Les +discriminants, structures de payload et builders existants ne changent pas ; `unpack()` valide +désormais les longueurs Borsh `u32 LE` avant `try_from_slice` pour : + +- `Initialize` : `name`, `symbol`, `uri` ; +- `UpdateField` : la chaîne de `Field::Key` lorsque le tag vaut `3`, puis `value` ; +- `RemoveKey` : `key`, après l'octet booléen `idempotent`. + +`UpdateAuthority` et `Emit` ne transportent pas de chaîne et restent inchangés. Le décodeur devra +appliquer la garde `1.0.1` avant toute allocation, même si le processor source figé résolvait +encore `1.0.0`. + +Au même commit : + +- `program/Cargo.toml` déclare le processor `spl-token-2022 11.0.0` ; +- sa dépendance path demande l'interface `3.1.0`, satisfaite par le package workspace `3.1.1` ; +- le `Cargo.lock` source résout `spl-token-group-interface 0.7.2`, + `spl-token-metadata-interface 1.0.0` et `spl-elgamal-registry-interface 0.2.1` ; +- l'égalité du binaire déployé avec cette source reste non prouvée sur Localnet, Devnet et Mainnet. + +## Dispatch réellement implémenté + +`Processor::_process_inner` applique cet ordre : + +1. `PodTokenInstruction`, discriminant `u8` ; +2. si ce décodage échoue, `TokenMetadataInstruction`, discriminant SPL de huit octets ; +3. si ce décodage échoue, `TokenGroupInstruction`, discriminant SPL de huit octets ; +4. sinon `InvalidInstruction`. + +La surface routable contient donc : + +| Famille | Enveloppes ou formes | +|------------------------------------------------------|---------------------:| +| Tags Token-2022 `u8` | 48 | +| Familles d'extensions parmi ces tags | 15 | +| Sous-instructions de ces familles | 58 | +| Formes Token-2022 hors enveloppes | 33 | +| Instructions Token Metadata exécutées par Token-2022 | 5 | +| Instructions Token Group exécutées par Token-2022 | 4 | +| Formes feuilles routables par le processor | 100 | + +Les 48 tags ne constituent donc pas, seuls, une déclaration de couverture maximale. Les quinze +tags d'extension sont des enveloppes et doivent être remplacés par leurs 58 sous-instructions dans +le comptage des formes feuilles. + +## Interfaces incorporées au processor + +Les neuf discriminants ci-dessous sont exécutés par Token-2022 lorsqu'ils ciblent le Program ID +`TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` : + +| Interface | Instruction | Discriminant hexadécimal | +|------------------------|--------------------------|--------------------------| +| Token Metadata `1.0.0` | `initialize` | `d2e11ea258b84d8d` | +| Token Metadata `1.0.0` | `update_field` | `dde9312db5cadcc8` | +| Token Metadata `1.0.0` | `remove_key` | `ea122038598d25b5` | +| Token Metadata `1.0.0` | `update_authority` | `d7e4a6e45464567b` | +| Token Metadata `1.0.0` | `emit` | `faa6b4fa0d0cb846` | +| Token Group `0.7.2` | `initialize_group` | `79716c2736330004` | +| Token Group `0.7.2` | `update_group_max_size` | `6c25ab8ff81e126e` | +| Token Group `0.7.2` | `update_group_authority` | `a1695801edddd8cb` | +| Token Group `0.7.2` | `initialize_member` | `9820deb0dfed7486` | + +Le propriétaire du décodage dépend toujours du Program ID exécutable : une CPI vers un programme +tiers implémentant la même interface appartient au décodeur de ce programme tiers. Un TLV pointeur +reste un lien et ne transfère pas la propriété du fait métier. + +## Wire public des instructions hors enveloppes + +Les 33 tags qui ne sont pas des enveloppes d'extension ont maintenant une ligne machine-readable +dans `baseInstructionWireAudit`. Les tailles incluent toujours le tag `u8`. L'interface `3.1.1` +encode les options d'instruction de manière compacte, distincte du `COption` à quatre octets des +états de compte : `0` tient sur un octet ; `1` est suivi de 32 octets pour une clé publique ou de +huit octets pour un `u64`. + +Ce point donne notamment les tailles exactes suivantes : + +- `InitializeMint` et `InitializeMint2` : 35 octets sans freeze authority, 67 avec ; +- `SetAuthority` : 3 octets sans nouvelle autorité, 35 avec ; +- `InitializeMintCloseAuthority` : 2 octets sans autorité, 34 avec ; +- `UnwrapLamports` : 2 octets sans montant, 10 avec. + +`GetAccountDataSize` et `Reallocate` consomment tout le suffixe par éléments `ExtensionType u16 LE` ; +un suffixe impair ou un type inconnu est rejeté par l'unpacker d'interface. `UiAmountToAmount` +consomme tout le suffixe comme UTF-8, y compris une chaîne vide au seul niveau de l'interface. +`Batch` conserve tout le suffixe comme wire de records, dont les bornes et la validation processor +restent à auditer. + +La distinction critique est conservée dans la matrice : `TokenInstruction::unpack()` appelle +`unpack_with_rest()` puis ignore le reste retourné. Pour les formes à préfixe fixe ou sans payload, +un succès de cet unpacker public ne prouve donc pas la consommation de tout le buffer, ni +l'acceptation du suffixe par le runtime. Le futur décodeur devra préserver et diagnostiquer tout +suffixe borné jusqu'à ce que le chemin exact du processor figé en établisse la règle variante par +variante. + +## Règles de suffixe du processor figé + +La comparaison a ensuite été menée sur les trois fichiers exacts du commit, avec leurs empreintes +SHA-256 enregistrées dans la matrice : + +- `interface/src/instruction.rs` : `672b3890…b3a287` ; +- `program/src/pod_instruction.rs` : `7b546580…49c7e5` ; +- `program/src/processor.rs` : `9d11b834…3032d`. + +Les 33 formes hors enveloppes forment une partition complète et sans doublon : + +| Règle processor | Tags | Nombre | +|------------------------------------------------|----------------------------------------|-------:| +| longueur totale Pod exacte | `2,3,4,7,8,12,13,14,15,16,18,19,23,35` | 14 | +| préfixe Pod + option compacte, suffixe accepté | `0,6,20,25,45` | 5 | +| tag seul, suffixe non inspecté et accepté | `1,5,9,10,11,17,22,31,32,38` | 10 | +| reste entier interprété comme payload | `21,24,29` | 3 | +| flux de records `Batch` | `255` | 1 | + +`decode_instruction_data()` exige exactement `1 + size_of::()` octets. À l'inverse, les +helpers privés des options compactes lisent la structure Pod, puis `0`, ou `1` suivi de la valeur, +sans vérifier l'épuisement du buffer. Pour les dix branches sans données, le processor n'appelle +aucun décodeur après la lecture du premier octet. Ces quinze formes acceptent donc réellement un +suffixe, même si celui-ci ne porte aucune sémantique publiée. Le décodeur devra le préserver sous +forme bornée et le diagnostiquer explicitement, sans créer de champ métier. + +Pour `GetAccountDataSize` et `Reallocate`, chaque morceau de deux octets doit former un +`ExtensionType` connu ; un dernier morceau incomplet ou un type inconnu échoue. Pour +`UiAmountToAmount`, tout le reste doit être UTF-8, la chaîne vide restant admise à ce niveau. + +`Batch` ne peut pas être vide : le plus petit wire total contient le tag externe, un header de deux +octets et au moins un discriminant interne, soit quatre octets. Chaque record encode en `u8` son +nombre de comptes et la longueur totale de son instruction interne. Un header ou payload tronqué +échoue ; une longueur interne nulle échoue au dispatch ; un `Batch` interne est rejeté par +`_process_inner`. Les fallbacks Token Metadata et Token Group restent en revanche joignables dans +un record lorsque leur wire tient dans les 255 octets. Le processor n'impose pas de nombre maximal +explicite de records au-delà des limites de transaction et de calcul : le décodeur devra donc poser +sa propre borne. + +## Comptes publiés par les builders de base + +La matrice contient désormais une ligne ordonnée pour chacune des 33 formes hors enveloppes. Elle +enregistre les metas exactes des 32 helpers Rust publiés : rôle, `writable`, `signer`, compte +optionnel et queue multisig. `Batch` reste la seule forme sans helper Rust dédié pour construire +ses metas ; `TokenInstruction::pack()` ne produit que ses données. + +Les autorités simples et multisig partagent le contrat classique des builders : l'autorité est +signataire lorsque la liste `signer_pubkeys` est vide ; sinon elle ne signe pas et chaque élément +de la queue est ajouté en lecture seule avec le flag signataire. Le builder ne borne pas la taille +de cette queue pour les opérations d'autorité et conserve ordre et doublons. Le runtime ne peut +toutefois satisfaire qu'un multisig stockant de un à onze positions. + +`InitializeMultisig` et `InitializeMultisig2` ont un contrat différent : les clés de configuration +ne signent pas. Le builder exige `m` et `n` dans `1..=11` ainsi que `m <= n`. Le processor consomme +tous les comptes restants comme clés de configuration, valide séparément `m` et `n`, mais ne +répète pas le contrôle `m <= n`. Une instruction manuelle `m > n` peut donc initialiser un état que +le builder refuse. Le décodeur doit conserver ce fait et le diagnostiquer sans le normaliser. + +`SyncNative` publie deux helpers : le premier fournit seulement le compte natif modifiable ; le +second ajoute Rent en lecture seule. Le processor traite effectivement le deuxième compte comme +optionnel, mais ignore ceux qui suivraient. `Batch` découpe les comptes selon le compteur `u8` de +chaque record ; les comptes externes restant après le dernier record ne sont pas rejetés. Ils +devront rester visibles comme comptes non assignés. + +Le contrat builder de `Reallocate` est fixé — compte à agrandir modifiable, payer modifiable et +signataire, System Program, propriétaire conditionnel puis queue multisig — mais la consommation +runtime détaillée reste ouverte jusqu'à reconfirmation du module séparé +`program/src/extension/reallocate.rs` au même commit. Cette limite empêche de déclarer l'audit +processor des comptes entièrement clos. + +## Sources auditées + +- dépôt `solana-program/token-2022`, commit figé ci-dessus ; +- `interface/src/instruction.rs` et `interface/src/extension/**/instruction.rs` ; +- `interface/src/extension/mod.rs` et les états d'extension ; +- `program/src/processor.rs` et `program/src/extension/**/processor.rs` ; +- dépôt `solana-program/token-metadata`, commit + `552935e00710478541e3394a8b2624c9ba7f503f`, tag `interface@v1.0.0` ; +- dépôt `solana-program/token-group`, commit + `2645064953937118572735993ed0ac1d07db5f14`, tag `interface@v0.7.2`. + +## Limites restantes + +Cette tranche confirme le wire public, les règles runtime de suffixe et les metas officielles des +builders des 33 formes hors enveloppes. Elle ne clôt pas encore l'audit par variante : consommation +processor complète des comptes, données de preuve, builders des extensions, statuts de +construction et compatibilité cluster doivent encore être renseignés avant le décodeur. + +## Première tranche verticale d'extensions + +Le décodeur structure désormais exactement douze feuilles issues de quatre enveloppes : les six +instructions Transfer Fee, les deux Default Account State, les deux Memo Transfer et les deux CPI +Guard. Les discriminants, champs numériques, options compactes et règles de longueur proviennent +des interfaces figées au commit audité. Les onze autres enveloppes restent opaques et ne sont pas +comptées comme décodées sémantiquement. + +Cette tranche ne déclare encore aucune capacité exécuteur d'extension. Conformément à l'ordre du +jalon, les projections propriétaires et leurs tests de non-duplication doivent être validés avant +d'activer les builders officiels correspondants. + +## Dispatch incorporé Token Metadata et Token Group + +Le dispatch de production ne peut pas se limiter au premier octet de `TokenInstruction`. Après +échec du décodage Token-2022 principal, le processor `11.0.0` audité tente successivement les +interfaces Token Metadata puis Token Group. Les neuf discriminants déjà inventoriés dans la +matrice sont donc désormais reconnus par le décodeur Token-2022 lorsque le Program ID réellement +exécuté est `Tokenz...` : cinq feuilles Metadata et quatre feuilles Group. + +Les chaînes Borsh Metadata sont bornées avant allocation et décodage. Les layouts Pod Group sont +traités avec une longueur exacte. Cette intégration ne décode pas un programme tiers implémentant +les mêmes interfaces : une CPI vers un autre Program ID reste la propriété du décodeur de ce +programme. + +L'égalité de surface à maintenir est désormais explicitement compilée et documentée : + +```text +33 feuilles hors enveloppes + 58 feuilles d'extensions + 5 Metadata + 4 Group = 100 +``` + +## Audit ElGamal restant + +La présence de `spl-elgamal-registry-interface 0.2.1`, de son Program ID `regVY...` et de la seed +`elgamal-registry` ne suffit pas à revendiquer sa couverture. La tranche dédiée doit encore fixer +les discriminants et le wire exacts, la dérivation PDA, la relation wallet/owner, les clés ElGamal, +les références de preuve, le lifecycle create/update, les autorités et signataires, les builders +actuels ou expérimentaux et les preuves de déploiement cluster. Toute référence au registre depuis +une instruction confidentielle Token-2022 reste un lien inter-programme et non une instruction du +registre. diff --git a/olddocs/archivekbot2/docs/SPL_TOKEN_2022_VALIDATION_MATRIX.json b/olddocs/archivekbot2/docs/SPL_TOKEN_2022_VALIDATION_MATRIX.json new file mode 100644 index 0000000..8cedd27 --- /dev/null +++ b/olddocs/archivekbot2/docs/SPL_TOKEN_2022_VALIDATION_MATRIX.json @@ -0,0 +1,146 @@ +{ + "matrixVersion": 2, + "milestone": "0.4.6", + "status": "partially_confirmed", + "statusVocabulary": [ + "not_run", + "simulated", + "submitted", + "confirmed", + "unavailable", + "failed" + ], + "scenarios": [ + { + "id": "offline_full_regression", + "environment": "offline", + "status": "confirmed", + "requiredEvidence": [ + "test_suite", + "clippy" + ], + "evidence": [ + { + "kind": "test_suite", + "value": "kb_pipeline 120/120" + }, + { + "kind": "test_suite", + "value": "kb_executor_spl_token_2022 44/44" + }, + { + "kind": "test_suite", + "value": "kb_executor_spl_elgamal_registry 6/6" + }, + { + "kind": "clippy", + "value": "cargo clippy --all-targets clean" + } + ] + }, + { + "id": "token_2022_public_devnet", + "environment": "devnet", + "status": "not_run", + "requiredEvidence": [ + "simulation", + "signature", + "canonical_hydration", + "core_extraction", + "decode_replay", + "materialization", + "second_replay" + ] + }, + { + "id": "elgamal_registry_devnet", + "environment": "devnet", + "status": "not_run", + "requiredEvidence": [ + "simulation", + "signature", + "canonical_hydration", + "core_extraction", + "decode_replay", + "materialization", + "second_replay" + ] + }, + { + "id": "confidential_transfer_localnet_or_devnet", + "environment": "localnet_or_devnet", + "status": "not_run", + "requiredEvidence": [ + "simulation", + "proof_mode", + "signature", + "canonical_hydration", + "core_extraction", + "decode_replay", + "materialization", + "second_replay" + ] + }, + { + "id": "confidential_mint_burn_localnet_or_devnet", + "environment": "localnet_or_devnet", + "status": "not_run", + "requiredEvidence": [ + "simulation", + "proof_mode", + "signature", + "canonical_hydration", + "core_extraction", + "decode_replay", + "materialization", + "second_replay" + ] + }, + { + "id": "permissioned_confidential_burn_localnet_or_devnet", + "environment": "localnet_or_devnet", + "status": "not_run", + "requiredEvidence": [ + "simulation", + "proof_mode", + "signature", + "canonical_hydration", + "core_extraction", + "decode_replay", + "materialization", + "second_replay" + ] + }, + { + "id": "mainnet_observation_corpus", + "environment": "mainnet_observation", + "status": "not_run", + "requiredEvidence": [ + "signatures", + "outer_cpi", + "success_failure" + ] + }, + { + "id": "postgres_double_replay", + "environment": "postgres", + "status": "not_run", + "requiredEvidence": [ + "postgres_tests", + "first_replay", + "second_replay", + "no_duplicates" + ] + }, + { + "id": "tauri_smoke", + "environment": "tauri", + "status": "not_run", + "requiredEvidence": [ + "startup", + "routes", + "journal" + ] + } + ] +} diff --git a/olddocs/archivekbot2/docs/SPL_TOKEN_MATRIX.json b/olddocs/archivekbot2/docs/SPL_TOKEN_MATRIX.json new file mode 100644 index 0000000..2030d4c --- /dev/null +++ b/olddocs/archivekbot2/docs/SPL_TOKEN_MATRIX.json @@ -0,0 +1,1440 @@ +{ + "file": "docs/SPL_TOKEN_MATRIX.json", + "version": 3, + "schemaVersion": 2, + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "interface": { + "workspaceConstraint": "^3.0", + "expectedResolvedVersion": "3.0.0", + "cargoResolutionStatus": "validated_by_workspace_cargo_2026-07-15", + "features": [], + "bincodeEnabled": false, + "officialTag": "interface@v3.0.0", + "sourceCommit": "46eaacd", + "instructionSource": "https://github.com/solana-program/token/blob/interface@v3.0.0/interface/src/instruction.rs", + "stateSource": "https://github.com/solana-program/token/blob/interface@v3.0.0/interface/src/state.rs", + "legacyProcessorSource": "https://github.com/solana-program/token/blob/interface@v3.0.0/program/src/processor.rs", + "pTokenRelease": "p-token@v1.0.0" + }, + "limits": { + "minSigners": 1, + "maxSigners": 11, + "maxBatchInstructions": 64, + "maxBatchAccounts": 512, + "maxInstructionBytes": 16384, + "nestedBatchAllowed": false + }, + "deploymentAudit": { + "localnet": { + "status": "not_tested", + "evidence": [] + }, + "devnet": { + "status": "partially_validated", + "evidence": [ + "TransferChecked simulated and submitted with canonical post-validation on 2026-07-15", + "5Q71KeomfhHBueDsD92C7L21vHUpFGZnZzCFPGaCDAMHx6yV4Jy2fMDzCpze8mNr2c1GLSRT93mmBaYy2RGZ95ZY", + "Controlled no-ATA lifecycle validated InitializeAccount3, MintToChecked, TransferChecked, ApproveChecked, Revoke, BurnChecked and CloseAccount with canonical replay and idempotence on 2026-07-15", + "Batch tag 255 simulation-only succeeded on the classic program with one zero-amount TransferChecked child on 2026-07-16; 270 compute units; no runtime error", + "UnwrapLamports tag 45 simulation-only succeeded for one lamport on a non-associated classic native token account on 2026-07-16; 140 compute units; no runtime error" + ] + }, + "mainnet": { + "status": "real_corpus_decode_and_materialization_validated", + "evidence": [ + "370 classic SPL Token instructions decoded without unsupported, failed or unmatched input on 2026-07-15", + "371 committed materializations; 8 refused outputs matched 8 failed transactions; second replay selected 0 inputs", + "Observed materialized operations: approve 9, burn_checked 1, close_account 79, initialize_account 3, sync_native 56, transfer 2, transfer_checked 212" + ] + }, + "note": "Publication in interface 3.0.0 is tracked separately from processor deployment and successful simulation." + }, + "corpusAudit": { + "mainnet": { + "source": "real canonical transactions replayed from PostgreSQL", + "observedNormalizedOperations": { + "approve": 9, + "burn_checked": 1, + "close_account": 79, + "initialize_account": 3, + "sync_native": 56, + "transfer": 2, + "transfer_checked": 212 + }, + "materializedFamilies": { + "token_account": 362, + "risk": 9 + }, + "invariants": { + "uncommittedOutputs": 0, + "duplicatedBatchParents": 0, + "classicTokenFeeOutputs": 0, + "secondReplaySelected": 0 + }, + "normalizedOperationCaveat": "initialize_account is intentionally not assigned to a specific wire tag because the materialized operation name normalizes historical and current initialization variants" + }, + "devnet": { + "source": "controlled opt-in execution scenarios without ATA", + "transferChecked": "simulation, submission, confirmation, canonical hydration, core extraction, decode, one materialization and idempotent replay validated", + "lifecycle": "raw 82/165/165 account preparation followed by eleven simulation-first Token transactions; recovery after public RPC throttling was validated", + "recentInstructionProbe": { + "date": "2026-07-16", + "submission": false, + "batch": { + "success": true, + "computeUnits": 270, + "child": "TransferChecked amount=0", + "runtimeError": null + }, + "unwrapLamports": { + "success": true, + "computeUnits": 140, + "amountLamports": "1", + "nativeAccount": "3DjMgMbaNU4nLbv8avkZuTPXc31khcfp1bMPV2AcJkZk", + "runtimeError": null + } + } + } + }, + "instructions": [ + { + "name": "initialize_mint", + "tag": 0, + "status": "historical", + "layout": "1 + u8 + Pubkey + COption; 35 or 67 bytes", + "allowedSizes": [ + 35, + 67 + ], + "accounts": [ + "mint(w)", + "rent_sysvar" + ], + "authorityForm": "not_applicable", + "decodedFields": [ + "decimals", + "mint_authority", + "freeze_authority" + ], + "limits": [], + "event": "spl_token.initialize_mint", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "initialize_mint" + }, + "executorSupport": { + "status": "unsupported", + "reasonCode": "execution_spl_token_historical_variant_decode_only", + "reason": "obsolete Rent-dependent initialization variant; the decoder remains exhaustive and the executor uses the current no-Rent builder" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "initialize_account", + "tag": 1, + "status": "historical", + "layout": "tag only; 1 byte", + "allowedSizes": null, + "accounts": [ + "token_account(w)", + "mint", + "owner", + "rent_sysvar" + ], + "authorityForm": "not_applicable", + "decodedFields": [], + "limits": [], + "event": "spl_token.initialize_account", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "initialize_account" + }, + "executorSupport": { + "status": "unsupported", + "reasonCode": "execution_spl_token_historical_variant_decode_only", + "reason": "obsolete Rent-dependent initialization variant; the decoder remains exhaustive and the executor uses the current no-Rent builder" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "initialize_multisig", + "tag": 2, + "status": "historical", + "layout": "1 + u8; 2 bytes", + "allowedSizes": null, + "accounts": [ + "multisig_account(w)", + "rent_sysvar", + "members[1..11]" + ], + "authorityForm": "not_applicable", + "decodedFields": [ + "m", + "n_from_accounts" + ], + "limits": [ + "1 <= M <= N <= 11" + ], + "event": "spl_token.initialize_multisig", + "projections": [ + "token_accounts", + "admin", + "risk" + ], + "officialBuilder": { + "available": true, + "function": "initialize_multisig" + }, + "executorSupport": { + "status": "unsupported", + "reasonCode": "execution_spl_token_historical_variant_decode_only", + "reason": "obsolete Rent-dependent initialization variant; the decoder remains exhaustive and the executor uses the current no-Rent builder" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "transfer", + "tag": 3, + "status": "historical", + "layout": "1 + u64 LE; 9 bytes", + "allowedSizes": null, + "accounts": [ + "source(w)", + "destination(w)", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [ + "amount_raw" + ], + "limits": [], + "event": "spl_token.transfer", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "transfer" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.transfer", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "real_transaction_decoded_and_materialized_2026-07-15" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [ + "5hNLki1wTmRtSkfi3DPmNPB91mGaCBmJ2KDY7bvvaQXPPNFdgYgJcuqQtmsidccbdZo73Du13K8rDbwvZd2fHfvh" + ], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "approve", + "tag": 4, + "status": "historical", + "layout": "1 + u64 LE; 9 bytes", + "allowedSizes": null, + "accounts": [ + "source(w)", + "delegate", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [ + "amount_raw" + ], + "limits": [], + "event": "spl_token.approve", + "projections": [ + "token_accounts", + "risk" + ], + "officialBuilder": { + "available": true, + "function": "approve" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.approve", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "real_transaction_decoded_and_materialized_2026-07-15" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [ + "25GkUzBPcXWgBi6nAu8RAHRsohidKFVCVhmBMdy3Xr9JNZdjvJeiFBmdtQpyadEVx4BfVJZLyifwf9xsDyBEyh84" + ], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "revoke", + "tag": 5, + "status": "historical", + "layout": "tag only; 1 byte", + "allowedSizes": null, + "accounts": [ + "source(w)", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [], + "limits": [], + "event": "spl_token.revoke", + "projections": [ + "token_accounts", + "risk" + ], + "officialBuilder": { + "available": true, + "function": "revoke" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.revoke", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "submission_confirmation_and_replay_validated_2026-07-15", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [ + "3osU5jfqDPdMqQKjTnRtvJLaQBxkwRCAJeSU1zEGCMHC5jFHAd5dV4SnHGK2hc6aBkLNLSzvqD7VgVjLxFfhk4MM" + ], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "set_authority", + "tag": 6, + "status": "historical", + "layout": "1 + AuthorityType u8 + COption; 3 or 35 bytes", + "allowedSizes": [ + 3, + 35 + ], + "accounts": [ + "authority_target(w)", + "current_authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [ + "authority_type", + "new_authority" + ], + "limits": [], + "event": "spl_token.set_authority", + "projections": [ + "admin", + "risk" + ], + "officialBuilder": { + "available": true, + "function": "set_authority" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.set_authority", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "mint_to", + "tag": 7, + "status": "historical", + "layout": "1 + u64 LE; 9 bytes", + "allowedSizes": null, + "accounts": [ + "mint(w)", + "destination(w)", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [ + "amount_raw" + ], + "limits": [], + "event": "spl_token.mint_to", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "mint_to" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.mint_to", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "burn", + "tag": 8, + "status": "historical", + "layout": "1 + u64 LE; 9 bytes", + "allowedSizes": null, + "accounts": [ + "source(w)", + "mint(w)", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [ + "amount_raw" + ], + "limits": [], + "event": "spl_token.burn", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "burn" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.burn", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "close_account", + "tag": 9, + "status": "historical", + "layout": "tag only; 1 byte", + "allowedSizes": null, + "accounts": [ + "source(w)", + "destination(w)", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [], + "limits": [], + "event": "spl_token.close_account", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "close_account" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.close_account", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "submission_confirmation_and_replay_validated_2026-07-15", + "mainnet": "real_transaction_decoded_and_materialized_2026-07-15" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [ + "27iYTpo9X5QNyQCXnfeHiVZqnqhszvrgsUDeC63ukjEF4KtYGPNJ4o4Vg4FGuzke5oHxybDnVvxFFMeqnHF2rSCB", + "hVS2YtL8zEbFPM1tyisWNScBoEkzfxDGeZKeZBpxA8rgEg6mQZXV67xdq6YUkhQX4GrfhPm87gvxupi9k56P9J8", + "4XUCaYXpeXPMBUmfHEWTzgiyoQUZNnF9jaZDAdrgi2qXABi6ZFBcuCUhgHQXqWtUb7V1gEVWXWmvZJKuyaNDqGrp" + ], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "freeze_account", + "tag": 10, + "status": "historical", + "layout": "tag only; 1 byte", + "allowedSizes": null, + "accounts": [ + "token_account(w)", + "mint", + "freeze_authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [], + "limits": [], + "event": "spl_token.freeze_account", + "projections": [ + "token_accounts", + "risk" + ], + "officialBuilder": { + "available": true, + "function": "freeze_account" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.freeze_account", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "thaw_account", + "tag": 11, + "status": "historical", + "layout": "tag only; 1 byte", + "allowedSizes": null, + "accounts": [ + "token_account(w)", + "mint", + "freeze_authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [], + "limits": [], + "event": "spl_token.thaw_account", + "projections": [ + "token_accounts", + "risk" + ], + "officialBuilder": { + "available": true, + "function": "thaw_account" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.thaw_account", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "transfer_checked", + "tag": 12, + "status": "current", + "layout": "1 + u64 LE + u8; 10 bytes", + "allowedSizes": null, + "accounts": [ + "source(w)", + "mint", + "destination(w)", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [ + "amount_raw", + "decimals" + ], + "limits": [], + "event": "spl_token.transfer_checked", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "transfer_checked" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.transfer_checked", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "simulation_submission_confirmation_and_replay_validated_2026-07-15", + "mainnet": "real_transaction_decoded_and_materialized_2026-07-15" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [ + "5Q71KeomfhHBueDsD92C7L21vHUpFGZnZzCFPGaCDAMHx6yV4Jy2fMDzCpze8mNr2c1GLSRT93mmBaYy2RGZ95ZY", + "2Xum6TUAKvu92gBUTCYS3LFtnYbMiR3bDq5VnrRS846ZgicsURqJrbD6LsJAJJD2jG3TPXVsMLY8UJx8NxDqPPbF", + "2125FHp6VjKaFApgDebwww1dGj1SFayKCwZPTwEieRWgKKGLe27Yjk9qKGT9zzc5Pc3Lsu9CRt8TDkJKdgJ1qpRP" + ], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "approve_checked", + "tag": 13, + "status": "current", + "layout": "1 + u64 LE + u8; 10 bytes", + "allowedSizes": null, + "accounts": [ + "source(w)", + "mint", + "delegate", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [ + "amount_raw", + "decimals" + ], + "limits": [], + "event": "spl_token.approve_checked", + "projections": [ + "token_accounts", + "risk" + ], + "officialBuilder": { + "available": true, + "function": "approve_checked" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.approve_checked", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "submission_confirmation_and_replay_validated_2026-07-15", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [ + "4dC5AeizWUMSToEH8xjWjuUqK7GjBUEPD5kWGdi9LpdVBRni38dqocXjA8Wcx2SnLSAUKPaV3JbzKdpWAEu8ZXAR" + ], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "mint_to_checked", + "tag": 14, + "status": "current", + "layout": "1 + u64 LE + u8; 10 bytes", + "allowedSizes": null, + "accounts": [ + "mint(w)", + "destination(w)", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [ + "amount_raw", + "decimals" + ], + "limits": [], + "event": "spl_token.mint_to_checked", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "mint_to_checked" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.mint_to_checked", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "submission_confirmation_and_replay_validated_2026-07-15", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [ + "3yr7CtHeuQPFWFp424Q3NdPA1CUNm1xKd5z6hy1sW5HmbXnkudg4wXFmNhHo8mBJok1xHqqF9uaftqZugj4Aiw3f" + ], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "burn_checked", + "tag": 15, + "status": "current", + "layout": "1 + u64 LE + u8; 10 bytes", + "allowedSizes": null, + "accounts": [ + "source(w)", + "mint(w)", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [ + "amount_raw", + "decimals" + ], + "limits": [], + "event": "spl_token.burn_checked", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "burn_checked" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.burn_checked", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "submission_confirmation_and_replay_validated_2026-07-15", + "mainnet": "real_transaction_decoded_and_materialized_2026-07-15" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [ + "34nijQGRnUoDj6hmdh8fWw5p33dEBxDPG5n4x8QBE4TdzbzathYgCmxzJvutyHhgXj3dqwZgcVdbjtmqZKNDHC3i", + "5sZpdTv1YYLpQ8AynL2eMMeFVwJfCPp8Pwf2KC93XQDM6NiQo9FVvZaL5qp1EFqY98k6ZFTVEirhKoUP7xck8bDg", + "5mk53ez5rJfCPAGUW3uHbYJ1bkBhPNRKi9NAuk6gknXp9CQtKtqUxkVdy6dnxmRTMmewwuFY865V9J72TrwESH5g" + ], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "initialize_account2", + "tag": 16, + "status": "historical", + "layout": "1 + Pubkey; 33 bytes", + "allowedSizes": null, + "accounts": [ + "token_account(w)", + "mint", + "rent_sysvar" + ], + "authorityForm": "not_applicable", + "decodedFields": [ + "owner" + ], + "limits": [], + "event": "spl_token.initialize_account2", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "initialize_account2" + }, + "executorSupport": { + "status": "unsupported", + "reasonCode": "execution_spl_token_historical_variant_decode_only", + "reason": "obsolete Rent-dependent initialization variant; the decoder remains exhaustive and the executor uses the current no-Rent builder" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "sync_native", + "tag": 17, + "status": "current", + "layout": "tag only; 1 byte", + "allowedSizes": null, + "accounts": [ + "native_token_account(w)", + "optional_rent_sysvar" + ], + "authorityForm": "not_applicable", + "decodedFields": [], + "limits": [], + "event": "spl_token.sync_native", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "sync_native" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.sync_native", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "real_transaction_decoded_and_materialized_2026-07-15" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [ + "27iYTpo9X5QNyQCXnfeHiVZqnqhszvrgsUDeC63ukjEF4KtYGPNJ4o4Vg4FGuzke5oHxybDnVvxFFMeqnHF2rSCB" + ], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "initialize_account3", + "tag": 18, + "status": "current", + "layout": "1 + Pubkey; 33 bytes", + "allowedSizes": null, + "accounts": [ + "token_account(w)", + "mint" + ], + "authorityForm": "not_applicable", + "decodedFields": [ + "owner" + ], + "limits": [], + "event": "spl_token.initialize_account3", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "initialize_account3" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.initialize_account", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "submission_confirmation_and_replay_validated_2026-07-15", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [ + "3yxsCf8tc1H2P9E3m6Kgu7J3XVeBw7wePuRTHvCaidQ74bsa2TP5xg4hpXAw1jkRSB3LrkLrXgx5eqvCQqRsXcfq" + ], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "initialize_multisig2", + "tag": 19, + "status": "current", + "layout": "1 + u8; 2 bytes", + "allowedSizes": null, + "accounts": [ + "multisig_account(w)", + "members[1..11]" + ], + "authorityForm": "not_applicable", + "decodedFields": [ + "m", + "n_from_accounts" + ], + "limits": [ + "1 <= M <= N <= 11" + ], + "event": "spl_token.initialize_multisig2", + "projections": [ + "token_accounts", + "admin", + "risk" + ], + "officialBuilder": { + "available": true, + "function": "initialize_multisig2" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.initialize_multisig", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "initialize_mint2", + "tag": 20, + "status": "current", + "layout": "1 + u8 + Pubkey + COption; 35 or 67 bytes", + "allowedSizes": [ + 35, + 67 + ], + "accounts": [ + "mint(w)" + ], + "authorityForm": "not_applicable", + "decodedFields": [ + "decimals", + "mint_authority", + "freeze_authority" + ], + "limits": [], + "event": "spl_token.initialize_mint2", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "initialize_mint2" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.initialize_mint", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "get_account_data_size", + "tag": 21, + "status": "current", + "layout": "tag; runtime ignores trailing data", + "allowedSizes": null, + "accounts": [ + "mint" + ], + "authorityForm": "not_applicable", + "decodedFields": [], + "limits": [], + "event": "spl_token.get_account_data_size", + "projections": [], + "officialBuilder": { + "available": true, + "function": "get_account_data_size" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.get_account_data_size", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": true, + "coreReplayValidation": "unavailable_in_current_core_input" + }, + "notes": [] + }, + { + "name": "initialize_immutable_owner", + "tag": 22, + "status": "current", + "layout": "tag only; classic runtime compatibility no-op", + "allowedSizes": null, + "accounts": [ + "token_account(w)" + ], + "authorityForm": "not_applicable", + "decodedFields": [], + "limits": [], + "event": "spl_token.initialize_immutable_owner", + "projections": [], + "officialBuilder": { + "available": true, + "function": "initialize_immutable_owner" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.initialize_immutable_owner", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [ + "Classic SPL Token compatibility no-op; no Token-2022 extension is inferred." + ] + }, + { + "name": "amount_to_ui_amount", + "tag": 23, + "status": "current", + "layout": "1 + u64 LE; 9 bytes", + "allowedSizes": null, + "accounts": [ + "mint" + ], + "authorityForm": "not_applicable", + "decodedFields": [ + "amount_raw" + ], + "limits": [], + "event": "spl_token.amount_to_ui_amount", + "projections": [], + "officialBuilder": { + "available": true, + "function": "amount_to_ui_amount" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.amount_to_ui_amount", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": true, + "coreReplayValidation": "unavailable_in_current_core_input" + }, + "notes": [] + }, + { + "name": "ui_amount_to_amount", + "tag": 24, + "status": "current", + "layout": "1 + UTF-8 remainder; at least 1 byte at wire layer", + "allowedSizes": null, + "accounts": [ + "mint" + ], + "authorityForm": "not_applicable", + "decodedFields": [ + "ui_amount_utf8" + ], + "limits": [], + "event": "spl_token.ui_amount_to_amount", + "projections": [], + "officialBuilder": { + "available": true, + "function": "ui_amount_to_amount" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.ui_amount_to_amount", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": true, + "coreReplayValidation": "unavailable_in_current_core_input" + }, + "notes": [] + }, + { + "name": "withdraw_excess_lamports", + "tag": 38, + "status": "current", + "layout": "tag only; 1 byte", + "allowedSizes": null, + "accounts": [ + "source(w)", + "destination(w)", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [], + "limits": [], + "event": "spl_token.withdraw_excess_lamports", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "withdraw_excess_lamports" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.withdraw_excess_lamports", + "constructibility": "official_builder_proven", + "clusterDeployment": "separate_from_library_support" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "not_tested", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [] + }, + { + "name": "unwrap_lamports", + "tag": 45, + "status": "recent", + "layout": "1 + COption; 2 or 10 bytes", + "allowedSizes": [ + 2, + 10 + ], + "accounts": [ + "native_token_account(w)", + "destination(w)", + "authority", + "multisig_signers*" + ], + "authorityForm": "single_or_multisig", + "decodedFields": [ + "optional_amount_lamports" + ], + "limits": [], + "event": "spl_token.unwrap_lamports", + "projections": [ + "token_accounts" + ], + "officialBuilder": { + "available": true, + "function": "unwrap_lamports" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.unwrap_lamports", + "constructibility": "official_builder_proven", + "clusterDeployment": "devnet_simulation_succeeded_2026-07-16" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "simulation_succeeded_2026-07-16", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": false + }, + "notes": [ + "Published by interface 3.0.0; cluster deployment requires separate simulation evidence.", + "Devnet simulation-only succeeded for one lamport from a controlled non-associated wrapped SOL account; 140 compute units and no runtime error." + ] + }, + { + "name": "batch", + "tag": 255, + "status": "recent", + "layout": "1 + repeated(u8 account_count, u8 data_len, instruction_data[data_len])", + "allowedSizes": null, + "accounts": [ + "concatenated sub-instruction account slices" + ], + "authorityForm": "not_applicable", + "decodedFields": [ + "ordered_sub_instructions", + "account_slices" + ], + "limits": [ + "64 sub-instructions", + "512 total accounts", + "255 bytes per child", + "no nested Batch" + ], + "event": "spl_token.batch", + "projections": [ + "child_dependent" + ], + "officialBuilder": { + "available": true, + "function": "batch" + }, + "executorSupport": { + "status": "supported", + "operationCode": "spl_token.batch", + "constructibility": "official_builder_proven", + "clusterDeployment": "devnet_simulation_succeeded_2026-07-16" + }, + "clusterStatus": { + "localnet": "not_tested", + "devnet": "simulation_succeeded_2026-07-16", + "mainnet": "not_tested" + }, + "syntheticFixtures": [ + "minimal_valid", + "truncated", + "unexpected_suffix" + ], + "realSignatures": [], + "returnData": { + "writes": true, + "coreReplayValidation": "unavailable_in_current_core_input" + }, + "notes": [ + "Child identities derive from parent instruction path and child position.", + "Devnet simulation-only succeeded with one zero-amount TransferChecked child; 270 compute units and no runtime error." + ] + } + ] +} diff --git a/olddocs/archivekbot2/docs/SQL_DEMOS.md b/olddocs/archivekbot2/docs/SQL_DEMOS.md new file mode 100644 index 0000000..51e7000 --- /dev/null +++ b/olddocs/archivekbot2/docs/SQL_DEMOS.md @@ -0,0 +1,109 @@ + + + +# Démos SQL + +## Fenêtres disponibles + +| Fenêtre | Rôle | +|------------------------------|------------------------------------------------------------------------------------------------------| +| `demo_sql_diag` | Profil, backend, DSN masqué, santé PostgreSQL et tables attendues. | +| `demo_sql_pg_raw` | Transactions canoniques et observations d’acquisition. | +| `demo_sql_pg_core` | Transactions, comptes, instructions, inner instructions, logs, balances et ledger. | +| `demo_sql_replay_candidates` | Exploration read-only, filtrage et export des signatures, programmes, mints, owners et account keys. | + +Depuis `0.3.4`, le diagnostic core inclut : + +```text +kb_sol_ops_processing_ledger +``` + +La fenêtre `demo_core_extraction` exécute le worker puis permet d’ouvrir les diagnostics raw/core et le sélecteur de candidats. Les fenêtres SQL restent read-only et ne modifient aucune donnée. + +## Sélecteur de candidats replay + +`demo_sql_replay_candidates` sépare l’exploration en cinq tableaux DataTables avec intégration Bootstrap 5 : + +1. transactions et signatures ; +2. programmes observés dans les instructions outer, inner et dans les logs reliés ; +3. mints ; +4. owners ; +5. account keys. + +Les requêtes PostgreSQL sont statiques, paramétrées et limitées à `5 000` lignes au maximum par chargement. Aucun éditeur SQL libre n’est exposé. + +### Transactions et signatures + +Filtres serveur disponibles : + +- fragment de signature ; +- plage inclusive de slots ; +- état raw ; +- statut du ledger `core_extraction` ; +- program ID exact avec portée `any`, `outer`, `inner` ou `logs` ; +- mint, owner ou account key exact ; +- limite et ordre des slots. + +Le tableau affiche aussi la présence du graphe core, le statut du ledger, sa version et son nombre de tentatives, ainsi que les cardinalités outer/inner. + +### Programmes + +Le tableau agrège les occurrences issues de : + +```text +kb_sol_core_instructions +kb_sol_core_inner_instructions +kb_sol_core_logs +``` + +Chaque ligne expose le code connu de `kb_program_ids` lorsqu’il existe, le nombre de transactions distinctes, d’instructions outer, d’instructions inner, de logs reliés et la plage de slots observée. Le filtre propose une liste des programmes enregistrés tout en conservant une saisie libre pour les identifiants inconnus ou partiels. + +Pour appliquer un programme au tableau des transactions, il faut cocher exactement une ligne puis utiliser « Utiliser comme filtre transactions ». Lorsqu’aucune ligne n’est cochée, l’action accepte aussi une seule ligne restant après le filtre local DataTables. + +### Mints, owners et comptes + +Les trois familles disposent de tableaux et filtres indépendants. Les mints et owners proviennent de `kb_sol_core_balance_changes`; les account keys proviennent de `kb_sol_core_account_keys` et ne sont pas classifiées automatiquement comme wallet, pool, mint ou token account. + +Chaque tableau affiche transactions distinctes, occurrences, occurrences par transaction, slots minimum/maximum et étendue. Une valeur sélectionnée peut être appliquée directement au filtre du tableau des transactions. + +### Sélection et export + +Dans chaque tableau : + +- la première colonne contient une case à cocher gérée par l’extension DataTables Select ; +- la case du header sélectionne ou désélectionne toutes les lignes correspondant au filtre local ; +- une sélection explicite est prioritaire ; +- sans sélection, la copie et l’export utilisent toutes les lignes correspondant au filtre local DataTables ; +- les identifiants peuvent être copiés dans le presse-papiers sous forme multiligne ; +- le frontend construit un CSV diagnostique avec BOM UTF-8, séparateur `;` et CRLF ; +- une commande Rust bornée écrit le fichier dans `data/exports_csv/` et ajoute un suffixe lorsque le nom existe déjà ; +- les valeurs longues sont tronquées visuellement, exposées intégralement par tooltip et copiables cellule par cellule ; +- tous les tableaux affichent 10 lignes par défaut et possèdent un reset complet des filtres. + +La copie multiligne des signatures peut être collée telle quelle dans le mode `Signatures explicites` de `demo_core_extraction`. L’export ne dépend plus du téléchargement HTML du WebView. + +### Lecture des colonnes transactions + +Les cardinalités sont séparées en quatre colonnes : `Outer inst.`, `Inner inst.`, `Outer pr.` et `Inner pr.`. Les deux premières comptent les instructions ; les deux dernières comptent les program IDs distincts. + +La colonne `Core` décrit le graphe structurel : + +- `absent` : aucune ligne `kb_sol_core_transactions` ; +- `présent` : graphe core présent et transaction Solana réussie ; +- `échec on-chain` : graphe core présent, mais la transaction Solana elle-même a retourné une erreur. + +`échec on-chain` n’est donc pas un échec de l’extracteur. Le tri DataTables utilise un rang numérique distinct pour ces trois états. + +### Pools et paires + +Aucun onglet pool/pair n’est ajouté dans `0.3.4`. Le core connaît des account keys mais ne peut pas déterminer de façon fiable leur rôle sémantique. Les futurs décodeurs et matérialiseurs alimenteront les tables catalogues de pools et de paires ; l’onglet pourra alors reposer sur des identifiants explicites plutôt que sur une heuristique. + +## Contrôles recommandés après extraction + +- comparer le nombre de transactions raw `core_extracted` et de transactions core ; +- vérifier l’absence de lignes filles orphelines ; +- vérifier l’unicité des chemins et indices ; +- comparer les statuts ledger avec les graphes core présents ; +- examiner les lignes raw `failed` et leur `lifecycle_reason`. + +Les requêtes prêtes à l’emploi sont dans `sql/validation/000_core_integrity.sql`. diff --git a/olddocs/archivekbot2/docs/SURFACE_CRATE_MATRIX.md b/olddocs/archivekbot2/docs/SURFACE_CRATE_MATRIX.md new file mode 100644 index 0000000..b465fa3 --- /dev/null +++ b/olddocs/archivekbot2/docs/SURFACE_CRATE_MATRIX.md @@ -0,0 +1,272 @@ + + + +# Matrice des crates réservés + +Ce document liste les crates actuellement présents dans le workspace. Un crate réservé ne signifie pas que le décodage, la matérialisation ou l’exécution est validé. + +## Principes + +- Les surfaces non classifiées ne doivent pas avoir de crate. +- Les décodeurs et exécuteurs sont réservés par surface canonique lorsque la surface est classifiée. +- Les détails de validation restent dans `registry/program_registry_seed.toml` et les docs spécialisées. + +## Solana + +| Surface | Décodeur | Exécuteur | +|---------------|--------------------------|---------------------------| +| `solana_core` | `kb_decoder_solana_core` | `kb_executor_solana_core` | + +## Spl + +| Surface | Décodeur | Exécuteur | +|--------------------------------|-------------------------------------------|--------------------------------------------| +| `spl_account_compression` | `kb_decoder_spl_account_compression` | `kb_executor_spl_account_compression` | +| `spl_associated_token_account` | `kb_decoder_spl_associated_token_account` | `kb_executor_spl_associated_token_account` | +| `spl_memo` | `kb_decoder_spl_memo` | `kb_executor_spl_memo` | +| `spl_name_service` | `kb_decoder_metadata_spl_name_service` | `kb_executor_metadata_spl_name_service` | +| `spl_noop` | `kb_decoder_spl_noop` | `kb_executor_spl_noop` | +| `spl_single_pool` | `kb_decoder_spl_single_pool` | `kb_executor_spl_single_pool` | +| `spl_stake_pool` | `kb_decoder_spl_stake_pool` | `kb_executor_spl_stake_pool` | +| `spl_token` | `kb_decoder_spl_token` | `kb_executor_spl_token` | +| `spl_token_2022` | `kb_decoder_spl_token_2022` | `kb_executor_spl_token_2022` | + + +## Amm + +| Surface | Décodeur | Exécuteur | +|----------------------------|---------------------------------------|----------------------------------------| +| `amm_aldrin_v1` | `kb_decoder_amm_aldrin_v1` | `kb_executor_amm_aldrin_v1` | +| `amm_aldrin_v2` | `kb_decoder_amm_aldrin_v2` | `kb_executor_amm_aldrin_v2` | +| `amm_alphaq` | `kb_decoder_amm_alphaq` | `kb_executor_amm_alphaq` | +| `amm_believe` | `kb_decoder_amm_believe` | `kb_executor_amm_believe` | +| `amm_bonk_swap` | `kb_decoder_amm_bonk_swap` | `kb_executor_amm_bonk_swap` | +| `amm_fluxbeam` | `kb_decoder_amm_fluxbeam` | `kb_executor_amm_fluxbeam` | +| `amm_goon_fi` | `kb_decoder_amm_goon_fi` | `kb_executor_amm_goon_fi` | +| `amm_goosefx_gamma` | `kb_decoder_amm_goosefx_gamma` | `kb_executor_amm_goosefx_gamma` | +| `amm_goosefx_v2` | `kb_decoder_amm_goosefx_v2` | `kb_executor_amm_goosefx_v2` | +| `amm_guac_swap` | `kb_decoder_amm_guac_swap` | `kb_executor_amm_guac_swap` | +| `amm_lifinity_swap_v2` | `kb_decoder_amm_lifinity_swap_v2` | `kb_executor_amm_lifinity_swap_v2` | +| `amm_metadao_futarchy_amm` | `kb_decoder_amm_metadao_futarchy_amm` | `kb_executor_amm_metadao_futarchy_amm` | +| `amm_metadao_v0_5` | `kb_decoder_amm_metadao_v0_5` | `kb_executor_amm_metadao_v0_5` | +| `amm_meteora_damm_v1` | `kb_decoder_amm_meteora_damm_v1` | `kb_executor_amm_meteora_damm_v1` | +| `amm_meteora_damm_v2` | `kb_decoder_amm_meteora_damm_v2` | `kb_executor_amm_meteora_damm_v2` | +| `amm_obric_v2` | `kb_decoder_amm_obric_v2` | `kb_executor_amm_obric_v2` | +| `amm_one_dex` | `kb_decoder_amm_one_dex` | `kb_executor_amm_one_dex` | +| `amm_pump_swap` | `kb_decoder_amm_pump_swap` | `kb_executor_amm_pump_swap` | +| `amm_raydium_lp_v4` | `kb_decoder_amm_raydium_lp_v4` | `kb_executor_amm_raydium_lp_v4` | +| `amm_solfi` | `kb_decoder_amm_solfi` | `kb_executor_amm_solfi` | +| `amm_solfi_v2` | `kb_decoder_amm_solfi_v2` | `kb_executor_amm_solfi_v2` | +| `amm_vertigo` | `kb_decoder_amm_vertigo` | `kb_executor_amm_vertigo` | +| `amm_virtuals` | `kb_decoder_amm_virtuals` | `kb_executor_amm_virtuals` | +| `amm_woofi` | `kb_decoder_amm_woofi` | `kb_executor_amm_woofi` | +| `amm_zero_fi` | `kb_decoder_amm_zero_fi` | `kb_executor_amm_zero_fi` | +| `amm_zora` | `kb_decoder_amm_zora` | `kb_executor_amm_zora` | + +## Cpmm + +| Surface | Décodeur | Exécuteur | +|----------------|---------------------------|----------------------------| +| `cpmm_raydium` | `kb_decoder_cpmm_raydium` | `kb_executor_cpmm_raydium` | + +## Clmm + +| Surface | Décodeur | Exécuteur | +|-----------------------|----------------------------------|-----------------------------------| +| `clmm_byreal` | `kb_decoder_clmm_byreal` | `kb_executor_clmm_byreal` | +| `clmm_fusion` | `kb_decoder_clmm_fusion` | `kb_executor_clmm_fusion` | +| `clmm_orca_whirlpool` | `kb_decoder_clmm_orca_whirlpool` | `kb_executor_clmm_orca_whirlpool` | +| `clmm_pancake_swap` | `kb_decoder_clmm_pancake_swap` | `kb_executor_clmm_pancake_swap` | +| `clmm_raydium` | `kb_decoder_clmm_raydium` | `kb_executor_clmm_raydium` | +| `clmm_stabble` | `kb_decoder_clmm_stabble` | `kb_executor_clmm_stabble` | + +## Dlmm + +| Surface | Décodeur | Exécuteur | +|----------------|---------------------------|----------------------------| +| `dlmm_meteora` | `kb_decoder_dlmm_meteora` | `kb_executor_dlmm_meteora` | + +## Stable Swap + +| Surface | Décodeur | Exécuteur | +|------------------------------|-----------------------------------------|------------------------------------------| +| `stable_swap_hylo_exchange` | `kb_decoder_stable_swap_hylo_exchange` | `kb_executor_stable_swap_hylo_exchange` | +| `stable_swap_jupiter_stable` | `kb_decoder_stable_swap_jupiter_stable` | `kb_executor_stable_swap_jupiter_stable` | +| `stable_swap_numeraire` | `kb_decoder_stable_swap_numeraire` | `kb_executor_stable_swap_numeraire` | +| `stable_swap_stabble` | `kb_decoder_stable_swap_stabble` | `kb_executor_stable_swap_stabble` | + +## Weighted Swap + +| Surface | Décodeur | Exécuteur | +|-------------------------|------------------------------------|-------------------------------------| +| `weighted_swap_stabble` | `kb_decoder_weighted_swap_stabble` | `kb_executor_weighted_swap_stabble` | + +## Launchpad + +| Surface | Décodeur | Exécuteur | +|-------------------------------|------------------------------------------|-------------------------------------------| +| `launchpad_boop_fun` | `kb_decoder_launchpad_boop_fun` | `kb_executor_launchpad_boop_fun` | +| `launchpad_metadao_ico` | `kb_decoder_launchpad_metadao_ico` | `kb_executor_launchpad_metadao_ico` | +| `launchpad_meteora_dbc` | `kb_decoder_launchpad_meteora_dbc` | `kb_executor_launchpad_meteora_dbc` | +| `launchpad_moonit` | `kb_decoder_launchpad_moonit` | `kb_executor_launchpad_moonit` | +| `launchpad_orca_wavebreak` | `kb_decoder_launchpad_orca_wavebreak` | `kb_executor_launchpad_orca_wavebreak` | +| `launchpad_printr` | `kb_decoder_launchpad_printr` | `kb_executor_launchpad_printr` | +| `launchpad_pump_fun` | `kb_decoder_launchpad_pump_fun` | `kb_executor_launchpad_pump_fun` | +| `launchpad_pump_pumpup_ai` | `kb_decoder_launchpad_pump_pumpup_ai` | `kb_executor_launchpad_pump_pumpup_ai` | +| `launchpad_raydium_launchlab` | `kb_decoder_launchpad_raydium_launchlab` | `kb_executor_launchpad_raydium_launchlab` | + +## Router + +| Surface | Décodeur | Exécuteur | +|--------------------------------|-------------------------------------------|--------------------------------------------| +| `router_dflow_aggregator_v4` | `kb_decoder_router_dflow_aggregator_v4` | `kb_executor_router_dflow_aggregator_v4` | +| `router_jupiter_aggregator_v4` | `kb_decoder_router_jupiter_aggregator_v4` | `kb_executor_router_jupiter_aggregator_v4` | +| `router_jupiter_aggregator_v6` | `kb_decoder_router_jupiter_aggregator_v6` | `kb_executor_router_jupiter_aggregator_v6` | +| `router_jupiter_dca` | `kb_decoder_router_jupiter_dca` | `kb_executor_router_jupiter_dca` | +| `router_okx_labs_v1` | `kb_decoder_router_okx_labs_v1` | `kb_executor_router_okx_labs_v1` | +| `router_okx_labs_v2` | `kb_decoder_router_okx_labs_v2` | `kb_executor_router_okx_labs_v2` | + +## Orderbook + +| Surface | Décodeur | Exécuteur | +|------------------------------------|-----------------------------------------------|------------------------------------------------| +| `orderbook_jupiter_limit_order` | `kb_decoder_orderbook_jupiter_limit_order` | `kb_executor_orderbook_jupiter_limit_order` | +| `orderbook_jupiter_limit_order_v2` | `kb_decoder_orderbook_jupiter_limit_order_v2` | `kb_executor_orderbook_jupiter_limit_order_v2` | +| `orderbook_openbook_v2` | `kb_decoder_orderbook_openbook_v2` | `kb_executor_orderbook_openbook_v2` | + +## Admin + +| Surface | Décodeur | Exécuteur | +|----------------------|---------------------------------|----------------------------------| +| `admin_jupiter_lock` | `kb_decoder_admin_jupiter_lock` | `kb_executor_admin_jupiter_lock` | +| `admin_pump_fees` | `kb_decoder_admin_pump_fees` | `kb_executor_admin_pump_fees` | + +## Fees + +| Surface | Décodeur | Exécuteur | +|--------------------------|-------------------------------------|--------------------------------------| +| `fees_bags_fee_share_v1` | `kb_decoder_fees_bags_fee_share_v1` | `kb_executor_fees_bags_fee_share_v1` | +| `fees_bags_fee_share_v2` | `kb_decoder_fees_bags_fee_share_v2` | `kb_executor_fees_bags_fee_share_v2` | + +## Lock + +| Surface | Décodeur | Exécuteur | +|-------------------|------------------------------|-------------------------------| +| `lock_raydium_lp` | `kb_decoder_lock_raydium_lp` | `kb_executor_lock_raydium_lp` | + +## Adapter + +| Surface | Décodeur | Exécuteur | +|---------------------------------|--------------------------------------------|---------------------------------------------| +| `adapter_saber_decimal_wrapper` | `kb_decoder_adapter_saber_decimal_wrapper` | `kb_executor_adapter_saber_decimal_wrapper` | + +## Governance + +| Surface | Décodeur | Exécuteur | +|-------------------------------|------------------------------------------|-------------------------------------------| +| `governance_metadao_bid_wall` | `kb_decoder_governance_metadao_bid_wall` | `kb_executor_governance_metadao_bid_wall` | + +## Bridge + +| Surface | Décodeur | Exécuteur | +|------------------------------------------------|-----------------------------------------------------------|------------------------------------------------------------| +| `bridge_circle_cctp_token_messenger_minter` | `kb_decoder_bridge_circle_cctp_token_messenger_minter` | `kb_executor_bridge_circle_cctp_token_messenger_minter` | +| `bridge_circle_cctp_token_messenger_minter_v2` | `kb_decoder_bridge_circle_cctp_token_messenger_minter_v2` | `kb_executor_bridge_circle_cctp_token_messenger_minter_v2` | +| `bridge_layer_zero_endpoint` | `kb_decoder_bridge_layer_zero_endpoint` | `kb_executor_bridge_layer_zero_endpoint` | +| `bridge_layer_zero_executor` | `kb_decoder_bridge_layer_zero_executor` | `kb_executor_bridge_layer_zero_executor` | + +## Rwa + +| Surface | Décodeur | Exécuteur | +|---------------------------|--------------------------------------|---------------------------------------| +| `rwa_ondo_global_markets` | `kb_decoder_rwa_ondo_global_markets` | `kb_executor_rwa_ondo_global_markets` | + +## Lending + +| Surface | Décodeur | Exécuteur | +|-----------------------------------|----------------------------------------------|-----------------------------------------------| +| `lending_clone` | `kb_decoder_lending_clone` | `kb_executor_lending_clone` | +| `lending_jupiter_lend_borrow` | `kb_decoder_lending_jupiter_lend_borrow` | `kb_executor_lending_jupiter_lend_borrow` | +| `lending_jupiter_lend_earn` | `kb_decoder_lending_jupiter_lend_earn` | `kb_executor_lending_jupiter_lend_earn` | +| `lending_jupiter_lend_flash_loan` | `kb_decoder_lending_jupiter_lend_flash_loan` | `kb_executor_lending_jupiter_lend_flash_loan` | +| `lending_jupiter_lend_liquidity` | `kb_decoder_lending_jupiter_lend_liquidity` | `kb_executor_lending_jupiter_lend_liquidity` | +| `lending_kamino` | `kb_decoder_lending_kamino` | `kb_executor_lending_kamino` | +| `lending_marginfi_v2` | `kb_decoder_lending_marginfi_v2` | `kb_executor_lending_marginfi_v2` | + +## Staking + +| Surface | Décodeur | Exécuteur | +|----------------------------|---------------------------------------|----------------------------------------| +| `staking_kamino_farm` | `kb_decoder_staking_kamino_farm` | `kb_executor_staking_kamino_farm` | +| `staking_marinade_finance` | `kb_decoder_staking_marinade_finance` | `kb_executor_staking_marinade_finance` | +| `staking_solayer` | `kb_decoder_staking_solayer` | `kb_executor_staking_solayer` | + +## Vault + +| Surface | Décodeur | Exécuteur | +|-----------------------------|----------------------------------------|-----------------------------------------| +| `vault_carrot_defi` | `kb_decoder_vault_carrot_defi` | `kb_executor_vault_carrot_defi` | +| `vault_hylo_stability_pool` | `kb_decoder_vault_hylo_stability_pool` | `kb_executor_vault_hylo_stability_pool` | +| `vault_kamino` | `kb_decoder_vault_kamino` | `kb_executor_vault_kamino` | +| `vault_kamino_v2` | `kb_decoder_vault_kamino_v2` | `kb_executor_vault_kamino_v2` | +| `vault_kamino_yvaults` | `kb_decoder_vault_kamino_yvaults` | `kb_executor_vault_kamino_yvaults` | +| `vault_meteora` | `kb_decoder_vault_meteora` | `kb_executor_vault_meteora` | + +## Vesting + +| Surface | Décodeur | Exécuteur | +|----------------------|---------------------------------|----------------------------------| +| `vesting_streamflow` | `kb_decoder_vesting_streamflow` | `kb_executor_vesting_streamflow` | + +## Nft + +| Surface | Décodeur | Exécuteur | +|--------------------------|-------------------------------------|--------------------------------------| +| `nft_metaplex_bubblegum` | `kb_decoder_nft_metaplex_bubblegum` | `kb_executor_nft_metaplex_bubblegum` | + +## Treasury + +| Surface | Décodeur | Exécuteur | +|---------------------------------------|--------------------------------------------------|---------------------------------------------------| +| `treasury_helium_treasury_management` | `kb_decoder_treasury_helium_treasury_management` | `kb_executor_treasury_helium_treasury_management` | + +## Wallet + +| Surface | Décodeur | Exécuteur | +|--------------------------------------|-------------------------------------------------|--------------------------------------------------| +| `wallet_jupiter_apepro_smart_wallet` | `kb_decoder_wallet_jupiter_apepro_smart_wallet` | `kb_executor_wallet_jupiter_apepro_smart_wallet` | + +## Perpetuals + +| Surface | Décodeur | Exécuteur | +|-----------------------|----------------------------------|-----------------------------------| +| `perpetuals_drift_v2` | `kb_decoder_perpetuals_drift_v2` | `kb_executor_perpetuals_drift_v2` | +| `perpetuals_jupiter` | `kb_decoder_perpetuals_jupiter` | `kb_executor_perpetuals_jupiter` | +| `perpetuals_zeta` | `kb_decoder_perpetuals_zeta` | `kb_executor_perpetuals_zeta` | + +## Matérialisateurs + +| Crate | +|---------------------------------------| +| `kb_materializer_admin` | +| `kb_materializer_bridge` | +| `kb_materializer_compliance_audit` | +| `kb_materializer_fees` | +| `kb_materializer_governance` | +| `kb_materializer_lending` | +| `kb_materializer_lifecycle` | +| `kb_materializer_liquidity` | +| `kb_materializer_metadata` | +| `kb_materializer_nft` | +| `kb_materializer_oracle` | +| `kb_materializer_orderbook` | +| `kb_materializer_perpetuals` | +| `kb_materializer_pool_state` | +| `kb_materializer_rewards` | +| `kb_materializer_risk` | +| `kb_materializer_routing` | +| `kb_materializer_staking` | +| `kb_materializer_token_accounts` | +| `kb_materializer_token_metadata_risk` | +| `kb_materializer_trades` | +| `kb_materializer_vault` | diff --git a/olddocs/archivekbot2/docs/TRACING_CONTRACT.md b/olddocs/archivekbot2/docs/TRACING_CONTRACT.md new file mode 100644 index 0000000..b098342 --- /dev/null +++ b/olddocs/archivekbot2/docs/TRACING_CONTRACT.md @@ -0,0 +1,168 @@ + + + +# Contrat de tracing par crate + +## Objectif + +Chaque événement est émis par la crate qui prend réellement la décision. `kb_app_demo` journalise les frontières Tauri, les actions utilisateur, l’état des fenêtres et les résumés d’orchestration ; il ne recopie pas les décisions internes du RPC, du pipeline, du store, d’un décodeur, d’un matérialiseur ou d’un exécuteur. + +## Classification des crates + +Une crate est opérationnelle lorsqu’elle réalise au moins une des actions suivantes : + +- I/O réseau ou base de données ; +- orchestration concurrente, retry, pacing ou annulation ; +- décodage ou matérialisation ; +- construction ou simulation d’un plan d’exécution ; +- décision runtime mutable ayant un effet observable. + +Une crate passive contient uniquement des types, contrats, DTO, traits sans implémentation, registres ou constantes. Elle ne dépend pas de `tracing`. `kb_config` reste une exception de bootstrap : son chargement et sa validation précèdent l’installation du subscriber. + +## Cible canonique + +Toute crate qui déclare `tracing.workspace = true` doit : + +- posséder `src/constants.rs` ; +- définir exactement une constante `pub(crate) const TRACING_TARGET` ; +- utiliser comme valeur le nom exact du package Cargo ; +- appeler les macros avec `target: crate::constants::TRACING_TARGET` ; +- déplacer la granularité interne dans des champs structurés. + +Exemple : + +```rust +tracing::error!( + target: crate::constants::TRACING_TARGET, + action = "decoder_outcome_failure", + campaign_id = %campaign_id, + signature = %input.signature, + instruction_path = %input.instruction_path, + program_id = %input.program_id, + processor_name = %identity.name, + processor_version = %identity.version, + status = ?result.status, + diagnostics = ?result.diagnostics, + "contextual instruction was not decoded successfully" +); +``` + +Les targets `khbot.*`, les targets suffixés par module et les targets de fenêtre ne sont plus utilisés par les crates opérationnelles migrées. Les identifiants frontend historiques restent acceptés comme valeurs du champ `frontend_target`, mais l’événement Rust est émis sous `kb_app_demo`. + +## Crates actuellement routées + +La configuration couvre toutes les crates qui déclarent actuellement `tracing.workspace = true` : + +```text +kb_app_demo +kb_decoder_solana_core +kb_decoder_spl_associated_token_account +kb_decoder_spl_memo +kb_decoder_spl_token +kb_decoder_spl_token_2022 +kb_executor_metadata_spl_name_service +kb_execution_solana +kb_executor_solana_core +kb_executor_spl_account_compression +kb_executor_spl_associated_token_account +kb_executor_spl_memo +kb_executor_spl_noop +kb_executor_spl_single_pool +kb_logging +kb_materializer_admin +kb_materializer_compliance_audit +kb_materializer_lifecycle +kb_materializer_staking +kb_materializer_transaction_annotations +kb_pipeline +kb_rpc +kb_store_pg +kb_wallet +``` + +Le test `every_tracing_crate_has_one_canonical_target_constant` détecte automatiquement toute crate avec `tracing.workspace = true` et vérifie la présence d’une unique constante canonique. Le test de `kb_config` vérifie parallèlement la matrice de routes de chaque profil. + +Les routes sont filtrées au niveau de leur writer plutôt que par un `Filtered` layer distinct. Un seul filtre d’admission agrégé empêche en amont le formatage des événements refusés par toutes les routes. Cette architecture préserve toutes les sorties globales et par crate au-delà de la limite interne de 64 identifiants de filtres de `tracing-subscriber`. Le test `more_than_64_routes_compose_without_filtered_layer_ids` protège explicitement ce contrat. + +## Granularité et corrélation + +Le target identifie la crate. Les champs décrivent l’action et le contexte : + +```text +action +stage +window +campaign_id +capture_session_id +signature +slot +instruction_path +program_id +processor_name +processor_version +materializer_name +materializer_version +input_key +input_hash +status +decision +error_code +``` + +Les spans de campagne et d’input utilisent eux aussi le target canonique `kb_pipeline`. Les événements des autres crates conservent leur propre target et reprennent les identifiants de corrélation utiles dans leurs champs. + +## Politique des erreurs de décodage et de matérialisation + +Un événement `error` est obligatoire pour : + +- un input sélectionné sans décodeur compatible ; +- un résultat de décodeur `failed` ; +- un résultat de décodeur `unsupported` après dispatch vers une surface déclarée compatible ; +- un résultat de décodeur invalide au regard du contrat API ; +- un résultat de matérialiseur `failed` ; +- une erreur de persistance decode, couverture, ledger ou matérialisation ; +- une campagne qui termine avec `unmatched > 0` ou `failed_inputs > 0`. + +L’événement doit permettre de retrouver rapidement l’input et la cause. Il conserve, lorsque disponibles, la campagne, la signature, le slot, le chemin d’instruction, le program ID, l’identité et la version du processor, la clé/hash d’input, le statut et les diagnostics structurés. + +Les cas suivants ne sont pas des erreurs logicielles : + +- transaction Solana échouée mais payload correctement décodé ; +- observation non commitée conformément au statut on-chain ; +- matérialisation `refused` par la politique de transaction ; +- entrée volontairement `ignored` avec justification ; +- annulation coopérative demandée par l’opérateur. + +Ils sont journalisés en `debug`, `info` ou `warn` selon leur impact. + +## Responsabilité + +- `kb_rpc` : sélection d’endpoint, requêtes, réponses bornées, retry, rate limit et transport. +- `kb_execution_solana` : assemblage du message, contrôle du contrat de signataires, liaison de simulation et signature transactionnelle. +- `kb_store_pg` : transactions SQL, commit/rollback, compteurs et erreurs de persistance. +- `kb_pipeline` : sélection, dispatch, concurrence, annulation, backfill et agrégation. +- décodeur : reconnaissance, validation du format, décision et diagnostic borné. +- matérialiseur : applicabilité exacte, politique de transaction et sorties produites. +- exécuteur : support, construction, simulation et garde-fous. +- application : invocation Tauri, fenêtre, progression utilisateur et résumé final. + +## Données interdites + +Ne jamais journaliser : + +- clé privée, seed phrase ou transaction à signer ; +- DSN ou URL contenant un secret non masqué ; +- payload brut complet ou réponse RPC volumineuse ; +- donnée dynamique non bornée. + +Conserver à la place la taille, un préfixe borné et un SHA-256 lorsque l’audit du payload est nécessaire. + +## Évolution + +L’ajout ou la suppression de `tracing.workspace = true` impose dans le même delta : + +1. la constante canonique ou sa suppression ; +2. les événements réels de la crate ; +3. la mise à jour de `config/example.config.json` ; +4. la mise à jour des tests de contrat ; +5. la mise à jour de la liste ci-dessus. diff --git a/olddocs/archivekbot2/docs/TRANSACTION_ACQUISITION_MODEL.md b/olddocs/archivekbot2/docs/TRANSACTION_ACQUISITION_MODEL.md new file mode 100644 index 0000000..e2776bd --- /dev/null +++ b/olddocs/archivekbot2/docs/TRANSACTION_ACQUISITION_MODEL.md @@ -0,0 +1,137 @@ + + + +# Modèle d’acquisition des transactions Solana + +## Décision + +Le pipeline ne conserve pas un payload complet différent pour chaque fournisseur. Toutes les sources doivent produire une représentation canonique commune avant l’écriture principale. + +```text +getTransaction JSON-RPC +Helius transactionSubscribe JSON +Yellowstone gRPC Protobuf +logsSubscribe + getTransaction +backfill ou réparation + | + v +adaptateur de source dans kb_rpc + | + v +transaction Solana canonique + | + +--> kb_sol_raw_transactions + | + +--> kb_sol_obs_transaction_observations +``` + +## Transaction canonique + +`kb_sol_raw_transactions` contient une seule ligne par signature. Le contenu est indépendant du fournisseur et ne doit contenir aucun champ propre à Helius, Triton, Chainstack, Shyft ou un endpoint particulier. + +Le document canonique doit inclure, quand la source les fournit : + +- signature ; +- slot ; +- version de transaction ; +- message header ; +- static account keys ; +- Address Lookup Tables ; +- loaded writable et readonly addresses ; +- recent blockhash ; +- outer instructions ; +- inner instructions ; +- logs ; +- statut et erreur ; +- fee et compute units ; +- balances SOL avant/après ; +- balances SPL avant/après ; +- rewards ; +- return data ; +- block time. + +Les public keys et signatures restent en base58, avec validation stricte de leur taille décodée : 32 octets pour les clés et blockhashes, 64 octets pour les signatures. Les données binaires d’instruction restent en base64. Les montants SPL conservent le montant entier brut normalisé sans zéros non significatifs, les décimales et une représentation décimale fixe recalculée localement, sans dépendre de `uiAmount` ou `uiAmountString` du fournisseur. + +Depuis `0.3.2`, ce contrat est matérialisé par `kb_model::CanonicalTransaction` avec `canonical_format_version = 1`. La sérialisation trie récursivement les clés des objets JSON avant calcul d’un hash SHA-256 sur le document compact. Les tableaux conservent l’ordre Solana d’origine. Les détails de source, timestamps locaux et identifiants de subscription sont exclus du document hashé. + +L’adaptateur HTTP standard demande `encoding = json`, puis convertit explicitement les payloads d’instruction reçus en base58 vers la représentation base64 canonique. Les champs optionnels absents et `null` sont normalisés vers le même état interne afin de stabiliser le hash entre réponses compatibles. + +## Observations de source + +`kb_sol_obs_transaction_observations` décrit comment et quand une transaction a été détectée ou reçue. Elle ne duplique pas la transaction complète. + +Champs minimaux visés : + +| Champ | Rôle | +|-----------------------|----------------------------------------------------------------------------------------------| +| `observation_key` | clé idempotente de l’observation | +| `raw_transaction_id` | lien optionnel vers la transaction canonique | +| `signature` | signature observée | +| `slot` | slot observé quand connu | +| `provider` | fournisseur, par exemple `helius`, `triton`, `chainstack`, `shyft` | +| `endpoint_code` | endpoint de configuration utilisé | +| `protocol` | `solana_http_json_rpc`, `solana_ws_json_rpc`, `helius_ws` ou `yellowstone_grpc` | +| `acquisition_method` | `getTransaction`, `transactionSubscribe`, `yellowstone_transactions`, `logs_hydration`, etc. | +| `origin` | `live`, `backfill`, `replay`, `repair` ou `migration` | +| `commitment` | commitment demandé ou observé | +| `capture_session_id` | session ou campagne de capture | +| `filter_code` | profil de filtre utilisé | +| `detected_at` | réception du premier signal, par exemple le log | +| `received_at` | réception de la transaction complète | +| `normalized_at` | fin de normalisation canonique | +| `persisted_at` | fin d’écriture durable | +| `payload_size_bytes` | taille du message source reçu | +| `source_payload_hash` | hash optionnel du message source sans le conserver | +| `status` | `detected`, `received`, `normalized`, `persisted`, `failed` ou `missing` | +| `error_code` | code technique normalisé optionnel | +| `error_message` | message de diagnostic optionnel | + +Les observations permettent de comparer les sources par signature, sans multiplier le volume de stockage transactionnel. + +## Notifications WebSocket + +`kb_sol_raw_ws_notifications` n’est plus une cible durable. + +Une notification `logsSubscribe` peut être conservée temporairement en mémoire jusqu’à l’hydratation de la transaction. La base conserve ensuite seulement : + +- les timestamps utiles ; +- la signature et le slot ; +- la source et la méthode ; +- la taille ; +- le statut de l’hydratation ; +- le lien éventuel vers la transaction canonique. + +Les notifications non transactionnelles comme `slotSubscribe`, `accountSubscribe` ou `programSubscribe` pourront avoir des tables métier dédiées seulement si un besoin durable apparaît. Elles ne doivent pas être entassées dans une table générique de payloads WebSocket. + +## Fusion multi-source + +Pour une signature déjà présente : + +1. normaliser le nouveau message ; +2. calculer le hash canonique ; +3. ajouter l’observation de source ; +4. si le hash est identique, ne pas dupliquer la transaction ; +5. si la nouvelle source apporte uniquement des champs auparavant absents, appliquer un enrichissement déterministe ; +6. si des champs incompatibles diffèrent, ne pas écraser silencieusement et enregistrer un conflit technique. + +Les différences liées au commitment ou à la disponibilité progressive des metadata doivent être distinguées d’un conflit réel. + +## Raw provider facultatif + +Un payload fournisseur complet peut être exporté de façon bornée pour une campagne de diagnostic, par exemple en NDJSON ou Protobuf, mais il ne fait pas partie du stockage PostgreSQL transactionnel normal. + +Ces exports doivent être : + +- explicitement activés ; +- limités en durée et en volume ; +- associés à une session de capture ; +- supprimables sans affecter les replays métier. + +## Frontières des crates + +- `kb_rpc` contient les transports et adaptateurs HTTP, WebSocket Helius et Yellowstone gRPC. +- `kb_model` contient le contrat canonique source-indépendant. +- `kb_store_core` contient les DTOs et repositories de transactions et observations. +- `kb_store_pg` contient la migration, les queries et les repositories PostgreSQL. +- les décodeurs ne dépendent jamais de la source d’acquisition. + diff --git a/olddocs/archivekbot2/docs/V0_4_6_VALIDATION.md b/olddocs/archivekbot2/docs/V0_4_6_VALIDATION.md new file mode 100644 index 0000000..994b85f --- /dev/null +++ b/olddocs/archivekbot2/docs/V0_4_6_VALIDATION.md @@ -0,0 +1,66 @@ + + + +# Validation finale `0.4.6` + +## Périmètre + +Le jalon couvre Token-2022 et le registre ElGamal comme programmes distincts, ainsi que la régression des décodeurs Solana Core/SPL livrés auparavant. Il ne transforme pas Anchor, Metaplex ou les futurs DEX en surfaces implicitement couvertes. + +## Résultats de tests + +| Suite | Résultat | +|------------------------------------|---------:| +| `kb_store_core` | 41/41 | +| `kb_store_pg` avec PostgreSQL réel | 46/46 | +| `kb_pipeline` | 124/124 | +| `kb_app_demo` | 118/118 | +| `cargo clippy --all-targets` | propre | + +Les contrôles SQL sur `kb_sol_decode_events` et `kb_sol_mat_events` ne révèlent aucun doublon d’identité. + +## Token-2022 et ElGamal Registry + +- 55 instructions Token-2022 Mainnet ont été décodées sans échec persistant. +- Huit opérations publiques Token-2022 ont été confirmées sur Devnet : `MintToChecked`, `TransferChecked`, `ApproveChecked`, `Revoke`, `BurnChecked`, `FreezeAccount`, `ThawAccount` et `CloseAccount`. +- Chaque parcours Devnet a été simulé, confirmé, hydraté, extrait, décodé, matérialisé puis rejoué idempotemment. +- ElGamal Registry est validé synthétiquement/offline pour le wire, le PDA, l’état, les lectures RPC, les préflights et les preuves. +- La validation publique ElGamal Registry reste indisponible sur Devnet/Mainnet au 20 juillet 2026 ; aucune preuve réseau n’est revendiquée. + +## Loader immuable et Loader v4 + +Le parser `Write` du loader immuable lit désormais la longueur vectorielle en `u32` et les données à l’offset 12. Le replay Mainnet a supprimé 68 diagnostics `loader_vector_length_mismatch`. + +Les rejets persistants restants sont tous issus de transactions Solana échouées : + +| Diagnostic | Nombre | +|----------------------------------|-------:| +| `immutable_loader_tag_truncated` | 31 | +| `loader_v4_tag_truncated` | 44 | +| `loader_accounts_invalid` | 1 | + +Quatre variantes Loader v4 inconnues sont persistées comme traitement réussi avec résultat métier `Unsupported`. Elles ne sont pas assimilées à des décodages complets. + +## Replay des signatures incomplètes + +Le mode `incomplete_signatures` sélectionne les signatures contenant au moins une instruction `pending`, `failed`, `replay_requested` ou `unsupported`. La limite est appliquée au nombre de signatures avant expansion vers les instructions compatibles. Ce mode ne nécessite pas de force replay global. + +Deux campagnes PostgreSQL réelles successives ont produit exactement : + +```text +selected=81 +started=81 +completed=81 +unmatched=0 +notStarted=0 +failedInputs=76 +decoded=1 +unsupported=4 +failed=76 +``` + +L’instruction décodée appartient à une signature incomplète contenant également une instruction valide. La répétition identique du second passage confirme la sélection stable ; les événements et matérialisations restent idempotents. + +## Conclusion + +Tous les décodeurs livrés jusqu’à `0.4.6` respectent leur contrat sur les tests synthétiques, les scénarios stateful et les données réseau observées. Les payloads malformés sont rejetés fail-closed et les variantes inconnues sont classées explicitement `Unsupported`. Cette conclusion ne prétend pas que chaque variante rare possible a été observée sur un cluster public. diff --git a/olddocs/archivekbot2/docs/VERSION_HEADER_AUDIT.md b/olddocs/archivekbot2/docs/VERSION_HEADER_AUDIT.md new file mode 100644 index 0000000..9836fea --- /dev/null +++ b/olddocs/archivekbot2/docs/VERSION_HEADER_AUDIT.md @@ -0,0 +1,30 @@ + + + +# Audit des en-têtes de version + +Ce document regroupe les commandes utiles pour vérifier les en-têtes `file:` et `version:`. + +## Lignes `version` différentes de 1 + +La commande suivante utilise deux passes pour éviter les problèmes de lookahead et d'expansion d'historique Bash : + +```bash +rg -n -P '^\s*(//|#||\*/)?\s*$' +``` + +## Fichiers concernés uniquement + +```bash +rg -n -P '^\s*(//|#||\*/)?\s*$' | cut -d: -f1 | sort -u +``` + +## Fichiers commentables sans ligne `version` + +```bash +find . -path './target' -prune -o -path './node_modules' -prune -o -path './dist' -prune -o -path './idls' -prune -o -type f \( -name '*.rs' -o -name '*.toml' -o -name '*.sql' -o -name '*.md' -o -name '*.ts' -o -name '*.js' -o -name '*.html' -o -name '*.scss' -o -name '*.sass' \) -print | while read -r f; do + if ! head -n 5 "$f" | rg -q 'version\s*:'; then + echo "$f" + fi + done +``` diff --git a/olddocs/archivekbot2/docs/WS_LISTENERS.md b/olddocs/archivekbot2/docs/WS_LISTENERS.md new file mode 100644 index 0000000..e341a77 --- /dev/null +++ b/olddocs/archivekbot2/docs/WS_LISTENERS.md @@ -0,0 +1,69 @@ + + + +# Listeners WebSocket + +## Statut + +Les listeners temps réel ne dirigent plus `0.3.x`. Ils seront repris après les décodeurs Core, Pump, Meteora, Raydium, Orca et Jupiter. + +## Méthodes déjà présentes dans `demo_ws` + +```text +slotSubscribe +slotsUpdatesSubscribe +rootSubscribe +logsSubscribe +accountSubscribe +programSubscribe +signatureSubscribe +blockSubscribe +voteSubscribe +``` + +L’audit confirme encore l’absence de : + +```text +transactionSubscribe +transactionUnsubscribe +request kind transaction_subscribe +classification logs_subscribe_all +``` + +Ces ajouts sont reportés à `0.10.x`. + +## Modèle futur + +```text +Helius transactionSubscribe +Yellowstone gRPC transactions +logsSubscribe + hydration + | + v +transaction canonique commune + | + +--> kb_sol_raw_transactions + +--> kb_sol_obs_transaction_observations +``` + +Le payload complet de la notification WebSocket ne doit pas être stocké durablement lorsqu’une transaction canonique existe. + +## Cas d’usage + +Les flux devront détecter rapidement : + +- création de token ou pool ; +- premiers swaps ; +- migration ; +- changement de liquidité ; +- activité administrative dangereuse ; +- frais et buybacks ; +- changements sur les comptes critiques. + +## Sécurité + +- Aucun ordre direct depuis la couche transport. +- Toute perte du flux principal désactive le trading. +- Les événements rejoués ou backfillés mettent à jour l’état sans déclencher rétroactivement un ordre. +- Les queues, tailles, retries et exports de diagnostic restent bornés. + diff --git a/olddocs/archivekbot2/idls/001.README.md b/olddocs/archivekbot2/idls/001.README.md new file mode 100644 index 0000000..994a228 --- /dev/null +++ b/olddocs/archivekbot2/idls/001.README.md @@ -0,0 +1,8 @@ + + + +# IDL locales + +Ce répertoire contient les IDL locales utilisées comme sources de connaissance pour les décodeurs. + +Les fichiers JSON ne doivent pas être modifiés pour ajouter des commentaires, car le format JSON standard ne les supporte pas. diff --git a/olddocs/archivekbot2/idls/bonkswap.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.json b/olddocs/archivekbot2/idls/bonkswap.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.json new file mode 100644 index 0000000..80b7b11 --- /dev/null +++ b/olddocs/archivekbot2/idls/bonkswap.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.json @@ -0,0 +1 @@ +{"version":"0.1.1","name":"bonkswap","instructions":[{"name":"createPool","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":true},{"name":"poolYAccount","isMut":true,"isSigner":true},{"name":"adminXAccount","isMut":true,"isSigner":false},{"name":"adminYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"projectOwner","isMut":false,"isSigner":false},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"lpFee","type":{"defined":"FixedPoint"}},{"name":"buybackFee","type":{"defined":"FixedPoint"}},{"name":"projectFee","type":{"defined":"FixedPoint"}},{"name":"mercantiFee","type":{"defined":"FixedPoint"}},{"name":"initialTokenX","type":{"defined":"Token"}},{"name":"initialTokenY","type":{"defined":"Token"}},{"name":"bump","type":"u8"}]},{"name":"createProvider","accounts":[{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"tokenXAmount","type":{"defined":"Token"}},{"name":"tokenYAmount","type":{"defined":"Token"}},{"name":"bump","type":"u8"}]},{"name":"createState","accounts":[{"name":"state","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"addTokens","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":true,"isSigner":false},{"name":"tokenProjectFirst","isMut":true,"isSigner":false},{"name":"tokenProjectSecond","isMut":true,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"deltaX","type":{"defined":"Token"}},{"name":"deltaY","type":{"defined":"Token"}}]},{"name":"withdrawBuyback","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"buybackXAccount","isMut":true,"isSigner":false},{"name":"buybackYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"swap","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"swapperXAccount","isMut":true,"isSigner":false},{"name":"swapperYAccount","isMut":true,"isSigner":false},{"name":"swapper","isMut":true,"isSigner":true},{"name":"referrerXAccount","isMut":true,"isSigner":false},{"name":"referrerYAccount","isMut":true,"isSigner":false},{"name":"referrer","isMut":true,"isSigner":false},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"deltaIn","type":{"defined":"Token"}},{"name":"priceLimit","type":{"defined":"FixedPoint"}},{"name":"xToY","type":"bool"}]},{"name":"withdrawShares","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":true,"isSigner":false},{"name":"tokenProjectFirst","isMut":true,"isSigner":false},{"name":"tokenProjectSecond","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"shares","type":{"defined":"Token"}}]},{"name":"withdrawLpFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawProjectFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"projectOwnerXAccount","isMut":true,"isSigner":false},{"name":"projectOwnerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"projectOwner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"createFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"supply","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"createDualFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenProjectFirst","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"createTripleFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenProjectFirst","isMut":false,"isSigner":false},{"name":"tokenProjectSecond","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":true},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"supplyProjectSecond","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"withdrawRewards","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":true,"isSigner":false},{"name":"tokenProjectFirst","isMut":true,"isSigner":false},{"name":"tokenProjectSecond","isMut":true,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"closePool","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"buybackXAccount","isMut":true,"isSigner":false},{"name":"buybackYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawMercantiFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"mercantiXAccount","isMut":true,"isSigner":false},{"name":"mercantiYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"addSupply","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"supplyProjectSecond","type":{"defined":"Token"}},{"name":"duration","type":"u64"}]},{"name":"updateFees","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false}],"args":[{"name":"newBuybackFee","type":{"defined":"FixedPoint"}},{"name":"newProjectFee","type":{"defined":"FixedPoint"}},{"name":"newProviderFee","type":{"defined":"FixedPoint"}},{"name":"newMercantiFee","type":{"defined":"FixedPoint"}}]},{"name":"resetFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"updateRewardTokens","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"newTokenMarcoAccount","isMut":true,"isSigner":true},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Farm","type":{"kind":"struct","fields":[{"name":"pool","type":"publicKey"},{"name":"tokens","type":{"array":["publicKey",3]}},{"name":"tokenAccounts","type":{"array":["publicKey",3]}},{"name":"supply","type":{"array":[{"defined":"Token"},3]}},{"name":"supplyLeft","type":{"array":[{"defined":"Token"},3]}},{"name":"accumulatedSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"offsetSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"startTime","type":"u64"},{"name":"endTime","type":"u64"},{"name":"lastUpdate","type":"u64"},{"name":"bump","type":"u8"},{"name":"farmType","type":{"defined":"FarmType"}}]}},{"name":"PoolV2","type":{"kind":"struct","fields":[{"name":"tokenX","type":"publicKey"},{"name":"tokenY","type":"publicKey"},{"name":"poolXAccount","type":"publicKey"},{"name":"poolYAccount","type":"publicKey"},{"name":"admin","type":"publicKey"},{"name":"projectOwner","type":"publicKey"},{"name":"tokenXReserve","type":{"defined":"Token"}},{"name":"tokenYReserve","type":{"defined":"Token"}},{"name":"selfShares","type":{"defined":"Token"}},{"name":"allShares","type":{"defined":"Token"}},{"name":"buybackAmountX","type":{"defined":"Token"}},{"name":"buybackAmountY","type":{"defined":"Token"}},{"name":"projectAmountX","type":{"defined":"Token"}},{"name":"projectAmountY","type":{"defined":"Token"}},{"name":"mercantiAmountX","type":{"defined":"Token"}},{"name":"mercantiAmountY","type":{"defined":"Token"}},{"name":"lpAccumulatorX","type":{"defined":"FixedPoint"}},{"name":"lpAccumulatorY","type":{"defined":"FixedPoint"}},{"name":"constK","type":{"defined":"Product"}},{"name":"price","type":{"defined":"FixedPoint"}},{"name":"lpFee","type":{"defined":"FixedPoint"}},{"name":"buybackFee","type":{"defined":"FixedPoint"}},{"name":"projectFee","type":{"defined":"FixedPoint"}},{"name":"mercantiFee","type":{"defined":"FixedPoint"}},{"name":"farmCount","type":"u64"},{"name":"poolBump","type":"u8"},{"name":"lpToken","type":"publicKey"},{"name":"lpTokenMintBump","type":"u8"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"tokenX","type":"publicKey"},{"name":"tokenY","type":"publicKey"},{"name":"poolXAccount","type":"publicKey"},{"name":"poolYAccount","type":"publicKey"},{"name":"admin","type":"publicKey"},{"name":"projectOwner","type":"publicKey"},{"name":"tokenXReserve","type":{"defined":"Token"}},{"name":"tokenYReserve","type":{"defined":"Token"}},{"name":"selfShares","type":{"defined":"Token"}},{"name":"allShares","type":{"defined":"Token"}},{"name":"buybackAmountX","type":{"defined":"Token"}},{"name":"buybackAmountY","type":{"defined":"Token"}},{"name":"projectAmountX","type":{"defined":"Token"}},{"name":"projectAmountY","type":{"defined":"Token"}},{"name":"mercantiAmountX","type":{"defined":"Token"}},{"name":"mercantiAmountY","type":{"defined":"Token"}},{"name":"lpAccumulatorX","type":{"defined":"FixedPoint"}},{"name":"lpAccumulatorY","type":{"defined":"FixedPoint"}},{"name":"constK","type":{"defined":"Product"}},{"name":"price","type":{"defined":"FixedPoint"}},{"name":"lpFee","type":{"defined":"FixedPoint"}},{"name":"buybackFee","type":{"defined":"FixedPoint"}},{"name":"projectFee","type":{"defined":"FixedPoint"}},{"name":"mercantiFee","type":{"defined":"FixedPoint"}},{"name":"farmCount","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"Provider","type":{"kind":"struct","fields":[{"name":"tokenX","type":"publicKey"},{"name":"tokenY","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"shares","type":{"defined":"Token"}},{"name":"lastFeeAccumulatorX","type":{"defined":"FixedPoint"}},{"name":"lastFeeAccumulatorY","type":{"defined":"FixedPoint"}},{"name":"lastSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"lastWithdrawTime","type":"u64"},{"name":"tokensOwedX","type":{"defined":"Token"}},{"name":"tokensOwedY","type":{"defined":"Token"}},{"name":"currentFarmCount","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"State","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"programAuthority","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"nonce","type":"u8"}]}}],"types":[{"name":"FixedPoint","type":{"kind":"struct","fields":[{"name":"v","type":"u128"}]}},{"name":"Token","type":{"kind":"struct","fields":[{"name":"v","type":"u64"}]}},{"name":"Product","type":{"kind":"struct","fields":[{"name":"v","type":"u128"}]}},{"name":"FarmType","type":{"kind":"enum","variants":[{"name":"Single"},{"name":"Dual"},{"name":"Triple"}]}}],"errors":[{"code":6000,"name":"DeltaTooBig","msg":"Delta greater than provider's tokens"},{"code":6001,"name":"TokenUnderflow","msg":"Token amount underflow"},{"code":6002,"name":"WrongRatio","msg":"Wrong tokens ratio"},{"code":6003,"name":"TooMuchShares","msg":"Too much shares provided"},{"code":6004,"name":"SwapToBig","msg":"Swap too big"},{"code":6005,"name":"FeeExceeded","msg":"Fee exceeded 100%"},{"code":6007,"name":"ScalesNotEqual","msg":"Scales have to be equal"},{"code":6008,"name":"FeeExceededDeltaOut","msg":"Fees exceeded delta_out"},{"code":6009,"name":"PriceLimitExceeded","msg":"Price limit exceeded"},{"code":6010,"name":"MintMismatch","msg":"Mint mismatch"},{"code":6011,"name":"TokensAreTheSame","msg":"Tokens are the same"},{"code":6012,"name":"WrongFarm","msg":"Cannot add supply to wrong farm"},{"code":6013,"name":"RewardsExceedingSupply","msg":"Cannot withdraw rewards exceeding supply left"},{"code":6014,"name":"FarmNotEnded","msg":"Farm has not ended, cannot add additional rewards"},{"code":6015,"name":"ZeroAmount","msg":"Must provide a nonzero amount"},{"code":6016,"name":"InvariantDecreased","msg":"Invariant has changed"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/boop_fun.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.json b/olddocs/archivekbot2/idls/boop_fun.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.json new file mode 100644 index 0000000..e130eea --- /dev/null +++ b/olddocs/archivekbot2/idls/boop_fun.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.json @@ -0,0 +1 @@ +{"address":"boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4","metadata":{"name":"boop","version":"0.3.0","spec":"0.1.0","description":"Boop is a token launcher with fee sharing"},"instructions":[{"name":"add_operators","discriminator":[165,199,62,214,81,54,4,150],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"authority","writable":true,"signer":true,"relations":["config"]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"operators","type":{"vec":"pubkey"}}]},{"name":"buy_token","discriminator":[138,127,14,91,38,87,115,105],"accounts":[{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"trading_fees_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"recipient_token_account"},{"name":"buyer","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"wsol","address":"So11111111111111111111111111111111111111112"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"buy_amount","type":"u64"},{"name":"amount_out_min","type":"u64"}]},{"name":"cancel_authority_transfer","discriminator":[94,131,125,184,183,24,125,229],"accounts":[{"name":"authority","signer":true,"relations":["config"]},{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"close_bonding_curve_vault","discriminator":[189,71,189,239,113,66,59,189],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"operator","writable":true,"signer":true},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"mint"},{"name":"recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"recipient"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"recipient","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["System program for creating associated token if needed"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"collect_meteora_trading_fees","discriminator":[249,95,126,91,81,162,83,250],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"protocol_fee_recipient","relations":["config"]},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pool_authority"},{"name":"pool"},{"name":"position","writable":true},{"name":"token_a_account","docs":["The token account to receive token a"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_a_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":"token_b_account","docs":["The token account to receive token b"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"}]}},{"name":"token_a_vault","writable":true},{"name":"token_b_vault","writable":true},{"name":"token_a_mint"},{"name":"token_b_mint"},{"name":"position_nft_account","writable":true},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"event_authority"},{"name":"cp_amm_program","address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"}],"args":[]},{"name":"collect_meteora_trading_fees_v2","discriminator":[96,39,109,46,5,161,15,57],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"protocol_fee_recipient","relations":["config"]},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pool_authority"},{"name":"pool"},{"name":"position","writable":true},{"name":"token_a_account","docs":["The token account to receive token a"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_a_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":"token_b_account","docs":["The token account to receive token b"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,116,95,103,114,97,100,95,116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"}]}},{"name":"token_a_vault","writable":true},{"name":"token_b_vault","writable":true},{"name":"token_a_mint"},{"name":"token_b_mint"},{"name":"position_nft_account","writable":true},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"event_authority"},{"name":"cp_amm_program","address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"collect_trading_fees","discriminator":[189,38,205,234,81,77,25,1],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"protocol_fee_recipient","relations":["config"]},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"lock_program","address":"LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[108,111,99,107,95,99,112,95,97,117,116,104,111,114,105,116,121,95,115,101,101,100]}],"program":{"kind":"account","path":"lock_program"}}},{"name":"fee_nft_account","docs":["Fee token account"]},{"name":"locked_liquidity","docs":["Store the locked the information of liquidity"],"writable":true},{"name":"cpmm_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"cp_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true},{"name":"lp_mint","docs":["lp mint","address = pool_state.lp_mint"],"writable":true},{"name":"recipient_token_0_account","docs":["The token account for receive token_0"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"vault_0_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":"recipient_token_1_account","docs":["The token account for receive token_1"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"token_0_vault.mint"}]}},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"locked_lp_vault","docs":["locked lp token account"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"system_program","docs":["System program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[]},{"name":"collect_trading_fees_v2","discriminator":[180,138,160,155,243,88,168,7],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"protocol_fee_recipient","relations":["config"]},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"lock_program","address":"LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[108,111,99,107,95,99,112,95,97,117,116,104,111,114,105,116,121,95,115,101,101,100]}],"program":{"kind":"account","path":"lock_program"}}},{"name":"fee_nft_account","docs":["Fee token account"]},{"name":"locked_liquidity","docs":["Store the locked the information of liquidity"],"writable":true},{"name":"cpmm_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"cp_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true},{"name":"lp_mint","docs":["lp mint","address = pool_state.lp_mint"],"writable":true},{"name":"recipient_token_0_account","docs":["The token account for receive token_0"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"vault_0_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":"recipient_token_1_account","docs":["The token account for receive token_1"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,116,95,103,114,97,100,95,116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"token_0_vault.mint"}]}},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"locked_lp_vault","docs":["locked lp token account"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"system_program","docs":["System program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[]},{"name":"complete_authority_transfer","discriminator":[81,233,91,132,175,31,151,141],"accounts":[{"name":"pending_authority","signer":true,"relations":["config"]},{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_meteora_pool","discriminator":[246,254,33,37,225,176,41,232],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"cp_amm_config"},{"name":"pool_authority"},{"name":"pool","writable":true},{"name":"position","writable":true},{"name":"position_nft_mint","writable":true,"signer":true},{"name":"position_nft_account","writable":true},{"name":"token_a_mint"},{"name":"token_b_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_a_vault","writable":true},{"name":"token_b_vault","writable":true},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"token_a_mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"event_authority"},{"name":"cp_amm_program","address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"}],"args":[]},{"name":"create_raydium_pool","discriminator":[65,45,119,77,204,178,84,2],"accounts":[{"name":"cpmm_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_0_mint"},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"token_0_mint","writable":true},{"name":"token_1_mint","docs":["Token_1 mint, the key must be greater than token_0 mint."],"address":"So11111111111111111111111111111111111111112"},{"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_state"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"token_0_mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"creator_lp_token","writable":true},{"name":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"create_pool_fee","docs":["create pool fee account"],"writable":true,"address":"DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"},{"name":"observation_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"operator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"create_raydium_random_pool","discriminator":[78,44,173,29,132,180,4,172],"accounts":[{"name":"cpmm_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true,"signer":true},{"name":"token_0_mint","writable":true},{"name":"token_1_mint","docs":["Token_1 mint, the key must be greater than token_0 mint."],"address":"So11111111111111111111111111111111111111112"},{"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_state"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"token_0_mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"creator_lp_token","writable":true},{"name":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"create_pool_fee","docs":["create pool fee account"],"writable":true,"address":"DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"},{"name":"observation_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"operator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"create_token","discriminator":[84,52,204,228,24,140,234,75],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"metadata","writable":true,"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":"mint"}],"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":"mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,105,110,116]},{"kind":"account","path":"payer"},{"kind":"arg","path":"salt"}]}},{"name":"payer","writable":true,"signer":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[{"name":"salt","type":"u64"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"create_token_fallback","discriminator":[253,184,126,199,235,232,172,162],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"metadata","writable":true,"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":"mint"}],"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":"mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,105,110,116]},{"kind":"arg","path":"salt"}]}},{"name":"payer","writable":true,"signer":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[{"name":"salt","type":"u64"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"deploy_bonding_curve","discriminator":[180,89,199,76,168,236,217,138],"accounts":[{"name":"mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,105,110,116]},{"kind":"account","path":"payer"},{"kind":"arg","path":"salt"}]}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"creator","type":"pubkey"},{"name":"salt","type":"u64"}]},{"name":"deploy_bonding_curve_fallback","discriminator":[53,230,172,84,77,174,22,61],"accounts":[{"name":"mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,105,110,116]},{"kind":"arg","path":"salt"}]}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"creator","type":"pubkey"},{"name":"salt","type":"u64"}]},{"name":"deposit_into_raydium","discriminator":[168,89,99,30,117,49,88,224],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"operator","writable":true,"signer":true},{"name":"operator_wsol_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"operator"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_1_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":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_0_mint"},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","docs":["System program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Program to create an ATA for the operator to recoup any potential remaining WSOL"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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_state"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"cpmm_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"owner_lp_token","writable":true},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"token_0_mint"}]}},{"name":"token_0_mint","writable":true},{"name":"token_1_mint","docs":["token_1 mint, the key must greater than token_0 mint"],"address":"So11111111111111111111111111111111111111112"}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"maximum_token_0_amount","type":"u64"},{"name":"maximum_token_1_amount","type":"u64"}]},{"name":"graduate","discriminator":[45,235,225,181,17,218,64,130],"accounts":[{"name":"mint"},{"name":"wsol","address":"So11111111111111111111111111111111111111112"},{"name":"protocol_fee_recipient","writable":true},{"name":"token_distributor"},{"name":"token_distributor_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_distributor"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve_sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_wsol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"operator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"initialize","discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"authority","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"protocol_fee_recipient","type":"pubkey"},{"name":"token_distributor","type":"pubkey"}]},{"name":"initiate_authority_transfer","discriminator":[210,43,101,215,119,140,106,218],"accounts":[{"name":"authority","signer":true,"relations":["config"]},{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"new_authority","type":"pubkey"}]},{"name":"lock_raydium_liquidity","discriminator":[173,255,148,6,122,99,140,22],"accounts":[{"name":"lock_program","address":"LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[108,111,99,107,95,99,112,95,97,117,116,104,111,114,105,116,121,95,115,101,101,100]}],"program":{"kind":"account","path":"lock_program"}}},{"name":"fee_nft_owner"},{"name":"fee_nft_mint","writable":true,"signer":true},{"name":"fee_nft_account","writable":true},{"name":"pool_state","writable":true},{"name":"locked_liquidity","docs":["Store the locked information of liquidity"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,107,101,100,95,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"fee_nft_mint"}],"program":{"kind":"account","path":"lock_program"}}},{"name":"lp_mint","docs":["The mint of liquidity token"],"writable":true},{"name":"liquidity_owner_lp","docs":["liquidity owner lp token account"],"writable":true},{"name":"locked_lp_vault","writable":true},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"operator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"token_0_vault.mint"}]}},{"name":"metadata_account","docs":["To store metaplex metadata"],"writable":true,"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":"fee_nft_mint"}],"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":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the new account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create/transfer mint/token account"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving fee NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata accunt"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[]},{"name":"remove_operators","discriminator":[42,20,89,83,222,37,4,109],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"authority","writable":true,"signer":true,"relations":["config"]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"operators","type":{"vec":"pubkey"}}]},{"name":"sell_token","discriminator":[109,61,40,187,230,176,135,174],"accounts":[{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"trading_fees_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"seller_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"seller"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"seller","writable":true,"signer":true},{"name":"recipient","writable":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"sell_amount","type":"u64"},{"name":"amount_out_min","type":"u64"}]},{"name":"split_post_graduation_trading_fees","discriminator":[241,178,177,69,38,187,58,176],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"mint"},{"name":"wsol","address":"So11111111111111111111111111111111111111112"},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"trading_fees_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,116,95,103,114,97,100,95,116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"fee_splitter_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_splitter_config"},{"name":"fee_splitter_creator_vault","writable":true},{"name":"fee_splitter_vault_authority","writable":true},{"name":"fee_splitter_creator_vault_authority","writable":true},{"name":"fee_splitter_staking_mint"},{"name":"fee_splitter_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_splitter_vault_authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"wsol"}],"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":"fee_splitter_creator_vault_authority_wsol_vault","writable":true},{"name":"fee_splitter_treasury_wsol_vault","writable":true},{"name":"fee_splitter_team_wsol_vault","writable":true},{"name":"fee_splitter_reward_pool","writable":true},{"name":"fee_splitter_reward_pool_staking_vault","writable":true},{"name":"fee_splitter_reward_pool_reward_vault","writable":true},{"name":"fee_splitter_reward_pool_program"}],"args":[]},{"name":"split_trading_fees","discriminator":[96,126,225,47,185,213,50,58],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"mint"},{"name":"wsol","address":"So11111111111111111111111111111111111111112"},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"trading_fees_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"fee_splitter_program","address":"boopEYztaEYSnajfMtjcRysyzyRcchgKsPboRZEbnJi"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_splitter_config"},{"name":"fee_splitter_creator_vault","writable":true},{"name":"fee_splitter_vault_authority","writable":true},{"name":"fee_splitter_creator_vault_authority","writable":true},{"name":"fee_splitter_staking_mint"},{"name":"fee_splitter_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_splitter_vault_authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"wsol"}],"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":"fee_splitter_creator_vault_authority_wsol_vault","writable":true},{"name":"fee_splitter_treasury_wsol_vault","writable":true},{"name":"fee_splitter_team_wsol_vault","writable":true},{"name":"fee_splitter_reward_pool","writable":true},{"name":"fee_splitter_reward_pool_staking_vault","writable":true},{"name":"fee_splitter_reward_pool_reward_vault","writable":true},{"name":"fee_splitter_reward_pool_program"}],"args":[]},{"name":"swap_sol_for_tokens_on_raydium","discriminator":[107,248,131,239,152,234,54,35],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"output_token_mint"}]}},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"operator","writable":true,"signer":true},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"output_token_mint"},{"kind":"account","path":"input_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"input_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"input_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"output_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"output_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"output_token_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"output_token_mint"}]}},{"name":"output_token_mint","docs":["token_0 mint, the key must smaller than token_1 mint"]},{"name":"input_token_mint","docs":["token_1 mint, the key must greater than token_0 mint"],"address":"So11111111111111111111111111111111111111112"},{"name":"token_program","docs":["input_token_mint and output_token_mint have the same token program"]},{"name":"cp_swap_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"observation_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}],"program":{"kind":"account","path":"cp_swap_program"}}}],"args":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"swap_tokens_for_sol_on_raydium","discriminator":[216,172,130,148,34,98,215,163],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"input_token_mint"}]}},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"operator","writable":true,"signer":true},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"input_token_mint"},{"kind":"account","path":"output_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"input_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"input_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"output_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"output_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"input_token_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"input_token_mint"}]}},{"name":"input_token_mint","docs":["token_0 mint, the key must smaller than token_1 mint"]},{"name":"output_token_mint","docs":["token_1 mint, the key must greater than token_0 mint"],"address":"So11111111111111111111111111111111111111112"},{"name":"token_program","docs":["input_token_mint and output_token_mint have the same token program"]},{"name":"cp_swap_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"observation_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}],"program":{"kind":"account","path":"cp_swap_program"}}}],"args":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"toggle_paused","discriminator":[54,83,147,198,123,97,218,72],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["config"]},{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}}],"args":[]},{"name":"update_config","discriminator":[29,158,252,191,10,83,219,99],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"authority","signer":true,"relations":["config"]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"new_protocol_fee_recipient","type":"pubkey"},{"name":"new_virtual_sol_reserves","type":"u64"},{"name":"new_virtual_token_reserves","type":"u64"},{"name":"new_graduation_target","type":"u64"},{"name":"new_graduation_fee","type":"u64"},{"name":"new_damping_term","type":"u8"},{"name":"new_swap_fee_basis_points","type":"u8"},{"name":"new_token_for_stakers_basis_points","type":"u16"},{"name":"new_token_amount_for_raydium_liquidity","type":"u64"},{"name":"new_max_graduation_price_deviation_basis_points","type":"u16"},{"name":"new_max_swap_amount_for_pool_price_correction_basis_points","type":"u16"}]}],"accounts":[{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"BondingCurve","discriminator":[23,183,248,55,96,216,172,96]},{"name":"Config","discriminator":[155,12,170,224,30,250,204,130]},{"name":"LockedCpLiquidityState","discriminator":[25,10,238,197,207,234,73,22]}],"events":[{"name":"AuthorityTransferCancelledEvent","discriminator":[192,121,140,224,229,96,13,143]},{"name":"AuthorityTransferCompletedEvent","discriminator":[163,132,217,128,243,92,90,249]},{"name":"AuthorityTransferInitiatedEvent","discriminator":[121,246,95,155,229,109,148,205]},{"name":"BondingCurveDeployedEvent","discriminator":[225,80,178,34,217,39,184,148]},{"name":"BondingCurveDeployedFallbackEvent","discriminator":[106,252,243,115,199,159,247,31]},{"name":"BondingCurveVaultClosedEvent","discriminator":[185,36,156,82,189,164,207,79]},{"name":"ConfigUpdatedEvent","discriminator":[245,158,129,99,60,100,214,220]},{"name":"LiquidityDepositedIntoRaydiumEvent","discriminator":[236,50,97,27,198,101,248,20]},{"name":"OperatorsAddedEvent","discriminator":[247,58,112,56,203,186,112,152]},{"name":"OperatorsRemovedEvent","discriminator":[44,72,75,70,151,42,53,89]},{"name":"PausedToggledEvent","discriminator":[143,222,228,224,6,230,64,176]},{"name":"PostGraduationTradingFeesSplitEvent","discriminator":[34,231,16,81,36,203,158,196]},{"name":"RaydiumLiquidityLockedEvent","discriminator":[172,189,8,241,137,175,59,100]},{"name":"RaydiumPoolCreatedEvent","discriminator":[170,178,21,215,84,222,34,101]},{"name":"RaydiumRandomPoolCreatedEvent","discriminator":[152,251,128,152,158,235,83,53]},{"name":"SwapSolForTokensOnRaydiumEvent","discriminator":[247,1,8,166,221,116,113,98]},{"name":"SwapTokensForSolOnRaydiumEvent","discriminator":[76,249,221,162,65,70,118,32]},{"name":"TokenBoughtEvent","discriminator":[71,89,222,124,215,192,230,138]},{"name":"TokenCreatedEvent","discriminator":[96,122,113,138,50,227,149,57]},{"name":"TokenCreatedFallbackEvent","discriminator":[157,202,35,92,165,163,39,56]},{"name":"TokenGraduatedEvent","discriminator":[73,116,111,26,92,217,146,141]},{"name":"TokenSoldEvent","discriminator":[204,239,182,77,241,51,77,66]},{"name":"TradingFeesCollectedEvent","discriminator":[225,63,26,55,134,243,210,203]},{"name":"TradingFeesCollectedV2Event","discriminator":[23,246,130,250,11,49,240,179]},{"name":"TradingFeesSplitEvent","discriminator":[113,60,159,17,253,174,135,122]}],"errors":[{"code":6000,"name":"AmountInTooLow","msg":"Amount in too low"},{"code":6001,"name":"AmountOutTooLow","msg":"Amount out too low"},{"code":6002,"name":"AmountZero","msg":"Amount zero"},{"code":6003,"name":"ConfigNotInitialized","msg":"Config not initialized"},{"code":6004,"name":"CreatorIsNotProvided","msg":"Creator is not provided"},{"code":6005,"name":"DampingTermTooLow","msg":"Damping term too low"},{"code":6006,"name":"FirstBuyMustBeAtMost50PercentOfTotalSupply","msg":"First buy must be at most 50% of the total supply"},{"code":6007,"name":"GraduationFeeRelativeToTargetIsTooHigh","msg":"Graduation fee relative to graduation target is too high"},{"code":6008,"name":"InsufficientTokensOut","msg":"Insufficient tokens to transfer out of the bonding curve"},{"code":6009,"name":"InvalidBondingCurveStatus","msg":"Invalid bonding curve status"},{"code":6010,"name":"InvalidDampingTerm","msg":"Invalid damping term"},{"code":6011,"name":"InvalidMint","msg":"Invalid mint"},{"code":6012,"name":"InvalidProtocolFeeRecipient","msg":"Invalid protocol fee recipient"},{"code":6013,"name":"InvalidSqrtPrice","msg":"Invalid sqrt price"},{"code":6014,"name":"MathOverflow","msg":"Math overflow"},{"code":6015,"name":"MaxBasisPointsOffGraduationPriceTooHigh","msg":"Max basis points off graduation price too high"},{"code":6016,"name":"MaxGraduationPriceDeviationBasisPointsTooHigh","msg":"Max graduation price deviation basis points too high"},{"code":6017,"name":"MaxSwapAmountForPoolPriceCorrectionBasisPointsTooHigh","msg":"Max swap amount for pool price correction basis points too high"},{"code":6018,"name":"MintIsLargerThanOrEqualToNativeMint","msg":"Mint is larger than or equal to native mint"},{"code":6019,"name":"NoAuthorityTransferInProgress","msg":"No authority transfer in progress"},{"code":6020,"name":"NothingToDeposit","msg":"LP Token amount is too low"},{"code":6021,"name":"NothingToSplit","msg":"Nothing to split"},{"code":6022,"name":"NothingToLock","msg":"Nothing to lock"},{"code":6023,"name":"OperatorAlreadyAdded","msg":"Operator already added"},{"code":6024,"name":"OperatorDoesNotExist","msg":"Operator does not exist"},{"code":6025,"name":"Paused","msg":"Paused"},{"code":6026,"name":"PoolPriceOutOfRange","msg":"Pool is already created and has a price out of range when attempting to deposit liquidity"},{"code":6027,"name":"SwapFeeBasisPointsTooHigh","msg":"Swap fee basis points too high"},{"code":6028,"name":"SwapAmountTooHigh","msg":"Swap amount exceeds the reasonable limit to leave as liquidity"},{"code":6029,"name":"TokenAmountForRaydiumLiquidityTooHigh","msg":"Token amount for Raydium liquidity too high"},{"code":6030,"name":"TokenForStakersBasisPointsTooHigh","msg":"Token for stakers basis points too high"},{"code":6031,"name":"TokenGraduated","msg":"Token graduated"},{"code":6032,"name":"TokenNameTooLong","msg":"Token name too long"},{"code":6033,"name":"TokenNameTooShort","msg":"Token name too short"},{"code":6034,"name":"TokenSymbolTooLong","msg":"Token symbol too long"},{"code":6035,"name":"TokenSymbolTooShort","msg":"Token symbol too short"},{"code":6036,"name":"Unauthorized","msg":"Unauthorized"}],"types":[{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"disable_create_pool","docs":["Status to control if new pool can be create"],"type":"bool"},{"name":"index","docs":["Config index"],"type":"u16"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u64"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"create_pool_fee","docs":["Fee for create a new pool"],"type":"u64"},{"name":"protocol_owner","docs":["Address of the protocol fee owner"],"type":"pubkey"},{"name":"fund_owner","docs":["Address of the fund fee owner"],"type":"pubkey"},{"name":"padding","docs":["padding"],"type":{"array":["u64",16]}}]}},{"name":"AuthorityTransferCancelledEvent","type":{"kind":"struct","fields":[]}},{"name":"AuthorityTransferCompletedEvent","type":{"kind":"struct","fields":[{"name":"old_authority","type":"pubkey"},{"name":"new_authority","type":"pubkey"}]}},{"name":"AuthorityTransferInitiatedEvent","type":{"kind":"struct","fields":[{"name":"old_authority","type":"pubkey"},{"name":"new_authority","type":"pubkey"}]}},{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"creator","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"virtual_token_reserves","docs":["virtual token reserves is deprecated, we now use the xyk formula instead","and it only requires virtual sol reserves","to maintain backwards compatibility, if damping term is 30, we use the old formula","and we still need virtual_token_reserves to be set correctly"],"type":"u64"},{"name":"graduation_target","type":"u64"},{"name":"graduation_fee","type":"u64"},{"name":"sol_reserves","type":"u64"},{"name":"token_reserves","type":"u64"},{"name":"damping_term","docs":["In reality, this is now more like a bonding_curve_selector"],"type":"u8"},{"name":"swap_fee_basis_points","type":"u8"},{"name":"token_for_stakers_basis_points","type":"u16"},{"name":"status","type":{"defined":{"name":"BondingCurveStatus"}}}]}},{"name":"BondingCurveDeployedEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"BondingCurveDeployedFallbackEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"BondingCurveStatus","type":{"kind":"enum","variants":[{"name":"Trading"},{"name":"Graduated"},{"name":"PoolPriceCorrected"},{"name":"LiquidityProvisioned"},{"name":"LiquidityLocked"}]}},{"name":"BondingCurveVaultClosedEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"recipient","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"Config","type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"authority","type":"pubkey"},{"name":"pending_authority","type":"pubkey"},{"name":"operators","type":{"vec":"pubkey"}},{"name":"protocol_fee_recipient","type":"pubkey"},{"name":"token_distributor","type":"pubkey"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"virtual_token_reserves","type":"u64"},{"name":"graduation_target","type":"u64"},{"name":"graduation_fee","type":"u64"},{"name":"damping_term","type":"u8"},{"name":"token_for_stakers_basis_points","type":"u16"},{"name":"swap_fee_basis_points","type":"u8"},{"name":"token_amount_for_raydium_liquidity","type":"u64"},{"name":"max_graduation_price_deviation_basis_points","type":"u16"},{"name":"max_swap_amount_for_pool_price_correction_basis_points","type":"u16"}]}},{"name":"ConfigUpdatedEvent","type":{"kind":"struct","fields":[{"name":"protocol_fee_recipient","type":"pubkey"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"virtual_token_reserves","type":"u64"},{"name":"graduation_target","type":"u64"},{"name":"graduation_fee","type":"u64"},{"name":"damping_term","type":"u8"},{"name":"swap_fee_basis_points","type":"u8"},{"name":"token_for_stakers_basis_points","type":"u16"},{"name":"token_amount_for_raydium_liquidity","type":"u64"},{"name":"max_graduation_price_deviation_basis_points","type":"u16"},{"name":"max_swap_amount_for_pool_price_correction_basis_points","type":"u16"}]}},{"name":"LiquidityDepositedIntoRaydiumEvent","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"lp_token_amount","type":"u64"},{"name":"tokens_deposited","type":"u64"},{"name":"wsol_deposited","type":"u64"}]}},{"name":"LockedCpLiquidityState","type":{"kind":"struct","fields":[{"name":"locked_lp_amount","docs":["The Locked liquidity amount without claimed lp fee"],"type":"u64"},{"name":"claimed_lp_amount","docs":["Claimed lp fee amount"],"type":"u64"},{"name":"unclaimed_lp_amount","docs":["Unclaimed lp fee amount"],"type":"u64"},{"name":"last_lp","docs":["Last updated cp pool lp total supply"],"type":"u64"},{"name":"last_k","docs":["Last updated cp pool k"],"type":"u128"},{"name":"recent_epoch","docs":["Account update recent epoch"],"type":"u64"},{"name":"pool_id","docs":["The ID of the pool with which this record is connected"],"type":"pubkey"},{"name":"fee_nft_mint","docs":["nft mint to check who has authority to collect fee"],"type":"pubkey"},{"name":"locked_owner","docs":["The owner who has locked liquidity"],"type":"pubkey"},{"name":"locked_lp_mint","docs":["The mint of locked lp token"],"type":"pubkey"},{"name":"padding","docs":["Unused bytes for future upgrades."],"type":{"array":["u64",8]}}]}},{"name":"OperatorsAddedEvent","type":{"kind":"struct","fields":[{"name":"operators","type":{"vec":"pubkey"}}]}},{"name":"OperatorsRemovedEvent","type":{"kind":"struct","fields":[{"name":"operators","type":{"vec":"pubkey"}}]}},{"name":"PausedToggledEvent","type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"}]}},{"name":"PostGraduationTradingFeesSplitEvent","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"creator","type":"pubkey"}]}},{"name":"RaydiumLiquidityLockedEvent","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"lp_amount","type":"u64"}]}},{"name":"RaydiumPoolCreatedEvent","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"RaydiumRandomPoolCreatedEvent","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"SwapSolForTokensOnRaydiumEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"}]}},{"name":"SwapTokensForSolOnRaydiumEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"}]}},{"name":"TokenBoughtEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"swap_fee","type":"u64"},{"name":"buyer","type":"pubkey"},{"name":"recipient","type":"pubkey"}]}},{"name":"TokenCreatedEvent","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"TokenCreatedFallbackEvent","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"TokenGraduatedEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"sol_for_liquidity","type":"u64"},{"name":"graduation_fee","type":"u64"},{"name":"token_for_distributor","type":"u64"}]}},{"name":"TokenSoldEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"swap_fee","type":"u64"},{"name":"seller","type":"pubkey"},{"name":"recipient","type":"pubkey"}]}},{"name":"TradingFeesCollectedEvent","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"TradingFeesCollectedV2Event","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"TradingFeesSplitEvent","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"creator","type":"pubkey"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/bubblegum.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.json b/olddocs/archivekbot2/idls/bubblegum.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.json new file mode 100644 index 0000000..8131dde --- /dev/null +++ b/olddocs/archivekbot2/idls/bubblegum.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.json @@ -0,0 +1 @@ +{"version":"0.12.0","name":"bubblegum","instructions":[{"name":"burn","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"}]},{"name":"cancelRedeem","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":true,"isSigner":true},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"voucher","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}}]},{"name":"createTree","accounts":[{"name":"treeAuthority","isMut":true,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"treeCreator","isMut":false,"isSigner":true},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxDepth","type":"u32"},{"name":"maxBufferSize","type":"u32"},{"name":"public","type":{"option":"bool"}}]},{"name":"decompressV1","accounts":[{"name":"voucher","isMut":true,"isSigner":false},{"name":"leafOwner","isMut":true,"isSigner":true},{"name":"tokenAccount","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"masterEdition","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"sysvarRent","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false}],"args":[{"name":"metadata","type":{"defined":"MetadataArgs"}}]},{"name":"delegate","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":true},{"name":"previousLeafDelegate","isMut":false,"isSigner":false},{"name":"newLeafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"}]},{"name":"mintToCollectionV1","accounts":[{"name":"treeAuthority","isMut":true,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"treeDelegate","isMut":false,"isSigner":true},{"name":"collectionAuthority","isMut":false,"isSigner":true},{"name":"collectionAuthorityRecordPda","isMut":false,"isSigner":false},{"name":"collectionMint","isMut":false,"isSigner":false},{"name":"collectionMetadata","isMut":true,"isSigner":false},{"name":"editionAccount","isMut":false,"isSigner":false},{"name":"bubblegumSigner","isMut":false,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"metadataArgs","type":{"defined":"MetadataArgs"}}]},{"name":"mintV1","accounts":[{"name":"treeAuthority","isMut":true,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"treeDelegate","isMut":false,"isSigner":true},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"message","type":{"defined":"MetadataArgs"}}]},{"name":"redeem","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":true,"isSigner":true},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"voucher","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"}]},{"name":"setAndVerifyCollection","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"treeDelegate","isMut":false,"isSigner":false},{"name":"collectionAuthority","isMut":false,"isSigner":true},{"name":"collectionAuthorityRecordPda","isMut":false,"isSigner":false},{"name":"collectionMint","isMut":false,"isSigner":false},{"name":"collectionMetadata","isMut":true,"isSigner":false},{"name":"editionAccount","isMut":false,"isSigner":false},{"name":"bubblegumSigner","isMut":false,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"message","type":{"defined":"MetadataArgs"}},{"name":"collection","type":"publicKey"}]},{"name":"setDecompressibleState","accounts":[{"name":"treeAuthority","isMut":true,"isSigner":false},{"name":"treeCreator","isMut":false,"isSigner":true}],"args":[{"name":"decompressableState","type":{"defined":"DecompressibleState"}}]},{"name":"setTreeDelegate","accounts":[{"name":"treeAuthority","isMut":true,"isSigner":false},{"name":"treeCreator","isMut":false,"isSigner":true},{"name":"newTreeDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"transfer","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"newLeafOwner","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"}]},{"name":"unverifyCollection","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"treeDelegate","isMut":false,"isSigner":false},{"name":"collectionAuthority","isMut":false,"isSigner":true},{"name":"collectionAuthorityRecordPda","isMut":false,"isSigner":false},{"name":"collectionMint","isMut":false,"isSigner":false},{"name":"collectionMetadata","isMut":true,"isSigner":false},{"name":"editionAccount","isMut":false,"isSigner":false},{"name":"bubblegumSigner","isMut":false,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"message","type":{"defined":"MetadataArgs"}}]},{"name":"unverifyCreator","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"creator","isMut":false,"isSigner":true},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"message","type":{"defined":"MetadataArgs"}}]},{"name":"verifyCollection","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"treeDelegate","isMut":false,"isSigner":false},{"name":"collectionAuthority","isMut":false,"isSigner":true},{"name":"collectionAuthorityRecordPda","isMut":false,"isSigner":false},{"name":"collectionMint","isMut":false,"isSigner":false},{"name":"collectionMetadata","isMut":true,"isSigner":false},{"name":"editionAccount","isMut":false,"isSigner":false},{"name":"bubblegumSigner","isMut":false,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"message","type":{"defined":"MetadataArgs"}}]},{"name":"verifyCreator","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"creator","isMut":false,"isSigner":true},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"message","type":{"defined":"MetadataArgs"}}]},{"name":"updateMetadata","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"collectionMint","isMut":false,"isSigner":false,"isOptional":true},{"name":"collectionMetadata","isMut":false,"isSigner":false,"isOptional":true},{"name":"collectionAuthorityRecordPda","isMut":false,"isSigner":false,"isOptional":true},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"currentMetadata","type":{"defined":"MetadataArgs"}},{"name":"updateArgs","type":{"defined":"UpdateArgs"}}]}],"accounts":[{"name":"TreeConfig","type":{"kind":"struct","fields":[{"name":"treeCreator","type":"publicKey"},{"name":"treeDelegate","type":"publicKey"},{"name":"totalMintCapacity","type":"u64"},{"name":"numMinted","type":"u64"},{"name":"isPublic","type":"bool"},{"name":"isDecompressible","type":{"defined":"DecompressibleState"}}]}},{"name":"Voucher","type":{"kind":"struct","fields":[{"name":"leafSchema","type":{"defined":"LeafSchema"}},{"name":"index","type":"u32"},{"name":"merkleTree","type":"publicKey"}]}}],"types":[{"name":"Creator","type":{"kind":"struct","fields":[{"name":"address","type":"publicKey"},{"name":"verified","type":"bool"},{"name":"share","type":"u8"}]}},{"name":"Uses","type":{"kind":"struct","fields":[{"name":"useMethod","type":{"defined":"UseMethod"}},{"name":"remaining","type":"u64"},{"name":"total","type":"u64"}]}},{"name":"Collection","type":{"kind":"struct","fields":[{"name":"verified","type":"bool"},{"name":"key","type":"publicKey"}]}},{"name":"MetadataArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"sellerFeeBasisPoints","type":"u16"},{"name":"primarySaleHappened","type":"bool"},{"name":"isMutable","type":"bool"},{"name":"editionNonce","type":{"option":"u8"}},{"name":"tokenStandard","type":{"option":{"defined":"TokenStandard"}}},{"name":"collection","type":{"option":{"defined":"Collection"}}},{"name":"uses","type":{"option":{"defined":"Uses"}}},{"name":"tokenProgramVersion","type":{"defined":"TokenProgramVersion"}},{"name":"creators","type":{"vec":{"defined":"Creator"}}}]}},{"name":"UpdateArgs","type":{"kind":"struct","fields":[{"name":"name","type":{"option":"string"}},{"name":"symbol","type":{"option":"string"}},{"name":"uri","type":{"option":"string"}},{"name":"creators","type":{"option":{"vec":{"defined":"Creator"}}}},{"name":"sellerFeeBasisPoints","type":{"option":"u16"}},{"name":"primarySaleHappened","type":{"option":"bool"}},{"name":"isMutable","type":{"option":"bool"}}]}},{"name":"Version","type":{"kind":"enum","variants":[{"name":"V1"}]}},{"name":"LeafSchema","type":{"kind":"enum","variants":[{"name":"V1","fields":[{"name":"id","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"delegate","type":"publicKey"},{"name":"nonce","type":"u64"},{"name":"data_hash","type":{"array":["u8",32]}},{"name":"creator_hash","type":{"array":["u8",32]}}]}]}},{"name":"TokenProgramVersion","type":{"kind":"enum","variants":[{"name":"Original"},{"name":"Token2022"}]}},{"name":"TokenStandard","type":{"kind":"enum","variants":[{"name":"NonFungible"},{"name":"FungibleAsset"},{"name":"Fungible"},{"name":"NonFungibleEdition"}]}},{"name":"UseMethod","type":{"kind":"enum","variants":[{"name":"Burn"},{"name":"Multiple"},{"name":"Single"}]}},{"name":"BubblegumEventType","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"LeafSchemaEvent"}]}},{"name":"DecompressibleState","type":{"kind":"enum","variants":[{"name":"Enabled"},{"name":"Disabled"}]}}],"errors":[{"code":6000,"name":"AssetOwnerMismatch","msg":""},{"code":6001,"name":"PublicKeyMismatch","msg":""},{"code":6002,"name":"HashingMismatch","msg":""},{"code":6003,"name":"UnsupportedSchemaVersion","msg":""},{"code":6004,"name":"CreatorShareTotalMustBe100","msg":""},{"code":6005,"name":"DuplicateCreatorAddress","msg":""},{"code":6006,"name":"CreatorDidNotVerify","msg":"Creator did not verify the metadata"},{"code":6007,"name":"CreatorNotFound","msg":""},{"code":6008,"name":"NoCreatorsPresent","msg":"No creators in creator Vec"},{"code":6009,"name":"CreatorHashMismatch","msg":"Provided creator Vec must result in provided creator hash"},{"code":6010,"name":"DataHashMismatch","msg":"Provided metadata must result in provided data hash"},{"code":6011,"name":"CreatorsTooLong","msg":"Creators list too long"},{"code":6012,"name":"MetadataNameTooLong","msg":""},{"code":6013,"name":"MetadataSymbolTooLong","msg":""},{"code":6014,"name":"MetadataUriTooLong","msg":""},{"code":6015,"name":"MetadataBasisPointsTooHigh","msg":"Basis points cannot exceed 10000"},{"code":6016,"name":"TreeAuthorityIncorrect","msg":"Tree creator or tree delegate must sign."},{"code":6017,"name":"InsufficientMintCapacity","msg":"Not enough unapproved mints left"},{"code":6018,"name":"NumericalOverflowError","msg":""},{"code":6019,"name":"IncorrectOwner","msg":"r"},{"code":6020,"name":"CollectionCannotBeVerifiedInThisInstruction","msg":""},{"code":6021,"name":"CollectionNotFound","msg":"Collection Not Found on Metadata"},{"code":6022,"name":"AlreadyVerified","msg":""},{"code":6023,"name":"AlreadyUnverified","msg":""},{"code":6024,"name":"UpdateAuthorityIncorrect","msg":"Incorrect leaf metadata update authority."},{"code":6025,"name":"LeafAuthorityMustSign","msg":"Tx must be signed by leaf owner or leaf delegate"},{"code":6026,"name":"CollectionMustBeSized","msg":""},{"code":6027,"name":"MetadataMintMismatch","msg":"Metadata mint does not match collection mint"},{"code":6028,"name":"InvalidCollectionAuthority","msg":""},{"code":6029,"name":"InvalidDelegateRecord","msg":""},{"code":6030,"name":"CollectionMasterEditionAccountInvalid","msg":"Edition account doesnt match collection"},{"code":6031,"name":"CollectionMustBeAUniqueMasterEdition","msg":"Collection Must Be a Unique Master Edition v2"},{"code":6032,"name":"UnknownExternalError","msg":"Could not convert to BubblegumError"},{"code":6033,"name":"DecompressionDisabled","msg":"Decompression disabled for this tree."},{"code":6034,"name":"MissingCollectionMintAccount","msg":"Missing collection mint account"},{"code":6035,"name":"MissingCollectionMetadataAccount","msg":"Missing collection metadata account"},{"code":6036,"name":"CollectionMismatch","msg":"Collection mismatch"},{"code":6037,"name":"MetadataImmutable","msg":"Metadata not mutable"},{"code":6038,"name":"PrimarySaleCanOnlyBeFlippedToTrue","msg":"Can only update primary sale to true"},{"code":6039,"name":"CreatorDidNotUnverify","msg":"Creator did not unverify the metadata"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/byreal_clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.json b/olddocs/archivekbot2/idls/byreal_clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.json new file mode 100644 index 0000000..777071d --- /dev/null +++ b/olddocs/archivekbot2/idls/byreal_clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.json @@ -0,0 +1 @@ +{"address":"REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2","metadata":{"name":"byreal_clmm","version":"0.1.0","spec":"0.1.0","description":"Anchor client and source for Byreal concentrated liquidity AMM"},"instructions":[{"name":"claim_offchain_reward","docs":["claim offchain reward from the pool"],"discriminator":[195,87,221,149,141,195,146,19],"accounts":[{"name":"claimer","docs":["the address who claim the offchain reward."],"writable":true,"signer":true},{"name":"authority","docs":["The authority make decision that who can claim the offchain reward."],"signer":true},{"name":"admin_group","docs":["Initialize amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_id","docs":["the pool id, which is the pool state account."],"relations":["reward_config"]},{"name":"token_mint"},{"name":"claimer_token_account","docs":[""],"writable":true},{"name":"reward_vault_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"reward_config"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"reward_config","docs":["The offchain reward config account, it also is the reward vault account."],"pda":{"seeds":[{"kind":"const","value":[111,102,102,99,104,97,105,110,95,114,101,119,97,114,100]},{"kind":"account","path":"pool_id"}]}},{"name":"token_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"amount","type":"u64"}]},{"name":"close_position","docs":["Close the user's position and NFT account. If the NFT mint belongs to token2022, it will also be closed and the funds returned to the NFT owner.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"nft_owner","docs":["The position nft owner"],"writable":true,"signer":true},{"name":"position_nft_mint","docs":["Mint address bound to the personal position."],"writable":true},{"name":"position_nft_account","docs":["User token account where position NFT be minted to"],"writable":true},{"name":"personal_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"system_program","docs":["System program to close the position state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Token/Token2022 program to close token/mint account"]}],"args":[]},{"name":"close_protocol_position","docs":["close the protocol position, send the remaining fund fee to admin fee keeper","this instruction will be delete after all protocol position is closed"],"discriminator":[201,117,152,144,85,85,108,178],"accounts":[{"name":"admin_group","docs":["amm admin group account to store admin permissions.","anyone can collect fee, but only fee-manager in admin group can receive fee"],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"fee_keeper","writable":true},{"name":"protocol_position","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"admin_group","docs":["amm admin group account to store admin permissions.","anyone can collect fee, but only fee-manager in admin group can receive fee"],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"admin_group","docs":["amm admin group account to store admin permissions.","anyone can collect fee, but only fee-manager in admin group can receive fee"],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_remaining_rewards","docs":["Collect remaining reward token for reward founder","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info",""],"discriminator":[18,237,166,197,34,16,213,144],"accounts":[{"name":"reward_funder","docs":["The founder who init reward info previously"],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"funder_token_account","docs":["The funder's reward token account"],"writable":true},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"reward_token_vault","docs":["Reward vault transfer remaining token to founder token account"]},{"name":"reward_vault_mint","docs":["The mint of reward token vault"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"create_amm_config","docs":["# Arguments","","* `ctx`- The accounts needed by instruction.","* `index` - The index of amm config, there may be multiple config.","* `tick_spacing` - The tickspacing binding with config, cannot be changed.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within trade fee.","* `fund_fee_rate` - The rate of fund fee within trade fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as normal manager in admin group."],"writable":true,"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"amm_config","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"trade_fee_rate","type":"u32"},{"name":"protocol_fee_rate","type":"u32"},{"name":"fund_fee_rate","type":"u32"}]},{"name":"create_operation_account","docs":["Creates an operation account for the program","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[63,87,148,33,109,35,8,104],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"writable":true,"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_pool","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `sqrt_price_x64` - the initial sqrt price (amount_token_1 / amount_token_0) of the pool as a Q64.64","Note: The open_time must be smaller than the current block_timestamp on chain."],"discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"pool_manager","docs":["with pool_manager permission, the pool creator can create a pool."],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"offchain_reward_config","docs":["Initialize an account to store the off-chain reward config"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,102,102,99,104,97,105,110,95,114,101,119,97,114,100]},{"kind":"account","path":"pool_state"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"sqrt_price_x64","type":"u128"},{"name":"open_time","type":"u64"}]},{"name":"create_pool_decay_fee","docs":["Creates a pool for the given token pair and the initial price with decay fee","# Arguments","","* `ctx`- The context of accounts","* `params` - The parameters for creating the pool with decay fee"],"discriminator":[252,154,210,191,22,217,136,252],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"pool_manager","docs":["with pool_manager permission, the pool creator can create a pool."],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"offchain_reward_config","docs":["Initialize an account to store the off-chain reward config"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,102,102,99,104,97,105,110,95,114,101,119,97,114,100]},{"kind":"account","path":"pool_state"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"CreatePoolDecayFeeParams"}}}]},{"name":"create_support_mint_associated","docs":["Create support token22 mint account which can create pool and send rewards with ignoring the not support extensions."],"discriminator":[17,251,65,92,136,242,14,169],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"token_mint","docs":["Support token mint"]},{"name":"support_mint_associated","docs":["Initialize support mint state account to store support mint address and bump."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,117,112,112,111,114,116,95,109,105,110,116]},{"kind":"account","path":"token_mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"decrease_liquidity","docs":["#[deprecated(note = \"Use `decrease_liquidity_v2` instead.\")]","Decreases liquidity for an existing position","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[160,38,208,111,104,91,44,1],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick","constraint = tick_array_lower.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick","constraint = tick_array_upper.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"decrease_liquidity_v2","docs":["Decreases liquidity for an existing position, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[58,127,188,62,79,82,196,96],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick","constraint = tick_array_lower.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick","constraint = tick_array_upper.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"deposit_offchain_reward","docs":["deposit offchain reward into the pool"],"discriminator":[97,125,48,169,92,241,44,142],"accounts":[{"name":"payer","docs":["the address paying to deposit the offchain reward."],"writable":true,"signer":true},{"name":"authority","docs":["The authority make decision that who can deposit the offchain reward."],"signer":true},{"name":"admin_group","docs":["Initialize amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_id","docs":["the pool id, which is the pool state account."],"relations":["reward_config"]},{"name":"token_mint"},{"name":"payer_token_account","docs":[""],"writable":true},{"name":"reward_vault_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"reward_config"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"reward_config","docs":["The offchain reward config account, it also is the reward vault account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,102,102,99,104,97,105,110,95,114,101,119,97,114,100]},{"kind":"account","path":"pool_id"}]}},{"name":"token_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"increase_liquidity","docs":["#[deprecated(note = \"Use `increase_liquidity_v2` instead.\")]","Increases liquidity for an existing position, with amount paid by `payer`","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, can't be zero","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[46,156,243,118,13,205,251,178],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick","constraint = tick_array_lower.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick","constraint = tick_array_upper.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"increase_liquidity_v2","docs":["Increases liquidity for an existing position, with amount paid by `payer`, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, if zero, calculate liquidity base amount_0 or amount_1 according base_flag","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `base_flag` - Now, we don't use base_flag, it can be None;","We directly calculate liquidity from amount_0_max or amount_1_max according to the current price in pool.",""],"discriminator":[133,29,89,223,69,238,176,10],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick","constraint = tick_array_lower.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick","constraint = tick_array_upper.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"init_amm_admin_group","docs":["Initialize the AMM admin group account, which is used to manage the AMM protocol."],"discriminator":[209,108,32,246,157,214,237,86],"accounts":[{"name":"payer","docs":["only super admin can create admin group"],"writable":true,"signer":true,"address":"AY196f8U5EvM999PVnvLmyvaUnzL4GLiFaGKUgnJXN6o"},{"name":"admin_group","docs":["Initialize amm admin group account to store admin permissions."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"InitAdminGroupParams"}}}]},{"name":"initialize_reward","docs":["Initialize a reward info for a given pool and reward index","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info","* `open_time` - reward open timestamp","* `end_time` - reward end timestamp","* `emissions_per_second_x64` - Token reward per second are earned per unit of liquidity.",""],"discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"reward_funder","docs":["The founder deposit reward token to vault"],"writable":true,"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"funder_token_account","writable":true},{"name":"amm_config","docs":["For check the reward_funder authority"]},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"reward_token_mint","docs":["Reward mint"]},{"name":"reward_token_vault","docs":["A pda, reward vault"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,114,101,119,97,114,100,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_token_mint"}]}},{"name":"reward_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"param","type":{"defined":{"name":"InitializeRewardParam"}}}]},{"name":"open_position","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `liquidity` - The liquidity to be added","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[135,128,47,77,15,152,240,49],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted","This account created in the contract by cpi to avoid large stack variables"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_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":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"open_position_v2","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `liquidity` - The liquidity to be added, if zero, and the base_flag is specified, calculate liquidity base amount_0_max or amount_1_max according base_flag, otherwise open position with zero liquidity","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,184,74,214,112,86,241,199],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_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":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program_2022","docs":["Program to create mint account and mint tokens"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"open_position_with_token22_nft","docs":["Creates a new position wrapped in a Token2022 NFT without relying on metadata_program and metadata_account, reduce the cost for user to create a personal position.","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `liquidity` - The liquidity to be added, if zero, and the base_flag is specified, calculate liquidity base amount_0_max or amount_1_max according base_flag, otherwise open position with zero liquidity","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,255,174,82,125,29,201,46],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address, initialize in contract"],"writable":true,"signer":true},{"name":"position_nft_account","writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to transfer for token account"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program_2022","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"set_pool_quote_flag","docs":["设置 pool 的 quote token 标识"],"discriminator":[250,38,116,122,249,128,108,105],"accounts":[{"name":"authority","docs":["必须是 pool_manager 权限"],"signer":true},{"name":"admin_group","pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","writable":true}],"args":[{"name":"token1_as_quote","type":"bool"}]},{"name":"set_pool_trade_fee_rate","docs":["设置 pool 专属的 trade_fee_rate"],"discriminator":[109,117,170,34,87,202,50,20],"accounts":[{"name":"authority","docs":["必须是 pool_manager 权限(与 create_pool 一致)"],"signer":true},{"name":"admin_group","pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","writable":true}],"args":[{"name":"trade_fee_rate","type":"u32"}]},{"name":"set_reward_params","docs":["Reset reward param, start a new reward cycle or extend the current cycle.","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - The index of reward token in the pool.","* `emissions_per_second_x64` - The per second emission reward, when extend the current cycle,","new value can't be less than old value","* `open_time` - reward open timestamp, must be set when starting a new cycle","* `end_time` - reward end timestamp",""],"discriminator":[112,52,167,75,32,201,211,137],"accounts":[{"name":"authority","docs":["Address to be set as protocol owner. It pays to create factory state account."],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"amm_config"},{"name":"pool_state","writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"token_program","docs":["Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"},{"name":"open_time","type":"u64"},{"name":"end_time","type":"u64"}]},{"name":"set_swap_dynamic_fee_params","docs":["设置 swap-dynamic-fee 参数"],"discriminator":[169,23,133,74,115,251,233,52],"accounts":[{"name":"authority","docs":["必须是 pool_manager 权限 (与 create_pool 一致)"],"signer":true},{"name":"admin_group","pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","writable":true}],"args":[{"name":"params","type":{"defined":{"name":"SetSwapDynamicFeeParamsInput"}}}]},{"name":"swap","docs":["#[deprecated(note = \"Use `swap_v2` instead.\")]","Swaps one token for as much as possible of another token across a single pool","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"tick_array","writable":true}],"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":"swap_v2","docs":["Swaps one token for as much as possible of another token across a single pool, support token program 2022","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"input_vault_mint","docs":["The mint of token vault 0"]},{"name":"output_vault_mint","docs":["The mint of token vault 1"]}],"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":"swap_v3_dyn","docs":["swap_v3_dyn: 支持动态费率的 swap 指令","如果pool不支持 swap-dynamic-fee,则行为与 swap_v2 相同"],"discriminator":[229,46,213,132,105,40,40,228],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"input_vault_mint","docs":["The mint of token vault 0"]},{"name":"output_vault_mint","docs":["The mint of token vault 1"]}],"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":"transfer_reward_owner","docs":["Transfer reward owner","","# Arguments","","* `ctx`- The context of accounts","* `new_owner`- new owner pubkey",""],"discriminator":[7,22,12,83,242,43,48,121],"accounts":[{"name":"authority","docs":["Address to be set as operation account owner."],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"update_amm_admin_group","docs":["Update the AMM admin group account, which is used to manage the AMM protocol."],"discriminator":[61,183,185,188,82,81,141,197],"accounts":[{"name":"payer","docs":["only super admin can create admin group"],"writable":true,"signer":true,"address":"AY196f8U5EvM999PVnvLmyvaUnzL4GLiFaGKUgnJXN6o"},{"name":"admin_group","docs":["update amm admin group account to store admin permissions."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}}],"args":[{"name":"params","type":{"defined":{"name":"UpdateAdminGroupParams"}}}]},{"name":"update_amm_config","docs":["Updates the owner of the amm config","Must be called by the current owner or admin","","# Arguments","","* `ctx`- The context of accounts","* `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0","* `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1","* `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2","* `new_owner`- The config's new owner, be set when `param` is 3","* `new_fund_owner`- The config's new fund owner, be set when `param` is 4","* `param`- The value can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The amm config owner or admin"],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"amm_config","docs":["Amm config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u32"}]},{"name":"update_operation_account","docs":["Update the operation account","","# Arguments","","* `ctx`- The context of accounts","* `param`- The value can be 0 | 1 | 2 | 3, otherwise will report a error","* `keys`- update operation owner when the `param` is 0","remove operation owner when the `param` is 1","update whitelist mint when the `param` is 2","remove whitelist mint when the `param` is 3",""],"discriminator":[127,70,119,40,188,227,61,7],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"param","type":"u8"},{"name":"keys","type":{"vec":"pubkey"}}]},{"name":"update_pool_status","docs":["Update pool status for given value","","# Arguments","","* `ctx`- The context of accounts","* `status` - The value of status",""],"discriminator":[130,87,108,6,46,224,117,123],"accounts":[{"name":"authority","signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","writable":true}],"args":[{"name":"status","type":"u8"}]},{"name":"update_reward_infos","docs":["Update rewards info of the given pool, can be called for everyone","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[163,172,224,52,11,154,106,223],"accounts":[{"name":"pool_state","docs":["The liquidity pool for which reward info to update"],"writable":true}],"args":[]},{"name":"withdraw_offchain_reward","docs":["withdraw offchain reward from the pool"],"discriminator":[86,53,59,76,217,38,71,213],"accounts":[{"name":"authority","docs":["The authority make decision that who can withdraw the offchain reward."],"signer":true},{"name":"admin_group","docs":["Initialize amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_id","docs":["the pool id, which is the pool state account."],"relations":["reward_config"]},{"name":"token_mint"},{"name":"receiver_token_account","docs":["the address who receive the withdrawn offchain reward."],"writable":true},{"name":"reward_vault_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"reward_config"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"reward_config","docs":["The offchain reward config account, it also is the reward vault account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,102,102,99,104,97,105,110,95,114,101,119,97,114,100]},{"kind":"account","path":"pool_id"}]}},{"name":"token_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"amount","type":"u64"}]}],"accounts":[{"name":"AmmAdminGroup","discriminator":[128,128,234,30,61,172,188,123]},{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"OffchainRewardConfig","discriminator":[118,52,115,150,99,69,164,76]},{"name":"OperationState","discriminator":[19,236,58,237,81,222,183,252]},{"name":"PersonalPositionState","discriminator":[70,111,150,126,230,15,25,117]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"ProtocolPositionState","discriminator":[100,226,145,99,146,218,160,106]},{"name":"SupportMintAssociated","discriminator":[134,40,183,79,12,112,162,53]},{"name":"TickArrayBitmapExtension","discriminator":[60,150,36,219,97,128,139,153]}],"events":[{"name":"CollectPersonalFeeEvent","discriminator":[166,174,105,192,81,161,83,105]},{"name":"CollectProtocolFeeEvent","discriminator":[206,87,17,79,45,41,213,61]},{"name":"ConfigChangeEvent","discriminator":[247,189,7,119,106,112,95,151]},{"name":"CreatePersonalPositionEvent","discriminator":[100,30,87,249,196,223,154,206]},{"name":"DecreaseLiquidityEvent","discriminator":[58,222,86,58,68,50,85,56]},{"name":"IncreaseLiquidityEvent","discriminator":[49,79,105,212,32,34,30,84]},{"name":"LiquidityCalculateEvent","discriminator":[237,112,148,230,57,84,180,162]},{"name":"LiquidityChangeEvent","discriminator":[126,240,175,206,158,88,153,107]},{"name":"ModifyAmmAdminGroupEvent","discriminator":[218,118,87,81,53,80,18,235]},{"name":"PoolCreatedEvent","discriminator":[25,94,75,47,112,99,53,63]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"UpdateRewardInfosEvent","discriminator":[109,127,186,78,114,65,37,236]}],"errors":[{"code":6000,"name":"LOK","msg":"LOK"},{"code":6001,"name":"NotApproved","msg":"Not approved"},{"code":6002,"name":"InvalidUpdateConfigFlag","msg":"invalid update amm config flag"},{"code":6003,"name":"AccountLack","msg":"Account lack"},{"code":6004,"name":"ClosePositionErr","msg":"Remove liquitity, collect fees owed and reward then you can close position account"},{"code":6005,"name":"ZeroMintAmount","msg":"Minting amount should be greater than 0"},{"code":6006,"name":"InvalidTickIndex","msg":"Tick out of range"},{"code":6007,"name":"TickInvalidOrder","msg":"The lower tick must be below the upper tick"},{"code":6008,"name":"TickLowerOverflow","msg":"The tick must be greater, or equal to the minimum tick(-443636)"},{"code":6009,"name":"TickUpperOverflow","msg":"The tick must be lesser than, or equal to the maximum tick(443636)"},{"code":6010,"name":"TickAndSpacingNotMatch","msg":"tick % tick_spacing must be zero"},{"code":6011,"name":"InvalidTickArray","msg":"Invalid tick array account"},{"code":6012,"name":"InvalidTickArrayBoundary","msg":"Invalid tick array boundary"},{"code":6013,"name":"SqrtPriceLimitOverflow","msg":"Square root price limit overflow"},{"code":6014,"name":"SqrtPriceX64","msg":"sqrt_price_x64 out of range"},{"code":6015,"name":"LiquiditySubValueErr","msg":"Liquidity sub delta L must be smaller than before"},{"code":6016,"name":"LiquidityAddValueErr","msg":"Liquidity add delta L must be greater, or equal to before"},{"code":6017,"name":"InvalidLiquidity","msg":"Invalid liquidity when update position"},{"code":6018,"name":"ForbidBothZeroForSupplyLiquidity","msg":"Both token amount must not be zero while supply liquidity"},{"code":6019,"name":"LiquidityInsufficient","msg":"Liquidity insufficient"},{"code":6020,"name":"TransactionTooOld","msg":"Transaction too old"},{"code":6021,"name":"PriceSlippageCheck","msg":"Price slippage check"},{"code":6022,"name":"TooLittleOutputReceived","msg":"Too little output received"},{"code":6023,"name":"TooMuchInputPaid","msg":"Too much input paid"},{"code":6024,"name":"ZeroAmountSpecified","msg":"Swap special amount can not be zero"},{"code":6025,"name":"InvalidInputPoolVault","msg":"Input pool vault is invalid"},{"code":6026,"name":"TooSmallInputOrOutputAmount","msg":"Swap input or output amount is too small"},{"code":6027,"name":"NotEnoughTickArrayAccount","msg":"Not enought tick array account"},{"code":6028,"name":"InvalidFirstTickArrayAccount","msg":"Invalid first tick array account"},{"code":6029,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6030,"name":"FullRewardInfo","msg":"The init reward token reach to the max"},{"code":6031,"name":"RewardTokenAlreadyInUse","msg":"The init reward token already in use"},{"code":6032,"name":"ExceptRewardMint","msg":"The reward tokens must contain one of pool vault mint except the last reward"},{"code":6033,"name":"InvalidRewardInitParam","msg":"Invalid reward init param"},{"code":6034,"name":"InvalidRewardDesiredAmount","msg":"Invalid collect reward desired amount"},{"code":6035,"name":"InvalidRewardInputAccountNumber","msg":"Invalid collect reward input account number"},{"code":6036,"name":"InvalidRewardPeriod","msg":"Invalid reward period"},{"code":6037,"name":"NotApproveUpdateRewardEmissiones","msg":"Modification of emissiones is allowed within 72 hours from the end of the previous cycle"},{"code":6038,"name":"UnInitializedRewardInfo","msg":"uninitialized reward info"},{"code":6039,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6040,"name":"MissingTickArrayBitmapExtensionAccount","msg":"Missing tickarray bitmap extension account"},{"code":6041,"name":"InsufficientLiquidityForDirection","msg":"Insufficient liquidity for this direction"},{"code":6042,"name":"MaxTokenOverflow","msg":"Max token overflow"},{"code":6043,"name":"CalculateOverflow","msg":"Calculate overflow"},{"code":6044,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"},{"code":6045,"name":"IllegalAccountOwner","msg":"invalid account owner"},{"code":6046,"name":"InvalidAccount","msg":"Invalid account"},{"code":6047,"name":"DecayFeeNeitherOnSellMint0NorMint1","msg":"Invalid decay fee params"},{"code":6048,"name":"SwapDynamicFeeEnabled","msg":"Swap dynamic fee is enabled, must use swap_v3_dyn instruction"},{"code":6049,"name":"InvalidPythOracleAccount","msg":"Invalid pyth oracle account"},{"code":6050,"name":"PythPriceStale","msg":"Pyth price is stale"},{"code":6051,"name":"InvalidSwapDynamicFeeParams","msg":"Invalid swap dynamic fee params"}],"types":[{"name":"AmmAdminGroup","docs":["Holds the admin group information."],"type":{"kind":"struct","fields":[{"name":"fee_keeper","docs":["the address who can hold the fee,","anyone can trigger the fee collection action,"],"type":"pubkey"},{"name":"reward_config_manager","docs":["the address who can config the reward(config, deposit, withdraw),","deposit reward, set the account who can deposit the reward, withdraw the remaining reward(withdraw)"],"type":"pubkey"},{"name":"reward_claim_manager","docs":["the address who can manage the offchain reward claim"],"type":"pubkey"},{"name":"pool_manager","docs":["the address who can manage the pool create action,","without this account's permission, no one can create a pool"],"type":"pubkey"},{"name":"emergency_manager","docs":["the address who can manage the emergency action,","emergency action includes stop/resume the pool, stop/resume withdraw lp"],"type":"pubkey"},{"name":"normal_manager","docs":["normal action manager,","such as create amm config, update amm config"],"type":"pubkey"},{"name":"pad","docs":["The space required for the account. may be used for future extensions."],"type":{"array":["pubkey",6]}}]}},{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"index","type":"u16"},{"name":"owner","docs":["Address of the protocol owner"],"type":"pubkey"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u32"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"tick_spacing","docs":["The tick spacing"],"type":"u16"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"padding_u32","type":"u32"},{"name":"fund_owner","type":"pubkey"},{"name":"padding","type":{"array":["u64",3]}}]}},{"name":"CollectPersonalFeeEvent","docs":["Emitted when tokens are collected for a position"],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which underlying tokens were collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The token account that received the collected token_0 tokens"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The token account that received the collected token_1 tokens"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 owed to the position that was collected"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 owed to the position that was collected"],"type":"u64"}]}},{"name":"CollectProtocolFeeEvent","docs":["Emitted when the collected protocol fees are withdrawn by the factory owner"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool whose protocol fee is collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"}]}},{"name":"ConfigChangeEvent","docs":["Emitted when create or update a config"],"type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"owner","type":"pubkey"},{"name":"protocol_fee_rate","type":"u32"},{"name":"trade_fee_rate","type":"u32"},{"name":"tick_spacing","type":"u16"},{"name":"fund_fee_rate","type":"u32"},{"name":"fund_owner","type":"pubkey"}]}},{"name":"CreatePersonalPositionEvent","docs":["Emitted when create a new position"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which liquidity was added"],"type":"pubkey"},{"name":"minter","docs":["The address that create the position"],"type":"pubkey"},{"name":"nft_owner","docs":["The owner of the position and recipient of any minted liquidity"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity minted to the position range"],"type":"u128"},{"name":"deposit_amount_0","docs":["The amount of token_0 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_1","docs":["The amount of token_1 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_0_transfer_fee","docs":["The token transfer fee for deposit_amount_0"],"type":"u64"},{"name":"deposit_amount_1_transfer_fee","docs":["The token transfer fee for deposit_amount_1"],"type":"u64"}]}},{"name":"CreatePoolDecayFeeParams","type":{"kind":"struct","fields":[{"name":"sqrt_price_x64","docs":["The initial sqrt price of the pool, in x64 format."],"type":"u128"},{"name":"open_time","docs":["The open time of the pool, can be set to a future time; it should be None or future time.","If None, the pool will be opened immediately."],"type":{"option":"u64"}},{"name":"use_decay_fee","docs":["Whether to use decay fee for the pool.","If true, the pool will use decay fee."],"type":"bool"},{"name":"decay_fee_on_sell_mint0","docs":["Whether to use decay fee on sell for mint0 and mint1.","If true, the pool will use decay fee on sell for mint0 and mint1","these two fields are only used when use_decay_fee is true, and at least one of them must be true."],"type":"bool"},{"name":"decay_fee_on_sell_mint1","type":"bool"},{"name":"init_decay_fee_rate","docs":["The initial decay fee rate for the pool, in percentage.(1=1%)"],"type":"u8"},{"name":"decay_fee_decrease_rate","docs":["decrease rate for the decay fee, in percentage.(1=1%)"],"type":"u8"},{"name":"decay_fee_decrease_interval","docs":["The interval for decreasing the decay fee, in seconds.","how to calculate the current decay fee:","interval_count = (current_time - open_time) / decay_fee_decrease_interval","current_decay_fee = init_decay_fee_rate*((1-decay_fee_decrease_rate/100)^interval_count)"],"type":"u8"}]}},{"name":"DecreaseLiquidityEvent","docs":["Emitted when liquidity is decreased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was decreased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the position was decreased"],"type":"u128"},{"name":"decrease_amount_0","docs":["The amount of token_0 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"decrease_amount_1","docs":["The amount of token_1 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"fee_amount_0","type":"u64"},{"name":"fee_amount_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"reward_amounts","docs":["The amount of rewards"],"type":{"array":["u64",3]}},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee"],"type":"u64"}]}},{"name":"IncreaseLiquidityEvent","docs":["Emitted when liquidity is increased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was increased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the NFT position was increased"],"type":"u128"},{"name":"amount_0","docs":["The amount of token_0 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_0_transfer_fee","docs":["The token transfer fee for amount_0"],"type":"u64"},{"name":"amount_1_transfer_fee","docs":["The token transfer fee for amount_1"],"type":"u64"}]}},{"name":"InitAdminGroupParams","type":{"kind":"struct","fields":[{"name":"fee_keeper","docs":["the address who can hold the fee,","anyone can trigger the fee collection action,"],"type":"pubkey"},{"name":"reward_config_manager","docs":["the address who can config the reward(config, deposit, withdraw),","deposit reward, set the account who can deposit the reward, withdraw the remaining reward(withdraw)"],"type":"pubkey"},{"name":"reward_claim_manager","docs":["the address who can manage the offchain reward claim"],"type":"pubkey"},{"name":"pool_manager","docs":["the address who can manage the pool create action,","without this account's permission, no one can create a pool"],"type":"pubkey"},{"name":"emergency_manager","docs":["the address who can manage the emergency action,","emergency action includes stop/resume the pool, stop/resume withdraw lp"],"type":"pubkey"},{"name":"normal_manager","docs":["normal action manager,","such as create amm config, update amm config"],"type":"pubkey"}]}},{"name":"InitializeRewardParam","type":{"kind":"struct","fields":[{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Token reward per second are earned per unit of liquidity"],"type":"u128"}]}},{"name":"LiquidityCalculateEvent","docs":["Emitted when liquidity decreased or increase."],"type":{"kind":"struct","fields":[{"name":"pool_liquidity","docs":["The pool liquidity before decrease or increase"],"type":"u128"},{"name":"pool_sqrt_price_x64","docs":["The pool price when decrease or increase in liquidity"],"type":"u128"},{"name":"pool_tick","docs":["The pool tick when decrease or increase in liquidity"],"type":"i32"},{"name":"calc_amount_0","docs":["The amount of token_0 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"calc_amount_1","docs":["The amount of token_1 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"trade_fee_owed_0","type":"u64"},{"name":"trade_fee_owed_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee without trade_fee_amount_0"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee without trade_fee_amount_0"],"type":"u64"}]}},{"name":"LiquidityChangeEvent","docs":["Emitted pool liquidity change when increase and decrease liquidity"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for swap"],"type":"pubkey"},{"name":"tick","docs":["The tick of the pool"],"type":"i32"},{"name":"tick_lower","docs":["The tick lower of position"],"type":"i32"},{"name":"tick_upper","docs":["The tick lower of position"],"type":"i32"},{"name":"liquidity_before","docs":["The liquidity of the pool before liquidity change"],"type":"u128"},{"name":"liquidity_after","docs":["The liquidity of the pool after liquidity change"],"type":"u128"}]}},{"name":"ModifyAmmAdminGroupEvent","type":{"kind":"struct","fields":[{"name":"fee_keeper","type":"pubkey"},{"name":"reward_config_manager","type":"pubkey"},{"name":"reward_claim_manager","type":"pubkey"},{"name":"pool_manager","type":"pubkey"},{"name":"emergency_manager","type":"pubkey"},{"name":"normal_manager","type":"pubkey"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u32"},{"name":"tick_cumulative","docs":["the cumulative of tick during the duration time"],"type":"i64"},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is initialized"],"type":"bool"},{"name":"recent_epoch","docs":["recent update epoch"],"type":"u64"},{"name":"observation_index","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","docs":["belongs to which pool"],"type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"OffchainRewardConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"pool_id","docs":["the pool state address"],"type":"pubkey"},{"name":"reward_vault","docs":["the vault to hold the reward","vault address is this config address"],"type":"pubkey"},{"name":"vault_bump","docs":["Bump to identify vault PDA"],"type":{"array":["u8",1]}},{"name":"reward_mint_vec","docs":["reward token mint address list","reward token account is ATA(reward_vault, reward_mint)"],"type":{"vec":"pubkey"}}]}},{"name":"OperationState","docs":["Holds the current owner of the factory"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"operation_owners","docs":["Address of the operation owner"],"type":{"array":["pubkey",10]}},{"name":"whitelist_mints","docs":["The mint address of whitelist to emit reward"],"type":{"array":["pubkey",100]}}]}},{"name":"PersonalPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"nft_mint","docs":["Mint address of the tokenized position"],"type":"pubkey"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0, as of the last computation"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1, as of the last computation"],"type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"PositionRewardInfo"}},3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"PoolCreatedEvent","docs":["Emitted when a pool is created and initialized with a starting price",""],"type":{"kind":"struct","fields":[{"name":"token_mint_0","docs":["The first token of the pool by address sort order"],"type":"pubkey"},{"name":"token_mint_1","docs":["The second token of the pool by address sort order"],"type":"pubkey"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"pool_state","docs":["The address of the created pool"],"type":"pubkey"},{"name":"sqrt_price_x64","docs":["The initial sqrt price of the pool, as a Q64.64"],"type":"u128"},{"name":"tick","docs":["The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool"],"type":"i32"},{"name":"token_vault_0","docs":["Vault of token_0"],"type":"pubkey"},{"name":"token_vault_1","docs":["Vault of token_1"],"type":"pubkey"}]}},{"name":"PoolState","docs":["The pool state","","PDA of `[POOL_SEED, config, token_mint_0, token_mint_1]`",""],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"amm_config","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"token_mint_0","docs":["Token pair of the pool, where token_mint_0 address < token_mint_1 address"],"type":"pubkey"},{"name":"token_mint_1","type":"pubkey"},{"name":"token_vault_0","docs":["Token pair vault"],"type":"pubkey"},{"name":"token_vault_1","type":"pubkey"},{"name":"observation_key","docs":["observation account key"],"type":"pubkey"},{"name":"mint_decimals_0","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_decimals_1","type":"u8"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"liquidity","docs":["The currently in range liquidity available to the pool."],"type":"u128"},{"name":"sqrt_price_x64","docs":["The current price of the pool as a sqrt(token_1/token_0) Q64.64 value"],"type":"u128"},{"name":"tick_current","docs":["The current tick of the pool, i.e. according to the last tick transition that was run."],"type":"i32"},{"name":"padding3","type":"u16"},{"name":"padding4","type":"u16"},{"name":"fee_growth_global_0_x64","docs":["The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per","unit of liquidity for the entire life of the pool."],"type":"u128"},{"name":"fee_growth_global_1_x64","type":"u128"},{"name":"protocol_fees_token_0","docs":["The amounts of token_0 and token_1 that are owed to the protocol."],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"swap_in_amount_token_0","docs":["The amounts in and out of swap token_0 and token_1"],"type":"u128"},{"name":"swap_out_amount_token_1","type":"u128"},{"name":"swap_in_amount_token_1","type":"u128"},{"name":"swap_out_amount_token_0","type":"u128"},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable open position and increase liquidity, 0: normal","bit1, 1: disable decrease liquidity, 0: normal","bit2, 1: disable collect fee, 0: normal","bit3, 1: disable collect reward, 0: normal","bit4, 1: disable swap, 0: normal"],"type":"u8"},{"name":"padding","docs":["Leave blank for future use"],"type":{"array":["u8",3]}},{"name":"trade_fee_rate","docs":["如果该值不为0, 则会覆盖 amm config 中的 trade_fee_rate 参数,作为实际收取的 trade fee rate","The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"RewardInfo"}},3]}},{"name":"tick_array_bitmap","docs":["Packed initialized tick array state"],"type":{"array":["u64",16]}},{"name":"total_fees_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_claimed_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_token_1","type":"u64"},{"name":"total_fees_claimed_token_1","type":"u64"},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"recent_epoch","type":"u64"},{"name":"decay_fee_flag","docs":["--- decay fee flag","bit0, 1: use decay fee, 0: not use decay fee","bit1, 1: use decay fee on sell for mint0, 0: not use decay fee on sell for mint0","bit2, 1: use decay fee on sell for mint1, 0: not use decay fee on sell for mint1","--- swap-dynamic-fee-flag","bit3, 1: token1 as quote token; token0 as quote token","bit4, 1: 启用 swap-dynamic-fee; 0: 不启用 swap-dynamic-fee"],"type":"u8"},{"name":"decay_fee_init_fee_rate","docs":["The initial decay fee rate for the pool, in percentage.(1=1%)"],"type":"u8"},{"name":"decay_fee_decrease_rate","docs":["decrease rate for the decay fee, in percentage.(1=1%)"],"type":"u8"},{"name":"decay_fee_decrease_interval","docs":["The interval for decreasing the decay fee, in seconds."],"type":"u8"},{"name":"arbitrage_fee_buffer_ppm","docs":["arbitrage_fee: 手工设置的一个容忍度,价差小于该值,不收取 arbitrageFee;单位取 10^-6(percent-per-million);"],"type":"u16"},{"name":"trade_slippage_fee_base","docs":["trade_slippage_fee: 公式中的b值,单位取 1/1000"],"type":"u8"},{"name":"trade_slippage_fee_trade_size_threshold","docs":["归一化(按quote数量计算)的swap-size值; 单位取 100"],"type":"u8"},{"name":"imbalance_fee_base","docs":["公式中的b,单位取1/10"],"type":"u8"},{"name":"imbalance_fee_x","docs":["公式中的x;单位取 1/100"],"type":"u8"},{"name":"padding1_1","type":{"array":["u8",6]}},{"name":"token0_pyth_feed_id","docs":["Pyth feed id for base token."],"type":{"array":["u8",32]}},{"name":"token1_pyth_feed_id","docs":["Pyth feed id for quote token."],"type":{"array":["u8",32]}},{"name":"padding1","type":{"array":["u64",14]}},{"name":"padding2","type":{"array":["u64",32]}}]}},{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growth_inside_last_x64","type":"u128"},{"name":"reward_amount_owed","type":"u64"}]}},{"name":"ProtocolPositionState","docs":["Info stored for each user's position"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1"],"type":"u64"},{"name":"reward_growth_inside","docs":["The reward growth per unit of liquidity as of the last update to liquidity"],"type":{"array":["u128",3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"RewardInfo","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"reward_state","docs":["Reward state"],"type":"u8"},{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"last_update_time","docs":["Reward last update time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Q64.64 number indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"reward_total_emissioned","docs":["The total amount of reward emissioned"],"type":"u64"},{"name":"reward_claimed","docs":["The total amount of claimed reward"],"type":"u64"},{"name":"token_mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"token_vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"authority","docs":["The owner that has permission to set reward param"],"type":"pubkey"},{"name":"reward_growth_global_x64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"SetSwapDynamicFeeParamsInput","type":{"kind":"struct","fields":[{"name":"enabled","docs":["是否启用 swap-dynamic-fee"],"type":"bool"},{"name":"arbitrage_fee_buffer_ppm","docs":["arbitrage_fee 缓冲值,单位 ppm (10^-6)"],"type":{"option":"u16"}},{"name":"trade_slippage_fee_base","docs":["trade_slippage_fee 基数,单位 1/1000"],"type":{"option":"u8"}},{"name":"trade_slippage_fee_trade_size_threshold","docs":["trade_slippage_fee 阈值,单位 100"],"type":{"option":"u8"}},{"name":"imbalance_fee_base","docs":["imbalance_fee 基数,单位 1/10"],"type":{"option":"u8"}},{"name":"imbalance_fee_x","docs":["imbalance_fee 阈值,单位 1/100"],"type":{"option":"u8"}},{"name":"token0_pyth_feed_id","docs":["token0 的 Pyth feed id"],"type":{"option":{"array":["u8",32]}}},{"name":"token1_pyth_feed_id","docs":["token1 的 Pyth feed id"],"type":{"option":{"array":["u8",32]}}}]}},{"name":"SupportMintAssociated","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"mint","docs":["Address of the supported token22 mint"],"type":"pubkey"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"SwapEvent","docs":["Emitted by when a swap is performed for a pool"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which token_0 and token_1 were swapped"],"type":"pubkey"},{"name":"sender","docs":["The address that initiated the swap call, and that received the callback"],"type":"pubkey"},{"name":"token_account_0","docs":["The payer token account in zero for one swaps, or the recipient token account","in one for zero swaps"],"type":"pubkey"},{"name":"token_account_1","docs":["The payer token account in one for zero swaps, or the recipient token account","in zero for one swaps"],"type":"pubkey"},{"name":"amount_0","docs":["The real delta amount of the token_0 of the pool or user"],"type":"u64"},{"name":"transfer_fee_0","docs":["The transfer fee charged by the withheld_amount of the token_0"],"type":"u64"},{"name":"amount_1","docs":["The real delta of the token_1 of the pool or user"],"type":"u64"},{"name":"transfer_fee_1","docs":["The transfer fee charged by the withheld_amount of the token_1"],"type":"u64"},{"name":"zero_for_one","docs":["if true, amount_0 is negtive and amount_1 is positive"],"type":"bool"},{"name":"sqrt_price_x64","docs":["The sqrt(price) of the pool after the swap, as a Q64.64"],"type":"u128"},{"name":"liquidity","docs":["The liquidity of the pool after the swap"],"type":"u128"},{"name":"tick","docs":["The log base 1.0001 of price of the pool after the swap"],"type":"i32"}]}},{"name":"TickArrayBitmapExtension","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"positive_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is positive"],"type":{"array":[{"array":["u64",8]},14]}},{"name":"negative_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is negitive"],"type":{"array":[{"array":["u64",8]},14]}}]}},{"name":"UpdateAdminGroupParams","type":{"kind":"struct","fields":[{"name":"fee_keeper","docs":["the address who can hold the fee,","anyone can trigger the fee collection action,"],"type":{"option":"pubkey"}},{"name":"reward_config_manager","docs":["the address who can config the reward(config, deposit, withdraw),","deposit reward, set the account who can deposit the reward, withdraw the remaining reward(withdraw)"],"type":{"option":"pubkey"}},{"name":"reward_claim_manager","docs":["the address who can manage the offchain reward claim"],"type":{"option":"pubkey"}},{"name":"pool_manager","docs":["the address who can manage the pool create action,","without this account's permission, no one can create a pool"],"type":{"option":"pubkey"}},{"name":"emergency_manager","docs":["the address who can manage the emergency action,","emergency action includes stop/resume the pool, stop/resume withdraw lp"],"type":{"option":"pubkey"}},{"name":"normal_manager","docs":["normal action manager,","such as create amm config, update amm config"],"type":{"option":"pubkey"}}]}},{"name":"UpdateRewardInfosEvent","docs":["Emitted when Reward are updated for a pool"],"type":{"kind":"struct","fields":[{"name":"reward_growth_global_x64","docs":["Reward info"],"type":{"array":["u128",3]}}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/carrot.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.json b/olddocs/archivekbot2/idls/carrot.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.json new file mode 100644 index 0000000..f3bbb6d --- /dev/null +++ b/olddocs/archivekbot2/idls/carrot.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"carrot","instructions":[{"name":"initVault","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"shares","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitVaultArgs"}}]},{"name":"transferVaultAuthority","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"newAuthority","isMut":false,"isSigner":false},{"name":"oldAuthority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"pauseVault","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true}],"args":[{"name":"args","type":{"defined":"PauseVaultArgs"}}]},{"name":"migrateVaultAccount","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"distributeVaultFees","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"shares","isMut":true,"isSigner":false},{"name":"sharesDestination","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateFee","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateFeeArgs"}}]},{"name":"issue","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"shares","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"asset","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"userAssetAta","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"assetTokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"IssueArgs"}}]},{"name":"redeem","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"shares","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"asset","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"userAssetAta","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"assetTokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"RedeemArgs"}}]},{"name":"addAsset","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"assetOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateAsset","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateAssetArgs"}}]},{"name":"removeAsset","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"asset","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"removeStrategy","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateStrategy","accounts":[{"name":"vault","isMut":false,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"UpdateStrategyArgs"}}]},{"name":"marginfiSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"marginfiGroup","isMut":false,"isSigner":false},{"name":"marginfiAccount","isMut":true,"isSigner":true},{"name":"marginfiBank","isMut":false,"isSigner":false},{"name":"marginfiBankLiquidityVault","isMut":false,"isSigner":false},{"name":"marginfiBankLiquidityVaultAuthority","isMut":false,"isSigner":false},{"name":"marginfiOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"marginfiProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MarginfiSupplyStrategyInitArgs"}}]},{"name":"marginfiSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"marginfiGroup","isMut":false,"isSigner":false},{"name":"marginfiAccount","isMut":true,"isSigner":false},{"name":"marginfiBank","isMut":true,"isSigner":false},{"name":"marginfiBankLiquidityVault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"marginfiProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MarginfiSupplyStrategyDepositArgs"}}]},{"name":"marginfiSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"marginfiGroup","isMut":false,"isSigner":false},{"name":"marginfiAccount","isMut":true,"isSigner":false},{"name":"marginfiBank","isMut":true,"isSigner":false},{"name":"marginfiBankLiquidityVault","isMut":true,"isSigner":false},{"name":"marginfiBankLiquidityVaultAuthority","isMut":true,"isSigner":false},{"name":"marginfiOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"marginfiProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MarginfiSupplyStrategyWithdrawArgs"}}]},{"name":"marginfiSupplyStrategyClaimEmissions","accounts":[{"name":"vault","isMut":false,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"marginfiGroup","isMut":false,"isSigner":false},{"name":"marginfiAccount","isMut":true,"isSigner":false},{"name":"marginfiBank","isMut":true,"isSigner":false},{"name":"marginfiEmissionsVault","isMut":true,"isSigner":false},{"name":"marginfiEmissionsAuth","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"marginfiProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"klendSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"assetPythOracle","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":true,"isSigner":false},{"name":"userMetadata","isMut":true,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"obligationFarm","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":false,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":false,"isSigner":false},{"name":"reserveFarmState","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"kfarmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"KlendSupplyStrategyInitArgs"}}]},{"name":"klendSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":true,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":true,"isSigner":false},{"name":"vaultCollateralAta","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"assetTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"kfarmsProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"KlendSupplyStrategyDepositArgs"}}]},{"name":"klendSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":true,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":true,"isSigner":false},{"name":"vaultCollateralAta","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"assetTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"kfarmsProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"KlendSupplyStrategyWithdrawArgs"}}]},{"name":"klendSupplyStrategyClaimEmissions","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"kfarmsGlobalConfig","isMut":false,"isSigner":false},{"name":"kfarmsVaultsAuthority","isMut":false,"isSigner":false},{"name":"kfarmsRewardsVault","isMut":true,"isSigner":false},{"name":"kfarmsRewardsTreasuryVault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"kfarmsProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"solendSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"assetPythOracle","isMut":false,"isSigner":false},{"name":"assetSwitchboardOracle","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"reserveCollateralMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":false,"isSigner":false},{"name":"reserveDepositCollateralAta","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"solendProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"SolendSupplyStrategyInitArgs"}}]},{"name":"solendSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"assetPythOracle","isMut":false,"isSigner":false},{"name":"assetSwitchboardOracle","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"vaultCollateralAta","isMut":true,"isSigner":false},{"name":"depositCollateralAta","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"solendProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"SolendSupplyStrategyDepositArgs"}}]},{"name":"solendSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"assetPythOracle","isMut":false,"isSigner":false},{"name":"assetSwitchboardOracle","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"vaultCollateralAta","isMut":true,"isSigner":false},{"name":"withdrawCollateralAta","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"solendProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"SolendSupplyStrategyWithdrawArgs"}}]},{"name":"mangoSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"mangoGroup","isMut":false,"isSigner":false},{"name":"mangoAccount","isMut":true,"isSigner":false},{"name":"mangoBank","isMut":false,"isSigner":false},{"name":"mangoVault","isMut":false,"isSigner":false},{"name":"pythOracle","isMut":false,"isSigner":false},{"name":"switchboardOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"mangoProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MangoSupplyStrategyInitArgs"}}]},{"name":"mangoSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"mangoGroup","isMut":false,"isSigner":false},{"name":"mangoAccount","isMut":true,"isSigner":false},{"name":"mangoBank","isMut":true,"isSigner":false},{"name":"mangoVault","isMut":true,"isSigner":false},{"name":"pythOracle","isMut":false,"isSigner":false},{"name":"switchboardOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"mangoProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MangoSupplyStrategyDepositArgs"}}]},{"name":"mangoSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"mangoGroup","isMut":false,"isSigner":false},{"name":"mangoAccount","isMut":true,"isSigner":false},{"name":"mangoBank","isMut":true,"isSigner":false},{"name":"mangoVault","isMut":true,"isSigner":false},{"name":"pythOracle","isMut":false,"isSigner":false},{"name":"switchboardOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"mangoProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MangoSupplyStrategyWithdrawArgs"}}]},{"name":"driftSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftState","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"driftSpotMarket","isMut":false,"isSigner":false},{"name":"driftPerpMarket","isMut":false,"isSigner":false},{"name":"driftSpotMarketVault","isMut":false,"isSigner":false},{"name":"spotPythOracle","isMut":false,"isSigner":false},{"name":"perpPythOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftSupplyStrategyInitArgs"}}]},{"name":"driftSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftState","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftSpotMarketVault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftSupplyStrategyDepositArgs"}}]},{"name":"driftSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftState","isMut":true,"isSigner":false},{"name":"driftSpotMarketVault","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftSupplyStrategyWithdrawArgs"}}]},{"name":"driftInsuranceFundStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftSpotMarketVault","isMut":false,"isSigner":false},{"name":"driftState","isMut":true,"isSigner":false},{"name":"driftInsuranceFundStake","isMut":true,"isSigner":false},{"name":"driftInsuranceFundVault","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftInsuranceFundStrategyInitArgs"}}]},{"name":"driftInsuranceFundStrategyStake","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftSpotMarketVault","isMut":true,"isSigner":false},{"name":"driftState","isMut":false,"isSigner":false},{"name":"driftInsuranceFundStake","isMut":true,"isSigner":false},{"name":"driftInsuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftInsuranceFundStrategyStakeArgs"}}]},{"name":"driftInsuranceFundStrategyUnstake","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftInsuranceFundStake","isMut":true,"isSigner":false},{"name":"driftInsuranceFundVault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"driftProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftInsuranceFundStrategyUnstakeArgs"}}]},{"name":"driftInsuranceFundStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftState","isMut":false,"isSigner":false},{"name":"driftInsuranceFundStake","isMut":true,"isSigner":false},{"name":"driftInsuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"clendSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"clendGroup","isMut":false,"isSigner":false},{"name":"clendAccount","isMut":true,"isSigner":true},{"name":"clendBank","isMut":false,"isSigner":false},{"name":"clendBankLiquidityVault","isMut":false,"isSigner":false},{"name":"clendBankLiquidityVaultAuthority","isMut":false,"isSigner":false},{"name":"clendOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"clendProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ClendSupplyStrategyInitArgs"}}]},{"name":"clendSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"clendGroup","isMut":false,"isSigner":false},{"name":"clendAccount","isMut":true,"isSigner":false},{"name":"clendBank","isMut":true,"isSigner":false},{"name":"clendBankLiquidityVault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"clendProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ClendSupplyStrategyDepositArgs"}}]},{"name":"clendSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"clendGroup","isMut":false,"isSigner":false},{"name":"clendAccount","isMut":true,"isSigner":false},{"name":"clendBank","isMut":true,"isSigner":false},{"name":"clendBankLiquidityVault","isMut":true,"isSigner":false},{"name":"clendBankLiquidityVaultAuthority","isMut":true,"isSigner":false},{"name":"clendOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"clendProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ClendSupplyStrategyWithdrawArgs"}}]},{"name":"chestStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"assetTokenAccount","isMut":false,"isSigner":false},{"name":"chest","isMut":false,"isSigner":false},{"name":"coinTokenAccount","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ChestStrategyInitArgs"}}]},{"name":"chestStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"chest","isMut":true,"isSigner":false},{"name":"coin","isMut":true,"isSigner":false},{"name":"chestAssetReserve","isMut":true,"isSigner":false},{"name":"driftVault","isMut":true,"isSigner":false},{"name":"driftVaultDepositor","isMut":true,"isSigner":false},{"name":"driftVaultTokenAccount","isMut":true,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftSpotMarketVault","isMut":true,"isSigner":false},{"name":"driftState","isMut":true,"isSigner":false},{"name":"vaultAssetTokenAccount","isMut":true,"isSigner":false},{"name":"vaultCoinTokenAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"chestProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false},{"name":"driftVaultsProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ChestStrategyDepositArgs"}}]},{"name":"chestStrategyRequestWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"chest","isMut":true,"isSigner":false},{"name":"coin","isMut":true,"isSigner":false},{"name":"chestCoinReserve","isMut":true,"isSigner":false},{"name":"redemptionRequest","isMut":true,"isSigner":false},{"name":"driftVault","isMut":true,"isSigner":false},{"name":"driftVaultDepositor","isMut":true,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"assetDestination","isMut":false,"isSigner":false},{"name":"vaultCoinTokenAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"chestProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ChestStrategyRequestWithdrawArgs"}}]},{"name":"chestStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategyAssetTokenAccount","isMut":true,"isSigner":false},{"name":"chest","isMut":true,"isSigner":false},{"name":"chestRedemptionRequest","isMut":false,"isSigner":false},{"name":"coin","isMut":true,"isSigner":false},{"name":"vaultCoinTokenAccount","isMut":true,"isSigner":false},{"name":"driftVault","isMut":true,"isSigner":false},{"name":"driftVaultDepositor","isMut":true,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"chestProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ChestStrategyWithdrawArgs"}}]},{"name":"updateSwitchboardOraclePrice","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"shares","isMut":false,"isSigner":false},{"name":"feed","isMut":true,"isSigner":false},{"name":"queue","isMut":false,"isSigner":false},{"name":"programState","isMut":false,"isSigner":false},{"name":"recentSlothashes","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"switchboardOnDemandProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Vault","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"shares","type":"publicKey"},{"name":"fee","type":{"defined":"Fee"}},{"name":"paused","type":"bool"},{"name":"assetIndex","type":"u16"},{"name":"strategyIndex","type":"u16"},{"name":"assets","type":{"vec":{"defined":"Asset"}}},{"name":"strategies","type":{"vec":{"defined":"StrategyRecord"}}}]}},{"name":"Strategy","type":{"kind":"struct","fields":[{"name":"metadata","type":{"defined":"StrategyMetadata"}},{"name":"strategyType","type":{"defined":"StrategyType"}}]}}],"types":[{"name":"ChestStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"failOnLowBalance","type":"bool"},{"name":"preserveRecordedBalance","type":"bool"}]}},{"name":"ChestStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"ChestStrategyRequestWithdrawArgs","type":{"kind":"struct","fields":[{"name":"assetAmount","type":"u64"}]}},{"name":"ChestStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"failOnLowBalance","type":"bool"},{"name":"preserveRecordedBalance","type":"bool"}]}},{"name":"ClendSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"ClendSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"ClendSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"DriftInsuranceFundStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"driftMarketIndex","type":"u16"}]}},{"name":"DriftInsuranceFundStrategyStakeArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"DriftInsuranceFundStrategyUnstakeArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"DriftSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"DriftSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"driftSubAccountId","type":"u16"},{"name":"driftMarketIndex","type":"u16"}]}},{"name":"DriftSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"InitVaultArgs","type":{"kind":"struct","fields":[{"name":"redemptionFeeBps","type":"u16"},{"name":"managementFeeBps","type":"u16"},{"name":"performanceFeeBps","type":"u16"}]}},{"name":"IssueArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"KlendSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"KlendSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"KlendSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"MangoSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"MangoSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"MangoSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"MarginfiSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"MarginfiSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"MarginfiSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"PauseVaultArgs","type":{"kind":"struct","fields":[{"name":"paused","type":"bool"}]}},{"name":"RedeemArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"SolendSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"SolendSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"SolendSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"UpdateAssetArgs","type":{"kind":"struct","fields":[{"name":"assetId","type":"u16"},{"name":"assetNewOracle","type":"publicKey"}]}},{"name":"UpdateFeeArgs","type":{"kind":"struct","fields":[{"name":"newRedemptionFeeBps","type":{"option":"u16"}},{"name":"newManagementFeeBps","type":{"option":"u16"}},{"name":"newPerformanceFeeBps","type":{"option":"u16"}}]}},{"name":"UpdateStrategyArgs","type":{"kind":"struct","fields":[{"name":"newStrategyType","type":{"defined":"StrategyType"}}]}},{"name":"Asset","type":{"kind":"struct","fields":[{"name":"assetId","type":"u16"},{"name":"mint","type":"publicKey"},{"name":"decimals","type":"u8"},{"name":"ata","type":"publicKey"},{"name":"oracle","type":"publicKey"}]}},{"name":"StrategyRecord","type":{"kind":"struct","fields":[{"name":"strategyId","type":"u16"},{"name":"assetId","type":"u16"},{"name":"balance","type":"u64"},{"name":"netEarnings","type":"i64"}]}},{"name":"StrategyMetadata","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"strategyId","type":"u16"},{"name":"assetMint","type":"publicKey"},{"name":"vault","type":"publicKey"}]}},{"name":"Fee","type":{"kind":"struct","fields":[{"name":"redemptionFeeBps","type":"u16"},{"name":"redemptionFeeAccumulated","type":"u64"},{"name":"managementFeeBps","type":"u16"},{"name":"managementFeeLastUpdate","type":"i64"},{"name":"managementFeeAccumulated","type":"u64"},{"name":"performanceFeeBps","type":"u16"}]}},{"name":"IssueEvent","type":{"kind":"struct","fields":[{"name":"depositor","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"sharesMinted","type":"u64"},{"name":"managementFee","type":"u64"},{"name":"tvl","type":"u128"}]}},{"name":"RedeemEvent","type":{"kind":"struct","fields":[{"name":"withdrawer","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"sharesBurned","type":"u64"},{"name":"redemptionFee","type":"u64"},{"name":"managementFee","type":"u64"},{"name":"tvl","type":"u128"}]}},{"name":"StrategyDepositEvent","type":{"kind":"struct","fields":[{"name":"strategy","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"depositAmount","type":"u64"},{"name":"netEarnings","type":"i64"},{"name":"strategyBalance","type":"u64"}]}},{"name":"StrategyWithdrawEvent","type":{"kind":"struct","fields":[{"name":"strategy","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"withdrawAmount","type":"u64"},{"name":"netEarnings","type":"i64"},{"name":"strategyBalance","type":"u64"}]}},{"name":"StrategyClaimEmissionsEvent","type":{"kind":"struct","fields":[{"name":"strategy","type":"publicKey"},{"name":"mint","type":"publicKey"}]}},{"name":"DistributeVaultFeesEvent","type":{"kind":"struct","fields":[{"name":"managementFeeAmountDistributed","type":"u64"},{"name":"performanceFeeAmountDistributed","type":"u64"},{"name":"redemptionFeeAmountDistributed","type":"u64"}]}},{"name":"UpdateSwitchboardOraclePriceEvent","type":{"kind":"struct","fields":[{"name":"vaultNav","type":"i128"},{"name":"vaultTvl","type":"u128"},{"name":"sharesSupply","type":"u64"}]}},{"name":"StrategyType","type":{"kind":"enum","variants":[{"name":"MarginfiSupply","fields":[{"name":"account","type":"publicKey"},{"name":"group","type":"publicKey"},{"name":"bank","type":"publicKey"},{"name":"bankLiquidityVault","type":"publicKey"},{"name":"bankLiquidityVaultAuthority","type":"publicKey"},{"name":"oracle","type":"publicKey"}]},{"name":"KlendSupply","fields":[{"name":"reserve","type":"publicKey"},{"name":"reserveCollateralMint","type":"publicKey"},{"name":"reserveLiquiditySupply","type":"publicKey"},{"name":"reserveDestinationDepositCollateral","type":"publicKey"},{"name":"reserveFarmState","type":"publicKey"},{"name":"lendingMarket","type":"publicKey"},{"name":"oracle","type":"publicKey"},{"name":"scopePrices","type":"publicKey"}]},{"name":"SolendSupply","fields":[{"name":"reserve","type":"publicKey"},{"name":"reserveCollateralMint","type":"publicKey"},{"name":"reserveLiquiditySupply","type":"publicKey"},{"name":"depositCollateralAta","type":"publicKey"},{"name":"lendingMarket","type":"publicKey"},{"name":"lendingMarketAuthority","type":"publicKey"},{"name":"pythOracle","type":"publicKey"},{"name":"switchboardOracle","type":"publicKey"}]},{"name":"MangoSupply","fields":[{"name":"group","type":"publicKey"},{"name":"account","type":"publicKey"},{"name":"bank","type":"publicKey"},{"name":"vault","type":"publicKey"},{"name":"pythOracle","type":"publicKey"},{"name":"switchboardOracle","type":"publicKey"}]},{"name":"DriftSupply","fields":[{"name":"state","type":"publicKey"},{"name":"signer","type":"publicKey"},{"name":"spotMarket","type":"publicKey"},{"name":"spotMarketVault","type":"publicKey"},{"name":"perpMarket","type":"publicKey"},{"name":"spotPythOracle","type":"publicKey"},{"name":"perpPythOracle","type":"publicKey"},{"name":"subAccountId","type":"u16"},{"name":"marketIndex","type":"u16"}]},{"name":"DriftInsuranceFund","fields":[{"name":"state","type":"publicKey"},{"name":"spotMarket","type":"publicKey"},{"name":"spotMarketVault","type":"publicKey"},{"name":"marketIndex","type":"u16"}]},{"name":"Chest","fields":[{"name":"chest","type":"publicKey"},{"name":"coin","type":"publicKey"},{"name":"driftVault","type":"publicKey"},{"name":"coinTokenAccount","type":"publicKey"},{"name":"assetDestination","type":"publicKey"},{"name":"redemptionRequest","type":{"option":"publicKey"}},{"name":"spotMarketIndex","type":"u16"}]},{"name":"ClendSupply","fields":[{"name":"account","type":"publicKey"},{"name":"group","type":"publicKey"},{"name":"bank","type":"publicKey"},{"name":"bankLiquidityVault","type":"publicKey"},{"name":"bankLiquidityVaultAuthority","type":"publicKey"},{"name":"oracle","type":"publicKey"}]}]}},{"name":"StrategyTypeSelection","type":{"kind":"enum","variants":[{"name":"MarginfiSupply"},{"name":"KlendSupply"},{"name":"SolendSupply"},{"name":"MangoSupply"},{"name":"DriftSupply"},{"name":"DriftInsuranceFund"},{"name":"Chest"},{"name":"ClendSupply"}]}},{"name":"CarrotEvent","type":{"kind":"enum","variants":[{"name":"Issue","fields":[{"defined":"IssueEvent"}]},{"name":"Redeem","fields":[{"defined":"RedeemEvent"}]},{"name":"StrategyDeposit","fields":[{"defined":"StrategyDepositEvent"}]},{"name":"StrategyWithdraw","fields":[{"defined":"StrategyWithdrawEvent"}]},{"name":"StrategyClaimEmissions","fields":[{"defined":"StrategyClaimEmissionsEvent"}]},{"name":"DistributeVaultFees","fields":[{"defined":"DistributeVaultFeesEvent"}]},{"name":"UpdateSwitchboardOraclePrice","fields":[{"defined":"UpdateSwitchboardOraclePriceEvent"}]}]}},{"name":"RoundingMode","type":{"kind":"enum","variants":[{"name":"RoundUp"},{"name":"RoundDown"},{"name":"Avg"}]}}],"errors":[{"code":6000,"name":"AssetAlreadyExists","msg":"Asset Already Exists"},{"code":6001,"name":"AssetNotFound","msg":"Asset Not Found"},{"code":6002,"name":"OracleNotFound","msg":"Oracle Not Found"},{"code":6003,"name":"OracleStalePrice","msg":"Oracle Returned Stale Price"},{"code":6004,"name":"StrategyNotFound","msg":"Strategy Not Found"},{"code":6005,"name":"AtaNotFound","msg":"Ata Not Found"},{"code":6006,"name":"StrategyAlreadyExists","msg":"Strategy Already Exists"},{"code":6007,"name":"InvalidStrategyType","msg":"Invalid Strategy Type"},{"code":6008,"name":"StrategyBalanceCalculationError","msg":"Strategy Balance Calculation Error"},{"code":6009,"name":"VaultIsPaused","msg":"Vault is Paused"},{"code":6010,"name":"InvalidVaultAuthority","msg":"Invalid Vault Authority"},{"code":6011,"name":"MigrationError","msg":"Account Migration Error"},{"code":6012,"name":"InvalidPriceConf","msg":"Invalid Price Confidence Interval"},{"code":6013,"name":"InvalidStrategyAccounts","msg":"Invalid Strategy Accounts"},{"code":6014,"name":"StrategyNotEmpty","msg":"Strategy Not Empty"},{"code":6015,"name":"AssetNotEmpty","msg":"Asset Not Empty"},{"code":6016,"name":"InvalidFeeBps","msg":"Invalid Fee Bps"},{"code":6017,"name":"InvalidReturnData","msg":"Invalid Return Data"},{"code":6018,"name":"InvalidCoinSupply","msg":"Invalid Coin Supply"},{"code":6019,"name":"InvalidNav","msg":"Invalid NAV"},{"code":6020,"name":"MathError","msg":"Math Error"},{"code":6021,"name":"ChestLowBalance","msg":"Chest Low Balance"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/cctp_v1.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.json b/olddocs/archivekbot2/idls/cctp_v1.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.json new file mode 100644 index 0000000..1c7342c --- /dev/null +++ b/olddocs/archivekbot2/idls/cctp_v1.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"token_messenger_minter","instructions":[{"name":"initialize","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"upgradeAuthority","isMut":false,"isSigner":true},{"name":"authorityPda","isMut":false,"isSigner":false},{"name":"tokenMessenger","isMut":true,"isSigner":false},{"name":"tokenMinter","isMut":true,"isSigner":false},{"name":"tokenMessengerMinterProgramData","isMut":false,"isSigner":false},{"name":"tokenMessengerMinterProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitializeParams"}}]},{"name":"transferOwnership","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"TransferOwnershipParams"}}]},{"name":"acceptOwnership","accounts":[{"name":"pendingOwner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AcceptOwnershipParams"}}]},{"name":"addRemoteTokenMessenger","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"remoteTokenMessenger","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AddRemoteTokenMessengerParams"}}]},{"name":"removeRemoteTokenMessenger","accounts":[{"name":"payee","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"remoteTokenMessenger","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RemoveRemoteTokenMessengerParams"}}]},{"name":"depositForBurn","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"eventRentPayer","isMut":true,"isSigner":true},{"name":"senderAuthorityPda","isMut":false,"isSigner":false},{"name":"burnTokenAccount","isMut":true,"isSigner":false},{"name":"messageTransmitter","isMut":true,"isSigner":false},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"remoteTokenMessenger","isMut":false,"isSigner":false},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"burnTokenMint","isMut":true,"isSigner":false},{"name":"messageSentEventData","isMut":true,"isSigner":true},{"name":"messageTransmitterProgram","isMut":false,"isSigner":false},{"name":"tokenMessengerMinterProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DepositForBurnParams"}}],"returns":"u64"},{"name":"depositForBurnWithCaller","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"eventRentPayer","isMut":true,"isSigner":true},{"name":"senderAuthorityPda","isMut":false,"isSigner":false},{"name":"burnTokenAccount","isMut":true,"isSigner":false},{"name":"messageTransmitter","isMut":true,"isSigner":false},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"remoteTokenMessenger","isMut":false,"isSigner":false},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"burnTokenMint","isMut":true,"isSigner":false},{"name":"messageSentEventData","isMut":true,"isSigner":true},{"name":"messageTransmitterProgram","isMut":false,"isSigner":false},{"name":"tokenMessengerMinterProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DepositForBurnWithCallerParams"}}],"returns":"u64"},{"name":"replaceDepositForBurn","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"eventRentPayer","isMut":true,"isSigner":true},{"name":"senderAuthorityPda","isMut":false,"isSigner":false},{"name":"messageTransmitter","isMut":true,"isSigner":false},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"messageSentEventData","isMut":true,"isSigner":true},{"name":"messageTransmitterProgram","isMut":false,"isSigner":false},{"name":"tokenMessengerMinterProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ReplaceDepositForBurnParams"}}],"returns":"u64"},{"name":"handleReceiveMessage","accounts":[{"name":"authorityPda","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"remoteTokenMessenger","isMut":false,"isSigner":false},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"tokenPair","isMut":false,"isSigner":false},{"name":"recipientTokenAccount","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"HandleReceiveMessageParams"}}]},{"name":"setTokenController","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"tokenMinter","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetTokenControllerParams"}}]},{"name":"pause","accounts":[{"name":"pauser","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"PauseParams"}}]},{"name":"unpause","accounts":[{"name":"pauser","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UnpauseParams"}}]},{"name":"updatePauser","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"tokenMinter","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UpdatePauserParams"}}]},{"name":"setMaxBurnAmountPerMessage","accounts":[{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetMaxBurnAmountPerMessageParams"}}]},{"name":"addLocalToken","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"localTokenMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AddLocalTokenParams"}}]},{"name":"removeLocalToken","accounts":[{"name":"payee","isMut":true,"isSigner":true},{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RemoveLocalTokenParams"}}]},{"name":"linkTokenPair","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"tokenPair","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"LinkTokenPairParams"}}]},{"name":"unlinkTokenPair","accounts":[{"name":"payee","isMut":true,"isSigner":true},{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"tokenPair","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UninkTokenPairParams"}}]},{"name":"burnTokenCustody","accounts":[{"name":"payee","isMut":true,"isSigner":true},{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":false,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"custodyTokenMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"BurnTokenCustodyParams"}}]}],"accounts":[{"name":"TokenMessenger","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"pendingOwner","type":"publicKey"},{"name":"localMessageTransmitter","type":"publicKey"},{"name":"messageBodyVersion","type":"u32"},{"name":"authorityBump","type":"u8"}]}},{"name":"RemoteTokenMessenger","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"tokenMessenger","type":"publicKey"}]}},{"name":"TokenMinter","type":{"kind":"struct","fields":[{"name":"tokenController","type":"publicKey"},{"name":"pauser","type":"publicKey"},{"name":"paused","type":"bool"},{"name":"bump","type":"u8"}]}},{"name":"TokenPair","type":{"kind":"struct","fields":[{"name":"remoteDomain","type":"u32"},{"name":"remoteToken","type":"publicKey"},{"name":"localToken","type":"publicKey"},{"name":"bump","type":"u8"}]}},{"name":"LocalToken","type":{"kind":"struct","fields":[{"name":"custody","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"burnLimitPerMessage","type":"u64"},{"name":"messagesSent","type":"u64"},{"name":"messagesReceived","type":"u64"},{"name":"amountSent","type":"u128"},{"name":"amountReceived","type":"u128"},{"name":"bump","type":"u8"},{"name":"custodyBump","type":"u8"}]}}],"types":[{"name":"AcceptOwnershipParams","type":{"kind":"struct","fields":[]}},{"name":"AddRemoteTokenMessengerParams","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"tokenMessenger","type":"publicKey"}]}},{"name":"DepositForBurnWithCallerParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"destinationDomain","type":"u32"},{"name":"mintRecipient","type":"publicKey"},{"name":"destinationCaller","type":"publicKey"}]}},{"name":"DepositForBurnParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"destinationDomain","type":"u32"},{"name":"mintRecipient","type":"publicKey"}]}},{"name":"HandleReceiveMessageParams","type":{"kind":"struct","fields":[{"name":"remoteDomain","type":"u32"},{"name":"sender","type":"publicKey"},{"name":"messageBody","type":"bytes"},{"name":"authorityBump","type":"u8"}]}},{"name":"InitializeParams","type":{"kind":"struct","fields":[{"name":"tokenController","type":"publicKey"},{"name":"localMessageTransmitter","type":"publicKey"},{"name":"messageBodyVersion","type":"u32"}]}},{"name":"RemoveRemoteTokenMessengerParams","type":{"kind":"struct","fields":[]}},{"name":"ReplaceDepositForBurnParams","type":{"kind":"struct","fields":[{"name":"originalMessage","type":"bytes"},{"name":"originalAttestation","type":"bytes"},{"name":"newDestinationCaller","type":"publicKey"},{"name":"newMintRecipient","type":"publicKey"}]}},{"name":"TransferOwnershipParams","type":{"kind":"struct","fields":[{"name":"newOwner","type":"publicKey"}]}},{"name":"AddLocalTokenParams","type":{"kind":"struct","fields":[]}},{"name":"BurnTokenCustodyParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"LinkTokenPairParams","type":{"kind":"struct","fields":[{"name":"localToken","type":"publicKey"},{"name":"remoteDomain","type":"u32"},{"name":"remoteToken","type":"publicKey"}]}},{"name":"PauseParams","type":{"kind":"struct","fields":[]}},{"name":"RemoveLocalTokenParams","type":{"kind":"struct","fields":[]}},{"name":"SetMaxBurnAmountPerMessageParams","type":{"kind":"struct","fields":[{"name":"burnLimitPerMessage","type":"u64"}]}},{"name":"SetTokenControllerParams","type":{"kind":"struct","fields":[{"name":"tokenController","type":"publicKey"}]}},{"name":"UninkTokenPairParams","type":{"kind":"struct","fields":[]}},{"name":"UnpauseParams","type":{"kind":"struct","fields":[]}},{"name":"UpdatePauserParams","type":{"kind":"struct","fields":[{"name":"newPauser","type":"publicKey"}]}},{"name":"TokenMinterError","type":{"kind":"enum","variants":[{"name":"InvalidAuthority"},{"name":"InvalidTokenMinterState"},{"name":"ProgramPaused"},{"name":"InvalidTokenPairState"},{"name":"InvalidLocalTokenState"},{"name":"InvalidPauser"},{"name":"InvalidTokenController"},{"name":"BurnAmountExceeded"},{"name":"InvalidAmount"}]}}],"events":[{"name":"OwnershipTransferStarted","fields":[{"name":"previousOwner","type":"publicKey","index":false},{"name":"newOwner","type":"publicKey","index":false}]},{"name":"OwnershipTransferred","fields":[{"name":"previousOwner","type":"publicKey","index":false},{"name":"newOwner","type":"publicKey","index":false}]},{"name":"DepositForBurn","fields":[{"name":"nonce","type":"u64","index":false},{"name":"burnToken","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"depositor","type":"publicKey","index":false},{"name":"mintRecipient","type":"publicKey","index":false},{"name":"destinationDomain","type":"u32","index":false},{"name":"destinationTokenMessenger","type":"publicKey","index":false},{"name":"destinationCaller","type":"publicKey","index":false}]},{"name":"MintAndWithdraw","fields":[{"name":"mintRecipient","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"mintToken","type":"publicKey","index":false}]},{"name":"RemoteTokenMessengerAdded","fields":[{"name":"domain","type":"u32","index":false},{"name":"tokenMessenger","type":"publicKey","index":false}]},{"name":"RemoteTokenMessengerRemoved","fields":[{"name":"domain","type":"u32","index":false},{"name":"tokenMessenger","type":"publicKey","index":false}]},{"name":"SetTokenController","fields":[{"name":"tokenController","type":"publicKey","index":false}]},{"name":"PauserChanged","fields":[{"name":"newAddress","type":"publicKey","index":false}]},{"name":"SetBurnLimitPerMessage","fields":[{"name":"token","type":"publicKey","index":false},{"name":"burnLimitPerMessage","type":"u64","index":false}]},{"name":"LocalTokenAdded","fields":[{"name":"custody","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false}]},{"name":"LocalTokenRemoved","fields":[{"name":"custody","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false}]},{"name":"TokenPairLinked","fields":[{"name":"localToken","type":"publicKey","index":false},{"name":"remoteDomain","type":"u32","index":false},{"name":"remoteToken","type":"publicKey","index":false}]},{"name":"TokenPairUnlinked","fields":[{"name":"localToken","type":"publicKey","index":false},{"name":"remoteDomain","type":"u32","index":false},{"name":"remoteToken","type":"publicKey","index":false}]},{"name":"Pause","fields":[]},{"name":"Unpause","fields":[]},{"name":"TokenCustodyBurned","fields":[{"name":"custodyTokenAccount","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"InvalidAuthority","msg":"Invalid authority"},{"code":6001,"name":"InvalidTokenMessengerState","msg":"Invalid token messenger state"},{"code":6002,"name":"InvalidTokenMessenger","msg":"Invalid token messenger"},{"code":6003,"name":"InvalidOwner","msg":"Invalid owner"},{"code":6004,"name":"MalformedMessage","msg":"Malformed message"},{"code":6005,"name":"InvalidMessageBodyVersion","msg":"Invalid message body version"},{"code":6006,"name":"InvalidAmount","msg":"Invalid amount"},{"code":6007,"name":"InvalidDestinationDomain","msg":"Invalid destination domain"},{"code":6008,"name":"InvalidDestinationCaller","msg":"Invalid destination caller"},{"code":6009,"name":"InvalidMintRecipient","msg":"Invalid mint recipient"},{"code":6010,"name":"InvalidSender","msg":"Invalid sender"},{"code":6011,"name":"InvalidTokenPair","msg":"Invalid token pair"},{"code":6012,"name":"InvalidTokenMint","msg":"Invalid token mint"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/cctp_v2.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.json b/olddocs/archivekbot2/idls/cctp_v2.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.json new file mode 100644 index 0000000..168bde5 --- /dev/null +++ b/olddocs/archivekbot2/idls/cctp_v2.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.json @@ -0,0 +1 @@ +{"address":"CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe","metadata":{"name":"token_messenger_minter_v2","version":"0.2.0","spec":"0.1.0","description":"Token Messenger and Minter for Cross-Chain Transfer Protocol V2","repository":"https://github.com/circlefin/solana-cctp-contracts"},"instructions":[{"name":"accept_ownership","discriminator":[172,23,43,13,238,213,85,150],"accounts":[{"name":"pending_owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"AcceptOwnershipParams"}}}]},{"name":"add_local_token","discriminator":[213,199,205,18,98,124,73,198],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token_mint"}]}},{"name":"custody_token_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,117,115,116,111,100,121]},{"kind":"account","path":"local_token_mint"}]}},{"name":"local_token_mint"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"AddLocalTokenParams"}}}]},{"name":"add_remote_token_messenger","discriminator":[12,149,172,165,111,202,24,33],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"remote_token_messenger","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,109,111,116,101,95,116,111,107,101,110,95,109,101,115,115,101,110,103,101,114]},{"kind":"arg","path":"params.domain"}]}},{"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":"params","type":{"defined":{"name":"AddRemoteTokenMessengerParams"}}}]},{"name":"burn_token_custody","discriminator":[233,136,180,175,112,41,62,71],"accounts":[{"name":"payee","writable":true,"signer":true},{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"local_token","pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"custody_token_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,117,115,116,111,100,121]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"custody_token_mint","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"BurnTokenCustodyParams"}}}]},{"name":"denylist_account","discriminator":[101,116,197,112,81,249,75,194],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"denylister","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"denylist_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,110,121,108,105,115,116,95,97,99,99,111,117,110,116]},{"kind":"arg","path":"params.account"}]}},{"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":"params","type":{"defined":{"name":"DenylistParams"}}}]},{"name":"deposit_for_burn","discriminator":[215,60,61,46,114,55,128,176],"accounts":[{"name":"owner","signer":true,"relations":["burn_token_account"]},{"name":"event_rent_payer","writable":true,"signer":true},{"name":"sender_authority_pda","pda":{"seeds":[{"kind":"const","value":[115,101,110,100,101,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"burn_token_account","writable":true},{"name":"denylist_account","docs":["Account is denylisted if the account exists at the expected PDA."],"pda":{"seeds":[{"kind":"const","value":[100,101,110,121,108,105,115,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"owner"}]}},{"name":"message_transmitter","writable":true},{"name":"token_messenger"},{"name":"remote_token_messenger"},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"burn_token_mint"}]}},{"name":"burn_token_mint","writable":true},{"name":"message_sent_event_data","writable":true,"signer":true},{"name":"message_transmitter_program","address":"CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC"},{"name":"token_messenger_minter_program","address":"CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"DepositForBurnParams"}}}]},{"name":"deposit_for_burn_with_hook","discriminator":[111,245,62,131,204,108,223,155],"accounts":[{"name":"owner","signer":true,"relations":["burn_token_account"]},{"name":"event_rent_payer","writable":true,"signer":true},{"name":"sender_authority_pda","pda":{"seeds":[{"kind":"const","value":[115,101,110,100,101,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"burn_token_account","writable":true},{"name":"denylist_account","docs":["Account is denylisted if the account exists at the expected PDA."],"pda":{"seeds":[{"kind":"const","value":[100,101,110,121,108,105,115,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"owner"}]}},{"name":"message_transmitter","writable":true},{"name":"token_messenger"},{"name":"remote_token_messenger"},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"burn_token_mint"}]}},{"name":"burn_token_mint","writable":true},{"name":"message_sent_event_data","writable":true,"signer":true},{"name":"message_transmitter_program","address":"CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC"},{"name":"token_messenger_minter_program","address":"CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"DepositForBurnWithHookParams"}}}]},{"name":"handle_receive_finalized_message","discriminator":[186,252,239,70,86,180,110,95],"accounts":[{"name":"authority_pda","signer":true,"pda":{"seeds":[{"kind":"const","value":[109,101,115,115,97,103,101,95,116,114,97,110,115,109,105,116,116,101,114,95,97,117,116,104,111,114,105,116,121]},{"kind":"const","value":[166,95,200,29,15,239,168,134,12,179,184,63,8,155,2,36,190,138,102,135,183,174,73,245,148,192,185,180,215,233,56,147]}],"program":{"kind":"const","value":[166,95,200,28,225,158,220,210,210,195,64,176,47,166,27,225,213,186,221,225,89,40,51,221,249,32,9,216,207,104,84,85]}}},{"name":"token_messenger"},{"name":"remote_token_messenger"},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"token_pair"},{"name":"fee_recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_messenger.fee_recipient","account":"TokenMessenger"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}],"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":"recipient_token_account","writable":true},{"name":"custody_token_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,117,115,116,111,100,121]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"HandleReceiveMessageParams"}}}]},{"name":"handle_receive_unfinalized_message","discriminator":[200,169,175,20,200,58,182,61],"accounts":[{"name":"authority_pda","signer":true,"pda":{"seeds":[{"kind":"const","value":[109,101,115,115,97,103,101,95,116,114,97,110,115,109,105,116,116,101,114,95,97,117,116,104,111,114,105,116,121]},{"kind":"const","value":[166,95,200,29,15,239,168,134,12,179,184,63,8,155,2,36,190,138,102,135,183,174,73,245,148,192,185,180,215,233,56,147]}],"program":{"kind":"const","value":[166,95,200,28,225,158,220,210,210,195,64,176,47,166,27,225,213,186,221,225,89,40,51,221,249,32,9,216,207,104,84,85]}}},{"name":"token_messenger"},{"name":"remote_token_messenger"},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"token_pair"},{"name":"fee_recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_messenger.fee_recipient","account":"TokenMessenger"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}],"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":"recipient_token_account","writable":true},{"name":"custody_token_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,117,115,116,111,100,121]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"HandleReceiveMessageParams"}}}]},{"name":"initialize","discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"authority_pda","pda":{"seeds":[{"kind":"const","value":[115,101,110,100,101,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"token_messenger","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,109,101,115,115,101,110,103,101,114]}]}},{"name":"token_minter","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,109,105,110,116,101,114]}]}},{"name":"token_messenger_minter_program_data"},{"name":"token_messenger_minter_program","address":"CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe"},{"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":"params","type":{"defined":{"name":"InitializeParams"}}}]},{"name":"link_token_pair","discriminator":[68,162,24,104,125,46,130,12],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"token_pair","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,112,97,105,114]},{"kind":"arg","path":"params.remote_domain"},{"kind":"arg","path":"params.remote_token"}]}},{"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":"params","type":{"defined":{"name":"LinkTokenPairParams"}}}]},{"name":"pause","discriminator":[211,22,221,251,74,121,193,47],"accounts":[{"name":"pauser","signer":true,"relations":["token_minter"]},{"name":"token_minter","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":"params","type":{"defined":{"name":"PauseParams"}}}]},{"name":"remove_local_token","discriminator":[27,43,66,170,188,44,109,97],"accounts":[{"name":"payee","writable":true,"signer":true},{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"custody_token_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,117,115,116,111,100,121]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"custody_token_mint","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"RemoveLocalTokenParams"}}}]},{"name":"remove_remote_token_messenger","discriminator":[65,114,66,85,169,98,177,146],"accounts":[{"name":"payee","writable":true,"signer":true},{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"remote_token_messenger","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,109,111,116,101,95,116,111,107,101,110,95,109,101,115,115,101,110,103,101,114]},{"kind":"account","path":"remote_token_messenger.domain","account":"RemoteTokenMessenger"}]}},{"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":"params","type":{"defined":{"name":"RemoveRemoteTokenMessengerParams"}}}]},{"name":"set_fee_recipient","discriminator":[227,18,215,42,237,246,151,66],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"SetFeeRecipientParams"}}}]},{"name":"set_max_burn_amount_per_message","discriminator":[30,128,145,240,70,237,109,207],"accounts":[{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"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":"params","type":{"defined":{"name":"SetMaxBurnAmountPerMessageParams"}}}]},{"name":"set_min_fee","discriminator":[114,198,35,3,41,196,194,246],"accounts":[{"name":"min_fee_controller","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"SetMinFeeParams"}}}]},{"name":"set_min_fee_controller","discriminator":[195,142,74,84,234,94,180,113],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"SetMinFeeControllerParams"}}}]},{"name":"set_token_controller","discriminator":[88,6,98,10,79,59,15,24],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"token_minter","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":"params","type":{"defined":{"name":"SetTokenControllerParams"}}}]},{"name":"transfer_ownership","discriminator":[65,177,215,73,53,45,99,47],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"TransferOwnershipParams"}}}]},{"name":"undenylist_account","discriminator":[57,36,43,168,62,172,33,39],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"denylister","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"denylist_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,110,121,108,105,115,116,95,97,99,99,111,117,110,116]},{"kind":"arg","path":"params.account"}]}},{"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":"params","type":{"defined":{"name":"UndenylistParams"}}}]},{"name":"unlink_token_pair","discriminator":[52,198,100,114,104,174,85,58],"accounts":[{"name":"payee","writable":true,"signer":true},{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"token_pair","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,112,97,105,114]},{"kind":"account","path":"token_pair.remote_domain","account":"TokenPair"},{"kind":"account","path":"token_pair.remote_token","account":"TokenPair"}]}},{"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":"params","type":{"defined":{"name":"UninkTokenPairParams"}}}]},{"name":"unpause","discriminator":[169,144,4,38,10,141,188,255],"accounts":[{"name":"pauser","signer":true,"relations":["token_minter"]},{"name":"token_minter","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":"params","type":{"defined":{"name":"UnpauseParams"}}}]},{"name":"update_denylister","discriminator":[193,66,198,201,84,57,14,222],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"UpdateDenylisterParams"}}}]},{"name":"update_pauser","discriminator":[140,171,211,132,57,201,16,254],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"token_minter","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":"params","type":{"defined":{"name":"UpdatePauserParams"}}}]}],"accounts":[{"name":"DenylistedAccount","discriminator":[186,58,212,239,102,131,157,146]},{"name":"LocalToken","discriminator":[159,131,58,170,193,84,128,182]},{"name":"MessageTransmitter","discriminator":[71,40,180,142,19,203,35,252]},{"name":"RemoteTokenMessenger","discriminator":[105,115,174,34,95,233,138,252]},{"name":"TokenMessenger","discriminator":[162,4,242,52,147,243,221,96]},{"name":"TokenMinter","discriminator":[122,133,84,63,57,159,171,206]},{"name":"TokenPair","discriminator":[17,214,45,176,229,149,197,71]}],"events":[{"name":"Denylisted","discriminator":[20,145,173,200,182,17,234,154]},{"name":"DenylisterChanged","discriminator":[249,170,81,180,185,175,138,72]},{"name":"DepositForBurn","discriminator":[144,252,145,146,6,74,167,235]},{"name":"FeeRecipientSet","discriminator":[99,140,80,35,245,176,179,110]},{"name":"LocalTokenAdded","discriminator":[146,8,224,150,122,173,23,39]},{"name":"LocalTokenRemoved","discriminator":[181,204,1,95,2,50,66,210]},{"name":"MinFeeControllerSet","discriminator":[239,12,122,105,231,114,13,196]},{"name":"MinFeeSet","discriminator":[60,127,101,230,216,129,188,98]},{"name":"MintAndWithdraw","discriminator":[75,67,229,70,162,126,0,71]},{"name":"OwnershipTransferStarted","discriminator":[183,253,239,246,140,179,133,105]},{"name":"OwnershipTransferred","discriminator":[172,61,205,183,250,50,38,98]},{"name":"Pause","discriminator":[194,251,232,196,118,95,111,219]},{"name":"PauserChanged","discriminator":[142,157,158,87,127,8,119,55]},{"name":"RemoteTokenMessengerAdded","discriminator":[251,29,63,244,48,114,210,175]},{"name":"RemoteTokenMessengerRemoved","discriminator":[255,121,137,39,230,125,11,30]},{"name":"SetBurnLimitPerMessage","discriminator":[98,152,88,191,245,30,27,209]},{"name":"SetTokenController","discriminator":[193,44,243,83,230,72,120,216]},{"name":"TokenCustodyBurned","discriminator":[219,143,107,226,67,75,178,46]},{"name":"TokenPairLinked","discriminator":[2,14,177,64,155,93,196,141]},{"name":"TokenPairUnlinked","discriminator":[78,232,230,208,180,212,246,72]},{"name":"UnDenylisted","discriminator":[150,39,227,20,162,180,5,242]},{"name":"Unpause","discriminator":[241,149,104,90,199,136,219,146]}],"errors":[{"code":6000,"name":"InvalidAuthority","msg":"Invalid authority"},{"code":6001,"name":"InvalidTokenMinterState","msg":"Invalid token minter state"},{"code":6002,"name":"ProgramPaused","msg":"Instruction is not allowed at this time"},{"code":6003,"name":"InvalidTokenPairState","msg":"Invalid token pair state"},{"code":6004,"name":"InvalidLocalTokenState","msg":"Invalid local token state"},{"code":6005,"name":"InvalidPauser","msg":"Invalid pauser"},{"code":6006,"name":"InvalidTokenController","msg":"Invalid token controller"},{"code":6007,"name":"BurnAmountExceeded","msg":"Burn amount exceeded"},{"code":6008,"name":"InvalidAmount","msg":"Invalid amount"}],"types":[{"name":"AcceptOwnershipParams","type":{"kind":"struct","fields":[]}},{"name":"AddLocalTokenParams","type":{"kind":"struct","fields":[]}},{"name":"AddRemoteTokenMessengerParams","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"token_messenger","type":"pubkey"}]}},{"name":"BurnTokenCustodyParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"DenylistParams","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"}]}},{"name":"Denylisted","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"}]}},{"name":"DenylistedAccount","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"}]}},{"name":"DenylisterChanged","type":{"kind":"struct","fields":[{"name":"old_denylister","type":"pubkey"},{"name":"new_denylister","type":"pubkey"}]}},{"name":"DepositForBurn","type":{"kind":"struct","fields":[{"name":"burn_token","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"depositor","type":"pubkey"},{"name":"mint_recipient","type":"pubkey"},{"name":"destination_domain","type":"u32"},{"name":"destination_token_messenger","type":"pubkey"},{"name":"destination_caller","type":"pubkey"},{"name":"max_fee","type":"u64"},{"name":"min_finality_threshold","type":"u32"},{"name":"hook_data","type":"bytes"}]}},{"name":"DepositForBurnParams","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"destination_domain","type":"u32"},{"name":"mint_recipient","type":"pubkey"},{"name":"destination_caller","type":"pubkey"},{"name":"max_fee","type":"u64"},{"name":"min_finality_threshold","type":"u32"}]}},{"name":"DepositForBurnWithHookParams","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"destination_domain","type":"u32"},{"name":"mint_recipient","type":"pubkey"},{"name":"destination_caller","type":"pubkey"},{"name":"max_fee","type":"u64"},{"name":"min_finality_threshold","type":"u32"},{"name":"hook_data","type":"bytes"}]}},{"name":"FeeRecipientSet","type":{"kind":"struct","fields":[{"name":"new_fee_recipient","type":"pubkey"}]}},{"name":"HandleReceiveMessageParams","type":{"kind":"struct","fields":[{"name":"remote_domain","type":"u32"},{"name":"sender","type":"pubkey"},{"name":"finality_threshold_executed","type":"u32"},{"name":"message_body","type":"bytes"},{"name":"authority_bump","type":"u8"}]}},{"name":"InitializeParams","type":{"kind":"struct","fields":[{"name":"token_controller","type":"pubkey"},{"name":"denylister","type":"pubkey"},{"name":"fee_recipient","type":"pubkey"},{"name":"min_fee_controller","type":"pubkey"},{"name":"min_fee","type":"u32"},{"name":"message_body_version","type":"u32"}]}},{"name":"LinkTokenPairParams","type":{"kind":"struct","fields":[{"name":"local_token","type":"pubkey"},{"name":"remote_domain","type":"u32"},{"name":"remote_token","type":"pubkey"}]}},{"name":"LocalToken","type":{"kind":"struct","fields":[{"name":"custody","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"burn_limit_per_message","type":"u64"},{"name":"messages_sent","type":"u64"},{"name":"messages_received","type":"u64"},{"name":"amount_sent","type":"u128"},{"name":"amount_received","type":"u128"},{"name":"bump","type":"u8"},{"name":"custody_bump","type":"u8"}]}},{"name":"LocalTokenAdded","type":{"kind":"struct","fields":[{"name":"custody","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"LocalTokenRemoved","type":{"kind":"struct","fields":[{"name":"custody","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"MessageTransmitter","docs":["Main state of the MessageTransmitter program"],"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"pending_owner","type":"pubkey"},{"name":"attester_manager","type":"pubkey"},{"name":"pauser","type":"pubkey"},{"name":"paused","type":"bool"},{"name":"local_domain","type":"u32"},{"name":"version","type":"u32"},{"name":"signature_threshold","type":"u32"},{"name":"enabled_attesters","type":{"vec":"pubkey"}},{"name":"max_message_body_size","type":"u64"}]}},{"name":"MinFeeControllerSet","type":{"kind":"struct","fields":[{"name":"new_min_fee_controller","type":"pubkey"}]}},{"name":"MinFeeSet","type":{"kind":"struct","fields":[{"name":"new_min_fee","type":"u32"}]}},{"name":"MintAndWithdraw","type":{"kind":"struct","fields":[{"name":"mint_recipient","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"mint_token","type":"pubkey"},{"name":"fee_collected","type":"u64"}]}},{"name":"OwnershipTransferStarted","type":{"kind":"struct","fields":[{"name":"previous_owner","type":"pubkey"},{"name":"new_owner","type":"pubkey"}]}},{"name":"OwnershipTransferred","type":{"kind":"struct","fields":[{"name":"previous_owner","type":"pubkey"},{"name":"new_owner","type":"pubkey"}]}},{"name":"Pause","type":{"kind":"struct","fields":[]}},{"name":"PauseParams","type":{"kind":"struct","fields":[]}},{"name":"PauserChanged","type":{"kind":"struct","fields":[{"name":"new_address","type":"pubkey"}]}},{"name":"RemoteTokenMessenger","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"token_messenger","type":"pubkey"}]}},{"name":"RemoteTokenMessengerAdded","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"token_messenger","type":"pubkey"}]}},{"name":"RemoteTokenMessengerRemoved","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"token_messenger","type":"pubkey"}]}},{"name":"RemoveLocalTokenParams","type":{"kind":"struct","fields":[]}},{"name":"RemoveRemoteTokenMessengerParams","type":{"kind":"struct","fields":[]}},{"name":"SetBurnLimitPerMessage","type":{"kind":"struct","fields":[{"name":"token","type":"pubkey"},{"name":"burn_limit_per_message","type":"u64"}]}},{"name":"SetFeeRecipientParams","type":{"kind":"struct","fields":[{"name":"new_fee_recipient","type":"pubkey"}]}},{"name":"SetMaxBurnAmountPerMessageParams","type":{"kind":"struct","fields":[{"name":"burn_limit_per_message","type":"u64"}]}},{"name":"SetMinFeeControllerParams","type":{"kind":"struct","fields":[{"name":"new_min_fee_controller","type":"pubkey"}]}},{"name":"SetMinFeeParams","type":{"kind":"struct","fields":[{"name":"new_min_fee","type":"u32"}]}},{"name":"SetTokenController","type":{"kind":"struct","fields":[{"name":"token_controller","type":"pubkey"}]}},{"name":"SetTokenControllerParams","type":{"kind":"struct","fields":[{"name":"token_controller","type":"pubkey"}]}},{"name":"TokenCustodyBurned","type":{"kind":"struct","fields":[{"name":"custody_token_account","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"TokenMessenger","type":{"kind":"struct","fields":[{"name":"denylister","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"pending_owner","type":"pubkey"},{"name":"message_body_version","type":"u32"},{"name":"authority_bump","type":"u8"},{"name":"fee_recipient","type":"pubkey"},{"name":"min_fee_controller","type":"pubkey"},{"name":"min_fee","type":"u32"}]}},{"name":"TokenMinter","type":{"kind":"struct","fields":[{"name":"token_controller","type":"pubkey"},{"name":"pauser","type":"pubkey"},{"name":"paused","type":"bool"},{"name":"bump","type":"u8"}]}},{"name":"TokenPair","type":{"kind":"struct","fields":[{"name":"remote_domain","type":"u32"},{"name":"remote_token","type":"pubkey"},{"name":"local_token","type":"pubkey"},{"name":"bump","type":"u8"}]}},{"name":"TokenPairLinked","type":{"kind":"struct","fields":[{"name":"local_token","type":"pubkey"},{"name":"remote_domain","type":"u32"},{"name":"remote_token","type":"pubkey"}]}},{"name":"TokenPairUnlinked","type":{"kind":"struct","fields":[{"name":"local_token","type":"pubkey"},{"name":"remote_domain","type":"u32"},{"name":"remote_token","type":"pubkey"}]}},{"name":"TransferOwnershipParams","type":{"kind":"struct","fields":[{"name":"new_owner","type":"pubkey"}]}},{"name":"UnDenylisted","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"}]}},{"name":"UndenylistParams","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"}]}},{"name":"UninkTokenPairParams","type":{"kind":"struct","fields":[]}},{"name":"Unpause","type":{"kind":"struct","fields":[]}},{"name":"UnpauseParams","type":{"kind":"struct","fields":[]}},{"name":"UpdateDenylisterParams","type":{"kind":"struct","fields":[{"name":"new_denylister","type":"pubkey"}]}},{"name":"UpdatePauserParams","type":{"kind":"struct","fields":[{"name":"new_pauser","type":"pubkey"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/clone.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.json b/olddocs/archivekbot2/idls/clone.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.json new file mode 100644 index 0000000..9f57bed --- /dev/null +++ b/olddocs/archivekbot2/idls/clone.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"clone","instructions":[{"name":"initializeClone","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":true,"isSigner":false},{"name":"collateralMint","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"cometCollateralIldLiquidatorFeeBps","type":"u16"},{"name":"cometOnassetIldLiquidatorFeeBps","type":"u16"},{"name":"borrowLiquidatorFeeBps","type":"u16"},{"name":"treasuryAddress","type":"publicKey"},{"name":"collateralOracleIndex","type":"u8"},{"name":"collateralizationRatio","type":"u8"}]},{"name":"initializePools","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeOracles","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateCloneParameters","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"clone","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CloneParameters"}}]},{"name":"updatePoolParameters","accounts":[{"name":"auth","isMut":false,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u8"},{"name":"params","type":{"defined":"PoolParameters"}}]},{"name":"updateOracles","accounts":[{"name":"auth","isMut":false,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UpdateOracleParameters"}}]},{"name":"initializeUser","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"authority","type":"publicKey"}]},{"name":"addPool","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":false,"isSigner":false},{"name":"onassetTokenAccount","isMut":false,"isSigner":false},{"name":"underlyingAssetMint","isMut":false,"isSigner":false},{"name":"underlyingAssetTokenAccount","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"minOvercollateralRatio","type":"u16"},{"name":"maxLiquidationOvercollateralRatio","type":"u16"},{"name":"liquidityTradingFeeBps","type":"u16"},{"name":"treasuryTradingFeeBps","type":"u16"},{"name":"ilHealthScoreCoefficient","type":"u16"},{"name":"positionHealthScoreCoefficient","type":"u16"},{"name":"oracleInfoIndex","type":"u8"}]},{"name":"updatePrices","accounts":[{"name":"oracles","isMut":true,"isSigner":false}],"args":[{"name":"oracleIndices","type":"bytes"}]},{"name":"initializeBorrowPosition","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"poolIndex","type":"u8"},{"name":"onassetAmount","type":"u64"},{"name":"collateralAmount","type":"u64"}]},{"name":"addCollateralToBorrow","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":false,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"borrowIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"withdrawCollateralFromBorrow","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"borrowIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"payBorrowDebt","accounts":[{"name":"payer","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"payerOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"user","type":"publicKey"},{"name":"borrowIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"borrowMore","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"oracles","isMut":false,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"borrowIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"addCollateralToComet","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"withdrawCollateralFromComet","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"addLiquidityToComet","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false}],"args":[{"name":"poolIndex","type":"u8"},{"name":"collateralAmount","type":"u64"}]},{"name":"withdrawLiquidityFromComet","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false}],"args":[{"name":"cometPositionIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"liquidateCometCollateralIld","accounts":[{"name":"liquidator","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"oracles","isMut":false,"isSigner":false},{"name":"collateralMint","isMut":true,"isSigner":false},{"name":"liquidatorCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"user","type":"publicKey"},{"name":"cometPositionIndex","type":"u8"}]},{"name":"liquidateCometOnassetIld","accounts":[{"name":"liquidator","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"oracles","isMut":false,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"liquidatorOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"liquidatorCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"user","type":"publicKey"},{"name":"cometPositionIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"liquidateBorrowPosition","accounts":[{"name":"liquidator","isMut":false,"isSigner":true},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"liquidatorCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"liquidatorOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"user","type":"publicKey"},{"name":"borrowIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"collectLpRewards","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"cometPositionIndex","type":"u8"}]},{"name":"payImpermanentLossDebt","accounts":[{"name":"payer","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"collateralMint","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"payerCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"payerOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"user","type":"publicKey"},{"name":"cometPositionIndex","type":"u8"},{"name":"amount","type":"u64"},{"name":"paymentType","type":{"defined":"PaymentType"}}]},{"name":"closeUserAccount","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"destination","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"wrapAsset","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"underlyingAssetTokenAccount","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"userAssetTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"poolIndex","type":"u8"}]},{"name":"unwrapOnasset","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"underlyingAssetTokenAccount","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"userAssetTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"poolIndex","type":"u8"}]},{"name":"removeCometPosition","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false}],"args":[{"name":"cometPositionIndex","type":"u8"}]},{"name":"swap","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"collateralMint","isMut":true,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false},{"name":"treasuryOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"treasuryCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"cloneStaking","isMut":false,"isSigner":false,"isOptional":true},{"name":"userStakingAccount","isMut":false,"isSigner":false,"isOptional":true},{"name":"cloneStakingProgram","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"poolIndex","type":"u8"},{"name":"quantity","type":"u64"},{"name":"quantityIsInput","type":"bool"},{"name":"quantityIsCollateral","type":"bool"},{"name":"resultThreshold","type":"u64"}]},{"name":"createTokenMetadata","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"metaplexProgram","isMut":false,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"metadataArgs","type":{"defined":"MetadataArgs"}}]},{"name":"removePool","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"underlyingAssetMint","isMut":false,"isSigner":false},{"name":"underlyingAssetTokenAccount","isMut":true,"isSigner":false},{"name":"treasuryAssetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"poolIndex","type":"u8"}]}],"accounts":[{"name":"Clone","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"auth","type":{"array":["publicKey",10]}},{"name":"bump","type":"u8"},{"name":"collateral","type":{"defined":"Collateral"}},{"name":"cometCollateralIldLiquidatorFeeBps","type":"u16"},{"name":"cometOnassetIldLiquidatorFeeBps","type":"u16"},{"name":"borrowLiquidatorFeeBps","type":"u16"},{"name":"treasuryAddress","type":"publicKey"},{"name":"eventCounter","type":"u64"},{"name":"nonAuthLiquidationsEnabled","type":"bool"}]}},{"name":"Pools","type":{"kind":"struct","fields":[{"name":"pools","type":{"vec":{"defined":"Pool"}}}]}},{"name":"Oracles","type":{"kind":"struct","fields":[{"name":"oracles","type":{"vec":{"defined":"OracleInfo"}}}]}},{"name":"User","type":{"kind":"struct","fields":[{"name":"borrows","type":{"vec":{"defined":"Borrow"}}},{"name":"comet","type":{"defined":"Comet"}}]}}],"types":[{"name":"MetadataArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"AssetInfo","type":{"kind":"struct","fields":[{"name":"onassetMint","type":"publicKey"},{"name":"oracleInfoIndex","type":"u8"},{"name":"ilHealthScoreCoefficient","type":"u16"},{"name":"positionHealthScoreCoefficient","type":"u16"},{"name":"minOvercollateralRatio","type":"u16"},{"name":"maxLiquidationOvercollateralRatio","type":"u16"}]}},{"name":"OracleInfo","type":{"kind":"struct","fields":[{"name":"source","type":{"defined":"OracleSource"}},{"name":"address","type":"publicKey"},{"name":"price","type":"i64"},{"name":"expo","type":"u8"},{"name":"status","type":{"defined":"Status"}},{"name":"lastUpdateSlot","type":"u64"},{"name":"rescaleFactor","type":"u8"}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"underlyingAssetTokenAccount","type":"publicKey"},{"name":"committedCollateralLiquidity","type":"u64"},{"name":"collateralIld","type":"i64"},{"name":"onassetIld","type":"i64"},{"name":"treasuryTradingFeeBps","type":"u16"},{"name":"liquidityTradingFeeBps","type":"u16"},{"name":"assetInfo","type":{"defined":"AssetInfo"}},{"name":"status","type":{"defined":"Status"}}]}},{"name":"Collateral","type":{"kind":"struct","fields":[{"name":"oracleInfoIndex","type":"u8"},{"name":"mint","type":"publicKey"},{"name":"vault","type":"publicKey"},{"name":"collateralizationRatio","type":"u8"},{"name":"scale","type":"u8"}]}},{"name":"Comet","type":{"kind":"struct","fields":[{"name":"collateralAmount","type":"u64"},{"name":"positions","type":{"vec":{"defined":"LiquidityPosition"}}}]}},{"name":"LiquidityPosition","type":{"kind":"struct","fields":[{"name":"poolIndex","type":"u8"},{"name":"committedCollateralLiquidity","type":"u64"},{"name":"collateralIldRebate","type":"i64"},{"name":"onassetIldRebate","type":"i64"}]}},{"name":"Borrow","type":{"kind":"struct","fields":[{"name":"poolIndex","type":"u8"},{"name":"borrowedOnasset","type":"u64"},{"name":"collateralAmount","type":"u64"}]}},{"name":"PaymentType","type":{"kind":"enum","variants":[{"name":"Onasset"},{"name":"Collateral"},{"name":"CollateralFromWallet"}]}},{"name":"CloneParameters","type":{"kind":"enum","variants":[{"name":"AddAuth","fields":[{"name":"address","type":"publicKey"}]},{"name":"RemoveAuth","fields":[{"name":"address","type":"publicKey"}]},{"name":"CometCollateralLiquidationFee","fields":[{"name":"value","type":"u16"}]},{"name":"CometOnassetLiquidationFee","fields":[{"name":"value","type":"u16"}]},{"name":"BorrowLiquidationFee","fields":[{"name":"value","type":"u16"}]},{"name":"TreasuryAddress","fields":[{"name":"address","type":"publicKey"}]},{"name":"CollateralizationRatio","fields":[{"name":"value","type":"u8"}]},{"name":"NonAuthLiquidationsEnabled","fields":[{"name":"value","type":"bool"}]}]}},{"name":"UpdateOracleParameters","type":{"kind":"enum","variants":[{"name":"Add","fields":[{"name":"address","type":"publicKey"},{"name":"source","type":{"defined":"OracleSource"}},{"name":"rescale_factor","type":{"option":"u8"}}]},{"name":"Remove","fields":[{"name":"index","type":"u8"}]},{"name":"Modify","fields":[{"name":"index","type":"u8"},{"name":"address","type":{"option":"publicKey"}},{"name":"source","type":{"option":{"defined":"OracleSource"}}},{"name":"status","type":{"option":{"defined":"Status"}}}]}]}},{"name":"PoolParameters","type":{"kind":"enum","variants":[{"name":"Status","fields":[{"name":"value","type":{"defined":"Status"}}]},{"name":"TreasuryTradingFee","fields":[{"name":"value","type":"u16"}]},{"name":"LiquidityTradingFee","fields":[{"name":"value","type":"u16"}]},{"name":"OracleInfoIndex","fields":[{"name":"value","type":"u8"}]},{"name":"MinOvercollateralRatio","fields":[{"name":"value","type":"u16"}]},{"name":"MaxLiquidationOvercollateralRatio","fields":[{"name":"value","type":"u16"}]},{"name":"IlHealthScoreCoefficient","fields":[{"name":"value","type":"u16"}]},{"name":"PositionHealthScoreCoefficient","fields":[{"name":"value","type":"u16"}]}]}},{"name":"Status","type":{"kind":"enum","variants":[{"name":"Active"},{"name":"Frozen"},{"name":"Extraction"},{"name":"Liquidation"},{"name":"Deprecation"}]}},{"name":"OracleSource","type":{"kind":"enum","variants":[{"name":"PYTH"},{"name":"SWITCHBOARD"}]}}],"events":[{"name":"SwapEvent","fields":[{"name":"eventId","type":"u64","index":false},{"name":"userAddress","type":"publicKey","index":false},{"name":"poolIndex","type":"u8","index":false},{"name":"inputIsCollateral","type":"bool","index":false},{"name":"input","type":"u64","index":false},{"name":"output","type":"u64","index":false},{"name":"tradingFee","type":"u64","index":false},{"name":"treasuryFee","type":"u64","index":false}]},{"name":"LiquidityDelta","fields":[{"name":"eventId","type":"u64","index":false},{"name":"userAddress","type":"publicKey","index":false},{"name":"poolIndex","type":"u8","index":false},{"name":"committedCollateralDelta","type":"i64","index":false},{"name":"collateralIldDelta","type":"i64","index":false},{"name":"onassetIldDelta","type":"i64","index":false}]},{"name":"PoolState","fields":[{"name":"eventId","type":"u64","index":false},{"name":"poolIndex","type":"u8","index":false},{"name":"onassetIld","type":"i64","index":false},{"name":"collateralIld","type":"i64","index":false},{"name":"committedCollateralLiquidity","type":"u64","index":false},{"name":"poolPrice","type":"u64","index":false},{"name":"poolScale","type":"u32","index":false}]},{"name":"BorrowUpdate","fields":[{"name":"eventId","type":"u64","index":false},{"name":"poolIndex","type":"u8","index":false},{"name":"userAddress","type":"publicKey","index":false},{"name":"isLiquidation","type":"bool","index":false},{"name":"collateralSupplied","type":"u64","index":false},{"name":"collateralDelta","type":"i64","index":false},{"name":"borrowedAmount","type":"u64","index":false},{"name":"borrowedDelta","type":"i64","index":false}]},{"name":"CometCollateralUpdate","fields":[{"name":"eventId","type":"u64","index":false},{"name":"userAddress","type":"publicKey","index":false},{"name":"collateralSupplied","type":"u64","index":false},{"name":"collateralDelta","type":"i64","index":false}]}],"errors":[{"code":6000,"name":"Unauthorized","msg":"Unauthorized"},{"code":6001,"name":"InvalidMintCollateralRatio","msg":"Invalid Mint Collateral Ratio"},{"code":6002,"name":"IntTypeConversionError","msg":"Integer Type Conversion Error"},{"code":6003,"name":"PoolNotFound","msg":"Pool Not Found"},{"code":6004,"name":"BumpNotFound","msg":"Bump not found"},{"code":6005,"name":"InvalidTokenAmount","msg":"Invalid Token Amount"},{"code":6006,"name":"ExpectedAccountNotFound","msg":"Expected Account Not Found"},{"code":6007,"name":"OutdatedOracle","msg":"Outdated Oracle"},{"code":6008,"name":"CheckedMathError","msg":"Checked Math Error"},{"code":6009,"name":"BorrowPositionUnableToLiquidate","msg":"Mint Position Unable to Liquidate"},{"code":6010,"name":"HealthScoreTooLow","msg":"Health Score Too Low"},{"code":6011,"name":"InvalidInputCollateralAccount","msg":"Invalid input collateral account"},{"code":6012,"name":"InvalidAccountLoaderOwner","msg":"Invalid Account loader owner"},{"code":6013,"name":"InvalidInputPositionIndex","msg":"Invalid input position index"},{"code":6014,"name":"InvalidTokenAccountBalance","msg":"Invalid token account balance"},{"code":6015,"name":"InequalityComparisonViolated","msg":"Inequality comparison violated"},{"code":6016,"name":"CometNotEmpty","msg":"Comet Not Empty"},{"code":6017,"name":"NotSubjectToLiquidation","msg":"Not Subject to Liquidation"},{"code":6018,"name":"LiquidationAmountTooLarge","msg":"Liquidation amount too large"},{"code":6019,"name":"NoRemainingAccountsSupplied","msg":"No remaining accounts supplied"},{"code":6020,"name":"InvalidOvercollateralizationRatios","msg":"Invalid over-collateralization ratios"},{"code":6021,"name":"IncorrectOracleAddress","msg":"Incorrect oracle address provided"},{"code":6022,"name":"InvalidValueRange","msg":"Value is in an incorrect range"},{"code":6023,"name":"InvalidAssetStability","msg":"Asset stable requirement violated"},{"code":6024,"name":"SlippageToleranceExceeded","msg":"Slippage tolerance exceeded"},{"code":6025,"name":"RequireOnlyonUSDCollateral","msg":"Collateral must be all in onUSD"},{"code":6026,"name":"RequireAllPositionsClosed","msg":"Positions must be all closed"},{"code":6027,"name":"FailedToLoadPyth","msg":"Failed to Load Pyth Price Feed"},{"code":6028,"name":"StatusPreventsAction","msg":"Status Prevents Action"},{"code":6029,"name":"PoolEmpty","msg":"Pool is empty"},{"code":6030,"name":"NoLiquidityToWithdraw","msg":"No liquidity to withdraw"},{"code":6031,"name":"InvalidStatus","msg":"Invalid Status"},{"code":6032,"name":"AuthArrayFull","msg":"Auth Array Full"},{"code":6033,"name":"AuthNotFound","msg":"Auth Not Found"},{"code":6034,"name":"InvalidOracleIndex","msg":"Invalid oracle index"},{"code":6035,"name":"InvalidPaymentType","msg":"Invalid Payment Type"},{"code":6036,"name":"InvalidConversion","msg":"Invalid Conversion"},{"code":6037,"name":"AuthAlreadyExists","msg":"Auth Already Exists"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/dflow_v4.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.json b/olddocs/archivekbot2/idls/dflow_v4.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.json new file mode 100644 index 0000000..d0a0765 --- /dev/null +++ b/olddocs/archivekbot2/idls/dflow_v4.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.json @@ -0,0 +1 @@ +{"address":"DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH","metadata":{"name":"swap_orchestrator","version":"0.1.0","spec":"0.1.0","description":"DFlow Aggregator program"},"instructions":[{"name":"close_empty_token_account","docs":["Closes a token account if it has a zero balance"],"discriminator":[232,75,140,136,250,78,224,188],"accounts":[{"name":"token_account","docs":["The token account to close (supports both spl_token and spl_token_2022)"],"writable":true},{"name":"authority","docs":["The authority of the token account. Must sign."],"signer":true},{"name":"destination","docs":["The account to receive the rent from closing the token account."],"writable":true},{"name":"token_program","docs":["The token program (either spl_token or spl_token_2022)"]}],"args":[]},{"name":"close_order","docs":["Closes an order, returning tokens from the order vault"],"discriminator":[90,103,209,28,7,63,168,4],"accounts":[{"name":"order","writable":true},{"name":"order_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,100,101,114,95,118,97,117,108,116]},{"kind":"account","path":"order"}]}},{"name":"return_input_token_account","docs":["Account to which leftover tokens in the order vault should be returned."],"writable":true,"relations":["order"]},{"name":"return_rent_to","docs":["Account to which rent for the order account and vault should be returned."],"writable":true,"relations":["order"]},{"name":"closer","docs":["Account that is authorized to close the order"],"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_referral_token_account_idempotent","docs":["Create a referral token account if it doesn't already exist"],"discriminator":[46,232,41,144,85,37,170,175],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"project"},{"name":"referral_account"},{"name":"referral_token_account","docs":["The referral token account to create. This is a PDA of the Referral program whose seeds are","[b\"referral_ata\", referral_account, mint]."],"writable":true},{"name":"mint"},{"name":"system_program"},{"name":"token_program"},{"name":"referral_program"}],"args":[]},{"name":"fill_order","docs":["Fills an order, closing the order after filling it"],"discriminator":[232,122,115,25,199,143,136,162],"accounts":[{"name":"order","writable":true},{"name":"order_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,100,101,114,95,118,97,117,108,116]},{"kind":"account","path":"order"}]}},{"name":"output_token_account","docs":["Account to which output from the fill should be sent."],"writable":true,"relations":["order"]},{"name":"return_input_token_account","docs":["Account to which leftover tokens in the order vault should be returned."],"writable":true,"relations":["order"]},{"name":"return_rent_to","docs":["Account to which rent for the order account and vault should be returned."],"writable":true,"relations":["order"]},{"name":"filler_input_token_account","writable":true},{"name":"input_mint","docs":["Input mint for the swap. Must be specified if the order inputs a mint for which the filler's","associated token account doesn't exist."],"optional":true},{"name":"filler_output_token_account","writable":true},{"name":"output_mint","docs":["Output mint for the swap. Must be specified if the order outputs native SOL or a mint for","which the filler's associated token account doesn't exist."],"optional":true},{"name":"filler","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"params","type":{"defined":{"name":"FillOrderParams"}}}]},{"name":"init_market_ledger_idempotent","docs":["Initialize a market ledger if it doesn't already exist"],"discriminator":[183,43,139,79,125,225,35,159],"accounts":[{"name":"predictions_program"},{"name":"market_ledger"},{"name":"market_ledger_redemption_vault"},{"name":"market_ledger_order_vault"},{"name":"market_ledger_reduce_yes_vault"},{"name":"market_ledger_reduce_no_vault"},{"name":"settlement_escrow"},{"name":"escrow_mint"},{"name":"market_yes_outcome_mint"},{"name":"market_no_outcome_mint"},{"name":"payer"},{"name":"outcome_token_program"},{"name":"escrow_token_program"},{"name":"system_program"}],"args":[{"name":"market_id","type":{"array":["u8",32]}}]},{"name":"open_order","docs":["Opens an order, escrowing the input tokens in the order vault"],"discriminator":[206,88,88,143,38,136,50,224],"accounts":[{"name":"order","docs":["Order account that the instruction will create to store the order details"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,100,101,114]},{"kind":"account","path":"return_input_token_account"},{"kind":"arg","path":"params.order_account_id"}]}},{"name":"order_vault","docs":["Token account that the instruction will create to escrow the input tokens for the order"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,100,101,114,95,118,97,117,108,116]},{"kind":"account","path":"order"}]}},{"name":"input_token_account","docs":["Token account from which input tokens should be withdrawn to fund the order"],"writable":true},{"name":"output_token_account","docs":["Account to which output from the fill should be sent. If the order specifies that it should","output native SOL, then this should be the user's wallet, although any account is allowed.","If the order doesn't specify that it should output native SOL, then this must be an SPL","token account, and the token account's mint determines the order's output mint."]},{"name":"return_input_token_account","docs":["Account to which leftover tokens in the order vault should be returned when the order is","filled or closed. If the input is native SOL, this should be the user's wallet, although any","account is allowed. If the input is wrapped SOL or an SPL token, this must be an SPL token","account for the input mint."]},{"name":"input_mint"},{"name":"user_token_authority","docs":["Authority of the input token account"],"signer":true},{"name":"fee_payer","docs":["Account that pays the fee budget for the order"],"writable":true,"signer":true},{"name":"fee_receiver","docs":["Account that receives the fee budget funds"],"writable":true},{"name":"rent_depositor","docs":["Depositor for the order account and vault account rent"],"writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"OpenOrderParams"}}}]},{"name":"swap","docs":["Executes a token swap"],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":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":"params","type":{"defined":{"name":"SwapParams"}}}]},{"name":"swap2","docs":["Executes a token swap with a slippage fee"],"discriminator":[65,75,63,76,235,91,91,136],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":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":"params","type":{"defined":{"name":"Swap2Params"}}}]},{"name":"swap2_with_destination","docs":["Executes a token swap with a slippage fee. Outputs to the specified destination account."],"discriminator":[95,123,213,246,122,1,86,231],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":true},{"name":"destination_token_account","writable":true},{"name":"destination_token_authority"},{"name":"destination_mint"},{"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":"params","type":{"defined":{"name":"Swap2Params"}}}]},{"name":"swap2_with_destination_native","docs":["Executes a token swap with a slippage fee. Outputs native SOL to the specified destination","account by unwrapping WSOL."],"discriminator":[222,100,184,146,186,196,105,165],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":true},{"name":"destination_account","docs":["The destination account that will receive the native SOL"],"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":"params","type":{"defined":{"name":"Swap2Params"}}}]},{"name":"swap_with_destination","docs":["Executes a token swap. Outputs to the specified destination account."],"discriminator":[168,172,24,77,197,156,135,101],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":true},{"name":"destination_token_account","writable":true},{"name":"destination_token_authority"},{"name":"destination_mint"},{"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":"params","type":{"defined":{"name":"SwapParams"}}}]},{"name":"swap_with_destination_native","docs":["Executes a token swap. Outputs native SOL to the specified destination account by unwrapping","WSOL."],"discriminator":[205,77,127,108,241,32,196,195],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":true},{"name":"destination_account","docs":["The destination account that will receive the native SOL"],"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":"params","type":{"defined":{"name":"SwapParams"}}}]},{"name":"transfer_fee","docs":["Transfer an SPL token fee if the receiving account can receive it"],"discriminator":[129,164,196,21,177,48,180,162],"accounts":[{"name":"from"},{"name":"to"},{"name":"authority"},{"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":"amount","type":"u64"}]},{"name":"transfer_sol","docs":["Transfer native SOL from one account to another"],"discriminator":[78,10,236,247,109,117,21,76],"accounts":[{"name":"from"},{"name":"to"},{"name":"system_program"}],"args":[{"name":"lamports","type":"u64"}]},{"name":"transfer_to_sponsor","docs":["Transfer an SPL token to a sponsor's token account, creating the sponsor's token account if","necessary."],"discriminator":[155,179,130,151,196,139,253,163],"accounts":[{"name":"user_token_authority"},{"name":"user_token_account"},{"name":"sponsor"},{"name":"sponsor_token_account"},{"name":"mint"},{"name":"token_program"},{"name":"associated_token_program"},{"name":"system_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"unwrap_sol","docs":["Unwrap all SOL in the provided wrapped SOL token account"],"discriminator":[99,40,14,105,45,107,172,201],"accounts":[{"name":"owner"},{"name":"wrapped_sol_associated_token_account"},{"name":"token_program"}],"args":[]},{"name":"wrap_sol","docs":["Wrap SOL, creating a wrapped SOL associated token account if necessary"],"discriminator":[47,62,155,172,131,205,37,201],"accounts":[{"name":"from"},{"name":"wrapped_sol_associated_token_account"},{"name":"native_mint"},{"name":"token_program"},{"name":"associated_token_program"},{"name":"system_program"}],"args":[{"name":"lamports","type":"u64"}]}],"accounts":[{"name":"Order","discriminator":[134,173,223,185,77,86,28,51]}],"events":[{"name":"FeeEvent","discriminator":[73,79,78,127,184,213,13,220]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]}],"errors":[{"code":15000,"name":"SwapCpiFailed","msg":"Swap CPI failed"},{"code":15001,"name":"SlippageLimitExceeded","msg":"Slippage limit exceeded"},{"code":15002,"name":"FeeAccountNotSpecified","msg":"Fee account must be specified when platform_fee_bps is nonzero"},{"code":15003,"name":"InvalidFeeAccountOwner","msg":"Invalid fee account owner"},{"code":15004,"name":"InputAmountIsZero","msg":"input_amount must be greater than 0"},{"code":15005,"name":"OutputTokenAccountMismatch","msg":"Swap output token account did not match the order's output_token_account"},{"code":15006,"name":"OrderNotFillableAfterLastFillableSlot","msg":"Order's last_fillable_slot has passed"},{"code":15007,"name":"FillOrderNotAuthorized","msg":"filler is not authorized to fill the order"},{"code":15008,"name":"MintAccountNotSpecified","msg":"Instruction must specify mint account"},{"code":15009,"name":"ReturnInputTokenAccountMismatch","msg":"return_input_token_account did not match the order's return_input_token_account"},{"code":15010,"name":"ReturnRentToMismatch","msg":"return_rent_to did not match the order's return_rent_to"},{"code":15011,"name":"CloseOrderNotAuthorized","msg":"closer is not authorized to close the order"},{"code":15012,"name":"InvalidReturnInputTokenAccount","msg":"Invalid return_input_token_account"},{"code":15013,"name":"InvalidOutputTokenAccount","msg":"Invalid output_token_account"},{"code":15014,"name":"CouldNotReturnInput","msg":"Couldn't return input from vault"},{"code":15015,"name":"LegInputOverconsumption","msg":"Leg consumed more than allowed input amount"},{"code":15016,"name":"RouteInputUnderconsumption","msg":"Route consumed less than minimum allowed amount of input"},{"code":15017,"name":"LegConsumedOutput","msg":"Leg consumed output"},{"code":15018,"name":"LegConsumedLamports","msg":"Leg consumed lamports"},{"code":15019,"name":"PumpFunAmmCreatedFeeAta","msg":"Pump.fun AMM leg created fee/buyback ATA"},{"code":15020,"name":"SkippedLeg","msg":"A leg in the route was skipped"},{"code":15021,"name":"DestinationTokenAccountDoesNotExist","msg":"Destination token account does not exist"},{"code":15022,"name":"Token2022ProgramNotProvided","msg":"Token 2022 Program account not provided"},{"code":15023,"name":"InvalidLegInputTokenAccount","msg":"Invalid leg input token account"},{"code":15024,"name":"RaydiumLaunchlabCreatedFeeAta","msg":"Raydium Launchlab leg created fee ATA"},{"code":15025,"name":"LegUnderproducedOutput","msg":"Leg produced less output than expected"},{"code":15026,"name":"NoSettlementTokensReceived","msg":"No settlement tokens were received during the swap"},{"code":15027,"name":"InsufficientAccountsForOpenPredictionsOrder","msg":"Insufficient accounts provided for OpenPredictionsOrder action"},{"code":15028,"name":"InvalidTokenAccount","msg":"Invalid token account. Must be either spl_token or spl_token_2022 account"},{"code":15029,"name":"InvalidCloseAuthorityForNativeMint","msg":"InitAtaIdempotent cannot set a close authority on a WSOL ATA"},{"code":15998,"name":"InvalidLegAction"},{"code":15999,"name":"InvalidInstructionData"}],"types":[{"name":"A","type":{"kind":"enum","variants":[{"name":"B","fields":[{"defined":{"name":"C"}}]},{"name":"J","fields":[{"defined":{"name":"J"}}]}]}},{"name":"Action","type":{"kind":"enum","variants":[{"name":"WhirlpoolsSwap","fields":[{"defined":{"name":"WhirlpoolsSwapOptions"}}]},{"name":"ClearpoolsSwap","fields":[{"defined":{"name":"ClearpoolsSwapOptions"}}]},{"name":"RaydiumAmmSwap","fields":[{"defined":{"name":"RaydiumAmmSwapOptions"}}]},{"name":"LifinityV2Swap","fields":[{"defined":{"name":"LifinityV2SwapOptions"}}]},{"name":"MeteoraDlmmSwap","fields":[{"defined":{"name":"MeteoraDlmmSwapOptions"}}]},{"name":"RaydiumClmmSwap","fields":[{"defined":{"name":"RaydiumClmmSwapOptions"}}]},{"name":"RaydiumClmmSwapV2","fields":[{"defined":{"name":"RaydiumClmmSwapV2Options"}}]},{"name":"PhoenixSwap","fields":[{"defined":{"name":"PhoenixSwapOptions"}}]},{"name":"PumpFunBuy","fields":[{"defined":{"name":"PumpFunBuyOptions"}}]},{"name":"PumpFunSell","fields":[{"defined":{"name":"PumpFunSellOptions"}}]},{"name":"GammaSwap","fields":[{"defined":{"name":"GammaSwapOptions"}}]},{"name":"ObricV2Swap","fields":[{"defined":{"name":"ObricV2SwapOptions"}}]},{"name":"PumpFunAmmBuy","fields":[{"defined":{"name":"PumpFunAmmBuyOptions"}}]},{"name":"PumpFunAmmSell","fields":[{"defined":{"name":"PumpFunAmmSellOptions"}}]},{"name":"SolFiSwap","fields":[{"defined":{"name":"SolFiSwapOptions"}}]},{"name":"RubiconSwap","fields":[{"defined":{"name":"RubiconSwapOptions"}}]},{"name":"MeteoraDammV1Swap","fields":[{"defined":{"name":"MeteoraDammV1SwapOptions"}}]},{"name":"RaydiumCpSwap","fields":[{"defined":{"name":"RaydiumCpSwapOptions"}}]},{"name":"StabbleStableSwap","fields":[{"defined":{"name":"StabbleStableSwapOptions"}}]},{"name":"TesseraVSwap","fields":[{"defined":{"name":"TesseraVSwapOptions"}}]},{"name":"MeteoraDammV2Swap","fields":[{"defined":{"name":"MeteoraDammV2SwapOptions"}}]},{"name":"RaydiumLaunchlabSwap","fields":[{"defined":{"name":"RaydiumLaunchlabSwapOptions"}}]},{"name":"MeteoraDbcSwap","fields":[{"defined":{"name":"MeteoraDbcSwapOptions"}}]},{"name":"HumidiFiSwap","fields":[{"defined":{"name":"HumidiFiSwapOptions"}}]},{"name":"WhirlpoolsSwapV2","fields":[{"defined":{"name":"WhirlpoolsSwapV2Options"}}]},{"name":"MeteoraDlmmSwapV2","fields":[{"defined":{"name":"MeteoraDlmmSwapV2Options"}}]},{"name":"ZeroFiSwap","fields":[{"defined":{"name":"ZeroFiSwapOptions"}}]},{"name":"AlphaQSwap","fields":[{"defined":{"name":"AlphaQSwapOptions"}}]},{"name":"TokenSwap","fields":[{"defined":{"name":"TokenSwapOptions"}}]},{"name":"SolFiV2Swap","fields":[{"defined":{"name":"SolFiV2SwapOptions"}}]},{"name":"MozartSwap","fields":[{"defined":{"name":"MozartSwapOptions"}}]},{"name":"DFlowDynamicRouteV1","fields":[{"defined":{"name":"DFlowDynamicRouteV1Options"}}]},{"name":"HeavenSwap","fields":[{"defined":{"name":"HeavenSwapOptions"}}]},{"name":"NexusSwap","fields":[{"defined":{"name":"NexusSwapOptions"}}]},{"name":"SarosDlmmSwap","fields":[{"defined":{"name":"SarosDlmmSwapOptions"}}]},{"name":"TransferFee","fields":[{"defined":{"name":"TransferFeeOptions"}}]},{"name":"TransferFeeWithMint","fields":[{"defined":{"name":"TransferFeeOptions"}}]},{"name":"RecordId","fields":[{"defined":{"name":"RecordIdOptions"}}]},{"name":"RecordId2","fields":[{"defined":{"name":"RecordId2Options"}}]},{"name":"ManifestSwap","fields":[{"defined":{"name":"ManifestSwapOptions"}}]},{"name":"BisonFiSwap","fields":[{"defined":{"name":"BisonFiSwapOptions"}}]},{"name":"SanctumInfinitySwap","fields":[{"defined":{"name":"SanctumInfinitySwapOptions"}}]},{"name":"SanctumInfinityLiquidity","fields":[{"defined":{"name":"SanctumInfinityLiquidityOptions"}}]},{"name":"OpenPredictionsOrder","fields":[{"defined":{"name":"OpenPredictionsOrderOptions"}}]},{"name":"ScorchSwap","fields":[{"defined":{"name":"ScorchSwapOptions"}}]},{"name":"IncludeAccount"},{"name":"StabbleWeightedSwap","fields":[{"defined":{"name":"StabbleWeightedSwapOptions"}}]},{"name":"VertigoSwap","fields":[{"defined":{"name":"VertigoSwapOptions"}}]},{"name":"SetMinimumLegOutputs","fields":[{"defined":{"name":"SetMinimumLegOutputsOptions"}}]},{"name":"SetMinimumLegPrices","fields":[{"defined":{"name":"SetMinimumLegPricesOptions"}}]},{"name":"SetSponsor"},{"name":"WrapSol","fields":[{"defined":{"name":"WrapSolOptions"}}]},{"name":"UnwrapSol"},{"name":"KDEXSwap","fields":[{"defined":{"name":"KDEXSwapOptions"}}]},{"name":"DeriverseSwap","fields":[{"defined":{"name":"DeriverseSwapOptions"}}]},{"name":"VaultSwap","fields":[{"defined":{"name":"VaultSwapOptions"}}]},{"name":"MetaDaoSwap","fields":[{"defined":{"name":"MetaDaoSwapOptions"}}]},{"name":"D","fields":[{"defined":{"name":"O"}}]},{"name":"XoCashExchangeSwap","fields":[{"defined":{"name":"XoCashExchangeSwapOptions"}}]},{"name":"LemmingsFiSwap","fields":[{"defined":{"name":"LemmingsFiSwapOptions"}}]},{"name":"InitAtaIdempotent"},{"name":"SetMaxUnderconsumptionBps","fields":[{"defined":{"name":"SetMaxUnderconsumptionBpsOptions"}}]},{"name":"GhostSwap","fields":[{"defined":{"name":"GhostSwapOptions"}}]},{"name":"TransferFeeV2","fields":[{"defined":{"name":"TransferFeeOptions"}}]},{"name":"TransferFeeWithMintV2","fields":[{"defined":{"name":"TransferFeeOptions"}}]},{"name":"PumpFunBuyV2","fields":[{"defined":{"name":"PumpFunBuyV2Options"}}]},{"name":"PumpFunSellV2","fields":[{"defined":{"name":"PumpFunSellV2Options"}}]}]}},{"name":"AlphaQDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"AlphaQSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"BisonFiDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"BisonFiSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"C","type":{"kind":"struct","fields":[{"name":"_padding","type":"u8"}]}},{"name":"ClearpoolsSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"a_to_b","type":"bool"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"DFlowDynamicRouteV1Options","type":{"kind":"struct","fields":[{"name":"candidate_actions","type":{"vec":{"defined":{"name":"DynamicRouteV1CandidateAction"}}}},{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"DeriverseSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"DynamicRouteV1CandidateAction","type":{"kind":"enum","variants":[{"name":"SolFi","fields":[{"defined":{"name":"SolFiDynamicRouteV1Options"}}]},{"name":"Rubicon","fields":[{"defined":{"name":"RubiconDynamicRouteV1Options"}}]},{"name":"TesseraV","fields":[{"defined":{"name":"TesseraVDynamicRouteV1Options"}}]},{"name":"HumidiFi","fields":[{"defined":{"name":"HumidiFiDynamicRouteV1Options"}}]},{"name":"SolFiV2","fields":[{"defined":{"name":"SolFiV2DynamicRouteV1Options"}}]},{"name":"Mozart","fields":[{"defined":{"name":"MozartDynamicRouteV1Options"}}]},{"name":"ObricV2","fields":[{"defined":{"name":"ObricV2DynamicRouteV1Options"}}]},{"name":"Nexus","fields":[{"defined":{"name":"NexusDynamicRouteV1Options"}}]},{"name":"BisonFi","fields":[{"defined":{"name":"BisonFiDynamicRouteV1Options"}}]},{"name":"ZeroFi","fields":[{"defined":{"name":"ZeroFiDynamicRouteV1Options"}}]},{"name":"Manifest","fields":[{"defined":{"name":"ManifestDynamicRouteV1Options"}}]},{"name":"AlphaQ","fields":[{"defined":{"name":"AlphaQDynamicRouteV1Options"}}]},{"name":"LemmingsFi","fields":[{"defined":{"name":"LemmingsFiDynamicRouteV1Options"}}]}]}},{"name":"FeeEvent","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"FillOrderParams","type":{"kind":"struct","fields":[{"name":"swap_actions","type":{"vec":{"defined":{"name":"Action"}}}},{"name":"platform_fee_ubps","type":"u32"}]}},{"name":"GammaSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"endorsed","type":"bool"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"GhostSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"HeavenSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"HumidiFiDynamicRouteV1Options","type":{"kind":"struct","fields":[{"name":"swap_id","type":"u64"}]}},{"name":"HumidiFiSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"swap_id","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"J","type":{"kind":"struct","fields":[{"name":"_padding","type":"u8"}]}},{"name":"KDEXSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"LegPrice","type":{"kind":"struct","fields":[{"name":"output_atoms_per_input_token","type":"u64"},{"name":"input_mint_decimals","type":"u8"}]}},{"name":"LemmingsFiDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"LemmingsFiSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"LifinityV2SwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"ManifestDynamicRouteV1Options","type":{"kind":"struct","fields":[{"name":"include_global","type":"bool"}]}},{"name":"ManifestSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MetaDaoSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MeteoraDammV1SwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MeteoraDammV2SwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MeteoraDbcSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"is_rate_limiter_applied","type":"bool"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MeteoraDlmmSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"num_bin_arrays","type":"u8"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MeteoraDlmmSwapV2Options","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"num_bin_arrays","type":"u8"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MozartDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"MozartSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"NexusDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"NexusSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"O","type":{"kind":"struct","fields":[{"name":"a","type":{"vec":{"defined":{"name":"A"}}}},{"name":"amount","type":"u64"},{"name":"orchestrator_flags","type":{"defined":{"name":"OrchestratorFlags"}}},{"name":"pfs","type":"u16"},{"name":"dfs","type":"u16"}]}},{"name":"ObricV2DynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"ObricV2SwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"OpenOrderParams","type":{"kind":"struct","fields":[{"name":"input_amount","type":"u64"},{"name":"quoted_out_amount","docs":["Quoted output amount after platform fee"],"type":"u64"},{"name":"fee_budget","docs":["Maximum amount in lamports that the fee payer will pay to have the order filled or closed"],"type":"u64"},{"name":"order_account_id","type":"u64"},{"name":"fillable_for_slots","docs":["Number of slots after the slot in which the order is opened for which the order is fillable.","If zero, the order is only fillable in the slot in which the open transaction landed."],"type":"u32"},{"name":"slippage_bps","docs":["Max allowed slippage in basis points. Along with `quoted_out_amount`, this is used to","calculate the minimum allowed output amount."],"type":"u16"},{"name":"closer","docs":["Account that is authorized to close the order"],"type":"pubkey"},{"name":"flags","docs":["Flags for the order"],"type":"u8"}]}},{"name":"OpenPredictionsOrderOptions","type":{"kind":"struct","fields":[{"name":"nonce","type":"u64"},{"name":"order_outcome","type":"u8"},{"name":"quoted_out_amount","docs":["Quoted output amount for the predictions order"],"type":"u64"},{"name":"slippage_bps","docs":["Slippage for the predictions order (separate from swap slippage)"],"type":"u16"},{"name":"platform_fee_recipient_vault","type":"pubkey"},{"name":"platform_fee_scale","type":"u16"}]}},{"name":"OrchestratorFlags","type":{"kind":"struct","fields":[{"name":"flags","type":"u8"}]}},{"name":"Order","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"closer","docs":["Account that is authorized to close the order"],"type":"pubkey"},{"name":"output_token_account","docs":["Account to which output from the fill should be sent. If the order specifies that it should","output native SOL, then this should be the user's wallet, although any account is allowed.","If the order doesn't specify that it should output native SOL, then this must be an SPL","token account, and the token account's mint determines the order's output mint."],"type":"pubkey"},{"name":"return_input_token_account","docs":["Account to which leftover tokens in the order vault should be returned when the order is","filled or closed. If the input is native SOL, this should be the user's wallet, although any","account is allowed. If the input is wrapped SOL or an SPL token, this must be an SPL token","account for the input mint."],"type":"pubkey"},{"name":"return_rent_to","docs":["Account to which rent for the account should be returned when the account is closed"],"type":"pubkey"},{"name":"id","docs":["ID used to produce a unique PDA for the order account"],"type":"u64"},{"name":"quoted_out_amount","type":"u64"},{"name":"last_fillable_slot","docs":["Highest slot at which the order can be filled"],"type":"u64"},{"name":"slippage_bps","docs":["Max allowed slippage in basis points. Along with `quoted_out_amount`, this is used to","calculate the minimum allowed output amount for the order."],"type":"u16"},{"name":"bump","type":"u8"},{"name":"vault_bump","docs":["Bump seed for the vault token account associated with the order"],"type":"u8"},{"name":"flags","docs":["Flags for the order"],"type":"u8"},{"name":"_padding1","type":"u8"},{"name":"_padding2","type":"u8"},{"name":"_padding3","type":"u8"}]}},{"name":"PhoenixSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"side","type":{"defined":{"name":"Side"}}},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunAmmBuyOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunAmmSellOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunBuyOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunBuyV2Options","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunSellOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunSellV2Options","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RaydiumAmmSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RaydiumClmmSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"num_remaining_accounts","type":"u8"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RaydiumClmmSwapV2Options","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"num_remaining_accounts","type":"u8"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RaydiumCpSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RaydiumLaunchlabSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RecordId2Options","type":{"kind":"struct","fields":[{"name":"id","type":{"array":["u8",4]}}]}},{"name":"RecordIdOptions","type":{"kind":"struct","fields":[{"name":"id","type":{"array":["u8",76]}}]}},{"name":"RubiconDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"RubiconSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"SanctumInfinityLiquidityOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"lst_value_calc_accs","type":"u8"},{"name":"lst_index","type":"u32"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"SanctumInfinitySwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"src_lst_value_calc_accs","type":"u8"},{"name":"dst_lst_value_calc_accs","type":"u8"},{"name":"src_lst_index","type":"u32"},{"name":"dst_lst_index","type":"u32"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"SarosDlmmSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"ScorchSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"id","type":"u128"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"SetMaxUnderconsumptionBpsOptions","type":{"kind":"struct","fields":[{"name":"max_underconsumption_bps","type":"u16"}]}},{"name":"SetMinimumLegOutputsOptions","type":{"kind":"struct","fields":[{"name":"minimum_outputs","docs":["Minimum allowed output amount for each swap leg"],"type":{"vec":"u64"}}]}},{"name":"SetMinimumLegPricesOptions","type":{"kind":"struct","fields":[{"name":"minimum_prices","docs":["Minimum allowed price for each swap leg"],"type":{"vec":{"defined":{"name":"LegPrice"}}}}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Bid"},{"name":"Ask"}]}},{"name":"SolFiDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"SolFiSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"SolFiV2DynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"SolFiV2SwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"StabbleStableSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"StabbleWeightedSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"Swap2Params","type":{"kind":"struct","fields":[{"name":"actions","type":{"vec":{"defined":{"name":"Action"}}}},{"name":"quoted_out_amount","docs":["Quoted output amount for the swap after platform fee"],"type":"u64"},{"name":"slippage_bps","docs":["Max allowed slippage in basis points. Along with `quoted_out_amount`, this is used to","calculate the minimum allowed output amount for the swap."],"type":"u16"},{"name":"platform_fee_bps","docs":["Platform fee in basis points. If nonzero, this percentage of the output amount will be","transferred to the platform fee account, and the instruction must include the platform fee","account as the last account. The platform fee account must be a valid token account for the","output mint, and it must specify the public key of the Referral program's DFlow project as","its owner."],"type":"u16"},{"name":"positive_slippage_fee_limit_pct","docs":["Limit on the positive slippage fee in percent. The positive slippage fee is limited to the","lesser of (1) the excess actual out amount above the quoted amount and (2) this percentage","of the actual out amount after platform fee."],"type":"u8"}]}},{"name":"SwapEvent","type":{"kind":"struct","fields":[{"name":"amm","type":"pubkey"},{"name":"input_mint","type":"pubkey"},{"name":"input_amount","type":"u64"},{"name":"output_mint","type":"pubkey"},{"name":"output_amount","type":"u64"}]}},{"name":"SwapParams","type":{"kind":"struct","fields":[{"name":"actions","type":{"vec":{"defined":{"name":"Action"}}}},{"name":"quoted_out_amount","docs":["Quoted output amount for the swap after platform fee"],"type":"u64"},{"name":"slippage_bps","docs":["Max allowed slippage in basis points. Along with `quoted_out_amount`, this is used to","calculate the minimum allowed output amount for the swap."],"type":"u16"},{"name":"platform_fee_bps","docs":["Platform fee in basis points. If nonzero, this percentage of the output amount will be","transferred to the platform fee account, and the instruction must include the platform fee","account as the last account. The platform fee account must be a valid token account for the","output mint, and it must specify the public key of the Referral program's DFlow project as","its owner."],"type":"u16"}]}},{"name":"TesseraVDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"TesseraVSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"TokenSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"TransferFeeOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"VaultSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"VertigoSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"WhirlpoolsSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"a_to_b","type":"bool"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"WhirlpoolsSwapV2Options","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"a_to_b","type":"bool"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"WrapSolOptions","type":{"kind":"struct","fields":[{"name":"lamports","type":"u64"}]}},{"name":"XoCashExchangeSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"ZeroFiDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"ZeroFiSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/drift_v2.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.json b/olddocs/archivekbot2/idls/drift_v2.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.json new file mode 100644 index 0000000..ce5f81e --- /dev/null +++ b/olddocs/archivekbot2/idls/drift_v2.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.json @@ -0,0 +1 @@ +{"version":"2.150.0","name":"drift","instructions":[{"name":"initializeUser","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"subAccountId","type":"u16"},{"name":"name","type":{"array":["u8",32]}}]},{"name":"initializeUserStats","accounts":[{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeSignedMsgUserOrders","accounts":[{"name":"signedMsgUserOrders","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"numOrders","type":"u16"}]},{"name":"resizeSignedMsgUserOrders","accounts":[{"name":"signedMsgUserOrders","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"user","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"numOrders","type":"u16"}]},{"name":"initializeSignedMsgWsDelegates","accounts":[{"name":"signedMsgWsDelegates","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"delegates","type":{"vec":"publicKey"}}]},{"name":"changeSignedMsgWsDelegateStatus","accounts":[{"name":"signedMsgWsDelegates","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"delegate","type":"publicKey"},{"name":"add","type":"bool"}]},{"name":"initializeFuelOverflow","accounts":[{"name":"fuelOverflow","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"sweepFuel","accounts":[{"name":"fuelOverflow","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"signer","isMut":false,"isSigner":true}],"args":[]},{"name":"resetFuelSeason","accounts":[{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[]},{"name":"initializeReferrerName","accounts":[{"name":"referrerName","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":{"array":["u8",32]}}]},{"name":"deposit","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"},{"name":"reduceOnly","type":"bool"}]},{"name":"withdraw","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"},{"name":"reduceOnly","type":"bool"}]},{"name":"transferDeposit","accounts":[{"name":"fromUser","isMut":true,"isSigner":false},{"name":"toUser","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarketVault","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"transferPools","accounts":[{"name":"fromUser","isMut":true,"isSigner":false},{"name":"toUser","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"depositFromSpotMarketVault","isMut":true,"isSigner":false},{"name":"depositToSpotMarketVault","isMut":true,"isSigner":false},{"name":"borrowFromSpotMarketVault","isMut":true,"isSigner":false},{"name":"borrowToSpotMarketVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false}],"args":[{"name":"depositFromMarketIndex","type":"u16"},{"name":"depositToMarketIndex","type":"u16"},{"name":"borrowFromMarketIndex","type":"u16"},{"name":"borrowToMarketIndex","type":"u16"},{"name":"depositAmount","type":{"option":"u64"}},{"name":"borrowAmount","type":{"option":"u64"}}]},{"name":"transferPerpPosition","accounts":[{"name":"fromUser","isMut":true,"isSigner":false},{"name":"toUser","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":{"option":"i64"}}]},{"name":"placePerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}}]},{"name":"cancelOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"orderId","type":{"option":"u32"}}]},{"name":"cancelOrderByUserId","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"userOrderId","type":"u8"}]},{"name":"cancelOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"marketType","type":{"option":{"defined":"MarketType"}}},{"name":"marketIndex","type":{"option":"u16"}},{"name":"direction","type":{"option":{"defined":"PositionDirection"}}}]},{"name":"cancelOrdersByIds","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"orderIds","type":{"vec":"u32"}}]},{"name":"modifyOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"orderId","type":{"option":"u32"}},{"name":"modifyOrderParams","type":{"defined":"ModifyOrderParams"}}]},{"name":"modifyOrderByUserId","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"userOrderId","type":"u8"},{"name":"modifyOrderParams","type":{"defined":"ModifyOrderParams"}}]},{"name":"placeAndTakePerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}},{"name":"successCondition","type":{"option":"u32"}}]},{"name":"placeAndMakePerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"taker","isMut":true,"isSigner":false},{"name":"takerStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}},{"name":"takerOrderId","type":"u32"}]},{"name":"placeAndMakeSignedMsgPerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"taker","isMut":true,"isSigner":false},{"name":"takerStats","isMut":true,"isSigner":false},{"name":"takerSignedMsgUserOrders","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}},{"name":"signedMsgOrderUuid","type":{"array":["u8",8]}}]},{"name":"placeSignedMsgTakerOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"signedMsgUserOrders","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"ixSysvar","isMut":false,"isSigner":false,"docs":["the supplied Sysvar could be anything else.","The Instruction Sysvar has not been implemented","in the Anchor framework yet, so this is the safe approach."]}],"args":[{"name":"signedMsgOrderParamsMessageBytes","type":"bytes"},{"name":"isDelegateSigner","type":"bool"}]},{"name":"placeSpotOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}}]},{"name":"placeAndTakeSpotOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}},{"name":"fulfillmentType","type":{"option":{"defined":"SpotFulfillmentType"}}},{"name":"makerOrderId","type":{"option":"u32"}}]},{"name":"placeAndMakeSpotOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"taker","isMut":true,"isSigner":false},{"name":"takerStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}},{"name":"takerOrderId","type":"u32"},{"name":"fulfillmentType","type":{"option":{"defined":"SpotFulfillmentType"}}}]},{"name":"placeOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"vec":{"defined":"OrderParams"}}}]},{"name":"beginSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"outSpotMarketVault","isMut":true,"isSigner":false},{"name":"inSpotMarketVault","isMut":true,"isSigner":false},{"name":"outTokenAccount","isMut":true,"isSigner":false},{"name":"inTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"amountIn","type":"u64"}]},{"name":"endSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"outSpotMarketVault","isMut":true,"isSigner":false},{"name":"inSpotMarketVault","isMut":true,"isSigner":false},{"name":"outTokenAccount","isMut":true,"isSigner":false},{"name":"inTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"limitPrice","type":{"option":"u64"}},{"name":"reduceOnly","type":{"option":{"defined":"SwapReduceOnly"}}}]},{"name":"updateUserName","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"name","type":{"array":["u8",32]}}]},{"name":"updateUserCustomMarginRatio","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"marginRatio","type":"u32"}]},{"name":"updateUserPerpPositionCustomMarginRatio","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"perpMarketIndex","type":"u16"},{"name":"marginRatio","type":"u16"}]},{"name":"updateUserMarginTradingEnabled","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"marginTradingEnabled","type":"bool"}]},{"name":"updateUserPoolId","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"poolId","type":"u8"}]},{"name":"updateUserDelegate","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"delegate","type":"publicKey"}]},{"name":"updateUserReduceOnly","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"reduceOnly","type":"bool"}]},{"name":"updateUserProtectedMakerOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"protectedMakerModeConfig","isMut":true,"isSigner":false}],"args":[{"name":"subAccountId","type":"u16"},{"name":"protectedMakerOrders","type":"bool"}]},{"name":"deleteUser","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true}],"args":[]},{"name":"forceDeleteUser","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":false},{"name":"keeper","isMut":true,"isSigner":true},{"name":"driftSigner","isMut":false,"isSigner":false}],"args":[]},{"name":"deleteSignedMsgUserOrders","accounts":[{"name":"signedMsgUserOrders","isMut":true,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"reclaimRent","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"enableUserHighLeverageMode","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"highLeverageModeConfig","isMut":true,"isSigner":false}],"args":[{"name":"subAccountId","type":"u16"}]},{"name":"fillPerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"fillerStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"orderId","type":{"option":"u32"}},{"name":"makerOrderId","type":{"option":"u32"}}]},{"name":"revertFill","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"fillerStats","isMut":true,"isSigner":false}],"args":[]},{"name":"fillSpotOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"fillerStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"orderId","type":{"option":"u32"}},{"name":"fulfillmentType","type":{"option":{"defined":"SpotFulfillmentType"}}},{"name":"makerOrderId","type":{"option":"u32"}}]},{"name":"triggerOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false}],"args":[{"name":"orderId","type":"u32"}]},{"name":"forceCancelOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false}],"args":[]},{"name":"updateUserIdle","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false}],"args":[]},{"name":"logUserBalances","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"user","isMut":true,"isSigner":false}],"args":[]},{"name":"disableUserHighLeverageMode","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"user","isMut":true,"isSigner":false},{"name":"highLeverageModeConfig","isMut":true,"isSigner":false}],"args":[{"name":"disableMaintenance","type":"bool"}]},{"name":"updateUserStatsReferrerStatus","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"userStats","isMut":true,"isSigner":false}],"args":[]},{"name":"adminUpdateUserStatsPausedOperations","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"pausedOperations","type":"u8"}]},{"name":"settlePnl","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"settleMultiplePnls","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":false,"isSigner":false}],"args":[{"name":"marketIndexes","type":{"vec":"u16"}},{"name":"mode","type":{"defined":"SettlePnlMode"}}]},{"name":"settleFundingPayment","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false}],"args":[]},{"name":"settleExpiredMarket","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"liquidatePerp","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"liquidatorMaxBaseAssetAmount","type":"u64"},{"name":"limitPrice","type":{"option":"u64"}}]},{"name":"liquidatePerpWithFill","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"liquidateSpot","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"assetMarketIndex","type":"u16"},{"name":"liabilityMarketIndex","type":"u16"},{"name":"liquidatorMaxLiabilityTransfer","type":"u128"},{"name":"limitPrice","type":{"option":"u64"}}]},{"name":"liquidateSpotWithSwapBegin","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"liabilitySpotMarketVault","isMut":true,"isSigner":false},{"name":"assetSpotMarketVault","isMut":true,"isSigner":false},{"name":"liabilityTokenAccount","isMut":true,"isSigner":false},{"name":"assetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"assetMarketIndex","type":"u16"},{"name":"liabilityMarketIndex","type":"u16"},{"name":"swapAmount","type":"u64"}]},{"name":"liquidateSpotWithSwapEnd","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"liabilitySpotMarketVault","isMut":true,"isSigner":false},{"name":"assetSpotMarketVault","isMut":true,"isSigner":false},{"name":"liabilityTokenAccount","isMut":true,"isSigner":false},{"name":"assetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"assetMarketIndex","type":"u16"},{"name":"liabilityMarketIndex","type":"u16"}]},{"name":"liquidateBorrowForPerpPnl","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"perpMarketIndex","type":"u16"},{"name":"spotMarketIndex","type":"u16"},{"name":"liquidatorMaxLiabilityTransfer","type":"u128"},{"name":"limitPrice","type":{"option":"u64"}}]},{"name":"liquidatePerpPnlForDeposit","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"perpMarketIndex","type":"u16"},{"name":"spotMarketIndex","type":"u16"},{"name":"liquidatorMaxPnlTransfer","type":"u128"},{"name":"limitPrice","type":{"option":"u64"}}]},{"name":"setUserStatusToBeingLiquidated","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"resolvePerpPnlDeficit","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"spotMarketIndex","type":"u16"},{"name":"perpMarketIndex","type":"u16"}]},{"name":"resolvePerpBankruptcy","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"quoteSpotMarketIndex","type":"u16"},{"name":"marketIndex","type":"u16"}]},{"name":"resolveSpotBankruptcy","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"settleRevenueToInsuranceFund","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"spotMarketIndex","type":"u16"}]},{"name":"updateFundingRate","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"updatePrelaunchOracle","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":false,"isSigner":false},{"name":"oracle","isMut":true,"isSigner":false}],"args":[]},{"name":"updatePerpBidAskTwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"keeperStats","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"updateSpotMarketCumulativeInterest","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"spotMarketVault","isMut":false,"isSigner":false}],"args":[]},{"name":"updateAmms","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"marketIndexes","type":{"vec":"u16"}}]},{"name":"updateSpotMarketExpiry","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"expiryTs","type":"i64"}]},{"name":"updateUserQuoteAssetInsuranceStake","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"signer","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false}],"args":[]},{"name":"updateUserGovTokenInsuranceStake","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"signer","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false}],"args":[]},{"name":"updateDelegateUserGovTokenInsuranceStake","accounts":[{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":false,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeInsuranceFundStake","accounts":[{"name":"spotMarket","isMut":false,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"addInsuranceFundStake","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"requestRemoveInsuranceFundStake","accounts":[{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"cancelRequestRemoveInsuranceFundStake","accounts":[{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"removeInsuranceFundStake","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"beginInsuranceFundSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"outInsuranceFundVault","isMut":true,"isSigner":false},{"name":"inInsuranceFundVault","isMut":true,"isSigner":false},{"name":"outTokenAccount","isMut":true,"isSigner":false},{"name":"inTokenAccount","isMut":true,"isSigner":false},{"name":"ifRebalanceConfig","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"amountIn","type":"u64"}]},{"name":"endInsuranceFundSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"outInsuranceFundVault","isMut":true,"isSigner":false},{"name":"inInsuranceFundVault","isMut":true,"isSigner":false},{"name":"outTokenAccount","isMut":true,"isSigner":false},{"name":"inTokenAccount","isMut":true,"isSigner":false},{"name":"ifRebalanceConfig","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"}]},{"name":"transferProtocolIfSharesToRevenuePool","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"ifRebalanceConfig","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"depositIntoInsuranceFundStake","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"updatePythPullOracle","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"pythSolanaReceiver","isMut":false,"isSigner":false},{"name":"encodedVaa","isMut":false,"isSigner":false},{"name":"priceFeed","isMut":true,"isSigner":false}],"args":[{"name":"feedId","type":{"array":["u8",32]}},{"name":"params","type":"bytes"}]},{"name":"postPythPullOracleUpdateAtomic","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"pythSolanaReceiver","isMut":false,"isSigner":false},{"name":"guardianSet","isMut":false,"isSigner":false},{"name":"priceFeed","isMut":true,"isSigner":false}],"args":[{"name":"feedId","type":{"array":["u8",32]}},{"name":"params","type":"bytes"}]},{"name":"postMultiPythPullOracleUpdatesAtomic","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"pythSolanaReceiver","isMut":false,"isSigner":false},{"name":"guardianSet","isMut":false,"isSigner":false}],"args":[{"name":"params","type":"bytes"}]},{"name":"pauseSpotMarketDepositWithdraw","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"keeper","isMut":false,"isSigner":true},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":false,"isSigner":false}],"args":[]},{"name":"initialize","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":true,"isSigner":false},{"name":"quoteAssetMint","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeSpotMarket","accounts":[{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketMint","isMut":false,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"optimalUtilization","type":"u32"},{"name":"optimalBorrowRate","type":"u32"},{"name":"maxBorrowRate","type":"u32"},{"name":"oracleSource","type":{"defined":"OracleSource"}},{"name":"initialAssetWeight","type":"u32"},{"name":"maintenanceAssetWeight","type":"u32"},{"name":"initialLiabilityWeight","type":"u32"},{"name":"maintenanceLiabilityWeight","type":"u32"},{"name":"imfFactor","type":"u32"},{"name":"liquidatorFee","type":"u32"},{"name":"ifLiquidationFee","type":"u32"},{"name":"activeStatus","type":"bool"},{"name":"assetTier","type":{"defined":"AssetTier"}},{"name":"scaleInitialAssetWeightStart","type":"u64"},{"name":"withdrawGuardThreshold","type":"u64"},{"name":"orderTickSize","type":"u64"},{"name":"orderStepSize","type":"u64"},{"name":"ifTotalFactor","type":"u32"},{"name":"name","type":{"array":["u8",32]}}]},{"name":"deleteInitializedSpotMarket","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"initializeSerumFulfillmentConfig","accounts":[{"name":"baseSpotMarket","isMut":false,"isSigner":false},{"name":"quoteSpotMarket","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"serumProgram","isMut":false,"isSigner":false},{"name":"serumMarket","isMut":false,"isSigner":false},{"name":"serumOpenOrders","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"serumFulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"updateSerumFulfillmentConfigStatus","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"serumFulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}}]},{"name":"initializeOpenbookV2FulfillmentConfig","accounts":[{"name":"baseSpotMarket","isMut":false,"isSigner":false},{"name":"quoteSpotMarket","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"openbookV2Program","isMut":false,"isSigner":false},{"name":"openbookV2Market","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"openbookV2FulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"openbookV2FulfillmentConfigStatus","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"openbookV2FulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}}]},{"name":"initializePhoenixFulfillmentConfig","accounts":[{"name":"baseSpotMarket","isMut":false,"isSigner":false},{"name":"quoteSpotMarket","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"phoenixProgram","isMut":false,"isSigner":false},{"name":"phoenixMarket","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"phoenixFulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"phoenixFulfillmentConfigStatus","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"phoenixFulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}}]},{"name":"initializePerpMarket","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"ammBaseAssetReserve","type":"u128"},{"name":"ammQuoteAssetReserve","type":"u128"},{"name":"ammPeriodicity","type":"i64"},{"name":"ammPegMultiplier","type":"u128"},{"name":"oracleSource","type":{"defined":"OracleSource"}},{"name":"contractTier","type":{"defined":"ContractTier"}},{"name":"marginRatioInitial","type":"u32"},{"name":"marginRatioMaintenance","type":"u32"},{"name":"liquidatorFee","type":"u32"},{"name":"ifLiquidationFee","type":"u32"},{"name":"imfFactor","type":"u32"},{"name":"activeStatus","type":"bool"},{"name":"baseSpread","type":"u32"},{"name":"maxSpread","type":"u32"},{"name":"maxOpenInterest","type":"u128"},{"name":"maxRevenueWithdrawPerPeriod","type":"u64"},{"name":"quoteMaxInsurance","type":"u64"},{"name":"orderStepSize","type":"u64"},{"name":"orderTickSize","type":"u64"},{"name":"minOrderSize","type":"u64"},{"name":"concentrationCoefScale","type":"u128"},{"name":"curveUpdateIntensity","type":"u8"},{"name":"ammJitIntensity","type":"u8"},{"name":"name","type":{"array":["u8",32]}},{"name":"lpPoolId","type":"u8"}]},{"name":"initializeAmmCache","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"addMarketToAmmCache","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"deleteAmmCache","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[]},{"name":"updateInitialAmmCacheInfo","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[]},{"name":"initializePredictionMarket","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[]},{"name":"deleteInitializedPerpMarket","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"moveAmmPrice","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"baseAssetReserve","type":"u128"},{"name":"quoteAssetReserve","type":"u128"},{"name":"sqrtK","type":"u128"}]},{"name":"recenterPerpMarketAmm","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"pegMultiplier","type":"u128"},{"name":"sqrtK","type":"u128"}]},{"name":"recenterPerpMarketAmmCrank","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"depth","type":{"option":"u128"}}]},{"name":"updatePerpMarketAmmSummaryStats","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UpdatePerpMarketSummaryStatsParams"}}]},{"name":"updatePerpMarketExpiry","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"expiryTs","type":"i64"}]},{"name":"updatePerpMarketLpPoolPausedOperations","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"lpPausedOperations","type":"u8"}]},{"name":"updatePerpMarketLpPoolStatus","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[{"name":"lpStatus","type":"u8"}]},{"name":"updatePerpMarketLpPoolFeeTransferScalar","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"optionalLpFeeTransferScalar","type":{"option":"u8"}},{"name":"optionalLpNetPnlTransferScalar","type":{"option":"u8"}}]},{"name":"settleExpiredMarketPoolsToRevenuePool","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[]},{"name":"depositIntoPerpMarketFeePool","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"sourceVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"quoteSpotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"updatePerpMarketPnlPool","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositIntoSpotMarketVault","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"sourceVault","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositIntoSpotMarketRevenuePool","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"repegAmmCurve","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"newPegCandidate","type":"u128"}]},{"name":"updatePerpMarketAmmOracleTwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[]},{"name":"resetPerpMarketAmmOracleTwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[]},{"name":"updateK","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"sqrtK","type":"u128"}]},{"name":"updatePerpMarketMarginRatio","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"marginRatioInitial","type":"u32"},{"name":"marginRatioMaintenance","type":"u32"}]},{"name":"updatePerpMarketHighLeverageMarginRatio","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"marginRatioInitial","type":"u16"},{"name":"marginRatioMaintenance","type":"u16"}]},{"name":"updatePerpMarketFundingPeriod","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"fundingPeriod","type":"i64"}]},{"name":"updatePerpMarketMaxImbalances","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"unrealizedMaxImbalance","type":"u64"},{"name":"maxRevenueWithdrawPerPeriod","type":"u64"},{"name":"quoteMaxInsurance","type":"u64"}]},{"name":"updatePerpMarketLiquidationFee","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"liquidatorFee","type":"u32"},{"name":"ifLiquidationFee","type":"u32"}]},{"name":"updatePerpMarketLpPoolId","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"lpPoolId","type":"u8"}]},{"name":"updateInsuranceFundUnstakingPeriod","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"insuranceFundUnstakingPeriod","type":"i64"}]},{"name":"updateSpotMarketPoolId","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"poolId","type":"u8"}]},{"name":"updateSpotMarketLiquidationFee","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"liquidatorFee","type":"u32"},{"name":"ifLiquidationFee","type":"u32"}]},{"name":"updateWithdrawGuardThreshold","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"withdrawGuardThreshold","type":"u64"}]},{"name":"updateSpotMarketIfFactor","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"spotMarketIndex","type":"u16"},{"name":"userIfFactor","type":"u32"},{"name":"totalIfFactor","type":"u32"}]},{"name":"updateSpotMarketRevenueSettlePeriod","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"revenueSettlePeriod","type":"i64"}]},{"name":"updateSpotMarketStatus","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"status","type":{"defined":"MarketStatus"}}]},{"name":"updateSpotMarketPausedOperations","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"pausedOperations","type":"u8"}]},{"name":"updateSpotMarketAssetTier","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"assetTier","type":{"defined":"AssetTier"}}]},{"name":"updateSpotMarketMarginWeights","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"initialAssetWeight","type":"u32"},{"name":"maintenanceAssetWeight","type":"u32"},{"name":"initialLiabilityWeight","type":"u32"},{"name":"maintenanceLiabilityWeight","type":"u32"},{"name":"imfFactor","type":"u32"}]},{"name":"updateSpotMarketBorrowRate","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"optimalUtilization","type":"u32"},{"name":"optimalBorrowRate","type":"u32"},{"name":"maxBorrowRate","type":"u32"},{"name":"minBorrowRate","type":{"option":"u8"}}]},{"name":"updateSpotMarketMaxTokenDeposits","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxTokenDeposits","type":"u64"}]},{"name":"updateSpotMarketMaxTokenBorrows","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxTokenBorrowsFraction","type":"u16"}]},{"name":"updateSpotMarketScaleInitialAssetWeightStart","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"scaleInitialAssetWeightStart","type":"u64"}]},{"name":"updateSpotMarketOracle","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oldOracle","isMut":false,"isSigner":false}],"args":[{"name":"oracle","type":"publicKey"},{"name":"oracleSource","type":{"defined":"OracleSource"}},{"name":"skipInvariantCheck","type":"bool"}]},{"name":"updateSpotMarketStepSizeAndTickSize","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"stepSize","type":"u64"},{"name":"tickSize","type":"u64"}]},{"name":"updateSpotMarketMinOrderSize","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"orderSize","type":"u64"}]},{"name":"updateSpotMarketOrdersEnabled","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"ordersEnabled","type":"bool"}]},{"name":"updateSpotMarketIfPausedOperations","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"pausedOperations","type":"u8"}]},{"name":"updateSpotMarketName","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"name","type":{"array":["u8",32]}}]},{"name":"updatePerpMarketStatus","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"status","type":{"defined":"MarketStatus"}}]},{"name":"updatePerpMarketPausedOperations","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"pausedOperations","type":"u8"}]},{"name":"updatePerpMarketContractTier","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"contractTier","type":{"defined":"ContractTier"}}]},{"name":"updatePerpMarketImfFactor","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"imfFactor","type":"u32"},{"name":"unrealizedPnlImfFactor","type":"u32"}]},{"name":"updatePerpMarketUnrealizedAssetWeight","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"unrealizedInitialAssetWeight","type":"u32"},{"name":"unrealizedMaintenanceAssetWeight","type":"u32"}]},{"name":"updatePerpMarketConcentrationCoef","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"concentrationScale","type":"u128"}]},{"name":"updatePerpMarketCurveUpdateIntensity","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"curveUpdateIntensity","type":"u8"}]},{"name":"updatePerpMarketReferencePriceOffsetDeadbandPct","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"referencePriceOffsetDeadbandPct","type":"u8"}]},{"name":"updatePerpFeeStructure","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"feeStructure","type":{"defined":"FeeStructure"}}]},{"name":"updateSpotFeeStructure","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"feeStructure","type":{"defined":"FeeStructure"}}]},{"name":"updateInitialPctToLiquidate","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"initialPctToLiquidate","type":"u16"}]},{"name":"updateLiquidationDuration","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"liquidationDuration","type":"u8"}]},{"name":"updateLiquidationMarginBufferRatio","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"liquidationMarginBufferRatio","type":"u32"}]},{"name":"updateOracleGuardRails","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"oracleGuardRails","type":{"defined":"OracleGuardRails"}}]},{"name":"updateStateSettlementDuration","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"settlementDuration","type":"u16"}]},{"name":"updateStateMaxNumberOfSubAccounts","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"maxNumberOfSubAccounts","type":"u16"}]},{"name":"updateStateMaxInitializeUserFee","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"maxInitializeUserFee","type":"u16"}]},{"name":"updatePerpMarketOracle","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oldOracle","isMut":false,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[{"name":"oracle","type":"publicKey"},{"name":"oracleSource","type":{"defined":"OracleSource"}},{"name":"skipInvariantCheck","type":"bool"}]},{"name":"updatePerpMarketBaseSpread","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"baseSpread","type":"u32"}]},{"name":"updateAmmJitIntensity","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"ammJitIntensity","type":"u8"}]},{"name":"updatePerpMarketMaxSpread","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxSpread","type":"u32"}]},{"name":"updatePerpMarketStepSizeAndTickSize","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"stepSize","type":"u64"},{"name":"tickSize","type":"u64"}]},{"name":"updatePerpMarketName","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"name","type":{"array":["u8",32]}}]},{"name":"updatePerpMarketMinOrderSize","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"orderSize","type":"u64"}]},{"name":"updatePerpMarketMaxSlippageRatio","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxSlippageRatio","type":"u16"}]},{"name":"updatePerpMarketMaxFillReserveFraction","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxFillReserveFraction","type":"u16"}]},{"name":"updatePerpMarketMaxOpenInterest","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxOpenInterest","type":"u128"}]},{"name":"updatePerpMarketNumberOfUsers","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"numberOfUsers","type":{"option":"u32"}},{"name":"numberOfUsersWithBase","type":{"option":"u32"}}]},{"name":"updatePerpMarketFeeAdjustment","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"feeAdjustment","type":"i16"}]},{"name":"updateSpotMarketFeeAdjustment","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"feeAdjustment","type":"i16"}]},{"name":"updatePerpMarketProtectedMakerParams","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"protectedMakerLimitPriceDivisor","type":{"option":"u8"}},{"name":"protectedMakerDynamicDivisor","type":{"option":"u8"}}]},{"name":"updatePerpMarketOracleLowRiskSlotDelayOverride","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"oracleLowRiskSlotDelayOverride","type":"i8"}]},{"name":"updatePerpMarketAmmSpreadAdjustment","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"ammSpreadAdjustment","type":"i8"},{"name":"ammInventorySpreadAdjustment","type":"i8"},{"name":"referencePriceOffset","type":"i32"}]},{"name":"updatePerpMarketOracleSlotDelayOverride","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"oracleSlotDelayOverride","type":"i8"}]},{"name":"updateAdmin","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"admin","type":"publicKey"}]},{"name":"updateDiscountMint","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"discountMint","type":"publicKey"}]},{"name":"updateExchangeStatus","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"exchangeStatus","type":"u8"}]},{"name":"updatePerpAuctionDuration","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"minPerpAuctionDuration","type":"u8"}]},{"name":"updateSpotAuctionDuration","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"defaultSpotAuctionDuration","type":"u8"}]},{"name":"initializePrelaunchOracle","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"prelaunchOracle","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"PrelaunchOracleParams"}}]},{"name":"updatePrelaunchOracleParams","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"prelaunchOracle","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"PrelaunchOracleParams"}}]},{"name":"deletePrelaunchOracle","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"prelaunchOracle","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"perpMarketIndex","type":"u16"}]},{"name":"initializePythPullOracle","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"pythSolanaReceiver","isMut":false,"isSigner":false},{"name":"priceFeed","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"feedId","type":{"array":["u8",32]}}]},{"name":"initializePythLazerOracle","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lazerOracle","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"feedId","type":"u32"}]},{"name":"postPythLazerOracleUpdate","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"pythLazerStorage","isMut":false,"isSigner":false},{"name":"ixSysvar","isMut":false,"isSigner":false}],"args":[{"name":"pythMessage","type":"bytes"}]},{"name":"initializeHighLeverageModeConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"highLeverageModeConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxUsers","type":"u32"}]},{"name":"updateHighLeverageModeConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"highLeverageModeConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"maxUsers","type":"u32"},{"name":"reduceOnly","type":"bool"},{"name":"currentUsers","type":{"option":"u32"}}]},{"name":"initializeProtectedMakerModeConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"protectedMakerModeConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxUsers","type":"u32"}]},{"name":"updateProtectedMakerModeConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"protectedMakerModeConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"maxUsers","type":"u32"},{"name":"reduceOnly","type":"bool"},{"name":"currentUsers","type":{"option":"u32"}}]},{"name":"adminDeposit","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"adminTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"initializeIfRebalanceConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"ifRebalanceConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"IfRebalanceConfigParams"}}]},{"name":"updateIfRebalanceConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"ifRebalanceConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"IfRebalanceConfigParams"}}]},{"name":"updateFeatureBitFlagsMmOracle","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"zeroMmOracleFields","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[]},{"name":"updateFeatureBitFlagsMedianTriggerPrice","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"updateFeatureBitFlagsBuilderCodes","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"initializeRevenueShare","accounts":[{"name":"revenueShare","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeRevenueShareEscrow","accounts":[{"name":"escrow","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"numOrders","type":"u16"}]},{"name":"resizeRevenueShareEscrowOrders","accounts":[{"name":"escrow","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"numOrders","type":"u16"}]},{"name":"changeApprovedBuilder","accounts":[{"name":"escrow","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"builder","type":"publicKey"},{"name":"maxFeeBps","type":"u16"},{"name":"add","type":"bool"}]},{"name":"initializeLpPool","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"lpPoolTokenVault","isMut":true,"isSigner":false},{"name":"ammConstituentMapping","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"constituentCorrelations","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"lpPoolId","type":"u8"},{"name":"minMintFee","type":"i64"},{"name":"maxAum","type":"u128"},{"name":"maxSettleQuoteAmountPerMarket","type":"u64"},{"name":"whitelistMint","type":"publicKey"}]},{"name":"updateFeatureBitFlagsSettleLpPool","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"updateFeatureBitFlagsSwapLpPool","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"updateFeatureBitFlagsMintRedeemLpPool","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"initializeConstituent","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"constituentCorrelations","isMut":true,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":false,"isSigner":false},{"name":"spotMarketMint","isMut":false,"isSigner":false},{"name":"constituentVault","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"spotMarketIndex","type":"u16"},{"name":"decimals","type":"u8"},{"name":"maxWeightDeviation","type":"i64"},{"name":"swapFeeMin","type":"i64"},{"name":"swapFeeMax","type":"i64"},{"name":"maxBorrowTokenAmount","type":"u64"},{"name":"oracleStalenessThreshold","type":"u64"},{"name":"costToTrade","type":"i32"},{"name":"constituentDerivativeIndex","type":{"option":"i16"}},{"name":"constituentDerivativeDepegThreshold","type":"u64"},{"name":"derivativeWeight","type":"u64"},{"name":"volatility","type":"u64"},{"name":"gammaExecution","type":"u8"},{"name":"gammaInventory","type":"u8"},{"name":"xi","type":"u8"},{"name":"newConstituentCorrelations","type":{"vec":"i64"}}]},{"name":"updateConstituentStatus","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false}],"args":[{"name":"newStatus","type":"u8"}]},{"name":"updateConstituentPausedOperations","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false}],"args":[{"name":"pausedOperations","type":"u8"}]},{"name":"updateConstituentParams","accounts":[{"name":"lpPool","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false}],"args":[{"name":"constituentParams","type":{"defined":"ConstituentParams"}}]},{"name":"updateLpPoolParams","accounts":[{"name":"lpPool","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"lpPoolParams","type":{"defined":"LpPoolParams"}}]},{"name":"addAmmConstituentMappingData","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"ammConstituentMapping","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"ammConstituentMappingData","type":{"vec":{"defined":"AddAmmConstituentMappingDatum"}}}]},{"name":"updateAmmConstituentMappingData","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"ammConstituentMapping","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"ammConstituentMappingData","type":{"vec":{"defined":"AddAmmConstituentMappingDatum"}}}]},{"name":"removeAmmConstituentMappingData","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"ammConstituentMapping","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"perpMarketIndex","type":"u16"},{"name":"constituentIndex","type":"u16"}]},{"name":"updateConstituentCorrelationData","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"constituentCorrelations","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"index1","type":"u16"},{"name":"index2","type":"u16"},{"name":"correlation","type":"i64"}]},{"name":"updateLpConstituentTargetBase","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"keeper","isMut":true,"isSigner":true},{"name":"ammConstituentMapping","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"ammCache","isMut":false,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false}],"args":[]},{"name":"updateLpPoolAum","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"keeper","isMut":true,"isSigner":true},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[]},{"name":"updateAmmCache","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false},{"name":"quoteMarket","isMut":false,"isSigner":false}],"args":[]},{"name":"overrideAmmCacheInfo","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"overrideParams","type":{"defined":"OverrideAmmCacheParams"}}]},{"name":"lpPoolSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false},{"name":"constituentCorrelations","isMut":false,"isSigner":false},{"name":"constituentInTokenAccount","isMut":true,"isSigner":false},{"name":"constituentOutTokenAccount","isMut":true,"isSigner":false},{"name":"userInTokenAccount","isMut":true,"isSigner":false},{"name":"userOutTokenAccount","isMut":true,"isSigner":false},{"name":"inConstituent","isMut":true,"isSigner":false},{"name":"outConstituent","isMut":true,"isSigner":false},{"name":"inMarketMint","isMut":false,"isSigner":false},{"name":"outMarketMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"inAmount","type":"u64"},{"name":"minOutAmount","type":"u64"}]},{"name":"viewLpPoolSwapFees","accounts":[{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false},{"name":"constituentCorrelations","isMut":false,"isSigner":false},{"name":"constituentInTokenAccount","isMut":true,"isSigner":false},{"name":"constituentOutTokenAccount","isMut":true,"isSigner":false},{"name":"inConstituent","isMut":true,"isSigner":false},{"name":"outConstituent","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"inAmount","type":"u64"},{"name":"inTargetWeight","type":"i64"},{"name":"outTargetWeight","type":"i64"}]},{"name":"lpPoolAddLiquidity","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"inMarketMint","isMut":false,"isSigner":false},{"name":"inConstituent","isMut":true,"isSigner":false},{"name":"userInTokenAccount","isMut":true,"isSigner":false},{"name":"constituentInTokenAccount","isMut":true,"isSigner":false},{"name":"userLpTokenAccount","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false},{"name":"lpPoolTokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"inAmount","type":"u128"},{"name":"minMintAmount","type":"u64"}]},{"name":"lpPoolRemoveLiquidity","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"outMarketMint","isMut":false,"isSigner":false},{"name":"outConstituent","isMut":true,"isSigner":false},{"name":"userOutTokenAccount","isMut":true,"isSigner":false},{"name":"constituentOutTokenAccount","isMut":true,"isSigner":false},{"name":"userLpTokenAccount","isMut":true,"isSigner":false},{"name":"spotMarketTokenAccount","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false},{"name":"lpPoolTokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"ammCache","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"inAmount","type":"u64"},{"name":"minOutAmount","type":"u128"}]},{"name":"viewLpPoolAddLiquidityFees","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"inMarketMint","isMut":false,"isSigner":false},{"name":"inConstituent","isMut":false,"isSigner":false},{"name":"lpMint","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"inAmount","type":"u128"}]},{"name":"viewLpPoolRemoveLiquidityFees","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"outMarketMint","isMut":false,"isSigner":false},{"name":"outConstituent","isMut":false,"isSigner":false},{"name":"lpMint","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"inAmount","type":"u64"}]},{"name":"beginLpSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"signerOutTokenAccount","isMut":true,"isSigner":false,"docs":["Signer token accounts"]},{"name":"signerInTokenAccount","isMut":true,"isSigner":false},{"name":"constituentOutTokenAccount","isMut":true,"isSigner":false,"docs":["Constituent token accounts"]},{"name":"constituentInTokenAccount","isMut":true,"isSigner":false},{"name":"outConstituent","isMut":true,"isSigner":false,"docs":["Constituents"]},{"name":"inConstituent","isMut":true,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"amountIn","type":"u64"}]},{"name":"endLpSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"signerOutTokenAccount","isMut":true,"isSigner":false,"docs":["Signer token accounts"]},{"name":"signerInTokenAccount","isMut":true,"isSigner":false},{"name":"constituentOutTokenAccount","isMut":true,"isSigner":false,"docs":["Constituent token accounts"]},{"name":"constituentInTokenAccount","isMut":true,"isSigner":false},{"name":"outConstituent","isMut":true,"isSigner":false,"docs":["Constituents"]},{"name":"inConstituent","isMut":true,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"}]},{"name":"updateConstituentOracleInfo","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"keeper","isMut":true,"isSigner":true},{"name":"constituent","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[]},{"name":"depositToProgramVault","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"constituent","isMut":true,"isSigner":false},{"name":"constituentTokenAccount","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawFromProgramVault","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false},{"name":"constituentTokenAccount","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"settlePerpToLpPool","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"keeper","isMut":true,"isSigner":true},{"name":"ammCache","isMut":true,"isSigner":false},{"name":"quoteMarket","isMut":true,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false},{"name":"constituentQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"quoteTokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"AmmCache","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"cache","type":{"vec":{"defined":"CacheInfo"}}}]}},{"name":"OpenbookV2FulfillmentConfig","type":{"kind":"struct","fields":[{"name":"pubkey","type":"publicKey"},{"name":"openbookV2ProgramId","type":"publicKey"},{"name":"openbookV2Market","type":"publicKey"},{"name":"openbookV2MarketAuthority","type":"publicKey"},{"name":"openbookV2EventHeap","type":"publicKey"},{"name":"openbookV2Bids","type":"publicKey"},{"name":"openbookV2Asks","type":"publicKey"},{"name":"openbookV2BaseVault","type":"publicKey"},{"name":"openbookV2QuoteVault","type":"publicKey"},{"name":"marketIndex","type":"u16"},{"name":"fulfillmentType","type":{"defined":"SpotFulfillmentType"}},{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}},{"name":"padding","type":{"array":["u8",4]}}]}},{"name":"PhoenixV1FulfillmentConfig","type":{"kind":"struct","fields":[{"name":"pubkey","type":"publicKey"},{"name":"phoenixProgramId","type":"publicKey"},{"name":"phoenixLogAuthority","type":"publicKey"},{"name":"phoenixMarket","type":"publicKey"},{"name":"phoenixBaseVault","type":"publicKey"},{"name":"phoenixQuoteVault","type":"publicKey"},{"name":"marketIndex","type":"u16"},{"name":"fulfillmentType","type":{"defined":"SpotFulfillmentType"}},{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}},{"name":"padding","type":{"array":["u8",4]}}]}},{"name":"SerumV3FulfillmentConfig","type":{"kind":"struct","fields":[{"name":"pubkey","type":"publicKey"},{"name":"serumProgramId","type":"publicKey"},{"name":"serumMarket","type":"publicKey"},{"name":"serumRequestQueue","type":"publicKey"},{"name":"serumEventQueue","type":"publicKey"},{"name":"serumBids","type":"publicKey"},{"name":"serumAsks","type":"publicKey"},{"name":"serumBaseVault","type":"publicKey"},{"name":"serumQuoteVault","type":"publicKey"},{"name":"serumOpenOrders","type":"publicKey"},{"name":"serumSignerNonce","type":"u64"},{"name":"marketIndex","type":"u16"},{"name":"fulfillmentType","type":{"defined":"SpotFulfillmentType"}},{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}},{"name":"padding","type":{"array":["u8",4]}}]}},{"name":"HighLeverageModeConfig","type":{"kind":"struct","fields":[{"name":"maxUsers","type":"u32"},{"name":"currentUsers","type":"u32"},{"name":"reduceOnly","type":"u8"},{"name":"padding1","type":{"array":["u8",3]}},{"name":"currentMaintenanceUsers","type":"u32"},{"name":"padding2","type":{"array":["u8",24]}}]}},{"name":"IfRebalanceConfig","type":{"kind":"struct","fields":[{"name":"pubkey","type":"publicKey"},{"name":"totalInAmount","docs":["total amount to be sold"],"type":"u64"},{"name":"currentInAmount","docs":["amount already sold"],"type":"u64"},{"name":"currentOutAmount","docs":["amount already bought"],"type":"u64"},{"name":"currentOutAmountTransferred","docs":["amount already transferred to revenue pool"],"type":"u64"},{"name":"currentInAmountSinceLastTransfer","docs":["amount already bought in epoch"],"type":"u64"},{"name":"epochStartTs","docs":["start time of epoch"],"type":"i64"},{"name":"epochInAmount","docs":["amount already bought in epoch"],"type":"u64"},{"name":"epochMaxInAmount","docs":["max amount to swap in epoch"],"type":"u64"},{"name":"epochDuration","docs":["duration of epoch"],"type":"i64"},{"name":"outMarketIndex","docs":["market index to sell"],"type":"u16"},{"name":"inMarketIndex","docs":["market index to buy"],"type":"u16"},{"name":"maxSlippageBps","type":"u16"},{"name":"swapMode","type":"u8"},{"name":"status","type":"u8"},{"name":"padding2","type":{"array":["u8",32]}}]}},{"name":"InsuranceFundStake","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"ifShares","type":"u128"},{"name":"lastWithdrawRequestShares","type":"u128"},{"name":"ifBase","type":"u128"},{"name":"lastValidTs","type":"i64"},{"name":"lastWithdrawRequestValue","type":"u64"},{"name":"lastWithdrawRequestTs","type":"i64"},{"name":"costBasis","type":"i64"},{"name":"marketIndex","type":"u16"},{"name":"padding","type":{"array":["u8",14]}}]}},{"name":"ProtocolIfSharesTransferConfig","type":{"kind":"struct","fields":[{"name":"whitelistedSigners","type":{"array":["publicKey",4]}},{"name":"maxTransferPerEpoch","type":"u128"},{"name":"currentEpochTransfer","type":"u128"},{"name":"nextEpochTs","type":"i64"},{"name":"padding","type":{"array":["u128",8]}}]}},{"name":"LPPool","type":{"kind":"struct","fields":[{"name":"pubkey","docs":["address of the vault."],"type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"whitelistMint","type":"publicKey"},{"name":"constituentTargetBase","type":"publicKey"},{"name":"constituentCorrelations","type":"publicKey"},{"name":"maxAum","docs":["The current number of VaultConstituents in the vault, each constituent is pda(LPPool.address, constituent_index)","which constituent is the quote, receives revenue pool distributions. (maybe this should just be implied idx 0)","pub quote_constituent_index: u16,","QUOTE_PRECISION: Max AUM, Prohibit minting new DLP beyond this"],"type":"u128"},{"name":"lastAum","docs":["QUOTE_PRECISION: AUM of the vault in USD, updated lazily"],"type":"u128"},{"name":"cumulativeQuoteSentToPerpMarkets","docs":["QUOTE PRECISION: Cumulative quotes from settles"],"type":"u128"},{"name":"cumulativeQuoteReceivedFromPerpMarkets","type":"u128"},{"name":"totalMintRedeemFeesPaid","docs":["QUOTE_PRECISION: Total fees paid for minting and redeeming LP tokens"],"type":"i128"},{"name":"lastAumSlot","docs":["timestamp of last AUM slot"],"type":"u64"},{"name":"maxSettleQuoteAmount","type":"u64"},{"name":"padding","docs":["timestamp of last vAMM revenue rebalance"],"type":"u64"},{"name":"mintRedeemId","docs":["Every mint/redeem has a monotonically increasing id. This is the next id to use"],"type":"u64"},{"name":"settleId","type":"u64"},{"name":"minMintFee","docs":["PERCENTAGE_PRECISION"],"type":"i64"},{"name":"tokenSupply","type":"u64"},{"name":"volatility","type":"u64"},{"name":"constituents","type":"u16"},{"name":"quoteConsituentIndex","type":"u16"},{"name":"bump","type":"u8"},{"name":"gammaExecution","type":"u8"},{"name":"xi","type":"u8"},{"name":"targetOracleDelayFeeBpsPer10Slots","type":"u8"},{"name":"targetPositionDelayFeeBpsPer10Slots","type":"u8"},{"name":"lpPoolId","type":"u8"},{"name":"padding","type":{"array":["u8",174]}}]}},{"name":"Constituent","type":{"kind":"struct","fields":[{"name":"pubkey","docs":["address of the constituent"],"type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"lpPool","type":"publicKey"},{"name":"vault","type":"publicKey"},{"name":"totalSwapFees","docs":["total fees received by the constituent. Positive = fees received, Negative = fees paid"],"type":"i128"},{"name":"spotBalance","docs":["spot borrow-lend balance for constituent"],"type":{"defined":"ConstituentSpotBalance"}},{"name":"lastSpotBalanceTokenAmount","type":"i64"},{"name":"cumulativeSpotInterestAccruedTokenAmount","type":"i64"},{"name":"maxWeightDeviation","docs":["max deviation from target_weight allowed for the constituent","precision: PERCENTAGE_PRECISION"],"type":"i64"},{"name":"swapFeeMin","docs":["min fee charged on swaps to/from this constituent","precision: PERCENTAGE_PRECISION"],"type":"i64"},{"name":"swapFeeMax","docs":["max fee charged on swaps to/from this constituent","precision: PERCENTAGE_PRECISION"],"type":"i64"},{"name":"maxBorrowTokenAmount","docs":["Max Borrow amount:","precision: token precision"],"type":"u64"},{"name":"vaultTokenBalance","docs":["ata token balance in token precision"],"type":"u64"},{"name":"lastOraclePrice","type":"i64"},{"name":"lastOracleSlot","type":"u64"},{"name":"oracleStalenessThreshold","docs":["Delay allowed for valid AUM calculation"],"type":"u64"},{"name":"flashLoanInitialTokenAmount","type":"u64"},{"name":"nextSwapId","docs":["Every swap to/from this constituent has a monotonically increasing id. This is the next id to use"],"type":"u64"},{"name":"derivativeWeight","docs":["percentable of derivatve weight to go to this specific derivative PERCENTAGE_PRECISION. Zero if no derivative weight"],"type":"u64"},{"name":"volatility","type":"u64"},{"name":"constituentDerivativeDepegThreshold","type":"u64"},{"name":"constituentDerivativeIndex","docs":["The `constituent_index` of the parent constituent. -1 if it is a parent index","Example: if in a pool with SOL (parent) and dSOL (derivative),","SOL.constituent_index = 1, SOL.constituent_derivative_index = -1,","dSOL.constituent_index = 2, dSOL.constituent_derivative_index = 1"],"type":"i16"},{"name":"spotMarketIndex","type":"u16"},{"name":"constituentIndex","type":"u16"},{"name":"decimals","type":"u8"},{"name":"bump","type":"u8"},{"name":"vaultBump","type":"u8"},{"name":"gammaInventory","type":"u8"},{"name":"gammaExecution","type":"u8"},{"name":"xi","type":"u8"},{"name":"status","type":"u8"},{"name":"pausedOperations","type":"u8"},{"name":"padding","type":{"array":["u8",162]}}]}},{"name":"AmmConstituentMapping","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"weights","type":{"vec":{"defined":"AmmConstituentDatum"}}}]}},{"name":"ConstituentTargetBase","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"targets","type":{"vec":{"defined":"TargetsDatum"}}}]}},{"name":"ConstituentCorrelations","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"correlations","type":{"vec":"i64"}}]}},{"name":"PrelaunchOracle","type":{"kind":"struct","fields":[{"name":"price","type":"i64"},{"name":"maxPrice","type":"i64"},{"name":"confidence","type":"u64"},{"name":"lastUpdateSlot","type":"u64"},{"name":"ammLastUpdateSlot","type":"u64"},{"name":"perpMarketIndex","type":"u16"},{"name":"padding","type":{"array":["u8",70]}}]}},{"name":"PerpMarket","type":{"kind":"struct","fields":[{"name":"pubkey","docs":["The perp market's address. It is a pda of the market index"],"type":"publicKey"},{"name":"amm","docs":["The automated market maker"],"type":{"defined":"AMM"}},{"name":"pnlPool","docs":["The market's pnl pool. When users settle negative pnl, the balance increases.","When users settle positive pnl, the balance decreases. Can not go negative."],"type":{"defined":"PoolBalance"}},{"name":"name","docs":["Encoded display name for the perp market e.g. SOL-PERP"],"type":{"array":["u8",32]}},{"name":"insuranceClaim","docs":["The perp market's claim on the insurance fund"],"type":{"defined":"InsuranceClaim"}},{"name":"unrealizedPnlMaxImbalance","docs":["The max pnl imbalance before positive pnl asset weight is discounted","pnl imbalance is the difference between long and short pnl. When it's greater than 0,","the amm has negative pnl and the initial asset weight for positive pnl is discounted","precision = QUOTE_PRECISION"],"type":"u64"},{"name":"expiryTs","docs":["The ts when the market will be expired. Only set if market is in reduce only mode"],"type":"i64"},{"name":"expiryPrice","docs":["The price at which positions will be settled. Only set if market is expired","precision = PRICE_PRECISION"],"type":"i64"},{"name":"nextFillRecordId","docs":["Every trade has a fill record id. This is the next id to be used"],"type":"u64"},{"name":"nextFundingRateRecordId","docs":["Every funding rate update has a record id. This is the next id to be used"],"type":"u64"},{"name":"nextCurveRecordId","docs":["Every amm k updated has a record id. This is the next id to be used"],"type":"u64"},{"name":"imfFactor","docs":["The initial margin fraction factor. Used to increase margin ratio for large positions","precision: MARGIN_PRECISION"],"type":"u32"},{"name":"unrealizedPnlImfFactor","docs":["The imf factor for unrealized pnl. Used to discount asset weight for large positive pnl","precision: MARGIN_PRECISION"],"type":"u32"},{"name":"liquidatorFee","docs":["The fee the liquidator is paid for taking over perp position","precision: LIQUIDATOR_FEE_PRECISION"],"type":"u32"},{"name":"ifLiquidationFee","docs":["The fee the insurance fund receives from liquidation","precision: LIQUIDATOR_FEE_PRECISION"],"type":"u32"},{"name":"marginRatioInitial","docs":["The margin ratio which determines how much collateral is required to open a position","e.g. margin ratio of .1 means a user must have $100 of total collateral to open a $1000 position","precision: MARGIN_PRECISION"],"type":"u32"},{"name":"marginRatioMaintenance","docs":["The margin ratio which determines when a user will be liquidated","e.g. margin ratio of .05 means a user must have $50 of total collateral to maintain a $1000 position","else they will be liquidated","precision: MARGIN_PRECISION"],"type":"u32"},{"name":"unrealizedPnlInitialAssetWeight","docs":["The initial asset weight for positive pnl. Negative pnl always has an asset weight of 1","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"unrealizedPnlMaintenanceAssetWeight","docs":["The maintenance asset weight for positive pnl. Negative pnl always has an asset weight of 1","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"numberOfUsersWithBase","docs":["number of users in a position (base)"],"type":"u32"},{"name":"numberOfUsers","docs":["number of users in a position (pnl) or pnl (quote)"],"type":"u32"},{"name":"marketIndex","type":"u16"},{"name":"status","docs":["Whether a market is active, reduce only, expired, etc","Affects whether users can open/close positions"],"type":{"defined":"MarketStatus"}},{"name":"contractType","docs":["Currently only Perpetual markets are supported"],"type":{"defined":"ContractType"}},{"name":"contractTier","docs":["The contract tier determines how much insurance a market can receive, with more speculative markets receiving less insurance","It also influences the order perp markets can be liquidated, with less speculative markets being liquidated first"],"type":{"defined":"ContractTier"}},{"name":"pausedOperations","type":"u8"},{"name":"quoteSpotMarketIndex","docs":["The spot market that pnl is settled in"],"type":"u16"},{"name":"feeAdjustment","docs":["Between -100 and 100, represents what % to increase/decrease the fee by","E.g. if this is -50 and the fee is 5bps, the new fee will be 2.5bps","if this is 50 and the fee is 5bps, the new fee will be 7.5bps"],"type":"i16"},{"name":"fuelBoostPosition","docs":["fuel multiplier for perp funding","precision: 10"],"type":"u8"},{"name":"fuelBoostTaker","docs":["fuel multiplier for perp taker","precision: 10"],"type":"u8"},{"name":"fuelBoostMaker","docs":["fuel multiplier for perp maker","precision: 10"],"type":"u8"},{"name":"poolId","type":"u8"},{"name":"highLeverageMarginRatioInitial","type":"u16"},{"name":"highLeverageMarginRatioMaintenance","type":"u16"},{"name":"protectedMakerLimitPriceDivisor","type":"u8"},{"name":"protectedMakerDynamicDivisor","type":"u8"},{"name":"lpFeeTransferScalar","type":"u8"},{"name":"lpStatus","type":"u8"},{"name":"lpPausedOperations","type":"u8"},{"name":"lpExchangeFeeExcluscionScalar","type":"u8"},{"name":"lastFillPrice","type":"u64"},{"name":"lpPoolId","type":"u8"},{"name":"padding","type":{"array":["u8",23]}}]}},{"name":"ProtectedMakerModeConfig","type":{"kind":"struct","fields":[{"name":"maxUsers","type":"u32"},{"name":"currentUsers","type":"u32"},{"name":"reduceOnly","type":"u8"},{"name":"padding","type":{"array":["u8",31]}}]}},{"name":"PythLazerOracle","type":{"kind":"struct","fields":[{"name":"price","type":"i64"},{"name":"publishTime","type":"u64"},{"name":"postedSlot","type":"u64"},{"name":"exponent","type":"i32"},{"name":"padding","type":{"array":["u8",4]}},{"name":"conf","type":"u64"}]}},{"name":"RevenueShare","type":{"kind":"struct","fields":[{"name":"authority","docs":["the owner of this account, a builder or referrer"],"type":"publicKey"},{"name":"totalReferrerRewards","type":"u64"},{"name":"totalBuilderRewards","type":"u64"},{"name":"padding","type":{"array":["u8",18]}}]}},{"name":"RevenueShareEscrow","type":{"kind":"struct","fields":[{"name":"authority","docs":["the owner of this account, a user"],"type":"publicKey"},{"name":"referrer","type":"publicKey"},{"name":"referrerBoostExpireTs","type":"u32"},{"name":"referrerRewardOffset","type":"i8"},{"name":"refereeFeeNumeratorOffset","type":"i8"},{"name":"referrerBoostNumerator","type":"i8"},{"name":"reservedFixed","type":{"array":["u8",17]}},{"name":"padding0","type":"u32"},{"name":"orders","type":{"vec":{"defined":"RevenueShareOrder"}}},{"name":"padding1","type":"u32"},{"name":"approvedBuilders","type":{"vec":{"defined":"BuilderInfo"}}}]}},{"name":"SignedMsgUserOrders","docs":["* This struct is a duplicate of SignedMsgUserOrdersZeroCopy\n * It is used to give anchor an struct to generate the idl for clients\n * The struct SignedMsgUserOrdersZeroCopy is used to load the data in efficiently"],"type":{"kind":"struct","fields":[{"name":"authorityPubkey","type":"publicKey"},{"name":"padding","type":"u32"},{"name":"signedMsgOrderData","type":{"vec":{"defined":"SignedMsgOrderId"}}}]}},{"name":"SignedMsgWsDelegates","docs":["* Used to store authenticated delegates for swift-like ws connections"],"type":{"kind":"struct","fields":[{"name":"delegates","type":{"vec":"publicKey"}}]}},{"name":"SpotMarket","type":{"kind":"struct","fields":[{"name":"pubkey","docs":["The address of the spot market. It is a pda of the market index"],"type":"publicKey"},{"name":"oracle","docs":["The oracle used to price the markets deposits/borrows"],"type":"publicKey"},{"name":"mint","docs":["The token mint of the market"],"type":"publicKey"},{"name":"vault","docs":["The vault used to store the market's deposits","The amount in the vault should be equal to or greater than deposits - borrows"],"type":"publicKey"},{"name":"name","docs":["The encoded display name for the market e.g. SOL"],"type":{"array":["u8",32]}},{"name":"historicalOracleData","type":{"defined":"HistoricalOracleData"}},{"name":"historicalIndexData","type":{"defined":"HistoricalIndexData"}},{"name":"revenuePool","docs":["Revenue the protocol has collected in this markets token","e.g. for SOL-PERP, funds can be settled in usdc and will flow into the USDC revenue pool"],"type":{"defined":"PoolBalance"}},{"name":"spotFeePool","docs":["The fees collected from swaps between this market and the quote market","Is settled to the quote markets revenue pool"],"type":{"defined":"PoolBalance"}},{"name":"insuranceFund","docs":["Details on the insurance fund covering bankruptcies in this markets token","Covers bankruptcies for borrows with this markets token and perps settling in this markets token"],"type":{"defined":"InsuranceFund"}},{"name":"totalSpotFee","docs":["The total spot fees collected for this market","precision: QUOTE_PRECISION"],"type":"u128"},{"name":"depositBalance","docs":["The sum of the scaled balances for deposits across users and pool balances","To convert to the deposit token amount, multiply by the cumulative deposit interest","precision: SPOT_BALANCE_PRECISION"],"type":"u128"},{"name":"borrowBalance","docs":["The sum of the scaled balances for borrows across users and pool balances","To convert to the borrow token amount, multiply by the cumulative borrow interest","precision: SPOT_BALANCE_PRECISION"],"type":"u128"},{"name":"cumulativeDepositInterest","docs":["The cumulative interest earned by depositors","Used to calculate the deposit token amount from the deposit balance","precision: SPOT_CUMULATIVE_INTEREST_PRECISION"],"type":"u128"},{"name":"cumulativeBorrowInterest","docs":["The cumulative interest earned by borrowers","Used to calculate the borrow token amount from the borrow balance","precision: SPOT_CUMULATIVE_INTEREST_PRECISION"],"type":"u128"},{"name":"totalSocialLoss","docs":["The total socialized loss from borrows, in the mint's token","precision: token mint precision"],"type":"u128"},{"name":"totalQuoteSocialLoss","docs":["The total socialized loss from borrows, in the quote market's token","preicision: QUOTE_PRECISION"],"type":"u128"},{"name":"withdrawGuardThreshold","docs":["no withdraw limits/guards when deposits below this threshold","precision: token mint precision"],"type":"u64"},{"name":"maxTokenDeposits","docs":["The max amount of token deposits in this market","0 if there is no limit","precision: token mint precision"],"type":"u64"},{"name":"depositTokenTwap","docs":["24hr average of deposit token amount","precision: token mint precision"],"type":"u64"},{"name":"borrowTokenTwap","docs":["24hr average of borrow token amount","precision: token mint precision"],"type":"u64"},{"name":"utilizationTwap","docs":["24hr average of utilization","which is borrow amount over token amount","precision: SPOT_UTILIZATION_PRECISION"],"type":"u64"},{"name":"lastInterestTs","docs":["Last time the cumulative deposit and borrow interest was updated"],"type":"u64"},{"name":"lastTwapTs","docs":["Last time the deposit/borrow/utilization averages were updated"],"type":"u64"},{"name":"expiryTs","docs":["The time the market is set to expire. Only set if market is in reduce only mode"],"type":"i64"},{"name":"orderStepSize","docs":["Spot orders must be a multiple of the step size","precision: token mint precision"],"type":"u64"},{"name":"orderTickSize","docs":["Spot orders must be a multiple of the tick size","precision: PRICE_PRECISION"],"type":"u64"},{"name":"minOrderSize","docs":["The minimum order size","precision: token mint precision"],"type":"u64"},{"name":"maxPositionSize","docs":["The maximum spot position size","if the limit is 0, there is no limit","precision: token mint precision"],"type":"u64"},{"name":"nextFillRecordId","docs":["Every spot trade has a fill record id. This is the next id to use"],"type":"u64"},{"name":"nextDepositRecordId","docs":["Every deposit has a deposit record id. This is the next id to use"],"type":"u64"},{"name":"initialAssetWeight","docs":["The initial asset weight used to calculate a deposits contribution to a users initial total collateral","e.g. if the asset weight is .8, $100 of deposits contributes $80 to the users initial total collateral","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"maintenanceAssetWeight","docs":["The maintenance asset weight used to calculate a deposits contribution to a users maintenance total collateral","e.g. if the asset weight is .9, $100 of deposits contributes $90 to the users maintenance total collateral","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"initialLiabilityWeight","docs":["The initial liability weight used to calculate a borrows contribution to a users initial margin requirement","e.g. if the liability weight is .9, $100 of borrows contributes $90 to the users initial margin requirement","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"maintenanceLiabilityWeight","docs":["The maintenance liability weight used to calculate a borrows contribution to a users maintenance margin requirement","e.g. if the liability weight is .8, $100 of borrows contributes $80 to the users maintenance margin requirement","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"imfFactor","docs":["The initial margin fraction factor. Used to increase liability weight/decrease asset weight for large positions","precision: MARGIN_PRECISION"],"type":"u32"},{"name":"liquidatorFee","docs":["The fee the liquidator is paid for taking over borrow/deposit","precision: LIQUIDATOR_FEE_PRECISION"],"type":"u32"},{"name":"ifLiquidationFee","docs":["The fee the insurance fund receives from liquidation","precision: LIQUIDATOR_FEE_PRECISION"],"type":"u32"},{"name":"optimalUtilization","docs":["The optimal utilization rate for this market.","Used to determine the markets borrow rate","precision: SPOT_UTILIZATION_PRECISION"],"type":"u32"},{"name":"optimalBorrowRate","docs":["The borrow rate for this market when the market has optimal utilization","precision: SPOT_RATE_PRECISION"],"type":"u32"},{"name":"maxBorrowRate","docs":["The borrow rate for this market when the market has 1000 utilization","precision: SPOT_RATE_PRECISION"],"type":"u32"},{"name":"decimals","docs":["The market's token mint's decimals. To from decimals to a precision, 10^decimals"],"type":"u32"},{"name":"marketIndex","type":"u16"},{"name":"ordersEnabled","docs":["Whether or not spot trading is enabled"],"type":"bool"},{"name":"oracleSource","type":{"defined":"OracleSource"}},{"name":"status","type":{"defined":"MarketStatus"}},{"name":"assetTier","docs":["The asset tier affects how a deposit can be used as collateral and the priority for a borrow being liquidated"],"type":{"defined":"AssetTier"}},{"name":"pausedOperations","type":"u8"},{"name":"ifPausedOperations","type":"u8"},{"name":"feeAdjustment","type":"i16"},{"name":"maxTokenBorrowsFraction","docs":["What fraction of max_token_deposits","disabled when 0, 1 => 1/10000 => .01% of max_token_deposits","precision: X/10000"],"type":"u16"},{"name":"flashLoanAmount","docs":["For swaps, the amount of token loaned out in the begin_swap ix","precision: token mint precision"],"type":"u64"},{"name":"flashLoanInitialTokenAmount","docs":["For swaps, the amount in the users token account in the begin_swap ix","Used to calculate how much of the token left the system in end_swap ix","precision: token mint precision"],"type":"u64"},{"name":"totalSwapFee","docs":["The total fees received from swaps","precision: token mint precision"],"type":"u64"},{"name":"scaleInitialAssetWeightStart","docs":["When to begin scaling down the initial asset weight","disabled when 0","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"minBorrowRate","docs":["The min borrow rate for this market when the market regardless of utilization","1 => 1/200 => .5%","precision: X/200"],"type":"u8"},{"name":"fuelBoostDeposits","docs":["fuel multiplier for spot deposits","precision: 10"],"type":"u8"},{"name":"fuelBoostBorrows","docs":["fuel multiplier for spot borrows","precision: 10"],"type":"u8"},{"name":"fuelBoostTaker","docs":["fuel multiplier for spot taker","precision: 10"],"type":"u8"},{"name":"fuelBoostMaker","docs":["fuel multiplier for spot maker","precision: 10"],"type":"u8"},{"name":"fuelBoostInsurance","docs":["fuel multiplier for spot insurance stake","precision: 10"],"type":"u8"},{"name":"tokenProgramFlag","type":"u8"},{"name":"poolId","type":"u8"},{"name":"padding","type":{"array":["u8",40]}}]}},{"name":"State","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"whitelistMint","type":"publicKey"},{"name":"discountMint","type":"publicKey"},{"name":"signer","type":"publicKey"},{"name":"srmVault","type":"publicKey"},{"name":"perpFeeStructure","type":{"defined":"FeeStructure"}},{"name":"spotFeeStructure","type":{"defined":"FeeStructure"}},{"name":"oracleGuardRails","type":{"defined":"OracleGuardRails"}},{"name":"numberOfAuthorities","type":"u64"},{"name":"numberOfSubAccounts","type":"u64"},{"name":"lpCooldownTime","type":"u64"},{"name":"liquidationMarginBufferRatio","type":"u32"},{"name":"settlementDuration","type":"u16"},{"name":"numberOfMarkets","type":"u16"},{"name":"numberOfSpotMarkets","type":"u16"},{"name":"signerNonce","type":"u8"},{"name":"minPerpAuctionDuration","type":"u8"},{"name":"defaultMarketOrderTimeInForce","type":"u8"},{"name":"defaultSpotAuctionDuration","type":"u8"},{"name":"exchangeStatus","type":"u8"},{"name":"liquidationDuration","type":"u8"},{"name":"initialPctToLiquidate","type":"u16"},{"name":"maxNumberOfSubAccounts","type":"u16"},{"name":"maxInitializeUserFee","type":"u16"},{"name":"featureBitFlags","type":"u8"},{"name":"lpPoolFeatureBitFlags","type":"u8"},{"name":"padding","type":{"array":["u8",8]}}]}},{"name":"User","type":{"kind":"struct","fields":[{"name":"authority","docs":["The owner/authority of the account"],"type":"publicKey"},{"name":"delegate","docs":["An addresses that can control the account on the authority's behalf. Has limited power, cant withdraw"],"type":"publicKey"},{"name":"name","docs":["Encoded display name e.g. \"toly\""],"type":{"array":["u8",32]}},{"name":"spotPositions","docs":["The user's spot positions"],"type":{"array":[{"defined":"SpotPosition"},8]}},{"name":"perpPositions","docs":["The user's perp positions"],"type":{"array":[{"defined":"PerpPosition"},8]}},{"name":"orders","docs":["The user's orders"],"type":{"array":[{"defined":"Order"},32]}},{"name":"lastAddPerpLpSharesTs","docs":["The last time the user added perp lp positions"],"type":"i64"},{"name":"totalDeposits","docs":["The total values of deposits the user has made","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalWithdraws","docs":["The total values of withdrawals the user has made","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalSocialLoss","docs":["The total socialized loss the users has incurred upon the protocol","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"settledPerpPnl","docs":["Fees (taker fees, maker rebate, referrer reward, filler reward) and pnl for perps","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"cumulativeSpotFees","docs":["Fees (taker fees, maker rebate, filler reward) for spot","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"cumulativePerpFunding","docs":["Cumulative funding paid/received for perps","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"liquidationMarginFreed","docs":["The amount of margin freed during liquidation. Used to force the liquidation to occur over a period of time","Defaults to zero when not being liquidated","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"lastActiveSlot","docs":["The last slot a user was active. Used to determine if a user is idle"],"type":"u64"},{"name":"nextOrderId","docs":["Every user order has an order id. This is the next order id to be used"],"type":"u32"},{"name":"maxMarginRatio","docs":["Custom max initial margin ratio for the user"],"type":"u32"},{"name":"nextLiquidationId","docs":["The next liquidation id to be used for user"],"type":"u16"},{"name":"subAccountId","docs":["The sub account id for this user"],"type":"u16"},{"name":"status","docs":["Whether the user is active, being liquidated or bankrupt"],"type":"u8"},{"name":"isMarginTradingEnabled","docs":["Whether the user has enabled margin trading"],"type":"bool"},{"name":"idle","docs":["User is idle if they haven't interacted with the protocol in 1 week and they have no orders, perp positions or borrows","Off-chain keeper bots can ignore users that are idle"],"type":"bool"},{"name":"openOrders","docs":["number of open orders"],"type":"u8"},{"name":"hasOpenOrder","docs":["Whether or not user has open order"],"type":"bool"},{"name":"openAuctions","docs":["number of open orders with auction"],"type":"u8"},{"name":"hasOpenAuction","docs":["Whether or not user has open order with auction"],"type":"bool"},{"name":"marginMode","type":{"defined":"MarginMode"}},{"name":"poolId","type":"u8"},{"name":"padding1","type":{"array":["u8",3]}},{"name":"lastFuelBonusUpdateTs","type":"u32"},{"name":"padding","type":{"array":["u8",12]}}]}},{"name":"UserStats","type":{"kind":"struct","fields":[{"name":"authority","docs":["The authority for all of a users sub accounts"],"type":"publicKey"},{"name":"referrer","docs":["The address that referred this user"],"type":"publicKey"},{"name":"fees","docs":["Stats on the fees paid by the user"],"type":{"defined":"UserFees"}},{"name":"nextEpochTs","docs":["The timestamp of the next epoch","Epoch is used to limit referrer rewards earned in single epoch"],"type":"i64"},{"name":"makerVolume30d","docs":["Rolling 30day maker volume for user","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"takerVolume30d","docs":["Rolling 30day taker volume for user","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"fillerVolume30d","docs":["Rolling 30day filler volume for user","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"lastMakerVolume30dTs","docs":["last time the maker volume was updated"],"type":"i64"},{"name":"lastTakerVolume30dTs","docs":["last time the taker volume was updated"],"type":"i64"},{"name":"lastFillerVolume30dTs","docs":["last time the filler volume was updated"],"type":"i64"},{"name":"ifStakedQuoteAssetAmount","docs":["The amount of tokens staked in the quote spot markets if"],"type":"u64"},{"name":"numberOfSubAccounts","docs":["The current number of sub accounts"],"type":"u16"},{"name":"numberOfSubAccountsCreated","docs":["The number of sub accounts created. Can be greater than the number of sub accounts if user","has deleted sub accounts"],"type":"u16"},{"name":"referrerStatus","docs":["Flags for referrer status:","First bit (LSB): 1 if user is a referrer, 0 otherwise","Second bit: 1 if user was referred, 0 otherwise"],"type":"u8"},{"name":"disableUpdatePerpBidAskTwap","type":"bool"},{"name":"pausedOperations","type":"u8"},{"name":"fuelOverflowStatus","docs":["whether the user has a FuelOverflow account"],"type":"u8"},{"name":"fuelInsurance","docs":["accumulated fuel for token amounts of insurance"],"type":"u32"},{"name":"fuelDeposits","docs":["accumulated fuel for notional of deposits"],"type":"u32"},{"name":"fuelBorrows","docs":["accumulate fuel bonus for notional of borrows"],"type":"u32"},{"name":"fuelPositions","docs":["accumulated fuel for perp open interest"],"type":"u32"},{"name":"fuelTaker","docs":["accumulate fuel bonus for taker volume"],"type":"u32"},{"name":"fuelMaker","docs":["accumulate fuel bonus for maker volume"],"type":"u32"},{"name":"ifStakedGovTokenAmount","docs":["The amount of tokens staked in the governance spot markets if"],"type":"u64"},{"name":"lastFuelIfBonusUpdateTs","docs":["last unix ts user stats data was used to update if fuel (u32 to save space)"],"type":"u32"},{"name":"padding","type":{"array":["u8",12]}}]}},{"name":"ReferrerName","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"user","type":"publicKey"},{"name":"userStats","type":"publicKey"},{"name":"name","type":{"array":["u8",32]}}]}},{"name":"FuelOverflow","type":{"kind":"struct","fields":[{"name":"authority","docs":["The authority of this overflow account"],"type":"publicKey"},{"name":"fuelInsurance","type":"u128"},{"name":"fuelDeposits","type":"u128"},{"name":"fuelBorrows","type":"u128"},{"name":"fuelPositions","type":"u128"},{"name":"fuelTaker","type":"u128"},{"name":"fuelMaker","type":"u128"},{"name":"lastFuelSweepTs","type":"u32"},{"name":"lastResetTs","type":"u32"},{"name":"padding","type":{"array":["u128",6]}}]}}],"types":[{"name":"UpdatePerpMarketSummaryStatsParams","type":{"kind":"struct","fields":[{"name":"quoteAssetAmountWithUnsettledLp","type":{"option":"i64"}},{"name":"netUnsettledFundingPnl","type":{"option":"i64"}},{"name":"updateAmmSummaryStats","type":{"option":"bool"}},{"name":"excludeTotalLiqFee","type":{"option":"bool"}}]}},{"name":"ConstituentParams","type":{"kind":"struct","fields":[{"name":"maxWeightDeviation","type":{"option":"i64"}},{"name":"swapFeeMin","type":{"option":"i64"}},{"name":"swapFeeMax","type":{"option":"i64"}},{"name":"maxBorrowTokenAmount","type":{"option":"u64"}},{"name":"oracleStalenessThreshold","type":{"option":"u64"}},{"name":"costToTradeBps","type":{"option":"i32"}},{"name":"constituentDerivativeIndex","type":{"option":"i16"}},{"name":"derivativeWeight","type":{"option":"u64"}},{"name":"volatility","type":{"option":"u64"}},{"name":"gammaExecution","type":{"option":"u8"}},{"name":"gammaInventory","type":{"option":"u8"}},{"name":"xi","type":{"option":"u8"}}]}},{"name":"LpPoolParams","type":{"kind":"struct","fields":[{"name":"maxSettleQuoteAmount","type":{"option":"u64"}},{"name":"volatility","type":{"option":"u64"}},{"name":"gammaExecution","type":{"option":"u8"}},{"name":"xi","type":{"option":"u8"}},{"name":"maxAum","type":{"option":"u128"}},{"name":"whitelistMint","type":{"option":"publicKey"}}]}},{"name":"OverrideAmmCacheParams","type":{"kind":"struct","fields":[{"name":"quoteOwedFromLpPool","type":{"option":"i64"}},{"name":"lastSettleSlot","type":{"option":"u64"}},{"name":"lastFeePoolTokenAmount","type":{"option":"u128"}},{"name":"lastNetPnlPoolTokenAmount","type":{"option":"i128"}},{"name":"ammPositionScalar","type":{"option":"u8"}},{"name":"ammInventoryLimit","type":{"option":"i64"}}]}},{"name":"AddAmmConstituentMappingDatum","type":{"kind":"struct","fields":[{"name":"constituentIndex","type":"u16"},{"name":"perpMarketIndex","type":"u16"},{"name":"weight","type":"i64"}]}},{"name":"CacheInfo","type":{"kind":"struct","fields":[{"name":"oracle","type":"publicKey"},{"name":"lastFeePoolTokenAmount","type":"u128"},{"name":"lastNetPnlPoolTokenAmount","type":"i128"},{"name":"lastExchangeFees","type":"u128"},{"name":"lastSettleAmmExFees","type":"u128"},{"name":"lastSettleAmmPnl","type":"i128"},{"name":"position","docs":["BASE PRECISION"],"type":"i64"},{"name":"slot","type":"u64"},{"name":"lastSettleAmount","type":"u64"},{"name":"lastSettleSlot","type":"u64"},{"name":"lastSettleTs","type":"i64"},{"name":"quoteOwedFromLpPool","type":"i64"},{"name":"ammInventoryLimit","type":"i64"},{"name":"oraclePrice","type":"i64"},{"name":"oracleSlot","type":"u64"},{"name":"marketIndex","type":"u16"},{"name":"oracleSource","type":"u8"},{"name":"oracleValidity","type":"u8"},{"name":"lpStatusForPerpMarket","type":"u8"},{"name":"ammPositionScalar","type":"u8"},{"name":"padding","type":{"array":["u8",34]}}]}},{"name":"AmmCacheFixed","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"pad","type":{"array":["u8",3]}},{"name":"len","type":"u32"}]}},{"name":"LiquidatePerpRecord","type":{"kind":"struct","fields":[{"name":"marketIndex","type":"u16"},{"name":"oraclePrice","type":"i64"},{"name":"baseAssetAmount","type":"i64"},{"name":"quoteAssetAmount","type":"i64"},{"name":"lpShares","docs":["precision: AMM_RESERVE_PRECISION"],"type":"u64"},{"name":"fillRecordId","type":"u64"},{"name":"userOrderId","type":"u32"},{"name":"liquidatorOrderId","type":"u32"},{"name":"liquidatorFee","docs":["precision: QUOTE_PRECISION"],"type":"u64"},{"name":"ifFee","docs":["precision: QUOTE_PRECISION"],"type":"u64"}]}},{"name":"LiquidateSpotRecord","type":{"kind":"struct","fields":[{"name":"assetMarketIndex","type":"u16"},{"name":"assetPrice","type":"i64"},{"name":"assetTransfer","type":"u128"},{"name":"liabilityMarketIndex","type":"u16"},{"name":"liabilityPrice","type":"i64"},{"name":"liabilityTransfer","docs":["precision: token mint precision"],"type":"u128"},{"name":"ifFee","docs":["precision: token mint precision"],"type":"u64"}]}},{"name":"LiquidateBorrowForPerpPnlRecord","type":{"kind":"struct","fields":[{"name":"perpMarketIndex","type":"u16"},{"name":"marketOraclePrice","type":"i64"},{"name":"pnlTransfer","type":"u128"},{"name":"liabilityMarketIndex","type":"u16"},{"name":"liabilityPrice","type":"i64"},{"name":"liabilityTransfer","type":"u128"}]}},{"name":"LiquidatePerpPnlForDepositRecord","type":{"kind":"struct","fields":[{"name":"perpMarketIndex","type":"u16"},{"name":"marketOraclePrice","type":"i64"},{"name":"pnlTransfer","type":"u128"},{"name":"assetMarketIndex","type":"u16"},{"name":"assetPrice","type":"i64"},{"name":"assetTransfer","type":"u128"}]}},{"name":"PerpBankruptcyRecord","type":{"kind":"struct","fields":[{"name":"marketIndex","type":"u16"},{"name":"pnl","type":"i128"},{"name":"ifPayment","type":"u128"},{"name":"clawbackUser","type":{"option":"publicKey"}},{"name":"clawbackUserPayment","type":{"option":"u128"}},{"name":"cumulativeFundingRateDelta","type":"i128"}]}},{"name":"SpotBankruptcyRecord","type":{"kind":"struct","fields":[{"name":"marketIndex","type":"u16"},{"name":"borrowAmount","type":"u128"},{"name":"ifPayment","type":"u128"},{"name":"cumulativeDepositInterestDelta","type":"u128"}]}},{"name":"IfRebalanceConfigParams","type":{"kind":"struct","fields":[{"name":"totalInAmount","type":"u64"},{"name":"epochMaxInAmount","type":"u64"},{"name":"epochDuration","type":"i64"},{"name":"outMarketIndex","type":"u16"},{"name":"inMarketIndex","type":"u16"},{"name":"maxSlippageBps","type":"u16"},{"name":"swapMode","type":"u8"},{"name":"status","type":"u8"}]}},{"name":"ConstituentSpotBalance","type":{"kind":"struct","fields":[{"name":"scaledBalance","docs":["The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow","interest of corresponding market.","precision: token precision"],"type":"u128"},{"name":"cumulativeDeposits","docs":["The cumulative deposits/borrows a user has made into a market","precision: token mint precision"],"type":"i64"},{"name":"marketIndex","docs":["The market index of the corresponding spot market"],"type":"u16"},{"name":"balanceType","docs":["Whether the position is deposit or borrow"],"type":{"defined":"SpotBalanceType"}},{"name":"padding","type":{"array":["u8",5]}}]}},{"name":"AmmConstituentDatum","type":{"kind":"struct","fields":[{"name":"perpMarketIndex","type":"u16"},{"name":"constituentIndex","type":"u16"},{"name":"padding","type":{"array":["u8",4]}},{"name":"lastSlot","type":"u64"},{"name":"weight","docs":["PERCENTAGE_PRECISION. The weight this constituent has on the perp market"],"type":"i64"}]}},{"name":"AmmConstituentMappingFixed","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"pad","type":{"array":["u8",3]}},{"name":"len","type":"u32"}]}},{"name":"TargetsDatum","type":{"kind":"struct","fields":[{"name":"costToTradeBps","type":"i32"},{"name":"padding","type":{"array":["u8",4]}},{"name":"targetBase","type":"i64"},{"name":"lastOracleSlot","type":"u64"},{"name":"lastPositionSlot","type":"u64"}]}},{"name":"ConstituentTargetBaseFixed","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"pad","type":{"array":["u8",3]}},{"name":"len","docs":["total elements in the flattened `data` vec"],"type":"u32"}]}},{"name":"ConstituentCorrelationsFixed","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"pad","type":{"array":["u8",3]}},{"name":"len","docs":["total elements in the flattened `data` vec"],"type":"u32"}]}},{"name":"MarketIdentifier","type":{"kind":"struct","fields":[{"name":"marketType","type":{"defined":"MarketType"}},{"name":"marketIndex","type":"u16"}]}},{"name":"HistoricalOracleData","type":{"kind":"struct","fields":[{"name":"lastOraclePrice","docs":["precision: PRICE_PRECISION"],"type":"i64"},{"name":"lastOracleConf","docs":["precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastOracleDelay","docs":["number of slots since last update"],"type":"i64"},{"name":"lastOraclePriceTwap","docs":["precision: PRICE_PRECISION"],"type":"i64"},{"name":"lastOraclePriceTwap5min","docs":["precision: PRICE_PRECISION"],"type":"i64"},{"name":"lastOraclePriceTwapTs","docs":["unix_timestamp of last snapshot"],"type":"i64"}]}},{"name":"HistoricalIndexData","type":{"kind":"struct","fields":[{"name":"lastIndexBidPrice","docs":["precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastIndexAskPrice","docs":["precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastIndexPriceTwap","docs":["precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastIndexPriceTwap5min","docs":["precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastIndexPriceTwapTs","docs":["unix_timestamp of last snapshot"],"type":"i64"}]}},{"name":"PrelaunchOracleParams","type":{"kind":"struct","fields":[{"name":"perpMarketIndex","type":"u16"},{"name":"price","type":{"option":"i64"}},{"name":"maxPrice","type":{"option":"i64"}}]}},{"name":"OrderParams","type":{"kind":"struct","fields":[{"name":"orderType","type":{"defined":"OrderType"}},{"name":"marketType","type":{"defined":"MarketType"}},{"name":"direction","type":{"defined":"PositionDirection"}},{"name":"userOrderId","type":"u8"},{"name":"baseAssetAmount","type":"u64"},{"name":"price","type":"u64"},{"name":"marketIndex","type":"u16"},{"name":"reduceOnly","type":"bool"},{"name":"postOnly","type":{"defined":"PostOnlyParam"}},{"name":"bitFlags","type":"u8"},{"name":"maxTs","type":{"option":"i64"}},{"name":"triggerPrice","type":{"option":"u64"}},{"name":"triggerCondition","type":{"defined":"OrderTriggerCondition"}},{"name":"oraclePriceOffset","type":{"option":"i32"}},{"name":"auctionDuration","type":{"option":"u8"}},{"name":"auctionStartPrice","type":{"option":"i64"}},{"name":"auctionEndPrice","type":{"option":"i64"}}]}},{"name":"SignedMsgOrderParamsMessage","type":{"kind":"struct","fields":[{"name":"signedMsgOrderParams","type":{"defined":"OrderParams"}},{"name":"subAccountId","type":"u16"},{"name":"slot","type":"u64"},{"name":"uuid","type":{"array":["u8",8]}},{"name":"takeProfitOrderParams","type":{"option":{"defined":"SignedMsgTriggerOrderParams"}}},{"name":"stopLossOrderParams","type":{"option":{"defined":"SignedMsgTriggerOrderParams"}}},{"name":"maxMarginRatio","type":{"option":"u16"}},{"name":"builderIdx","type":{"option":"u8"}},{"name":"builderFeeTenthBps","type":{"option":"u16"}},{"name":"isolatedPositionDeposit","type":{"option":"u64"}}]}},{"name":"SignedMsgOrderParamsDelegateMessage","type":{"kind":"struct","fields":[{"name":"signedMsgOrderParams","type":{"defined":"OrderParams"}},{"name":"takerPubkey","type":"publicKey"},{"name":"slot","type":"u64"},{"name":"uuid","type":{"array":["u8",8]}},{"name":"takeProfitOrderParams","type":{"option":{"defined":"SignedMsgTriggerOrderParams"}}},{"name":"stopLossOrderParams","type":{"option":{"defined":"SignedMsgTriggerOrderParams"}}},{"name":"maxMarginRatio","type":{"option":"u16"}},{"name":"builderIdx","type":{"option":"u8"}},{"name":"builderFeeTenthBps","type":{"option":"u16"}},{"name":"isolatedPositionDeposit","type":{"option":"u64"}}]}},{"name":"SignedMsgTriggerOrderParams","type":{"kind":"struct","fields":[{"name":"triggerPrice","type":"u64"},{"name":"baseAssetAmount","type":"u64"}]}},{"name":"ModifyOrderParams","type":{"kind":"struct","fields":[{"name":"direction","type":{"option":{"defined":"PositionDirection"}}},{"name":"baseAssetAmount","type":{"option":"u64"}},{"name":"price","type":{"option":"u64"}},{"name":"reduceOnly","type":{"option":"bool"}},{"name":"postOnly","type":{"option":{"defined":"PostOnlyParam"}}},{"name":"bitFlags","type":{"option":"u8"}},{"name":"maxTs","type":{"option":"i64"}},{"name":"triggerPrice","type":{"option":"u64"}},{"name":"triggerCondition","type":{"option":{"defined":"OrderTriggerCondition"}}},{"name":"oraclePriceOffset","type":{"option":"i32"}},{"name":"auctionDuration","type":{"option":"u8"}},{"name":"auctionStartPrice","type":{"option":"i64"}},{"name":"auctionEndPrice","type":{"option":"i64"}},{"name":"policy","type":{"option":"u8"}}]}},{"name":"InsuranceClaim","type":{"kind":"struct","fields":[{"name":"revenueWithdrawSinceLastSettle","docs":["The amount of revenue last settled","Positive if funds left the perp market,","negative if funds were pulled into the perp market","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"maxRevenueWithdrawPerPeriod","docs":["The max amount of revenue that can be withdrawn per period","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"quoteMaxInsurance","docs":["The max amount of insurance that perp market can use to resolve bankruptcy and pnl deficits","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"quoteSettledInsurance","docs":["The amount of insurance that has been used to resolve bankruptcy and pnl deficits","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"lastRevenueWithdrawTs","docs":["The last time revenue was settled in/out of market"],"type":"i64"}]}},{"name":"PoolBalance","type":{"kind":"struct","fields":[{"name":"scaledBalance","docs":["To get the pool's token amount, you must multiply the scaled balance by the market's cumulative","deposit interest","precision: SPOT_BALANCE_PRECISION"],"type":"u128"},{"name":"marketIndex","docs":["The spot market the pool is for"],"type":"u16"},{"name":"padding","type":{"array":["u8",6]}}]}},{"name":"AMM","type":{"kind":"struct","fields":[{"name":"oracle","docs":["oracle price data public key"],"type":"publicKey"},{"name":"historicalOracleData","docs":["stores historically witnessed oracle data"],"type":{"defined":"HistoricalOracleData"}},{"name":"baseAssetAmountPerLp","docs":["accumulated base asset amount since inception per lp share","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"quoteAssetAmountPerLp","docs":["accumulated quote asset amount since inception per lp share","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"feePool","docs":["partition of fees from perp market trading moved from pnl settlements"],"type":{"defined":"PoolBalance"}},{"name":"baseAssetReserve","docs":["`x` reserves for constant product mm formula (x * y = k)","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"quoteAssetReserve","docs":["`y` reserves for constant product mm formula (x * y = k)","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"concentrationCoef","docs":["determines how close the min/max base asset reserve sit vs base reserves","allow for decreasing slippage without increasing liquidity and v.v.","precision: PERCENTAGE_PRECISION"],"type":"u128"},{"name":"minBaseAssetReserve","docs":["minimum base_asset_reserve allowed before AMM is unavailable","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"maxBaseAssetReserve","docs":["maximum base_asset_reserve allowed before AMM is unavailable","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"sqrtK","docs":["`sqrt(k)` in constant product mm formula (x * y = k). stored to avoid drift caused by integer math issues","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"pegMultiplier","docs":["normalizing numerical factor for y, its use offers lowest slippage in cp-curve when market is balanced","precision: PEG_PRECISION"],"type":"u128"},{"name":"terminalQuoteAssetReserve","docs":["y when market is balanced. stored to save computation","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"baseAssetAmountLong","docs":["always non-negative. tracks number of total longs in market (regardless of counterparty)","precision: BASE_PRECISION"],"type":"i128"},{"name":"baseAssetAmountShort","docs":["always non-positive. tracks number of total shorts in market (regardless of counterparty)","precision: BASE_PRECISION"],"type":"i128"},{"name":"baseAssetAmountWithAmm","docs":["tracks net position (longs-shorts) in market with AMM as counterparty","precision: BASE_PRECISION"],"type":"i128"},{"name":"baseAssetAmountWithUnsettledLp","docs":["tracks net position (longs-shorts) in market with LPs as counterparty","precision: BASE_PRECISION"],"type":"i128"},{"name":"maxOpenInterest","docs":["max allowed open interest, blocks trades that breach this value","precision: BASE_PRECISION"],"type":"u128"},{"name":"quoteAssetAmount","docs":["sum of all user's perp quote_asset_amount in market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"quoteEntryAmountLong","docs":["sum of all long user's quote_entry_amount in market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"quoteEntryAmountShort","docs":["sum of all short user's quote_entry_amount in market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"quoteBreakEvenAmountLong","docs":["sum of all long user's quote_break_even_amount in market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"quoteBreakEvenAmountShort","docs":["sum of all short user's quote_break_even_amount in market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"userLpShares","docs":["total user lp shares of sqrt_k (protocol owned liquidity = sqrt_k - last_funding_rate)","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"lastFundingRate","docs":["last funding rate in this perp market (unit is quote per base)","precision: FUNDING_RATE_PRECISION"],"type":"i64"},{"name":"lastFundingRateLong","docs":["last funding rate for longs in this perp market (unit is quote per base)","precision: FUNDING_RATE_PRECISION"],"type":"i64"},{"name":"lastFundingRateShort","docs":["last funding rate for shorts in this perp market (unit is quote per base)","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"last24hAvgFundingRate","docs":["estimate of last 24h of funding rate perp market (unit is quote per base)","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"totalFee","docs":["total fees collected by this perp market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"totalMmFee","docs":["total fees collected by the vAMM's bid/ask spread","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"totalExchangeFee","docs":["total fees collected by exchange fee schedule","precision: QUOTE_PRECISION"],"type":"u128"},{"name":"totalFeeMinusDistributions","docs":["total fees minus any recognized upnl and pool withdraws","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"totalFeeWithdrawn","docs":["sum of all fees from fee pool withdrawn to revenue pool","precision: QUOTE_PRECISION"],"type":"u128"},{"name":"totalLiquidationFee","docs":["all fees collected by market for liquidations","precision: QUOTE_PRECISION"],"type":"u128"},{"name":"cumulativeFundingRateLong","docs":["accumulated funding rate for longs since inception in market"],"type":"i128"},{"name":"cumulativeFundingRateShort","docs":["accumulated funding rate for shorts since inception in market"],"type":"i128"},{"name":"totalSocialLoss","docs":["accumulated social loss paid by users since inception in market"],"type":"u128"},{"name":"askBaseAssetReserve","docs":["transformed base_asset_reserve for users going long","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"askQuoteAssetReserve","docs":["transformed quote_asset_reserve for users going long","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"bidBaseAssetReserve","docs":["transformed base_asset_reserve for users going short","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"bidQuoteAssetReserve","docs":["transformed quote_asset_reserve for users going short","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"lastOracleNormalisedPrice","docs":["the last seen oracle price partially shrunk toward the amm reserve price","precision: PRICE_PRECISION"],"type":"i64"},{"name":"lastOracleReservePriceSpreadPct","docs":["the gap between the oracle price and the reserve price = y * peg_multiplier / x"],"type":"i64"},{"name":"lastBidPriceTwap","docs":["average estimate of bid price over funding_period","precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastAskPriceTwap","docs":["average estimate of ask price over funding_period","precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastMarkPriceTwap","docs":["average estimate of (bid+ask)/2 price over funding_period","precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastMarkPriceTwap5min","docs":["average estimate of (bid+ask)/2 price over FIVE_MINUTES"],"type":"u64"},{"name":"lastUpdateSlot","docs":["the last blockchain slot the amm was updated"],"type":"u64"},{"name":"lastOracleConfPct","docs":["the pct size of the oracle confidence interval","precision: PERCENTAGE_PRECISION"],"type":"u64"},{"name":"netRevenueSinceLastFunding","docs":["the total_fee_minus_distribution change since the last funding update","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"lastFundingRateTs","docs":["the last funding rate update unix_timestamp"],"type":"i64"},{"name":"fundingPeriod","docs":["the peridocity of the funding rate updates"],"type":"i64"},{"name":"orderStepSize","docs":["the base step size (increment) of orders","precision: BASE_PRECISION"],"type":"u64"},{"name":"orderTickSize","docs":["the price tick size of orders","precision: PRICE_PRECISION"],"type":"u64"},{"name":"minOrderSize","docs":["the minimum base size of an order","precision: BASE_PRECISION"],"type":"u64"},{"name":"mmOracleSlot","docs":["the max base size a single user can have","precision: BASE_PRECISION"],"type":"u64"},{"name":"volume24h","docs":["estimated total of volume in market","QUOTE_PRECISION"],"type":"u64"},{"name":"longIntensityVolume","docs":["the volume intensity of long fills against AMM"],"type":"u64"},{"name":"shortIntensityVolume","docs":["the volume intensity of short fills against AMM"],"type":"u64"},{"name":"lastTradeTs","docs":["the blockchain unix timestamp at the time of the last trade"],"type":"i64"},{"name":"markStd","docs":["estimate of standard deviation of the fill (mark) prices","precision: PRICE_PRECISION"],"type":"u64"},{"name":"oracleStd","docs":["estimate of standard deviation of the oracle price at each update","precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastMarkPriceTwapTs","docs":["the last unix_timestamp the mark twap was updated"],"type":"i64"},{"name":"baseSpread","docs":["the minimum spread the AMM can quote. also used as step size for some spread logic increases."],"type":"u32"},{"name":"maxSpread","docs":["the maximum spread the AMM can quote"],"type":"u32"},{"name":"longSpread","docs":["the spread for asks vs the reserve price"],"type":"u32"},{"name":"shortSpread","docs":["the spread for bids vs the reserve price"],"type":"u32"},{"name":"mmOraclePrice","docs":["MM oracle price"],"type":"i64"},{"name":"maxFillReserveFraction","docs":["the fraction of total available liquidity a single fill on the AMM can consume"],"type":"u16"},{"name":"maxSlippageRatio","docs":["the maximum slippage a single fill on the AMM can push"],"type":"u16"},{"name":"curveUpdateIntensity","docs":["the update intensity of AMM formulaic updates (adjusting k). 0-100"],"type":"u8"},{"name":"ammJitIntensity","docs":["the jit intensity of AMM. larger intensity means larger participation in jit. 0 means no jit participation.","(0, 100] is intensity for protocol-owned AMM. (100, 200] is intensity for user LP-owned AMM."],"type":"u8"},{"name":"oracleSource","docs":["the oracle provider information. used to decode/scale the oracle public key"],"type":{"defined":"OracleSource"}},{"name":"lastOracleValid","docs":["tracks whether the oracle was considered valid at the last AMM update"],"type":"bool"},{"name":"targetBaseAssetAmountPerLp","docs":["the target value for `base_asset_amount_per_lp`, used during AMM JIT with LP split","precision: BASE_PRECISION"],"type":"i32"},{"name":"perLpBase","docs":["expo for unit of per_lp, base 10 (if per_lp_base=X, then per_lp unit is 10^X)"],"type":"i8"},{"name":"oracleLowRiskSlotDelayOverride","docs":["the override for the state.min_perp_auction_duration","0 is no override, -1 is disable speed bump, 1-100 is literal speed bump"],"type":"i8"},{"name":"ammSpreadAdjustment","docs":["signed scale amm_spread similar to fee_adjustment logic (-100 = 0, 100 = double)"],"type":"i8"},{"name":"oracleSlotDelayOverride","type":"i8"},{"name":"mmOracleSequenceId","type":"u64"},{"name":"netUnsettledFundingPnl","type":"i64"},{"name":"quoteAssetAmountWithUnsettledLp","type":"i64"},{"name":"referencePriceOffset","type":"i32"},{"name":"ammInventorySpreadAdjustment","docs":["signed scale amm_spread similar to fee_adjustment logic (-100 = 0, 100 = double)"],"type":"i8"},{"name":"referencePriceOffsetDeadbandPct","type":"u8"},{"name":"padding","type":{"array":["u8",2]}},{"name":"lastFundingOracleTwap","type":"i64"}]}},{"name":"RevenueShareOrder","type":{"kind":"struct","fields":[{"name":"feesAccrued","docs":["fees accrued so far for this order slot. This is not exclusively fees from this order_id","and may include fees from other orders in the same market. This may be swept to the","builder's SpotPosition during settle_pnl."],"type":"u64"},{"name":"orderId","docs":["the order_id of the current active order in this slot. It's only relevant while bit_flag = Open"],"type":"u32"},{"name":"feeTenthBps","docs":["the builder fee on this order, in tenths of a bps, e.g. 100 = 0.01%"],"type":"u16"},{"name":"marketIndex","type":"u16"},{"name":"subAccountId","docs":["the subaccount_id of the user who created this order. It's only relevant while bit_flag = Open"],"type":"u16"},{"name":"builderIdx","docs":["the index of the RevenueShareEscrow.approved_builders list, that this order's fee will settle to. Ignored","if bit_flag = Referral."],"type":"u8"},{"name":"bitFlags","docs":["bitflags that describe the state of the order.","[`RevenueShareOrderBitFlag::Init`]: this order slot is available for use.","[`RevenueShareOrderBitFlag::Open`]: this order slot is occupied, `order_id` is the `sub_account_id`'s active order.","[`RevenueShareOrderBitFlag::Completed`]: this order has been filled or canceled, and is waiting to be settled into.","the builder's account order_id and sub_account_id are no longer relevant, it may be merged with other orders.","[`RevenueShareOrderBitFlag::Referral`]: this order stores referral rewards waiting to be settled for this market.","If it is set, no other bitflag should be set."],"type":"u8"},{"name":"userOrderIndex","docs":["the index into the User's orders list when this RevenueShareOrder was created, make sure to verify that order_id matches."],"type":"u8"},{"name":"marketType","type":{"defined":"MarketType"}},{"name":"padding","type":{"array":["u8",10]}}]}},{"name":"BuilderInfo","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"maxFeeTenthBps","type":"u16"},{"name":"padding","type":{"array":["u8",6]}}]}},{"name":"RevenueShareEscrowFixed","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"referrer","type":"publicKey"},{"name":"referrerBoostExpireTs","type":"u32"},{"name":"referrerRewardOffset","type":"i8"},{"name":"refereeFeeNumeratorOffset","type":"i8"},{"name":"referrerBoostNumerator","type":"i8"},{"name":"reservedFixed","type":{"array":["u8",17]}}]}},{"name":"SignedMsgOrderId","type":{"kind":"struct","fields":[{"name":"uuid","type":{"array":["u8",8]}},{"name":"maxSlot","type":"u64"},{"name":"orderId","type":"u32"},{"name":"padding","type":"u32"}]}},{"name":"SignedMsgUserOrdersFixed","type":{"kind":"struct","fields":[{"name":"userPubkey","type":"publicKey"},{"name":"padding","type":"u32"},{"name":"len","type":"u32"}]}},{"name":"InsuranceFund","type":{"kind":"struct","fields":[{"name":"vault","type":"publicKey"},{"name":"totalShares","type":"u128"},{"name":"userShares","type":"u128"},{"name":"sharesBase","type":"u128"},{"name":"unstakingPeriod","type":"i64"},{"name":"lastRevenueSettleTs","type":"i64"},{"name":"revenueSettlePeriod","type":"i64"},{"name":"totalFactor","type":"u32"},{"name":"userFactor","type":"u32"}]}},{"name":"OracleGuardRails","type":{"kind":"struct","fields":[{"name":"priceDivergence","type":{"defined":"PriceDivergenceGuardRails"}},{"name":"validity","type":{"defined":"ValidityGuardRails"}}]}},{"name":"PriceDivergenceGuardRails","type":{"kind":"struct","fields":[{"name":"markOraclePercentDivergence","type":"u64"},{"name":"oracleTwap5minPercentDivergence","type":"u64"}]}},{"name":"ValidityGuardRails","type":{"kind":"struct","fields":[{"name":"slotsBeforeStaleForAmm","type":"i64"},{"name":"slotsBeforeStaleForMargin","type":"i64"},{"name":"confidenceIntervalMaxSize","type":"u64"},{"name":"tooVolatileRatio","type":"i64"}]}},{"name":"FeeStructure","type":{"kind":"struct","fields":[{"name":"feeTiers","type":{"array":[{"defined":"FeeTier"},10]}},{"name":"fillerRewardStructure","type":{"defined":"OrderFillerRewardStructure"}},{"name":"referrerRewardEpochUpperBound","type":"u64"},{"name":"flatFillerFee","type":"u64"}]}},{"name":"FeeTier","type":{"kind":"struct","fields":[{"name":"feeNumerator","type":"u32"},{"name":"feeDenominator","type":"u32"},{"name":"makerRebateNumerator","type":"u32"},{"name":"makerRebateDenominator","type":"u32"},{"name":"referrerRewardNumerator","type":"u32"},{"name":"referrerRewardDenominator","type":"u32"},{"name":"refereeFeeNumerator","type":"u32"},{"name":"refereeFeeDenominator","type":"u32"}]}},{"name":"OrderFillerRewardStructure","type":{"kind":"struct","fields":[{"name":"rewardNumerator","type":"u32"},{"name":"rewardDenominator","type":"u32"},{"name":"timeBasedRewardLowerBound","type":"u128"}]}},{"name":"UserFees","type":{"kind":"struct","fields":[{"name":"totalFeePaid","docs":["Total taker fee paid","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalFeeRebate","docs":["Total maker fee rebate","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalTokenDiscount","docs":["Total discount from holding token","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalRefereeDiscount","docs":["Total discount from being referred","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalReferrerReward","docs":["Total reward to referrer","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"currentEpochReferrerReward","docs":["Total reward to referrer this epoch","precision: QUOTE_PRECISION"],"type":"u64"}]}},{"name":"SpotPosition","type":{"kind":"struct","fields":[{"name":"scaledBalance","docs":["The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow","interest of corresponding market.","precision: SPOT_BALANCE_PRECISION"],"type":"u64"},{"name":"openBids","docs":["How many spot non reduce only trigger orders the user has open","precision: token mint precision"],"type":"i64"},{"name":"openAsks","docs":["How many spot non reduce only trigger orders the user has open","precision: token mint precision"],"type":"i64"},{"name":"cumulativeDeposits","docs":["The cumulative deposits/borrows a user has made into a market","precision: token mint precision"],"type":"i64"},{"name":"marketIndex","docs":["The market index of the corresponding spot market"],"type":"u16"},{"name":"balanceType","docs":["Whether the position is deposit or borrow"],"type":{"defined":"SpotBalanceType"}},{"name":"openOrders","docs":["Number of open orders"],"type":"u8"},{"name":"padding","type":{"array":["u8",4]}}]}},{"name":"PerpPosition","type":{"kind":"struct","fields":[{"name":"lastCumulativeFundingRate","docs":["The perp market's last cumulative funding rate. Used to calculate the funding payment owed to user","precision: FUNDING_RATE_PRECISION"],"type":"i64"},{"name":"baseAssetAmount","docs":["the size of the users perp position","precision: BASE_PRECISION"],"type":"i64"},{"name":"quoteAssetAmount","docs":["Used to calculate the users pnl. Upon entry, is equal to base_asset_amount * avg entry price - fees","Updated when the user open/closes position or settles pnl. Includes fees/funding","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"quoteBreakEvenAmount","docs":["The amount of quote the user would need to exit their position at to break even","Updated when the user open/closes position or settles pnl. Includes fees/funding","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"quoteEntryAmount","docs":["The amount quote the user entered the position with. Equal to base asset amount * avg entry price","Updated when the user open/closes position. Excludes fees/funding","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"openBids","docs":["The amount of non reduce only trigger orders the user has open","precision: BASE_PRECISION"],"type":"i64"},{"name":"openAsks","docs":["The amount of non reduce only trigger orders the user has open","precision: BASE_PRECISION"],"type":"i64"},{"name":"settledPnl","docs":["The amount of pnl settled in this market since opening the position","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"lpShares","docs":["The number of lp (liquidity provider) shares the user has in this perp market","LP shares allow users to provide liquidity via the AMM","precision: BASE_PRECISION"],"type":"u64"},{"name":"lastBaseAssetAmountPerLp","docs":["The last base asset amount per lp the amm had","Used to settle the users lp position","precision: BASE_PRECISION"],"type":"i64"},{"name":"lastQuoteAssetAmountPerLp","docs":["The last quote asset amount per lp the amm had","Used to settle the users lp position","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"padding","type":{"array":["u8",2]}},{"name":"maxMarginRatio","type":"u16"},{"name":"marketIndex","docs":["The market index for the perp market"],"type":"u16"},{"name":"openOrders","docs":["The number of open orders"],"type":"u8"},{"name":"perLpBase","type":"i8"}]}},{"name":"Order","type":{"kind":"struct","fields":[{"name":"slot","docs":["The slot the order was placed"],"type":"u64"},{"name":"price","docs":["The limit price for the order (can be 0 for market orders)","For orders with an auction, this price isn't used until the auction is complete","precision: PRICE_PRECISION"],"type":"u64"},{"name":"baseAssetAmount","docs":["The size of the order","precision for perps: BASE_PRECISION","precision for spot: token mint precision"],"type":"u64"},{"name":"baseAssetAmountFilled","docs":["The amount of the order filled","precision for perps: BASE_PRECISION","precision for spot: token mint precision"],"type":"u64"},{"name":"quoteAssetAmountFilled","docs":["The amount of quote filled for the order","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"triggerPrice","docs":["At what price the order will be triggered. Only relevant for trigger orders","precision: PRICE_PRECISION"],"type":"u64"},{"name":"auctionStartPrice","docs":["The start price for the auction. Only relevant for market/oracle orders","precision: PRICE_PRECISION"],"type":"i64"},{"name":"auctionEndPrice","docs":["The end price for the auction. Only relevant for market/oracle orders","precision: PRICE_PRECISION"],"type":"i64"},{"name":"maxTs","docs":["The time when the order will expire"],"type":"i64"},{"name":"oraclePriceOffset","docs":["If set, the order limit price is the oracle price + this offset","precision: PRICE_PRECISION"],"type":"i32"},{"name":"orderId","docs":["The id for the order. Each users has their own order id space"],"type":"u32"},{"name":"marketIndex","docs":["The perp/spot market index"],"type":"u16"},{"name":"status","docs":["Whether the order is open or unused"],"type":{"defined":"OrderStatus"}},{"name":"orderType","docs":["The type of order"],"type":{"defined":"OrderType"}},{"name":"marketType","docs":["Whether market is spot or perp"],"type":{"defined":"MarketType"}},{"name":"userOrderId","docs":["User generated order id. Can make it easier to place/cancel orders"],"type":"u8"},{"name":"existingPositionDirection","docs":["What the users position was when the order was placed"],"type":{"defined":"PositionDirection"}},{"name":"direction","docs":["Whether the user is going long or short. LONG = bid, SHORT = ask"],"type":{"defined":"PositionDirection"}},{"name":"reduceOnly","docs":["Whether the order is allowed to only reduce position size"],"type":"bool"},{"name":"postOnly","docs":["Whether the order must be a maker"],"type":"bool"},{"name":"immediateOrCancel","docs":["Whether the order must be canceled the same slot it is placed"],"type":"bool"},{"name":"triggerCondition","docs":["Whether the order is triggered above or below the trigger price. Only relevant for trigger orders"],"type":{"defined":"OrderTriggerCondition"}},{"name":"auctionDuration","docs":["How many slots the auction lasts"],"type":"u8"},{"name":"postedSlotTail","docs":["Last 8 bits of the slot the order was posted on-chain (not order slot for signed msg orders)"],"type":"u8"},{"name":"bitFlags","docs":["Bitflags for further classification","0: is_signed_message"],"type":"u8"},{"name":"padding","type":{"array":["u8",1]}}]}},{"name":"SwapDirection","type":{"kind":"enum","variants":[{"name":"Add"},{"name":"Remove"}]}},{"name":"ModifyOrderId","type":{"kind":"enum","variants":[{"name":"UserOrderId","fields":["u8"]},{"name":"OrderId","fields":["u32"]}]}},{"name":"PositionDirection","type":{"kind":"enum","variants":[{"name":"Long"},{"name":"Short"}]}},{"name":"SpotFulfillmentType","type":{"kind":"enum","variants":[{"name":"SerumV3"},{"name":"Match"},{"name":"PhoenixV1"},{"name":"OpenbookV2"}]}},{"name":"SwapReduceOnly","type":{"kind":"enum","variants":[{"name":"In"},{"name":"Out"}]}},{"name":"TwapPeriod","type":{"kind":"enum","variants":[{"name":"FundingPeriod"},{"name":"FiveMin"}]}},{"name":"LiquidationMultiplierType","type":{"kind":"enum","variants":[{"name":"Discount"},{"name":"Premium"}]}},{"name":"SettlementDirection","type":{"kind":"enum","variants":[{"name":"ToLpPool"},{"name":"FromLpPool"},{"name":"None"}]}},{"name":"MarginRequirementType","type":{"kind":"enum","variants":[{"name":"Initial"},{"name":"Fill"},{"name":"Maintenance"}]}},{"name":"OracleValidity","type":{"kind":"enum","variants":[{"name":"NonPositive"},{"name":"TooVolatile"},{"name":"TooUncertain"},{"name":"StaleForMargin"},{"name":"InsufficientDataPoints"},{"name":"StaleForAMM","fields":[{"name":"immediate","type":"bool"},{"name":"lowRisk","type":"bool"}]},{"name":"Valid"}]}},{"name":"DriftAction","type":{"kind":"enum","variants":[{"name":"UpdateFunding"},{"name":"SettlePnl"},{"name":"TriggerOrder"},{"name":"FillOrderMatch"},{"name":"FillOrderAmmLowRisk"},{"name":"FillOrderAmmImmediate"},{"name":"Liquidate"},{"name":"MarginCalc"},{"name":"UpdateTwap"},{"name":"UpdateAMMCurve"},{"name":"OracleOrderPrice"},{"name":"UseMMOraclePrice"},{"name":"UpdateAmmCache"},{"name":"UpdateLpPoolAum"},{"name":"LpPoolSwap"}]}},{"name":"LogMode","type":{"kind":"enum","variants":[{"name":"None"},{"name":"ExchangeOracle"},{"name":"MMOracle"},{"name":"SafeMMOracle"},{"name":"Margin"}]}},{"name":"PositionUpdateType","type":{"kind":"enum","variants":[{"name":"Open"},{"name":"Increase"},{"name":"Reduce"},{"name":"Close"},{"name":"Flip"}]}},{"name":"DepositExplanation","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Transfer"},{"name":"Borrow"},{"name":"RepayBorrow"},{"name":"Reward"}]}},{"name":"DepositDirection","type":{"kind":"enum","variants":[{"name":"Deposit"},{"name":"Withdraw"}]}},{"name":"OrderAction","type":{"kind":"enum","variants":[{"name":"Place"},{"name":"Cancel"},{"name":"Fill"},{"name":"Trigger"},{"name":"Expire"}]}},{"name":"OrderActionExplanation","type":{"kind":"enum","variants":[{"name":"None"},{"name":"InsufficientFreeCollateral"},{"name":"OraclePriceBreachedLimitPrice"},{"name":"MarketOrderFilledToLimitPrice"},{"name":"OrderExpired"},{"name":"Liquidation"},{"name":"OrderFilledWithAMM"},{"name":"OrderFilledWithAMMJit"},{"name":"OrderFilledWithMatch"},{"name":"OrderFilledWithMatchJit"},{"name":"MarketExpired"},{"name":"RiskingIncreasingOrder"},{"name":"ReduceOnlyOrderIncreasedPosition"},{"name":"OrderFillWithSerum"},{"name":"NoBorrowLiquidity"},{"name":"OrderFillWithPhoenix"},{"name":"OrderFilledWithAMMJitLPSplit"},{"name":"OrderFilledWithLPJit"},{"name":"DeriskLp"},{"name":"OrderFilledWithOpenbookV2"},{"name":"TransferPerpPosition"}]}},{"name":"LPAction","type":{"kind":"enum","variants":[{"name":"AddLiquidity"},{"name":"RemoveLiquidity"},{"name":"SettleLiquidity"},{"name":"RemoveLiquidityDerisk"}]}},{"name":"LiquidationType","type":{"kind":"enum","variants":[{"name":"LiquidatePerp"},{"name":"LiquidateSpot"},{"name":"LiquidateBorrowForPerpPnl"},{"name":"LiquidatePerpPnlForDeposit"},{"name":"PerpBankruptcy"},{"name":"SpotBankruptcy"}]}},{"name":"SettlePnlExplanation","type":{"kind":"enum","variants":[{"name":"None"},{"name":"ExpiredPosition"}]}},{"name":"StakeAction","type":{"kind":"enum","variants":[{"name":"Stake"},{"name":"UnstakeRequest"},{"name":"UnstakeCancelRequest"},{"name":"Unstake"},{"name":"UnstakeTransfer"},{"name":"StakeTransfer"},{"name":"AdminDeposit"}]}},{"name":"FillMode","type":{"kind":"enum","variants":[{"name":"Fill"},{"name":"PlaceAndMake"},{"name":"PlaceAndTake","fields":["bool","u8"]},{"name":"Liquidation"}]}},{"name":"PerpFulfillmentMethod","type":{"kind":"enum","variants":[{"name":"AMM","fields":[{"option":"u64"}]},{"name":"Match","fields":["publicKey","u16","u64"]}]}},{"name":"SpotFulfillmentMethod","type":{"kind":"enum","variants":[{"name":"ExternalMarket"},{"name":"Match","fields":["publicKey","u16"]}]}},{"name":"ConstituentStatus","type":{"kind":"enum","variants":[{"name":"ReduceOnly"},{"name":"Decommissioned"}]}},{"name":"MarginCalculationMode","type":{"kind":"enum","variants":[{"name":"Standard","fields":[{"name":"trackOpenOrdersFraction","type":"bool"}]},{"name":"Liquidation","fields":[{"name":"marketToTrackMarginRequirement","type":{"option":{"defined":"MarketIdentifier"}}}]}]}},{"name":"OracleSource","type":{"kind":"enum","variants":[{"name":"Pyth"},{"name":"Switchboard"},{"name":"QuoteAsset"},{"name":"Pyth1K"},{"name":"Pyth1M"},{"name":"PythStableCoin"},{"name":"Prelaunch"},{"name":"PythPull"},{"name":"Pyth1KPull"},{"name":"Pyth1MPull"},{"name":"PythStableCoinPull"},{"name":"SwitchboardOnDemand"},{"name":"PythLazer"},{"name":"PythLazer1K"},{"name":"PythLazer1M"},{"name":"PythLazerStableCoin"}]}},{"name":"OrderParamsBitFlag","type":{"kind":"enum","variants":[{"name":"ImmediateOrCancel"},{"name":"UpdateHighLeverageMode"}]}},{"name":"PostOnlyParam","type":{"kind":"enum","variants":[{"name":"None"},{"name":"MustPostOnly"},{"name":"TryPostOnly"},{"name":"Slide"}]}},{"name":"ModifyOrderPolicy","type":{"kind":"enum","variants":[{"name":"MustModify"},{"name":"ExcludePreviousFill"}]}},{"name":"PlaceAndTakeOrderSuccessCondition","type":{"kind":"enum","variants":[{"name":"PartialFill"},{"name":"FullFill"}]}},{"name":"PerpOperation","type":{"kind":"enum","variants":[{"name":"UpdateFunding"},{"name":"AmmFill"},{"name":"Fill"},{"name":"SettlePnl"},{"name":"SettlePnlWithPosition"},{"name":"Liquidation"},{"name":"AmmImmediateFill"},{"name":"SettleRevPool"}]}},{"name":"SpotOperation","type":{"kind":"enum","variants":[{"name":"UpdateCumulativeInterest"},{"name":"Fill"},{"name":"Deposit"},{"name":"Withdraw"},{"name":"Liquidation"}]}},{"name":"InsuranceFundOperation","type":{"kind":"enum","variants":[{"name":"Init"},{"name":"Add"},{"name":"RequestRemove"},{"name":"Remove"}]}},{"name":"PerpLpOperation","type":{"kind":"enum","variants":[{"name":"TrackAmmRevenue"},{"name":"SettleQuoteOwed"}]}},{"name":"ConstituentLpOperation","type":{"kind":"enum","variants":[{"name":"Swap"},{"name":"Deposit"},{"name":"Withdraw"}]}},{"name":"MarketStatus","type":{"kind":"enum","variants":[{"name":"Initialized"},{"name":"Active"},{"name":"FundingPaused"},{"name":"AmmPaused"},{"name":"FillPaused"},{"name":"WithdrawPaused"},{"name":"ReduceOnly"},{"name":"Settlement"},{"name":"Delisted"}]}},{"name":"LpStatus","type":{"kind":"enum","variants":[{"name":"Uncollateralized"},{"name":"Active"},{"name":"Decommissioning"}]}},{"name":"ContractType","type":{"kind":"enum","variants":[{"name":"Perpetual"},{"name":"Future"},{"name":"Prediction"}]}},{"name":"ContractTier","type":{"kind":"enum","variants":[{"name":"A"},{"name":"B"},{"name":"C"},{"name":"Speculative"},{"name":"HighlySpeculative"},{"name":"Isolated"}]}},{"name":"RevenueShareOrderBitFlag","type":{"kind":"enum","variants":[{"name":"Init"},{"name":"Open"},{"name":"Completed"},{"name":"Referral"}]}},{"name":"SettlePnlMode","type":{"kind":"enum","variants":[{"name":"MustSettle"},{"name":"TrySettle"}]}},{"name":"SpotBalanceType","type":{"kind":"enum","variants":[{"name":"Deposit"},{"name":"Borrow"}]}},{"name":"SpotFulfillmentConfigStatus","type":{"kind":"enum","variants":[{"name":"Enabled"},{"name":"Disabled"}]}},{"name":"AssetTier","type":{"kind":"enum","variants":[{"name":"Collateral"},{"name":"Protected"},{"name":"Cross"},{"name":"Isolated"},{"name":"Unlisted"}]}},{"name":"TokenProgramFlag","type":{"kind":"enum","variants":[{"name":"Token2022"},{"name":"TransferHook"}]}},{"name":"ExchangeStatus","type":{"kind":"enum","variants":[{"name":"DepositPaused"},{"name":"WithdrawPaused"},{"name":"AmmPaused"},{"name":"FillPaused"},{"name":"LiqPaused"},{"name":"FundingPaused"},{"name":"SettlePnlPaused"},{"name":"AmmImmediateFillPaused"}]}},{"name":"FeatureBitFlags","type":{"kind":"enum","variants":[{"name":"MmOracleUpdate"},{"name":"MedianTriggerPrice"},{"name":"BuilderCodes"},{"name":"BuilderReferral"}]}},{"name":"LpPoolFeatureBitFlags","type":{"kind":"enum","variants":[{"name":"SettleLpPool"},{"name":"SwapLpPool"},{"name":"MintRedeemLpPool"}]}},{"name":"UserStatus","type":{"kind":"enum","variants":[{"name":"BeingLiquidated"},{"name":"Bankrupt"},{"name":"ReduceOnly"},{"name":"AdvancedLp"},{"name":"ProtectedMakerOrders"}]}},{"name":"AssetType","type":{"kind":"enum","variants":[{"name":"Base"},{"name":"Quote"}]}},{"name":"OrderStatus","type":{"kind":"enum","variants":[{"name":"Init"},{"name":"Open"},{"name":"Filled"},{"name":"Canceled"}]}},{"name":"OrderType","type":{"kind":"enum","variants":[{"name":"Market"},{"name":"Limit"},{"name":"TriggerMarket"},{"name":"TriggerLimit"},{"name":"Oracle"}]}},{"name":"OrderTriggerCondition","type":{"kind":"enum","variants":[{"name":"Above"},{"name":"Below"},{"name":"TriggeredAbove"},{"name":"TriggeredBelow"}]}},{"name":"MarketType","type":{"kind":"enum","variants":[{"name":"Spot"},{"name":"Perp"}]}},{"name":"OrderBitFlag","type":{"kind":"enum","variants":[{"name":"SignedMessage"},{"name":"OracleTriggerMarket"},{"name":"SafeTriggerOrder"},{"name":"NewTriggerReduceOnly"},{"name":"HasBuilder"}]}},{"name":"ReferrerStatus","type":{"kind":"enum","variants":[{"name":"IsReferrer"},{"name":"IsReferred"},{"name":"BuilderReferral"}]}},{"name":"MarginMode","type":{"kind":"enum","variants":[{"name":"Default"},{"name":"HighLeverage"},{"name":"HighLeverageMaintenance"}]}},{"name":"FuelOverflowStatus","type":{"kind":"enum","variants":[{"name":"Exists"}]}},{"name":"UserStatsPausedOperations","type":{"kind":"enum","variants":[{"name":"UpdateBidAskTwap"},{"name":"AmmAtomicFill"},{"name":"AmmAtomicRiskIncreasingFill"}]}},{"name":"SignatureVerificationError","type":{"kind":"enum","variants":[{"name":"InvalidEd25519InstructionProgramId"},{"name":"InvalidEd25519InstructionDataLength"},{"name":"InvalidSignatureIndex"},{"name":"InvalidSignatureOffset"},{"name":"InvalidPublicKeyOffset"},{"name":"InvalidMessageOffset"},{"name":"InvalidMessageDataSize"},{"name":"InvalidInstructionIndex"},{"name":"MessageOffsetOverflow"},{"name":"InvalidMessageHex"},{"name":"InvalidMessageData"},{"name":"LoadInstructionAtFailed"}]}}],"events":[{"name":"NewUserRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"userAuthority","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"subAccountId","type":"u16","index":false},{"name":"name","type":{"array":["u8",32]},"index":false},{"name":"referrer","type":"publicKey","index":false}]},{"name":"DepositRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"userAuthority","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"direction","type":{"defined":"DepositDirection"},"index":false},{"name":"depositRecordId","type":"u64","index":false},{"name":"amount","type":"u64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"oraclePrice","type":"i64","index":false},{"name":"marketDepositBalance","type":"u128","index":false},{"name":"marketWithdrawBalance","type":"u128","index":false},{"name":"marketCumulativeDepositInterest","type":"u128","index":false},{"name":"marketCumulativeBorrowInterest","type":"u128","index":false},{"name":"totalDepositsAfter","type":"u64","index":false},{"name":"totalWithdrawsAfter","type":"u64","index":false},{"name":"explanation","type":{"defined":"DepositExplanation"},"index":false},{"name":"transferUser","type":{"option":"publicKey"},"index":false},{"name":"signer","type":{"option":"publicKey"},"index":false},{"name":"userTokenAmountAfter","type":"i128","index":false}]},{"name":"SpotInterestRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"depositBalance","type":"u128","index":false},{"name":"cumulativeDepositInterest","type":"u128","index":false},{"name":"borrowBalance","type":"u128","index":false},{"name":"cumulativeBorrowInterest","type":"u128","index":false},{"name":"optimalUtilization","type":"u32","index":false},{"name":"optimalBorrowRate","type":"u32","index":false},{"name":"maxBorrowRate","type":"u32","index":false}]},{"name":"FundingPaymentRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"userAuthority","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"fundingPayment","type":"i64","index":false},{"name":"baseAssetAmount","type":"i64","index":false},{"name":"userLastCumulativeFunding","type":"i64","index":false},{"name":"ammCumulativeFundingLong","type":"i128","index":false},{"name":"ammCumulativeFundingShort","type":"i128","index":false}]},{"name":"FundingRateRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"recordId","type":"u64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"fundingRate","type":"i64","index":false},{"name":"fundingRateLong","type":"i128","index":false},{"name":"fundingRateShort","type":"i128","index":false},{"name":"cumulativeFundingRateLong","type":"i128","index":false},{"name":"cumulativeFundingRateShort","type":"i128","index":false},{"name":"oraclePriceTwap","type":"i64","index":false},{"name":"markPriceTwap","type":"u64","index":false},{"name":"periodRevenue","type":"i64","index":false},{"name":"baseAssetAmountWithAmm","type":"i128","index":false},{"name":"baseAssetAmountWithUnsettledLp","type":"i128","index":false}]},{"name":"CurveRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"recordId","type":"u64","index":false},{"name":"pegMultiplierBefore","type":"u128","index":false},{"name":"baseAssetReserveBefore","type":"u128","index":false},{"name":"quoteAssetReserveBefore","type":"u128","index":false},{"name":"sqrtKBefore","type":"u128","index":false},{"name":"pegMultiplierAfter","type":"u128","index":false},{"name":"baseAssetReserveAfter","type":"u128","index":false},{"name":"quoteAssetReserveAfter","type":"u128","index":false},{"name":"sqrtKAfter","type":"u128","index":false},{"name":"baseAssetAmountLong","type":"u128","index":false},{"name":"baseAssetAmountShort","type":"u128","index":false},{"name":"baseAssetAmountWithAmm","type":"i128","index":false},{"name":"totalFee","type":"i128","index":false},{"name":"totalFeeMinusDistributions","type":"i128","index":false},{"name":"adjustmentCost","type":"i128","index":false},{"name":"oraclePrice","type":"i64","index":false},{"name":"fillRecord","type":"u128","index":false},{"name":"numberOfUsers","type":"u32","index":false},{"name":"marketIndex","type":"u16","index":false}]},{"name":"SignedMsgOrderRecord","fields":[{"name":"user","type":"publicKey","index":false},{"name":"hash","type":"string","index":false},{"name":"matchingOrderParams","type":{"defined":"OrderParams"},"index":false},{"name":"userOrderId","type":"u32","index":false},{"name":"signedMsgOrderMaxSlot","type":"u64","index":false},{"name":"signedMsgOrderUuid","type":{"array":["u8",8]},"index":false},{"name":"ts","type":"i64","index":false}]},{"name":"OrderRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"user","type":"publicKey","index":false},{"name":"order","type":{"defined":"Order"},"index":false}]},{"name":"OrderActionRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"action","type":{"defined":"OrderAction"},"index":false},{"name":"actionExplanation","type":{"defined":"OrderActionExplanation"},"index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"marketType","type":{"defined":"MarketType"},"index":false},{"name":"filler","type":{"option":"publicKey"},"index":false},{"name":"fillerReward","type":{"option":"u64"},"index":false},{"name":"fillRecordId","type":{"option":"u64"},"index":false},{"name":"baseAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"quoteAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"takerFee","type":{"option":"u64"},"index":false},{"name":"makerFee","type":{"option":"i64"},"index":false},{"name":"referrerReward","type":{"option":"u32"},"index":false},{"name":"quoteAssetAmountSurplus","type":{"option":"i64"},"index":false},{"name":"spotFulfillmentMethodFee","type":{"option":"u64"},"index":false},{"name":"taker","type":{"option":"publicKey"},"index":false},{"name":"takerOrderId","type":{"option":"u32"},"index":false},{"name":"takerOrderDirection","type":{"option":{"defined":"PositionDirection"}},"index":false},{"name":"takerOrderBaseAssetAmount","type":{"option":"u64"},"index":false},{"name":"takerOrderCumulativeBaseAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"takerOrderCumulativeQuoteAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"maker","type":{"option":"publicKey"},"index":false},{"name":"makerOrderId","type":{"option":"u32"},"index":false},{"name":"makerOrderDirection","type":{"option":{"defined":"PositionDirection"}},"index":false},{"name":"makerOrderBaseAssetAmount","type":{"option":"u64"},"index":false},{"name":"makerOrderCumulativeBaseAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"makerOrderCumulativeQuoteAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"oraclePrice","type":"i64","index":false},{"name":"bitFlags","type":"u8","index":false},{"name":"takerExistingQuoteEntryAmount","type":{"option":"u64"},"index":false},{"name":"takerExistingBaseAssetAmount","type":{"option":"u64"},"index":false},{"name":"makerExistingQuoteEntryAmount","type":{"option":"u64"},"index":false},{"name":"makerExistingBaseAssetAmount","type":{"option":"u64"},"index":false},{"name":"triggerPrice","type":{"option":"u64"},"index":false},{"name":"builderIdx","type":{"option":"u8"},"index":false},{"name":"builderFee","type":{"option":"u64"},"index":false}]},{"name":"LPRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"user","type":"publicKey","index":false},{"name":"action","type":{"defined":"LPAction"},"index":false},{"name":"nShares","type":"u64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"deltaBaseAssetAmount","type":"i64","index":false},{"name":"deltaQuoteAssetAmount","type":"i64","index":false},{"name":"pnl","type":"i64","index":false}]},{"name":"LiquidationRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"liquidationType","type":{"defined":"LiquidationType"},"index":false},{"name":"user","type":"publicKey","index":false},{"name":"liquidator","type":"publicKey","index":false},{"name":"marginRequirement","type":"u128","index":false},{"name":"totalCollateral","type":"i128","index":false},{"name":"marginFreed","type":"u64","index":false},{"name":"liquidationId","type":"u16","index":false},{"name":"bankrupt","type":"bool","index":false},{"name":"canceledOrderIds","type":{"vec":"u32"},"index":false},{"name":"liquidatePerp","type":{"defined":"LiquidatePerpRecord"},"index":false},{"name":"liquidateSpot","type":{"defined":"LiquidateSpotRecord"},"index":false},{"name":"liquidateBorrowForPerpPnl","type":{"defined":"LiquidateBorrowForPerpPnlRecord"},"index":false},{"name":"liquidatePerpPnlForDeposit","type":{"defined":"LiquidatePerpPnlForDepositRecord"},"index":false},{"name":"perpBankruptcy","type":{"defined":"PerpBankruptcyRecord"},"index":false},{"name":"spotBankruptcy","type":{"defined":"SpotBankruptcyRecord"},"index":false}]},{"name":"SettlePnlRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"user","type":"publicKey","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"pnl","type":"i128","index":false},{"name":"baseAssetAmount","type":"i64","index":false},{"name":"quoteAssetAmountAfter","type":"i64","index":false},{"name":"quoteEntryAmount","type":"i64","index":false},{"name":"settlePrice","type":"i64","index":false},{"name":"explanation","type":{"defined":"SettlePnlExplanation"},"index":false}]},{"name":"InsuranceFundRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"spotMarketIndex","type":"u16","index":false},{"name":"perpMarketIndex","type":"u16","index":false},{"name":"userIfFactor","type":"u32","index":false},{"name":"totalIfFactor","type":"u32","index":false},{"name":"vaultAmountBefore","type":"u64","index":false},{"name":"insuranceVaultAmountBefore","type":"u64","index":false},{"name":"totalIfSharesBefore","type":"u128","index":false},{"name":"totalIfSharesAfter","type":"u128","index":false},{"name":"amount","type":"i64","index":false}]},{"name":"InsuranceFundStakeRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"userAuthority","type":"publicKey","index":false},{"name":"action","type":{"defined":"StakeAction"},"index":false},{"name":"amount","type":"u64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"insuranceVaultAmountBefore","type":"u64","index":false},{"name":"ifSharesBefore","type":"u128","index":false},{"name":"userIfSharesBefore","type":"u128","index":false},{"name":"totalIfSharesBefore","type":"u128","index":false},{"name":"ifSharesAfter","type":"u128","index":false},{"name":"userIfSharesAfter","type":"u128","index":false},{"name":"totalIfSharesAfter","type":"u128","index":false}]},{"name":"InsuranceFundSwapRecord","fields":[{"name":"rebalanceConfig","type":"publicKey","index":false},{"name":"inIfTotalSharesBefore","type":"u128","index":false},{"name":"outIfTotalSharesBefore","type":"u128","index":false},{"name":"inIfUserSharesBefore","type":"u128","index":false},{"name":"outIfUserSharesBefore","type":"u128","index":false},{"name":"inIfTotalSharesAfter","type":"u128","index":false},{"name":"outIfTotalSharesAfter","type":"u128","index":false},{"name":"inIfUserSharesAfter","type":"u128","index":false},{"name":"outIfUserSharesAfter","type":"u128","index":false},{"name":"ts","type":"i64","index":false},{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false},{"name":"outOraclePrice","type":"u64","index":false},{"name":"outOraclePriceTwap","type":"i64","index":false},{"name":"inVaultAmountBefore","type":"u64","index":false},{"name":"outVaultAmountBefore","type":"u64","index":false},{"name":"inFundVaultAmountAfter","type":"u64","index":false},{"name":"outFundVaultAmountAfter","type":"u64","index":false},{"name":"inMarketIndex","type":"u16","index":false},{"name":"outMarketIndex","type":"u16","index":false}]},{"name":"TransferProtocolIfSharesToRevenuePoolRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"amount","type":"u64","index":false},{"name":"shares","type":"u128","index":false},{"name":"ifVaultAmountBefore","type":"u64","index":false},{"name":"protocolSharesBefore","type":"u128","index":false},{"name":"transferAmount","type":"u64","index":false}]},{"name":"SwapRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"user","type":"publicKey","index":false},{"name":"amountOut","type":"u64","index":false},{"name":"amountIn","type":"u64","index":false},{"name":"outMarketIndex","type":"u16","index":false},{"name":"inMarketIndex","type":"u16","index":false},{"name":"outOraclePrice","type":"i64","index":false},{"name":"inOraclePrice","type":"i64","index":false},{"name":"fee","type":"u64","index":false}]},{"name":"SpotMarketVaultDepositRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"depositBalance","type":"u128","index":false},{"name":"cumulativeDepositInterestBefore","type":"u128","index":false},{"name":"cumulativeDepositInterestAfter","type":"u128","index":false},{"name":"depositTokenAmountBefore","type":"u64","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"DeleteUserRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"userAuthority","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"subAccountId","type":"u16","index":false},{"name":"keeper","type":{"option":"publicKey"},"index":false}]},{"name":"FuelSweepRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"userStatsFuelInsurance","type":"u32","index":false},{"name":"userStatsFuelDeposits","type":"u32","index":false},{"name":"userStatsFuelBorrows","type":"u32","index":false},{"name":"userStatsFuelPositions","type":"u32","index":false},{"name":"userStatsFuelTaker","type":"u32","index":false},{"name":"userStatsFuelMaker","type":"u32","index":false},{"name":"fuelOverflowFuelInsurance","type":"u128","index":false},{"name":"fuelOverflowFuelDeposits","type":"u128","index":false},{"name":"fuelOverflowFuelBorrows","type":"u128","index":false},{"name":"fuelOverflowFuelPositions","type":"u128","index":false},{"name":"fuelOverflowFuelTaker","type":"u128","index":false},{"name":"fuelOverflowFuelMaker","type":"u128","index":false}]},{"name":"FuelSeasonRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"fuelInsurance","type":"u128","index":false},{"name":"fuelDeposits","type":"u128","index":false},{"name":"fuelBorrows","type":"u128","index":false},{"name":"fuelPositions","type":"u128","index":false},{"name":"fuelTaker","type":"u128","index":false},{"name":"fuelMaker","type":"u128","index":false},{"name":"fuelTotal","type":"u128","index":false}]},{"name":"RevenueShareSettleRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"builder","type":{"option":"publicKey"},"index":false},{"name":"referrer","type":{"option":"publicKey"},"index":false},{"name":"feeSettled","type":"u64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"marketType","type":{"defined":"MarketType"},"index":false},{"name":"builderSubAccountId","type":"u16","index":false},{"name":"builderTotalReferrerRewards","type":"u64","index":false},{"name":"builderTotalBuilderRewards","type":"u64","index":false}]},{"name":"LPSettleRecord","fields":[{"name":"recordId","type":"u64","index":false},{"name":"lastTs","type":"i64","index":false},{"name":"lastSlot","type":"u64","index":false},{"name":"ts","type":"i64","index":false},{"name":"slot","type":"u64","index":false},{"name":"perpMarketIndex","type":"u16","index":false},{"name":"settleToLpAmount","type":"i64","index":false},{"name":"perpAmmPnlDelta","type":"i64","index":false},{"name":"perpAmmExFeeDelta","type":"i64","index":false},{"name":"lpAum","type":"u128","index":false},{"name":"lpPrice","type":"u128","index":false},{"name":"lpPool","type":"publicKey","index":false}]},{"name":"LPSwapRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"slot","type":"u64","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"outAmount","type":"u128","index":false},{"name":"inAmount","type":"u128","index":false},{"name":"outFee","type":"i128","index":false},{"name":"inFee","type":"i128","index":false},{"name":"outSpotMarketIndex","type":"u16","index":false},{"name":"inSpotMarketIndex","type":"u16","index":false},{"name":"outConstituentIndex","type":"u16","index":false},{"name":"inConstituentIndex","type":"u16","index":false},{"name":"outOraclePrice","type":"i64","index":false},{"name":"inOraclePrice","type":"i64","index":false},{"name":"lastAum","type":"u128","index":false},{"name":"lastAumSlot","type":"u64","index":false},{"name":"inMarketCurrentWeight","type":"i64","index":false},{"name":"outMarketCurrentWeight","type":"i64","index":false},{"name":"inMarketTargetWeight","type":"i64","index":false},{"name":"outMarketTargetWeight","type":"i64","index":false},{"name":"inSwapId","type":"u64","index":false},{"name":"outSwapId","type":"u64","index":false},{"name":"lpPool","type":"publicKey","index":false}]},{"name":"LPMintRedeemRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"slot","type":"u64","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"description","type":"u8","index":false},{"name":"amount","type":"u128","index":false},{"name":"fee","type":"i128","index":false},{"name":"spotMarketIndex","type":"u16","index":false},{"name":"constituentIndex","type":"u16","index":false},{"name":"oraclePrice","type":"i64","index":false},{"name":"mint","type":"publicKey","index":false},{"name":"lpAmount","type":"u64","index":false},{"name":"lpFee","type":"i64","index":false},{"name":"lpPrice","type":"u128","index":false},{"name":"mintRedeemId","type":"u64","index":false},{"name":"lastAum","type":"u128","index":false},{"name":"lastAumSlot","type":"u64","index":false},{"name":"inMarketCurrentWeight","type":"i64","index":false},{"name":"inMarketTargetWeight","type":"i64","index":false},{"name":"lpPool","type":"publicKey","index":false}]},{"name":"LPBorrowLendDepositRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"slot","type":"u64","index":false},{"name":"spotMarketIndex","type":"u16","index":false},{"name":"constituentIndex","type":"u16","index":false},{"name":"direction","type":{"defined":"DepositDirection"},"index":false},{"name":"tokenBalance","type":"i64","index":false},{"name":"lastTokenBalance","type":"i64","index":false},{"name":"interestAccruedTokenAmount","type":"i64","index":false},{"name":"amountDepositWithdraw","type":"u64","index":false},{"name":"lpPool","type":"publicKey","index":false}]}],"errors":[{"code":6000,"name":"InvalidSpotMarketAuthority","msg":"Invalid Spot Market Authority"},{"code":6001,"name":"InvalidInsuranceFundAuthority","msg":"Clearing house not insurance fund authority"},{"code":6002,"name":"InsufficientDeposit","msg":"Insufficient deposit"},{"code":6003,"name":"InsufficientCollateral","msg":"Insufficient collateral"},{"code":6004,"name":"SufficientCollateral","msg":"Sufficient collateral"},{"code":6005,"name":"MaxNumberOfPositions","msg":"Max number of positions taken"},{"code":6006,"name":"AdminControlsPricesDisabled","msg":"Admin Controls Prices Disabled"},{"code":6007,"name":"MarketDelisted","msg":"Market Delisted"},{"code":6008,"name":"MarketIndexAlreadyInitialized","msg":"Market Index Already Initialized"},{"code":6009,"name":"UserAccountAndUserPositionsAccountMismatch","msg":"User Account And User Positions Account Mismatch"},{"code":6010,"name":"UserHasNoPositionInMarket","msg":"User Has No Position In Market"},{"code":6011,"name":"InvalidInitialPeg","msg":"Invalid Initial Peg"},{"code":6012,"name":"InvalidRepegRedundant","msg":"AMM repeg already configured with amt given"},{"code":6013,"name":"InvalidRepegDirection","msg":"AMM repeg incorrect repeg direction"},{"code":6014,"name":"InvalidRepegProfitability","msg":"AMM repeg out of bounds pnl"},{"code":6015,"name":"SlippageOutsideLimit","msg":"Slippage Outside Limit Price"},{"code":6016,"name":"OrderSizeTooSmall","msg":"Order Size Too Small"},{"code":6017,"name":"InvalidUpdateK","msg":"Price change too large when updating K"},{"code":6018,"name":"AdminWithdrawTooLarge","msg":"Admin tried to withdraw amount larger than fees collected"},{"code":6019,"name":"MathError","msg":"Math Error"},{"code":6020,"name":"BnConversionError","msg":"Conversion to u128/u64 failed with an overflow or underflow"},{"code":6021,"name":"ClockUnavailable","msg":"Clock unavailable"},{"code":6022,"name":"UnableToLoadOracle","msg":"Unable To Load Oracles"},{"code":6023,"name":"PriceBandsBreached","msg":"Price Bands Breached"},{"code":6024,"name":"ExchangePaused","msg":"Exchange is paused"},{"code":6025,"name":"InvalidWhitelistToken","msg":"Invalid whitelist token"},{"code":6026,"name":"WhitelistTokenNotFound","msg":"Whitelist token not found"},{"code":6027,"name":"InvalidDiscountToken","msg":"Invalid discount token"},{"code":6028,"name":"DiscountTokenNotFound","msg":"Discount token not found"},{"code":6029,"name":"ReferrerNotFound","msg":"Referrer not found"},{"code":6030,"name":"ReferrerStatsNotFound","msg":"ReferrerNotFound"},{"code":6031,"name":"ReferrerMustBeWritable","msg":"ReferrerMustBeWritable"},{"code":6032,"name":"ReferrerStatsMustBeWritable","msg":"ReferrerMustBeWritable"},{"code":6033,"name":"ReferrerAndReferrerStatsAuthorityUnequal","msg":"ReferrerAndReferrerStatsAuthorityUnequal"},{"code":6034,"name":"InvalidReferrer","msg":"InvalidReferrer"},{"code":6035,"name":"InvalidOracle","msg":"InvalidOracle"},{"code":6036,"name":"OracleNotFound","msg":"OracleNotFound"},{"code":6037,"name":"LiquidationsBlockedByOracle","msg":"Liquidations Blocked By Oracle"},{"code":6038,"name":"MaxDeposit","msg":"Can not deposit more than max deposit"},{"code":6039,"name":"CantDeleteUserWithCollateral","msg":"Can not delete user that still has collateral"},{"code":6040,"name":"InvalidFundingProfitability","msg":"AMM funding out of bounds pnl"},{"code":6041,"name":"CastingFailure","msg":"Casting Failure"},{"code":6042,"name":"InvalidOrder","msg":"InvalidOrder"},{"code":6043,"name":"InvalidOrderMaxTs","msg":"InvalidOrderMaxTs"},{"code":6044,"name":"InvalidOrderMarketType","msg":"InvalidOrderMarketType"},{"code":6045,"name":"InvalidOrderForInitialMarginReq","msg":"InvalidOrderForInitialMarginReq"},{"code":6046,"name":"InvalidOrderNotRiskReducing","msg":"InvalidOrderNotRiskReducing"},{"code":6047,"name":"InvalidOrderSizeTooSmall","msg":"InvalidOrderSizeTooSmall"},{"code":6048,"name":"InvalidOrderNotStepSizeMultiple","msg":"InvalidOrderNotStepSizeMultiple"},{"code":6049,"name":"InvalidOrderBaseQuoteAsset","msg":"InvalidOrderBaseQuoteAsset"},{"code":6050,"name":"InvalidOrderIOC","msg":"InvalidOrderIOC"},{"code":6051,"name":"InvalidOrderPostOnly","msg":"InvalidOrderPostOnly"},{"code":6052,"name":"InvalidOrderIOCPostOnly","msg":"InvalidOrderIOCPostOnly"},{"code":6053,"name":"InvalidOrderTrigger","msg":"InvalidOrderTrigger"},{"code":6054,"name":"InvalidOrderAuction","msg":"InvalidOrderAuction"},{"code":6055,"name":"InvalidOrderOracleOffset","msg":"InvalidOrderOracleOffset"},{"code":6056,"name":"InvalidOrderMinOrderSize","msg":"InvalidOrderMinOrderSize"},{"code":6057,"name":"PlacePostOnlyLimitFailure","msg":"Failed to Place Post-Only Limit Order"},{"code":6058,"name":"UserHasNoOrder","msg":"User has no order"},{"code":6059,"name":"OrderAmountTooSmall","msg":"Order Amount Too Small"},{"code":6060,"name":"MaxNumberOfOrders","msg":"Max number of orders taken"},{"code":6061,"name":"OrderDoesNotExist","msg":"Order does not exist"},{"code":6062,"name":"OrderNotOpen","msg":"Order not open"},{"code":6063,"name":"FillOrderDidNotUpdateState","msg":"FillOrderDidNotUpdateState"},{"code":6064,"name":"ReduceOnlyOrderIncreasedRisk","msg":"Reduce only order increased risk"},{"code":6065,"name":"UnableToLoadAccountLoader","msg":"Unable to load AccountLoader"},{"code":6066,"name":"TradeSizeTooLarge","msg":"Trade Size Too Large"},{"code":6067,"name":"UserCantReferThemselves","msg":"User cant refer themselves"},{"code":6068,"name":"DidNotReceiveExpectedReferrer","msg":"Did not receive expected referrer"},{"code":6069,"name":"CouldNotDeserializeReferrer","msg":"Could not deserialize referrer"},{"code":6070,"name":"CouldNotDeserializeReferrerStats","msg":"Could not deserialize referrer stats"},{"code":6071,"name":"UserOrderIdAlreadyInUse","msg":"User Order Id Already In Use"},{"code":6072,"name":"NoPositionsLiquidatable","msg":"No positions liquidatable"},{"code":6073,"name":"InvalidMarginRatio","msg":"Invalid Margin Ratio"},{"code":6074,"name":"CantCancelPostOnlyOrder","msg":"Cant Cancel Post Only Order"},{"code":6075,"name":"InvalidOracleOffset","msg":"InvalidOracleOffset"},{"code":6076,"name":"CantExpireOrders","msg":"CantExpireOrders"},{"code":6077,"name":"CouldNotLoadMarketData","msg":"CouldNotLoadMarketData"},{"code":6078,"name":"PerpMarketNotFound","msg":"PerpMarketNotFound"},{"code":6079,"name":"InvalidMarketAccount","msg":"InvalidMarketAccount"},{"code":6080,"name":"UnableToLoadPerpMarketAccount","msg":"UnableToLoadMarketAccount"},{"code":6081,"name":"MarketWrongMutability","msg":"MarketWrongMutability"},{"code":6082,"name":"UnableToCastUnixTime","msg":"UnableToCastUnixTime"},{"code":6083,"name":"CouldNotFindSpotPosition","msg":"CouldNotFindSpotPosition"},{"code":6084,"name":"NoSpotPositionAvailable","msg":"NoSpotPositionAvailable"},{"code":6085,"name":"InvalidSpotMarketInitialization","msg":"InvalidSpotMarketInitialization"},{"code":6086,"name":"CouldNotLoadSpotMarketData","msg":"CouldNotLoadSpotMarketData"},{"code":6087,"name":"SpotMarketNotFound","msg":"SpotMarketNotFound"},{"code":6088,"name":"InvalidSpotMarketAccount","msg":"InvalidSpotMarketAccount"},{"code":6089,"name":"UnableToLoadSpotMarketAccount","msg":"UnableToLoadSpotMarketAccount"},{"code":6090,"name":"SpotMarketWrongMutability","msg":"SpotMarketWrongMutability"},{"code":6091,"name":"SpotMarketInterestNotUpToDate","msg":"SpotInterestNotUpToDate"},{"code":6092,"name":"SpotMarketInsufficientDeposits","msg":"SpotMarketInsufficientDeposits"},{"code":6093,"name":"UserMustSettleTheirOwnPositiveUnsettledPNL","msg":"UserMustSettleTheirOwnPositiveUnsettledPNL"},{"code":6094,"name":"CantUpdatePoolBalanceType","msg":"CantUpdatePoolBalanceType"},{"code":6095,"name":"InsufficientCollateralForSettlingPNL","msg":"InsufficientCollateralForSettlingPNL"},{"code":6096,"name":"AMMNotUpdatedInSameSlot","msg":"AMMNotUpdatedInSameSlot"},{"code":6097,"name":"AuctionNotComplete","msg":"AuctionNotComplete"},{"code":6098,"name":"MakerNotFound","msg":"MakerNotFound"},{"code":6099,"name":"MakerStatsNotFound","msg":"MakerNotFound"},{"code":6100,"name":"MakerMustBeWritable","msg":"MakerMustBeWritable"},{"code":6101,"name":"MakerStatsMustBeWritable","msg":"MakerMustBeWritable"},{"code":6102,"name":"MakerOrderNotFound","msg":"MakerOrderNotFound"},{"code":6103,"name":"CouldNotDeserializeMaker","msg":"CouldNotDeserializeMaker"},{"code":6104,"name":"CouldNotDeserializeMakerStats","msg":"CouldNotDeserializeMaker"},{"code":6105,"name":"AuctionPriceDoesNotSatisfyMaker","msg":"AuctionPriceDoesNotSatisfyMaker"},{"code":6106,"name":"MakerCantFulfillOwnOrder","msg":"MakerCantFulfillOwnOrder"},{"code":6107,"name":"MakerOrderMustBePostOnly","msg":"MakerOrderMustBePostOnly"},{"code":6108,"name":"CantMatchTwoPostOnlys","msg":"CantMatchTwoPostOnlys"},{"code":6109,"name":"OrderBreachesOraclePriceLimits","msg":"OrderBreachesOraclePriceLimits"},{"code":6110,"name":"OrderMustBeTriggeredFirst","msg":"OrderMustBeTriggeredFirst"},{"code":6111,"name":"OrderNotTriggerable","msg":"OrderNotTriggerable"},{"code":6112,"name":"OrderDidNotSatisfyTriggerCondition","msg":"OrderDidNotSatisfyTriggerCondition"},{"code":6113,"name":"PositionAlreadyBeingLiquidated","msg":"PositionAlreadyBeingLiquidated"},{"code":6114,"name":"PositionDoesntHaveOpenPositionOrOrders","msg":"PositionDoesntHaveOpenPositionOrOrders"},{"code":6115,"name":"AllOrdersAreAlreadyLiquidations","msg":"AllOrdersAreAlreadyLiquidations"},{"code":6116,"name":"CantCancelLiquidationOrder","msg":"CantCancelLiquidationOrder"},{"code":6117,"name":"UserIsBeingLiquidated","msg":"UserIsBeingLiquidated"},{"code":6118,"name":"LiquidationsOngoing","msg":"LiquidationsOngoing"},{"code":6119,"name":"WrongSpotBalanceType","msg":"WrongSpotBalanceType"},{"code":6120,"name":"UserCantLiquidateThemself","msg":"UserCantLiquidateThemself"},{"code":6121,"name":"InvalidPerpPositionToLiquidate","msg":"InvalidPerpPositionToLiquidate"},{"code":6122,"name":"InvalidBaseAssetAmountForLiquidatePerp","msg":"InvalidBaseAssetAmountForLiquidatePerp"},{"code":6123,"name":"InvalidPositionLastFundingRate","msg":"InvalidPositionLastFundingRate"},{"code":6124,"name":"InvalidPositionDelta","msg":"InvalidPositionDelta"},{"code":6125,"name":"UserBankrupt","msg":"UserBankrupt"},{"code":6126,"name":"UserNotBankrupt","msg":"UserNotBankrupt"},{"code":6127,"name":"UserHasInvalidBorrow","msg":"UserHasInvalidBorrow"},{"code":6128,"name":"DailyWithdrawLimit","msg":"DailyWithdrawLimit"},{"code":6129,"name":"DefaultError","msg":"DefaultError"},{"code":6130,"name":"InsufficientLPTokens","msg":"Insufficient LP tokens"},{"code":6131,"name":"CantLPWithPerpPosition","msg":"Cant LP with a market position"},{"code":6132,"name":"UnableToBurnLPTokens","msg":"Unable to burn LP tokens"},{"code":6133,"name":"TryingToRemoveLiquidityTooFast","msg":"Trying to remove liqudity too fast after adding it"},{"code":6134,"name":"InvalidSpotMarketVault","msg":"Invalid Spot Market Vault"},{"code":6135,"name":"InvalidSpotMarketState","msg":"Invalid Spot Market State"},{"code":6136,"name":"InvalidSerumProgram","msg":"InvalidSerumProgram"},{"code":6137,"name":"InvalidSerumMarket","msg":"InvalidSerumMarket"},{"code":6138,"name":"InvalidSerumBids","msg":"InvalidSerumBids"},{"code":6139,"name":"InvalidSerumAsks","msg":"InvalidSerumAsks"},{"code":6140,"name":"InvalidSerumOpenOrders","msg":"InvalidSerumOpenOrders"},{"code":6141,"name":"FailedSerumCPI","msg":"FailedSerumCPI"},{"code":6142,"name":"FailedToFillOnExternalMarket","msg":"FailedToFillOnExternalMarket"},{"code":6143,"name":"InvalidFulfillmentConfig","msg":"InvalidFulfillmentConfig"},{"code":6144,"name":"InvalidFeeStructure","msg":"InvalidFeeStructure"},{"code":6145,"name":"InsufficientIFShares","msg":"Insufficient IF shares"},{"code":6146,"name":"MarketActionPaused","msg":"the Market has paused this action"},{"code":6147,"name":"MarketPlaceOrderPaused","msg":"the Market status doesnt allow placing orders"},{"code":6148,"name":"MarketFillOrderPaused","msg":"the Market status doesnt allow filling orders"},{"code":6149,"name":"MarketWithdrawPaused","msg":"the Market status doesnt allow withdraws"},{"code":6150,"name":"ProtectedAssetTierViolation","msg":"Action violates the Protected Asset Tier rules"},{"code":6151,"name":"IsolatedAssetTierViolation","msg":"Action violates the Isolated Asset Tier rules"},{"code":6152,"name":"UserCantBeDeleted","msg":"User Cant Be Deleted"},{"code":6153,"name":"ReduceOnlyWithdrawIncreasedRisk","msg":"Reduce Only Withdraw Increased Risk"},{"code":6154,"name":"MaxOpenInterest","msg":"Max Open Interest"},{"code":6155,"name":"CantResolvePerpBankruptcy","msg":"Cant Resolve Perp Bankruptcy"},{"code":6156,"name":"LiquidationDoesntSatisfyLimitPrice","msg":"Liquidation Doesnt Satisfy Limit Price"},{"code":6157,"name":"MarginTradingDisabled","msg":"Margin Trading Disabled"},{"code":6158,"name":"InvalidMarketStatusToSettlePnl","msg":"Invalid Market Status to Settle Perp Pnl"},{"code":6159,"name":"PerpMarketNotInSettlement","msg":"PerpMarketNotInSettlement"},{"code":6160,"name":"PerpMarketNotInReduceOnly","msg":"PerpMarketNotInReduceOnly"},{"code":6161,"name":"PerpMarketSettlementBufferNotReached","msg":"PerpMarketSettlementBufferNotReached"},{"code":6162,"name":"PerpMarketSettlementUserHasOpenOrders","msg":"PerpMarketSettlementUserHasOpenOrders"},{"code":6163,"name":"PerpMarketSettlementUserHasActiveLP","msg":"PerpMarketSettlementUserHasActiveLP"},{"code":6164,"name":"UnableToSettleExpiredUserPosition","msg":"UnableToSettleExpiredUserPosition"},{"code":6165,"name":"UnequalMarketIndexForSpotTransfer","msg":"UnequalMarketIndexForSpotTransfer"},{"code":6166,"name":"InvalidPerpPositionDetected","msg":"InvalidPerpPositionDetected"},{"code":6167,"name":"InvalidSpotPositionDetected","msg":"InvalidSpotPositionDetected"},{"code":6168,"name":"InvalidAmmDetected","msg":"InvalidAmmDetected"},{"code":6169,"name":"InvalidAmmForFillDetected","msg":"InvalidAmmForFillDetected"},{"code":6170,"name":"InvalidAmmLimitPriceOverride","msg":"InvalidAmmLimitPriceOverride"},{"code":6171,"name":"InvalidOrderFillPrice","msg":"InvalidOrderFillPrice"},{"code":6172,"name":"SpotMarketBalanceInvariantViolated","msg":"SpotMarketBalanceInvariantViolated"},{"code":6173,"name":"SpotMarketVaultInvariantViolated","msg":"SpotMarketVaultInvariantViolated"},{"code":6174,"name":"InvalidPDA","msg":"InvalidPDA"},{"code":6175,"name":"InvalidPDASigner","msg":"InvalidPDASigner"},{"code":6176,"name":"RevenueSettingsCannotSettleToIF","msg":"RevenueSettingsCannotSettleToIF"},{"code":6177,"name":"NoRevenueToSettleToIF","msg":"NoRevenueToSettleToIF"},{"code":6178,"name":"NoAmmPerpPnlDeficit","msg":"NoAmmPerpPnlDeficit"},{"code":6179,"name":"SufficientPerpPnlPool","msg":"SufficientPerpPnlPool"},{"code":6180,"name":"InsufficientPerpPnlPool","msg":"InsufficientPerpPnlPool"},{"code":6181,"name":"PerpPnlDeficitBelowThreshold","msg":"PerpPnlDeficitBelowThreshold"},{"code":6182,"name":"MaxRevenueWithdrawPerPeriodReached","msg":"MaxRevenueWithdrawPerPeriodReached"},{"code":6183,"name":"MaxIFWithdrawReached","msg":"InvalidSpotPositionDetected"},{"code":6184,"name":"NoIFWithdrawAvailable","msg":"NoIFWithdrawAvailable"},{"code":6185,"name":"InvalidIFUnstake","msg":"InvalidIFUnstake"},{"code":6186,"name":"InvalidIFUnstakeSize","msg":"InvalidIFUnstakeSize"},{"code":6187,"name":"InvalidIFUnstakeCancel","msg":"InvalidIFUnstakeCancel"},{"code":6188,"name":"InvalidIFForNewStakes","msg":"InvalidIFForNewStakes"},{"code":6189,"name":"InvalidIFRebase","msg":"InvalidIFRebase"},{"code":6190,"name":"InvalidInsuranceUnstakeSize","msg":"InvalidInsuranceUnstakeSize"},{"code":6191,"name":"InvalidOrderLimitPrice","msg":"InvalidOrderLimitPrice"},{"code":6192,"name":"InvalidIFDetected","msg":"InvalidIFDetected"},{"code":6193,"name":"InvalidAmmMaxSpreadDetected","msg":"InvalidAmmMaxSpreadDetected"},{"code":6194,"name":"InvalidConcentrationCoef","msg":"InvalidConcentrationCoef"},{"code":6195,"name":"InvalidSrmVault","msg":"InvalidSrmVault"},{"code":6196,"name":"InvalidVaultOwner","msg":"InvalidVaultOwner"},{"code":6197,"name":"InvalidMarketStatusForFills","msg":"InvalidMarketStatusForFills"},{"code":6198,"name":"IFWithdrawRequestInProgress","msg":"IFWithdrawRequestInProgress"},{"code":6199,"name":"NoIFWithdrawRequestInProgress","msg":"NoIFWithdrawRequestInProgress"},{"code":6200,"name":"IFWithdrawRequestTooSmall","msg":"IFWithdrawRequestTooSmall"},{"code":6201,"name":"IncorrectSpotMarketAccountPassed","msg":"IncorrectSpotMarketAccountPassed"},{"code":6202,"name":"BlockchainClockInconsistency","msg":"BlockchainClockInconsistency"},{"code":6203,"name":"InvalidIFSharesDetected","msg":"InvalidIFSharesDetected"},{"code":6204,"name":"NewLPSizeTooSmall","msg":"NewLPSizeTooSmall"},{"code":6205,"name":"MarketStatusInvalidForNewLP","msg":"MarketStatusInvalidForNewLP"},{"code":6206,"name":"InvalidMarkTwapUpdateDetected","msg":"InvalidMarkTwapUpdateDetected"},{"code":6207,"name":"MarketSettlementAttemptOnActiveMarket","msg":"MarketSettlementAttemptOnActiveMarket"},{"code":6208,"name":"MarketSettlementRequiresSettledLP","msg":"MarketSettlementRequiresSettledLP"},{"code":6209,"name":"MarketSettlementAttemptTooEarly","msg":"MarketSettlementAttemptTooEarly"},{"code":6210,"name":"MarketSettlementTargetPriceInvalid","msg":"MarketSettlementTargetPriceInvalid"},{"code":6211,"name":"UnsupportedSpotMarket","msg":"UnsupportedSpotMarket"},{"code":6212,"name":"SpotOrdersDisabled","msg":"SpotOrdersDisabled"},{"code":6213,"name":"MarketBeingInitialized","msg":"Market Being Initialized"},{"code":6214,"name":"InvalidUserSubAccountId","msg":"Invalid Sub Account Id"},{"code":6215,"name":"InvalidTriggerOrderCondition","msg":"Invalid Trigger Order Condition"},{"code":6216,"name":"InvalidSpotPosition","msg":"Invalid Spot Position"},{"code":6217,"name":"CantTransferBetweenSameUserAccount","msg":"Cant transfer between same user account"},{"code":6218,"name":"InvalidPerpPosition","msg":"Invalid Perp Position"},{"code":6219,"name":"UnableToGetLimitPrice","msg":"Unable To Get Limit Price"},{"code":6220,"name":"InvalidLiquidation","msg":"Invalid Liquidation"},{"code":6221,"name":"SpotFulfillmentConfigDisabled","msg":"Spot Fulfillment Config Disabled"},{"code":6222,"name":"InvalidMaker","msg":"Invalid Maker"},{"code":6223,"name":"FailedUnwrap","msg":"Failed Unwrap"},{"code":6224,"name":"MaxNumberOfUsers","msg":"Max Number Of Users"},{"code":6225,"name":"InvalidOracleForSettlePnl","msg":"InvalidOracleForSettlePnl"},{"code":6226,"name":"MarginOrdersOpen","msg":"MarginOrdersOpen"},{"code":6227,"name":"TierViolationLiquidatingPerpPnl","msg":"TierViolationLiquidatingPerpPnl"},{"code":6228,"name":"CouldNotLoadUserData","msg":"CouldNotLoadUserData"},{"code":6229,"name":"UserWrongMutability","msg":"UserWrongMutability"},{"code":6230,"name":"InvalidUserAccount","msg":"InvalidUserAccount"},{"code":6231,"name":"CouldNotLoadUserStatsData","msg":"CouldNotLoadUserData"},{"code":6232,"name":"UserStatsWrongMutability","msg":"UserWrongMutability"},{"code":6233,"name":"InvalidUserStatsAccount","msg":"InvalidUserAccount"},{"code":6234,"name":"UserNotFound","msg":"UserNotFound"},{"code":6235,"name":"UnableToLoadUserAccount","msg":"UnableToLoadUserAccount"},{"code":6236,"name":"UserStatsNotFound","msg":"UserStatsNotFound"},{"code":6237,"name":"UnableToLoadUserStatsAccount","msg":"UnableToLoadUserStatsAccount"},{"code":6238,"name":"UserNotInactive","msg":"User Not Inactive"},{"code":6239,"name":"RevertFill","msg":"RevertFill"},{"code":6240,"name":"InvalidMarketAccountforDeletion","msg":"Invalid MarketAccount for Deletion"},{"code":6241,"name":"InvalidSpotFulfillmentParams","msg":"Invalid Spot Fulfillment Params"},{"code":6242,"name":"FailedToGetMint","msg":"Failed to Get Mint"},{"code":6243,"name":"FailedPhoenixCPI","msg":"FailedPhoenixCPI"},{"code":6244,"name":"FailedToDeserializePhoenixMarket","msg":"FailedToDeserializePhoenixMarket"},{"code":6245,"name":"InvalidPricePrecision","msg":"InvalidPricePrecision"},{"code":6246,"name":"InvalidPhoenixProgram","msg":"InvalidPhoenixProgram"},{"code":6247,"name":"InvalidPhoenixMarket","msg":"InvalidPhoenixMarket"},{"code":6248,"name":"InvalidSwap","msg":"InvalidSwap"},{"code":6249,"name":"SwapLimitPriceBreached","msg":"SwapLimitPriceBreached"},{"code":6250,"name":"SpotMarketReduceOnly","msg":"SpotMarketReduceOnly"},{"code":6251,"name":"FundingWasNotUpdated","msg":"FundingWasNotUpdated"},{"code":6252,"name":"ImpossibleFill","msg":"ImpossibleFill"},{"code":6253,"name":"CantUpdatePerpBidAskTwap","msg":"CantUpdatePerpBidAskTwap"},{"code":6254,"name":"UserReduceOnly","msg":"UserReduceOnly"},{"code":6255,"name":"InvalidMarginCalculation","msg":"InvalidMarginCalculation"},{"code":6256,"name":"CantPayUserInitFee","msg":"CantPayUserInitFee"},{"code":6257,"name":"CantReclaimRent","msg":"CantReclaimRent"},{"code":6258,"name":"InsuranceFundOperationPaused","msg":"InsuranceFundOperationPaused"},{"code":6259,"name":"NoUnsettledPnl","msg":"NoUnsettledPnl"},{"code":6260,"name":"PnlPoolCantSettleUser","msg":"PnlPoolCantSettleUser"},{"code":6261,"name":"OracleNonPositive","msg":"OracleInvalid"},{"code":6262,"name":"OracleTooVolatile","msg":"OracleTooVolatile"},{"code":6263,"name":"OracleTooUncertain","msg":"OracleTooUncertain"},{"code":6264,"name":"OracleStaleForMargin","msg":"OracleStaleForMargin"},{"code":6265,"name":"OracleInsufficientDataPoints","msg":"OracleInsufficientDataPoints"},{"code":6266,"name":"OracleStaleForAMM","msg":"OracleStaleForAMM"},{"code":6267,"name":"UnableToParsePullOracleMessage","msg":"Unable to parse pull oracle message"},{"code":6268,"name":"MaxBorrows","msg":"Can not borow more than max borrows"},{"code":6269,"name":"OracleUpdatesNotMonotonic","msg":"Updates must be monotonically increasing"},{"code":6270,"name":"OraclePriceFeedMessageMismatch","msg":"Trying to update price feed with the wrong feed id"},{"code":6271,"name":"OracleUnsupportedMessageType","msg":"The message in the update must be a PriceFeedMessage"},{"code":6272,"name":"OracleDeserializeMessageFailed","msg":"Could not deserialize the message in the update"},{"code":6273,"name":"OracleWrongGuardianSetOwner","msg":"Wrong guardian set owner in update price atomic"},{"code":6274,"name":"OracleWrongWriteAuthority","msg":"Oracle post update atomic price feed account must be drift program"},{"code":6275,"name":"OracleWrongVaaOwner","msg":"Oracle vaa owner must be wormhole program"},{"code":6276,"name":"OracleTooManyPriceAccountUpdates","msg":"Multi updates must have 2 or fewer accounts passed in remaining accounts"},{"code":6277,"name":"OracleMismatchedVaaAndPriceUpdates","msg":"Don't have the same remaining accounts number and pyth updates left"},{"code":6278,"name":"OracleBadRemainingAccountPublicKey","msg":"Remaining account passed does not match oracle update derived pda"},{"code":6279,"name":"FailedOpenbookV2CPI","msg":"FailedOpenbookV2CPI"},{"code":6280,"name":"InvalidOpenbookV2Program","msg":"InvalidOpenbookV2Program"},{"code":6281,"name":"InvalidOpenbookV2Market","msg":"InvalidOpenbookV2Market"},{"code":6282,"name":"NonZeroTransferFee","msg":"Non zero transfer fee"},{"code":6283,"name":"LiquidationOrderFailedToFill","msg":"Liquidation order failed to fill"},{"code":6284,"name":"InvalidPredictionMarketOrder","msg":"Invalid prediction market order"},{"code":6285,"name":"InvalidVerificationIxIndex","msg":"Ed25519 Ix must be before place and make SignedMsg order ix"},{"code":6286,"name":"SigVerificationFailed","msg":"SignedMsg message verificaiton failed"},{"code":6287,"name":"MismatchedSignedMsgOrderParamsMarketIndex","msg":"Market index mismatched b/w taker and maker SignedMsg order params"},{"code":6288,"name":"InvalidSignedMsgOrderParam","msg":"Invalid SignedMsg order param"},{"code":6289,"name":"PlaceAndTakeOrderSuccessConditionFailed","msg":"Place and take order success condition failed"},{"code":6290,"name":"InvalidHighLeverageModeConfig","msg":"Invalid High Leverage Mode Config"},{"code":6291,"name":"InvalidRFQUserAccount","msg":"Invalid RFQ User Account"},{"code":6292,"name":"RFQUserAccountWrongMutability","msg":"RFQUserAccount should be mutable"},{"code":6293,"name":"RFQUserAccountFull","msg":"RFQUserAccount has too many active RFQs"},{"code":6294,"name":"RFQOrderNotFilled","msg":"RFQ order not filled as expected"},{"code":6295,"name":"InvalidRFQOrder","msg":"RFQ orders must be jit makers"},{"code":6296,"name":"InvalidRFQMatch","msg":"RFQ matches must be valid"},{"code":6297,"name":"InvalidSignedMsgUserAccount","msg":"Invalid SignedMsg user account"},{"code":6298,"name":"SignedMsgUserAccountWrongMutability","msg":"SignedMsg account wrong mutability"},{"code":6299,"name":"SignedMsgUserOrdersAccountFull","msg":"SignedMsgUserAccount has too many active orders"},{"code":6300,"name":"SignedMsgOrderDoesNotExist","msg":"Order with SignedMsg uuid does not exist"},{"code":6301,"name":"InvalidSignedMsgOrderId","msg":"SignedMsg order id cannot be 0s"},{"code":6302,"name":"InvalidPoolId","msg":"Invalid pool id"},{"code":6303,"name":"InvalidProtectedMakerModeConfig","msg":"Invalid Protected Maker Mode Config"},{"code":6304,"name":"InvalidPythLazerStorageOwner","msg":"Invalid pyth lazer storage owner"},{"code":6305,"name":"UnverifiedPythLazerMessage","msg":"Verification of pyth lazer message failed"},{"code":6306,"name":"InvalidPythLazerMessage","msg":"Invalid pyth lazer message"},{"code":6307,"name":"PythLazerMessagePriceFeedMismatch","msg":"Pyth lazer message does not correspond to correct fed id"},{"code":6308,"name":"InvalidLiquidateSpotWithSwap","msg":"InvalidLiquidateSpotWithSwap"},{"code":6309,"name":"SignedMsgUserContextUserMismatch","msg":"User in SignedMsg message does not match user in ix context"},{"code":6310,"name":"UserFuelOverflowThresholdNotMet","msg":"User fuel overflow threshold not met"},{"code":6311,"name":"FuelOverflowAccountNotFound","msg":"FuelOverflow account not found"},{"code":6312,"name":"InvalidTransferPerpPosition","msg":"Invalid Transfer Perp Position"},{"code":6313,"name":"InvalidSignedMsgUserOrdersResize","msg":"Invalid SignedMsgUserOrders resize"},{"code":6314,"name":"CouldNotDeserializeHighLeverageModeConfig","msg":"Could not deserialize high leverage mode config"},{"code":6315,"name":"InvalidIfRebalanceConfig","msg":"Invalid If Rebalance Config"},{"code":6316,"name":"InvalidIfRebalanceSwap","msg":"Invalid If Rebalance Swap"},{"code":6317,"name":"InvalidRevenueShareResize","msg":"Invalid RevenueShare resize"},{"code":6318,"name":"BuilderRevoked","msg":"Builder has been revoked"},{"code":6319,"name":"InvalidBuilderFee","msg":"Builder fee is greater than max fee bps"},{"code":6320,"name":"RevenueShareEscrowAuthorityMismatch","msg":"RevenueShareEscrow authority mismatch"},{"code":6321,"name":"RevenueShareEscrowOrdersAccountFull","msg":"RevenueShareEscrow has too many active orders"},{"code":6322,"name":"InvalidRevenueShareAccount","msg":"Invalid RevenueShareAccount"},{"code":6323,"name":"CannotRevokeBuilderWithOpenOrders","msg":"Cannot revoke builder with open orders"},{"code":6324,"name":"UnableToLoadRevenueShareAccount","msg":"Unable to load builder account"},{"code":6325,"name":"InvalidConstituent","msg":"Invalid Constituent"},{"code":6326,"name":"InvalidAmmConstituentMappingArgument","msg":"Invalid Amm Constituent Mapping argument"},{"code":6327,"name":"ConstituentNotFound","msg":"Constituent not found"},{"code":6328,"name":"ConstituentCouldNotLoad","msg":"Constituent could not load"},{"code":6329,"name":"ConstituentWrongMutability","msg":"Constituent wrong mutability"},{"code":6330,"name":"WrongNumberOfConstituents","msg":"Wrong number of constituents passed to instruction"},{"code":6331,"name":"InsufficientConstituentTokenBalance","msg":"Insufficient constituent token balance"},{"code":6332,"name":"AMMCacheStale","msg":"Amm Cache data too stale"},{"code":6333,"name":"LpPoolAumDelayed","msg":"LP Pool AUM not updated recently"},{"code":6334,"name":"ConstituentOracleStale","msg":"Constituent oracle is stale"},{"code":6335,"name":"LpInvariantFailed","msg":"LP Invariant failed"},{"code":6336,"name":"InvalidConstituentDerivativeWeights","msg":"Invalid constituent derivative weights"},{"code":6337,"name":"MaxDlpAumBreached","msg":"Max DLP AUM Breached"},{"code":6338,"name":"SettleLpPoolDisabled","msg":"Settle Lp Pool Disabled"},{"code":6339,"name":"MintRedeemLpPoolDisabled","msg":"Mint/Redeem Lp Pool Disabled"},{"code":6340,"name":"LpPoolSettleInvariantBreached","msg":"Settlement amount exceeded"},{"code":6341,"name":"InvalidConstituentOperation","msg":"Invalid constituent operation"},{"code":6342,"name":"Unauthorized","msg":"Unauthorized for operation"},{"code":6343,"name":"InvalidLpPoolId","msg":"Invalid Lp Pool Id for Operation"},{"code":6344,"name":"MarketIndexNotFoundAmmCache","msg":"MarketIndexNotFoundAmmCache"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/fusion_amm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.json b/olddocs/archivekbot2/idls/fusion_amm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.json new file mode 100644 index 0000000..9991644 --- /dev/null +++ b/olddocs/archivekbot2/idls/fusion_amm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.json @@ -0,0 +1 @@ +{"address":"fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9","metadata":{"name":"fusionamm","version":"1.1.4","spec":"0.1.0"},"instructions":[{"name":"close_bundled_position","docs":["Close a bundled position in a FusionPool.","","### Authority","- `position_bundle_authority` - authority that owns the token corresponding to this desired position bundle.","","### Parameters","- `bundle_index` - The bundle index that we'd like to close.","","#### Special Errors","- `InvalidBundleIndex` - If the provided bundle index is out of bounds.","- `ClosePositionNotEmpty` - The provided position account is not empty."],"discriminator":[41,36,216,245,27,85,103,67],"accounts":[{"name":"bundled_position","writable":true},{"name":"position_bundle","writable":true},{"name":"position_bundle_token_account"},{"name":"position_bundle_authority","signer":true},{"name":"receiver","writable":true}],"args":[{"name":"bundle_index","type":"u16"}]},{"name":"close_limit_order","docs":["Close a limit order in a FusionPool. Burns the limit order token in the owner's wallet.","Mint and TokenAccount are based on Token-2022. And Mint account will be also closed.","","### Authority","- \"limit_order_authority\" - The authority that owns the limit order token.","","#### Special Errors","- `CloseLimitOrderNotEmpty` - The provided limit order account is not empty."],"discriminator":[76,124,128,15,213,87,37,250],"accounts":[{"name":"limit_order_authority","signer":true},{"name":"receiver","writable":true},{"name":"limit_order","writable":true},{"name":"limit_order_mint","writable":true},{"name":"limit_order_token_account","writable":true},{"name":"token_2022_program"}],"args":[]},{"name":"close_position","docs":["Close a position in a FusionPool. Burns the position token in the owner's wallet.","Mint and TokenAccount are based on Token-2022. And Mint account will be also closed.","","### Authority","- \"position_authority\" - The authority that owns the position token.","","#### Special Errors","- `ClosePositionNotEmpty` - The provided position account is not empty."],"discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"position_authority","signer":true},{"name":"receiver","writable":true},{"name":"position","writable":true},{"name":"position_mint","writable":true},{"name":"position_token_account","writable":true},{"name":"token_2022_program"}],"args":[]},{"name":"collect_fees","docs":["Collect fees accrued for this position.","","### Authority","- `position_authority` - authority that owns the token corresponding to this desired position."],"discriminator":[164,152,207,99,30,186,19,182],"accounts":[{"name":"fusion_pool"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"}],"args":[{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"collect_protocol_fees","docs":["Collect the protocol fees accrued in this FusionPool","","### Authority","- `collect_protocol_fees_authority` - assigned authority in the FusionPoolConfig that can collect protocol fees"],"discriminator":[22,67,23,98,150,178,70,220],"accounts":[{"name":"fusion_pools_config"},{"name":"fusion_pool","writable":true},{"name":"collect_protocol_fees_authority","signer":true},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_destination_a","writable":true},{"name":"token_destination_b","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"}],"args":[{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"decrease_limit_order","docs":["Remove tokens from a limit order in the FusionPool.","","### Parameters","- `amount` - The total amount of tokens the user is willing to withdraw."],"discriminator":[117,157,60,103,66,49,163,0],"accounts":[{"name":"limit_order_authority","signer":true},{"name":"fusion_pool","writable":true},{"name":"limit_order","writable":true},{"name":"limit_order_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"}],"args":[{"name":"amount","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"decrease_liquidity","docs":["Withdraw liquidity from a position in the FusionPool. This call also updates the position's accrued fees.","","### Authority","- `position_authority` - authority that owns the token corresponding to this desired position.","","### Parameters","- `liquidity_amount` - The total amount of Liquidity the user desires to withdraw.","- `token_min_a` - The minimum amount of tokenA the user is willing to withdraw.","- `token_min_b` - The minimum amount of tokenB the user is willing to withdraw.","","#### Special Errors","- `LiquidityZero` - Provided liquidity amount is zero.","- `LiquidityTooHigh` - Provided liquidity exceeds u128::max.","- `TokenMinSubceeded` - The required token to perform this operation subceeds the user defined amount."],"discriminator":[160,38,208,111,104,91,44,1],"accounts":[{"name":"fusion_pool","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_min_a","type":"u64"},{"name":"token_min_b","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"delete_position_bundle","docs":["Delete a PositionBundle account. Burns the position bundle token in the owner's wallet.","","### Authority","- `position_bundle_owner` - The owner that owns the position bundle token.","","### Special Errors","- `PositionBundleNotDeletable` - The provided position bundle has open positions."],"discriminator":[100,25,99,2,217,239,124,173],"accounts":[{"name":"position_bundle","writable":true},{"name":"position_bundle_mint","writable":true},{"name":"position_bundle_token_account","writable":true},{"name":"position_bundle_owner","signer":true},{"name":"receiver","writable":true},{"name":"token_program"}],"args":[]},{"name":"delete_token_badge","discriminator":[53,146,68,8,18,117,17,185],"accounts":[{"name":"fusion_pools_config"},{"name":"token_badge_authority","signer":true},{"name":"token_mint"},{"name":"token_badge","writable":true},{"name":"receiver","writable":true}],"args":[]},{"name":"idl_include","discriminator":[223,253,121,121,60,193,129,31],"accounts":[{"name":"tick_array"},{"name":"system_program"}],"args":[]},{"name":"increase_limit_order","docs":["Add tokens to a limit order in the FusionPool.","","### Parameters","- `amount` - The total amount of tokens the user is willing to deposit."],"discriminator":[177,144,89,236,250,186,125,99],"accounts":[{"name":"limit_order_authority","signer":true},{"name":"fusion_pool","writable":true},{"name":"limit_order","writable":true},{"name":"limit_order_token_account"},{"name":"token_mint"},{"name":"token_owner_account","writable":true},{"name":"token_vault","writable":true},{"name":"tick_array","writable":true},{"name":"token_program"},{"name":"memo_program"}],"args":[{"name":"amount","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"increase_liquidity","docs":["Add liquidity to a position in the FusionPool. This call also updates the position's accrued fees.","","### Authority","- `position_authority` - authority that owns the token corresponding to this desired position.","","### Parameters","- `liquidity_amount` - The total amount of Liquidity the user is willing to deposit.","- `token_max_a` - The maximum amount of tokenA the user is willing to deposit.","- `token_max_b` - The maximum amount of tokenB the user is willing to deposit.","","#### Special Errors","- `LiquidityZero` - Provided liquidity amount is zero.","- `LiquidityTooHigh` - Provided liquidity exceeds u128::max.","- `TokenMaxExceeded` - The required token to perform this operation exceeds the user defined amount."],"discriminator":[46,156,243,118,13,205,251,178],"accounts":[{"name":"fusion_pool","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_max_a","type":"u64"},{"name":"token_max_b","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"initialize_config","docs":["Initializes a FusionPoolsConfig account that hosts info & authorities","required to govern a set of FusionPools.","","### Parameters","- `fee_authority` - Authority authorized to initialize fee-tiers and set customs fees.","- `collect_protocol_fees_authority` - Authority authorized to collect protocol fees.","- `token_badge_authority`","- `default_protocol_fee_rate`","- `default_order_protocol_fee_rate`"],"discriminator":[208,127,21,1,194,190,196,70],"accounts":[{"name":"fusion_pools_config","writable":true},{"name":"funder","writable":true,"signer":true},{"name":"system_program"}],"args":[{"name":"fee_authority","type":"pubkey"},{"name":"collect_protocol_fees_authority","type":"pubkey"},{"name":"token_badge_authority","type":"pubkey"},{"name":"default_protocol_fee_rate","type":"u16"}]},{"name":"initialize_pool","docs":["Initializes a FusionPool account.","","### Parameters","- `tick_spacing` - The desired tick spacing for this pool.","- `fee_rate` - The desired fee rate for this pool.","- `initial_sqrt_price` - The desired initial sqrt-price for this pool","","#### Special Errors","`InvalidTokenMintOrder` - The order of mints have to be ordered by","`SqrtPriceOutOfBounds` - provided initial_sqrt_price is not between 2^-64 to 2^64",""],"discriminator":[95,180,10,172,84,174,232,40],"accounts":[{"name":"fusion_pools_config"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_badge_a"},{"name":"token_badge_b"},{"name":"funder","writable":true,"signer":true},{"name":"fusion_pool","writable":true},{"name":"token_vault_a","writable":true,"signer":true},{"name":"token_vault_b","writable":true,"signer":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"system_program"},{"name":"rent"}],"args":[{"name":"tick_spacing","type":"u16"},{"name":"fee_rate","type":"u16"},{"name":"initial_sqrt_price","type":"u128"}]},{"name":"initialize_position_bundle","docs":["Initializes a PositionBundle account that bundles several positions.","A unique token will be minted to represent the position bundle in the users wallet."],"discriminator":[117,45,241,149,24,18,194,65],"accounts":[{"name":"position_bundle","writable":true},{"name":"position_bundle_mint","writable":true,"signer":true},{"name":"position_bundle_token_account","writable":true},{"name":"position_bundle_owner"},{"name":"funder","writable":true,"signer":true},{"name":"token_program"},{"name":"system_program"},{"name":"rent"},{"name":"associated_token_program"}],"args":[]},{"name":"initialize_position_bundle_with_metadata","docs":["Initializes a PositionBundle account that bundles several positions.","A unique token will be minted to represent the position bundle in the users wallet.","Additional Metaplex metadata is appended to identify the token."],"discriminator":[93,124,16,179,249,131,115,245],"accounts":[{"name":"position_bundle","writable":true},{"name":"position_bundle_mint","writable":true,"signer":true},{"name":"position_bundle_metadata","docs":["https://github.com/metaplex-foundation/metaplex-program-library/blob/773a574c4b34e5b9f248a81306ec24db064e255f/token-metadata/program/src/utils/metadata.rs#L100"],"writable":true},{"name":"position_bundle_token_account","writable":true},{"name":"position_bundle_owner"},{"name":"funder","writable":true,"signer":true},{"name":"metadata_update_auth"},{"name":"token_program"},{"name":"system_program"},{"name":"rent"},{"name":"associated_token_program"},{"name":"metadata_program"}],"args":[]},{"name":"initialize_tick_array","docs":["Initializes a tick_array account to represent a tick-range in a FusionPool.","","### Parameters","- `start_tick_index` - The starting tick index for this tick-array.","Has to be a multiple of TickArray size & the tick spacing of this pool.","","#### Special Errors","- `InvalidStartTick` - if the provided start tick is out of bounds or is not a multiple of","TICK_ARRAY_SIZE * tick spacing."],"discriminator":[11,188,193,214,141,91,149,184],"accounts":[{"name":"fusion_pool"},{"name":"funder","writable":true,"signer":true},{"name":"tick_array","writable":true},{"name":"system_program"}],"args":[{"name":"start_tick_index","type":"i32"}]},{"name":"initialize_token_badge","discriminator":[253,77,205,95,27,224,89,223],"accounts":[{"name":"fusion_pools_config"},{"name":"token_badge_authority","signer":true},{"name":"token_mint"},{"name":"token_badge","writable":true},{"name":"funder","writable":true,"signer":true},{"name":"system_program"}],"args":[]},{"name":"lock_position","docs":["Lock the position to prevent liquidity decrease.","","### Authority","- `position_authority` - The authority that owns the position token.","","#### Special Errors","- `PositionAlreadyLocked` - The provided position is already locked.","- `PositionNotLockable` - The provided position is not lockable (e.g. An empty position)."],"discriminator":[227,62,2,252,247,10,171,185],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"position_authority","signer":true},{"name":"position"},{"name":"position_mint"},{"name":"position_token_account","writable":true},{"name":"position_lock","writable":true},{"name":"fusion_pool"},{"name":"token_2022_program"},{"name":"system_program"}],"args":[{"name":"lock_type","type":{"defined":{"name":"PositionLockType"}}}]},{"name":"open_bundled_position","docs":["Open a bundled position in a FusionPool. No new tokens are issued","because the owner of the position bundle becomes the owner of the position.","The position will start off with 0 liquidity.","","### Authority","- `position_bundle_authority` - authority that owns the token corresponding to this desired position bundle.","","### Parameters","- `bundle_index` - The bundle index that we'd like to open.","- `tick_lower_index` - The tick specifying the lower end of the position range.","- `tick_upper_index` - The tick specifying the upper end of the position range.","","#### Special Errors","- `InvalidBundleIndex` - If the provided bundle index is out of bounds.","- `InvalidTickIndex` - If a provided tick is out of bounds, out of order or not a multiple of","the tick-spacing in this pool."],"discriminator":[169,113,126,171,213,172,212,49],"accounts":[{"name":"bundled_position","writable":true},{"name":"position_bundle","writable":true},{"name":"position_bundle_token_account"},{"name":"position_bundle_authority","signer":true},{"name":"fusion_pool"},{"name":"funder","writable":true,"signer":true},{"name":"system_program"},{"name":"rent"}],"args":[{"name":"bundle_index","type":"u16"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]},{"name":"open_limit_order","docs":["Open a limit order in a FusionPool. A unique token will be minted to represent the limit order","in the users wallet. The limit order will start off with 0 amount.","","### Parameters","- `tick_index` - The tick specifying the limit order execution price.","- `a_to_b` - The limit order swap direction.","- `with_token_metadata_extension` - If true, the token metadata extension will be initialized."],"discriminator":[157,32,218,183,71,29,18,147],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"owner"},{"name":"limit_order","writable":true},{"name":"limit_order_mint","writable":true,"signer":true},{"name":"limit_order_token_account","writable":true},{"name":"fusion_pool"},{"name":"token_2022_program"},{"name":"system_program"},{"name":"associated_token_program"},{"name":"metadata_update_auth"}],"args":[{"name":"tick_index","type":"i32"},{"name":"a_to_b","type":"bool"},{"name":"with_token_metadata_extension","type":"bool"}]},{"name":"open_position","docs":["Open a position in a FusionPool. A unique token will be minted to represent the position","in the users wallet. Additional TokenMetadata extension is initialized to identify the token.","Mint and TokenAccount are based on Token-2022.","The position will start off with 0 liquidity.","","### Parameters","- `tick_lower_index` - The tick specifying the lower end of the position range.","- `tick_upper_index` - The tick specifying the upper end of the position range.","- `with_token_metadata_extension` - If true, the token metadata extension will be initialized.","","#### Special Errors","- `InvalidTickIndex` - If a provided tick is out of bounds, out of order or not a multiple of","the tick-spacing in this pool."],"discriminator":[135,128,47,77,15,152,240,49],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"owner"},{"name":"position","writable":true},{"name":"position_mint","writable":true,"signer":true},{"name":"position_token_account","writable":true},{"name":"fusion_pool"},{"name":"token_2022_program"},{"name":"system_program"},{"name":"associated_token_program"},{"name":"metadata_update_auth"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"with_token_metadata_extension","type":"bool"}]},{"name":"reset_pool_price","docs":["Resets the pool price to the provided value if the pool is empty.","","### Authority","- \"fee_authority\" - Set authority that can modify pool fees in the FusionPoolConfig","","### Parameters","- `sqrt_price` - The new sqrt_price of the pool.","","#### Special Errors","- `ResetPriceForNonEmptyPool` - Thrown if the pool is not empty."],"discriminator":[93,158,158,189,131,42,15,22],"accounts":[{"name":"fee_authority","signer":true},{"name":"fusion_pools_config"},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"fusion_pool","writable":true}],"args":[{"name":"sqrt_price","type":"u128"}]},{"name":"set_collect_protocol_fees_authority","docs":["Sets the fee authority to collect protocol fees for a FusionPoolConfig.","Only the current collect protocol fee authority has permission to invoke this instruction.","","### Authority","- \"fee_authority\" - Set authority that can collect protocol fees in the FusionPoolConfig"],"discriminator":[34,150,93,244,139,225,233,67],"accounts":[{"name":"fusion_pools_config","writable":true},{"name":"collect_protocol_fees_authority","signer":true},{"name":"new_collect_protocol_fees_authority"}],"args":[]},{"name":"set_default_protocol_fee_rate","docs":["Sets the default protocol fee rate for a FusionPoolConfig","Protocol fee rate is represented as a basis point.","Only the current fee authority has permission to invoke this instruction.","","### Authority","- \"fee_authority\" - Set authority that can modify pool fees in the FusionPoolConfig","","### Parameters","- `default_protocol_fee_rate` - Rate that is referenced during the initialization of a FusionPool using this config.","","#### Special Errors","- `ProtocolFeeRateMaxExceeded` - If the provided default_protocol_fee_rate exceeds MAX_PROTOCOL_FEE_RATE."],"discriminator":[107,205,249,226,151,35,86,0],"accounts":[{"name":"fusion_pools_config","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"default_protocol_fee_rate","type":"u16"}]},{"name":"set_fee_authority","docs":["Sets the fee authority for a FusionPoolConfig.","The fee authority can set the fee & protocol fee rate for individual pools or","set the default fee rate for newly minted pools.","Only the current fee authority has permission to invoke this instruction.","","### Authority","- \"fee_authority\" - Set authority that can modify pool fees in the FusionPoolConfig"],"discriminator":[31,1,50,87,237,101,97,132],"accounts":[{"name":"fusion_pools_config","writable":true},{"name":"fee_authority","signer":true},{"name":"new_fee_authority"}],"args":[]},{"name":"set_fee_rate","docs":["Sets the fee rate for a FusionPool.","Fee rate is represented as hundredths of a basis point.","Only the current fee authority has permission to invoke this instruction.","","### Authority","- \"fee_authority\" - Set authority that can modify pool fees in the FusionPoolConfig","","### Parameters","- `fee_rate` - The rate that the pool will use to calculate fees going onwards.","","#### Special Errors","- `FeeRateMaxExceeded` - If the provided fee_rate exceeds MAX_FEE_RATE."],"discriminator":[53,243,137,65,8,140,158,6],"accounts":[{"name":"fusion_pools_config"},{"name":"fusion_pool","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"fee_rate","type":"u16"}]},{"name":"set_position_range","docs":["Set the position range to a new one.","","### Authority","- `position_authority` - The authority that owns the position token.","","### Parameters","- `tick_lower_index` - The tick specifying the lower index of the position.","- `tick_upper_index` - The tick specifying the upper index of the position."],"discriminator":[192,22,176,176,155,49,153,96],"accounts":[{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account","writable":true},{"name":"fusion_pool"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]},{"name":"set_protocol_fee_rate","docs":["Sets the protocol fee rate for a FusionPool.","Protocol fee rate is represented as a basis point.","Only the current fee authority has permission to invoke this instruction.","","### Authority","- \"fee_authority\" - Set authority that can modify pool fees in the FusionPoolConfig","","### Parameters","- `protocol_fee_rate` - The rate that the pool will use to calculate protocol fees going onwards.","","#### Special Errors","- `ProtocolFeeRateMaxExceeded` - If the provided default_protocol_fee_rate exceeds MAX_PROTOCOL_FEE_RATE."],"discriminator":[95,7,4,50,154,79,156,131],"accounts":[{"name":"fusion_pools_config"},{"name":"fusion_pool","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"protocol_fee_rate","type":"u16"}]},{"name":"set_token_badge_authority","discriminator":[207,202,4,32,205,79,13,178],"accounts":[{"name":"fusion_pools_config","writable":true},{"name":"fee_authority","signer":true},{"name":"new_token_badge_authority"}],"args":[]},{"name":"swap","docs":["Perform a swap in this FusionPool","","### Authority","- \"token_authority\" - The authority to withdraw tokens from the input token account.","","### Parameters","- `amount` - The amount of input or output token to swap from (depending on amount_specified_is_input).","- `other_amount_threshold` - The maximum/minimum of input/output token to swap into (depending on amount_specified_is_input).","- `sqrt_price_limit` - The maximum/minimum price the swap will swap to.","- `amount_specified_is_input` - Specifies the token the parameter `amount`represents. If true, the amount represents the input token of the swap.","- `a_to_b` - The direction of the swap. True if swapping from A to B. False if swapping from B to A.","","#### Special Errors","- `ZeroTradableAmount` - User provided parameter `amount` is 0.","- `InvalidSqrtPriceLimitDirection` - User provided parameter `sqrt_price_limit` does not match the direction of the trade.","- `SqrtPriceOutOfBounds` - User provided parameter `sqrt_price_limit` is over Whirlppool's max/min bounds for sqrt-price.","- `InvalidTickArraySequence` - User provided tick-arrays are not in sequential order required to proceed in this trade direction.","- `TickArraySequenceInvalidIndex` - The swap loop attempted to access an invalid array index during the query of the next initialized tick.","- `TickArrayIndexOutofBounds` - The swap loop attempted to access an invalid array index during tick crossing.","- `LiquidityOverflow` - Liquidity value overflowed 128bits during tick crossing.","- `InvalidTickSpacing` - The swap pool was initialized with tick-spacing of 0."],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"},{"name":"token_authority","signer":true},{"name":"fusion_pool","writable":true},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_0","writable":true},{"name":"tick_array_1","writable":true},{"name":"tick_array_2","writable":true}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit","type":"u128"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b","type":"bool"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"two_hop_swap","docs":["Perform a two-hop swap in this FusionPool","","### Authority","- \"token_authority\" - The authority to withdraw tokens from the input token account.","","### Parameters","- `amount` - The amount of input or output token to swap from (depending on amount_specified_is_input).","- `other_amount_threshold` - The maximum/minimum of input/output token to swap into (depending on amount_specified_is_input).","- `amount_specified_is_input` - Specifies the token the parameter `amount`represents. If true, the amount represents the input token of the swap.","- `a_to_b_one` - The direction of the swap of hop one. True if swapping from A to B. False if swapping from B to A.","- `a_to_b_two` - The direction of the swap of hop two. True if swapping from A to B. False if swapping from B to A.","- `sqrt_price_limit_one` - The maximum/minimum price the swap will swap to in the first hop.","- `sqrt_price_limit_two` - The maximum/minimum price the swap will swap to in the second hop.","","#### Special Errors","- `ZeroTradableAmount` - User provided parameter `amount` is 0.","- `InvalidSqrtPriceLimitDirection` - User provided parameter `sqrt_price_limit` does not match the direction of the trade.","- `SqrtPriceOutOfBounds` - User provided parameter `sqrt_price_limit` is over Whirlppool's max/min bounds for sqrt-price.","- `InvalidTickArraySequence` - User provided tick-arrays are not in sequential order required to proceed in this trade direction.","- `TickArraySequenceInvalidIndex` - The swap loop attempted to access an invalid array index during the query of the next initialized tick.","- `TickArrayIndexOutofBounds` - The swap loop attempted to access an invalid array index during tick crossing.","- `LiquidityOverflow` - Liquidity value overflowed 128bits during tick crossing.","- `InvalidTickSpacing` - The swap pool was initialized with tick-spacing of 0.","- `InvalidIntermediaryMint` - Error if the intermediary mint between hop one and two do not equal.","- `DuplicateTwoHopPool` - Error if fusion_pool one & two are the same pool."],"discriminator":[195,96,237,108,68,162,219,230],"accounts":[{"name":"fusion_pool_one","writable":true},{"name":"fusion_pool_two","writable":true},{"name":"token_mint_input"},{"name":"token_mint_intermediate"},{"name":"token_mint_output"},{"name":"token_program_input"},{"name":"token_program_intermediate"},{"name":"token_program_output"},{"name":"token_owner_account_input","writable":true},{"name":"token_vault_one_input","writable":true},{"name":"token_vault_one_intermediate","writable":true},{"name":"token_vault_two_intermediate","writable":true},{"name":"token_vault_two_output","writable":true},{"name":"token_owner_account_output","writable":true},{"name":"token_authority","signer":true},{"name":"tick_array_one_0","writable":true},{"name":"tick_array_one_1","writable":true},{"name":"tick_array_one_2","writable":true},{"name":"tick_array_two_0","writable":true},{"name":"tick_array_two_1","writable":true},{"name":"tick_array_two_2","writable":true},{"name":"memo_program"}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b_one","type":"bool"},{"name":"a_to_b_two","type":"bool"},{"name":"sqrt_price_limit_one","type":"u128"},{"name":"sqrt_price_limit_two","type":"u128"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"update_fees","docs":["Update the accrued fees for a position.","","#### Special Errors","- `TickNotFound` - Provided tick array account does not contain the tick for this position.","- `LiquidityZero` - Position has zero liquidity and therefore already has the most updated fees values."],"discriminator":[225,27,13,6,69,84,172,191],"accounts":[{"name":"fusion_pool","writable":true},{"name":"position","writable":true},{"name":"tick_array_lower"},{"name":"tick_array_upper"}],"args":[]}],"accounts":[{"name":"FusionPool","discriminator":[254,204,207,98,25,181,29,67]},{"name":"FusionPoolsConfig","discriminator":[191,199,19,11,75,86,239,169]},{"name":"LimitOrder","discriminator":[137,183,212,91,115,29,141,227]},{"name":"Position","discriminator":[170,188,143,228,122,64,247,208]},{"name":"PositionBundle","discriminator":[129,169,175,65,185,95,32,100]},{"name":"PositionLock","discriminator":[163,137,166,27,112,14,172,118]},{"name":"TickArray","discriminator":[85,1,199,2,188,97,101,139]},{"name":"TokenBadge","discriminator":[116,219,204,229,249,116,255,150]}],"errors":[{"code":6000,"name":"InvalidEnum","msg":"Enum value could not be converted"},{"code":6001,"name":"InvalidStartTick","msg":"Invalid start tick index provided."},{"code":6002,"name":"TickArrayExistInPool","msg":"Tick-array already exists in this fusion_pool"},{"code":6003,"name":"TickArrayIndexOutofBounds","msg":"Attempt to search for a tick-array failed"},{"code":6004,"name":"InvalidTickSpacing","msg":"Tick-spacing is not supported"},{"code":6005,"name":"ClosePositionNotEmpty","msg":"Position is not empty It cannot be closed"},{"code":6006,"name":"DivideByZero","msg":"Unable to divide by zero"},{"code":6007,"name":"NumberCastError","msg":"Unable to cast number into BigInt"},{"code":6008,"name":"NumberDownCastError","msg":"Unable to down cast number"},{"code":6009,"name":"TickNotFound","msg":"Tick not found within tick array"},{"code":6010,"name":"InvalidTickIndex","msg":"Provided tick index is either out of bounds or uninitializable"},{"code":6011,"name":"SqrtPriceOutOfBounds","msg":"Provided sqrt price out of bounds"},{"code":6012,"name":"LiquidityZero","msg":"Liquidity amount must be greater than zero"},{"code":6013,"name":"LiquidityTooHigh","msg":"Liquidity amount must be less than i64::MAX"},{"code":6014,"name":"LiquidityOverflow","msg":"Liquidity overflow"},{"code":6015,"name":"LiquidityUnderflow","msg":"Liquidity underflow"},{"code":6016,"name":"LiquidityNetError","msg":"Tick liquidity net underflowed or overflowed"},{"code":6017,"name":"TokenMaxExceeded","msg":"Exceeded token max"},{"code":6018,"name":"TokenMinSubceeded","msg":"Did not meet token min"},{"code":6019,"name":"MissingOrInvalidDelegate","msg":"Position token account has a missing or invalid delegate"},{"code":6020,"name":"InvalidPositionTokenAmount","msg":"Position token amount must be 1"},{"code":6021,"name":"InvalidTimestampConversion","msg":"Timestamp should be convertible from i64 to u64"},{"code":6022,"name":"InvalidTimestamp","msg":"Timestamp should be greater than the last updated timestamp"},{"code":6023,"name":"InvalidTickArraySequence","msg":"Invalid tick array sequence provided for instruction."},{"code":6024,"name":"InvalidTokenMintOrder","msg":"Token Mint in wrong order"},{"code":6025,"name":"SetRangeForNonEmptyPosition","msg":"Position is not empty, range can't be set."},{"code":6026,"name":"Unused","msg":"Unused"},{"code":6027,"name":"RewardVaultAmountInsufficient","msg":"Reward vault requires amount to support emissions for at least one day"},{"code":6028,"name":"FeeRateMaxExceeded","msg":"Exceeded max fee rate"},{"code":6029,"name":"ProtocolFeeRateMaxExceeded","msg":"Exceeded max protocol fee rate"},{"code":6030,"name":"MultiplicationShiftRightOverflow","msg":"Multiplication with shift right overflow"},{"code":6031,"name":"MulDivOverflow","msg":"Muldiv overflow"},{"code":6032,"name":"MulDivInvalidInput","msg":"Invalid div_u256 input"},{"code":6033,"name":"MultiplicationOverflow","msg":"Multiplication overflow"},{"code":6034,"name":"InvalidSqrtPriceLimitDirection","msg":"Provided SqrtPriceLimit not in the same direction as the swap."},{"code":6035,"name":"ZeroTradableAmount","msg":"There are no tradable amount to swap."},{"code":6036,"name":"AmountOutBelowMinimum","msg":"Amount out below minimum threshold"},{"code":6037,"name":"AmountInAboveMaximum","msg":"Amount in above maximum threshold"},{"code":6038,"name":"TickArraySequenceInvalidIndex","msg":"Invalid index for tick array sequence"},{"code":6039,"name":"AmountCalcOverflow","msg":"Amount calculated overflows"},{"code":6040,"name":"AmountRemainingOverflow","msg":"Amount remaining overflows"},{"code":6041,"name":"InvalidIntermediaryMint","msg":"Invalid intermediary mint"},{"code":6042,"name":"DuplicateTwoHopPool","msg":"Duplicate two hop pool"},{"code":6043,"name":"InvalidBundleIndex","msg":"Bundle index is out of bounds"},{"code":6044,"name":"BundledPositionAlreadyOpened","msg":"Position has already been opened"},{"code":6045,"name":"BundledPositionAlreadyClosed","msg":"Position has already been closed"},{"code":6046,"name":"PositionBundleNotDeletable","msg":"Unable to delete PositionBundle with open positions"},{"code":6047,"name":"UnsupportedTokenMint","msg":"Token mint has unsupported attributes"},{"code":6048,"name":"RemainingAccountsInvalidSlice","msg":"Invalid remaining accounts"},{"code":6049,"name":"RemainingAccountsInsufficient","msg":"Insufficient remaining accounts"},{"code":6050,"name":"NoExtraAccountsForTransferHook","msg":"Unable to call transfer hook without extra accounts"},{"code":6051,"name":"IntermediateTokenAmountMismatch","msg":"Output and input amount mismatch"},{"code":6052,"name":"TransferFeeCalculationError","msg":"Transfer fee calculation failed"},{"code":6053,"name":"RemainingAccountsDuplicatedAccountsType","msg":"Same accounts type is provided more than once"},{"code":6054,"name":"FullRangeOnlyPool","msg":"This fusion_pool only supports full-range positions"},{"code":6055,"name":"TooManySupplementalTickArrays","msg":"Too many supplemental tick arrays provided"},{"code":6056,"name":"DifferentFusionPoolTickArrayAccount","msg":"TickArray account for different fusion_pool provided"},{"code":6057,"name":"PartialFillError","msg":"Trade resulted in partial fill"},{"code":6058,"name":"TakerOrderNotSupported","msg":"The limit order tick index is incorrect relative to the current market tick (taker order)"},{"code":6059,"name":"LimitOrderAmountExceeded","msg":"Exceeded the limit order deposited input amount"},{"code":6060,"name":"LimitOrderNotEmpty","msg":"Limit order is not empty and cannot be closed"},{"code":6061,"name":"LimitOrderIsFilled","msg":"Unable to increase a limit order because it's partially or fully filled"},{"code":6062,"name":"ZeroAmount","msg":"Zero amount"},{"code":6063,"name":"ResetPriceForNonEmptyPool","msg":"Can't reset the price because the pool is not empty"},{"code":6064,"name":"PositionLocked","msg":"Position locked"},{"code":6065,"name":"PositionNotLockable","msg":"Position is not lockable"},{"code":6066,"name":"RentCalculationError","msg":"Rent calculation error"}],"types":[{"name":"AccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookA"},{"name":"TransferHookB"},{"name":"TransferHookInput"},{"name":"TransferHookIntermediate"},{"name":"TransferHookOutput"},{"name":"SupplementalTickArrays"},{"name":"SupplementalTickArraysOne"},{"name":"SupplementalTickArraysTwo"}]}},{"name":"FusionPool","type":{"kind":"struct","fields":[{"name":"bump","type":{"array":["u8",1]}},{"name":"version","type":"u16"},{"name":"token_mint_a","type":"pubkey"},{"name":"token_mint_b","type":"pubkey"},{"name":"token_vault_a","type":"pubkey"},{"name":"token_vault_b","type":"pubkey"},{"name":"tick_spacing","type":"u16"},{"name":"tick_spacing_seed","type":{"array":["u8",2]}},{"name":"fee_rate","type":"u16"},{"name":"protocol_fee_rate","type":"u16"},{"name":"unused_0","type":"u32"},{"name":"liquidity","type":"u128"},{"name":"sqrt_price","type":"u128"},{"name":"tick_current_index","type":"i32"},{"name":"protocol_fee_owed_a","type":"u64"},{"name":"protocol_fee_owed_b","type":"u64"},{"name":"fee_growth_global_a","type":"u128"},{"name":"fee_growth_global_b","type":"u128"},{"name":"orders_total_amount_a","type":"u64"},{"name":"orders_total_amount_b","type":"u64"},{"name":"orders_filled_amount_a","type":"u64"},{"name":"orders_filled_amount_b","type":"u64"},{"name":"olp_fee_owed_a","type":"u64"},{"name":"olp_fee_owed_b","type":"u64"},{"name":"ma_sqrt_price","type":"u128"},{"name":"last_swap_timestamp","type":"u64"},{"name":"reserved","type":{"array":["u8",116]}}]}},{"name":"FusionPoolsConfig","type":{"kind":"struct","fields":[{"name":"version","type":"u16"},{"name":"fee_authority","type":"pubkey"},{"name":"collect_protocol_fees_authority","type":"pubkey"},{"name":"token_badge_authority","type":"pubkey"},{"name":"default_protocol_fee_rate","type":"u16"},{"name":"unused_0","type":"u16"},{"name":"unused_1","type":"u16"},{"name":"reserved","type":{"array":["u8",170]}}]}},{"name":"LimitOrder","type":{"kind":"struct","fields":[{"name":"version","type":"u16"},{"name":"fusion_pool","type":"pubkey"},{"name":"limit_order_mint","type":"pubkey"},{"name":"tick_index","type":"i32"},{"name":"amount","type":"u64"},{"name":"a_to_b","type":"bool"},{"name":"age","type":"u64"},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"MaybeTick","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Initialized","fields":[{"defined":{"name":"TickData"}}]}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"version","type":"u16"},{"name":"fusion_pool","type":"pubkey"},{"name":"position_mint","type":"pubkey"},{"name":"liquidity","type":"u128"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"fee_growth_checkpoint_a","type":"u128"},{"name":"fee_owed_a","type":"u64"},{"name":"fee_growth_checkpoint_b","type":"u128"},{"name":"fee_owed_b","type":"u64"},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"PositionBundle","type":{"kind":"struct","fields":[{"name":"position_bundle_mint","type":"pubkey"},{"name":"position_bitmap","type":{"array":["u8",32]}}]}},{"name":"PositionLock","type":{"kind":"struct","fields":[{"name":"position_mint","type":"pubkey"},{"name":"position_owner","type":"pubkey"},{"name":"fusion_pool","type":"pubkey"},{"name":"locked_timestamp","type":"u64"},{"name":"lock_type","type":{"defined":{"name":"PositionLockType"}}},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"PositionLockType","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Permanent"}]}},{"name":"RemainingAccountsInfo","type":{"kind":"struct","fields":[{"name":"slices","type":{"vec":{"defined":{"name":"RemainingAccountsSlice"}}}}]}},{"name":"RemainingAccountsSlice","type":{"kind":"struct","fields":[{"name":"accounts_type","type":{"defined":{"name":"AccountsType"}}},{"name":"length","type":"u8"}]}},{"name":"TickArray","type":{"kind":"struct","fields":[{"name":"start_tick_index","type":"i32"},{"name":"fusion_pool","type":"pubkey"},{"name":"ticks","type":{"array":[{"defined":{"name":"MaybeTick"}},88]}}]}},{"name":"TickData","type":{"kind":"struct","fields":[{"name":"liquidity_net","type":"i128"},{"name":"liquidity_gross","type":"u128"},{"name":"fee_growth_outside_a","type":"u128"},{"name":"fee_growth_outside_b","type":"u128"},{"name":"age","type":"u64"},{"name":"open_orders_input","type":"u64"},{"name":"part_filled_orders_input","type":"u64"},{"name":"part_filled_orders_remaining_input","type":"u64"},{"name":"fulfilled_a_to_b_orders_input","type":"u64"},{"name":"fulfilled_b_to_a_orders_input","type":"u64"}]}},{"name":"TokenBadge","type":{"kind":"struct","fields":[{"name":"token_mint","type":"pubkey"},{"name":"reserved","type":{"array":["u8",128]}}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/goosefx_gamma.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.json b/olddocs/archivekbot2/idls/goosefx_gamma.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.json new file mode 100644 index 0000000..6eadf43 --- /dev/null +++ b/olddocs/archivekbot2/idls/goosefx_gamma.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.json @@ -0,0 +1 @@ +{"address":"GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT","metadata":{"name":"gamma","version":"0.2.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_or_update_actor","discriminator":[113,136,228,230,107,185,128,227],"accounts":[{"name":"owner","docs":["Only admin(multisig) can add or update actor"],"writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"actor","writable":true,"pda":{"seeds":[{"kind":"const","value":[97,99,116,111,114]},{"kind":"account","path":"authority"}]}},{"name":"authority","docs":["Account for which the actor is being created.","This is the account that will be able to update the pool."]}],"args":[{"name":"is_admin","type":"bool"}]},{"name":"add_partner","docs":["Admin-permissioned instruction to add a new partner to a pool","","* `ctx` - The context of accounts",""],"discriminator":[180,111,45,157,241,187,234,88],"accounts":[{"name":"authority","signer":true},{"name":"amm_config"},{"name":"pool_state","writable":true,"relations":["partner"]},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"partner"}],"args":[]},{"name":"calculate_rewards","docs":["Calculate rewards for the user","","* `ctx` - The context of accounts",""],"discriminator":[199,115,201,124,71,81,143,252],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"user","docs":["User for which we are calculating rewards"]},{"name":"pool_state"},{"name":"reward_info","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,105,110,102,111,95,115,101,101,100]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_info.start_at","account":"RewardInfo"},{"kind":"account","path":"reward_info.mint","account":"RewardInfo"}]}},{"name":"user_reward_info","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,114,101,119,97,114,100,95,105,110,102,111,95,115,101,101,100]},{"kind":"account","path":"reward_info"},{"kind":"account","path":"user"}]}},{"name":"user_pool_liquidity","docs":["User pool liquidity account"],"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,45,112,111,111,108,45,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"user"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"claim_partner_fees","docs":["Claim fees for a particular partner","","* `ctx` - The context of accounts",""],"discriminator":[114,71,103,57,160,205,242,185],"accounts":[{"name":"partner"},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state"},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"token_0_token_account","writable":true,"relations":["partner"]},{"name":"token_1_token_account","writable":true,"relations":["partner"]},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"claim_rewards","docs":["Claim rewards for the user","Transfers the amount of tokens calculated for the user to their reward token account","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[4,144,132,71,116,23,151,80],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state"},{"name":"reward_info","pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,105,110,102,111,95,115,101,101,100]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_info.start_at","account":"RewardInfo"},{"kind":"account","path":"reward_info.mint","account":"RewardInfo"}]}},{"name":"reward_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,118,97,117,108,116,95,115,101,101,100]},{"kind":"account","path":"reward_info"}]}},{"name":"user_token_account","writable":true},{"name":"user_reward_info","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,114,101,119,97,114,100,95,105,110,102,111,95,115,101,101,100]},{"kind":"account","path":"reward_info"},{"kind":"account","path":"user"}]}},{"name":"reward_mint","writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"owner","docs":["Only admin or fund_owner can collect fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"recipient_token_0_account","docs":["The address that receives the collected token_0 fund fees"],"writable":true},{"name":"recipient_token_1_account","docs":["The address that receives the collected token_1 fund fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"owner","docs":["Only admin or owner can collect fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores owner"]},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"recipient_token_0_account","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_1_account","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"create_amm_config","docs":["The configuation of AMM protocol, include trade fee and protocol fee","# Arguments","","* `ctx`- The accounts needed by instruction.","* `index` - The index of amm config, there may be multiple config.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within tarde fee.","* `fund_fee_rate` - The rate of fund fee within tarde fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"9QcHinaHcJFdzSHeiF1yGchcuQk3qPFNV13q6dZJbAny"},{"name":"amm_config","docs":["Initialize AmmConfig state account to store protocol owner address and fee rates"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"trade_fee_rate","type":"u64"},{"name":"protocol_fee_rate","type":"u64"},{"name":"fund_fee_rate","type":"u64"},{"name":"create_pool_fee","type":"u64"},{"name":"max_open_time","type":"u64"}]},{"name":"create_rewards","docs":["Create rewards for the pool","Initializes a new reward info account and a reward vault account","Transfers the rewards to the reward vault","","# Arguments","","* `ctx` - The context of accounts","* `start_time` - The start time of the reward","* `end_time` - The end time of the reward","* `reward_amount` - The amount of the reward",""],"discriminator":[124,251,145,232,5,173,159,223],"accounts":[{"name":"reward_provider","writable":true,"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state"},{"name":"reward_info","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,105,110,102,111,95,115,101,101,100]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"start_time"},{"kind":"account","path":"reward_mint"}]}},{"name":"reward_providers_token_account","writable":true},{"name":"reward_vault","docs":["For reward to deposit into."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,118,97,117,108,116,95,115,101,101,100]},{"kind":"account","path":"reward_info"}]}},{"name":"reward_mint","writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"start_time","type":"u64"},{"name":"end_time","type":"u64"},{"name":"reward_amount","type":"u64"}]},{"name":"create_swap_referral","docs":["Initialize swap referrals for an existing AMM config","# Arguments","","* `ctx` - The accounts needed by the instruction, including those used by cpi to the referral program","* `name` - The project name, passed to the referral program. Must be less than 50 chars in length","* `default_share_bps` - Percentage share of fees to referrers. Must be less than 10_000"],"discriminator":[67,131,93,236,56,6,40,77],"accounts":[{"name":"admin","docs":["Admin signer for this operation"],"signer":true},{"name":"owner","address":"9QcHinaHcJFdzSHeiF1yGchcuQk3qPFNV13q6dZJbAny"},{"name":"payer","writable":true,"signer":true},{"name":"amm_config","docs":["The config acts as the base for its referral project"],"writable":true},{"name":"project","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"referral_program","address":"REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3"}],"args":[{"name":"name","type":"string"},{"name":"default_share_bps","type":"u16"}]},{"name":"deposit","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `lp_token_amount` - Pool token amount to transfer. token_a and token_b amount are set by the current exchange rate and size of the pool","* `maximum_token_0_amount` - Maximum token 0 amount to deposit, prevents excessive slippage","* `maximum_token_1_amount` - Maximum token 1 amount to deposit, prevents excessive slippage",""],"discriminator":[242,35,198,137,82,225,242,182],"accounts":[{"name":"owner","docs":["Owner of the liquidity provided"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state the owner is depositing into"],"writable":true},{"name":"user_pool_liquidity","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,45,112,111,111,108,45,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"owner"}]}},{"name":"token_0_account","docs":["The payer's token account to deposit token_0"],"writable":true},{"name":"token_1_account","docs":["The payer's token account to deposit token_1"],"writable":true},{"name":"token_0_vault","docs":["Pool vault for token_0 to deposit into","The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["Pool vault for token_1 to deposit into","The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"maximum_token_0_amount","type":"u64"},{"name":"maximum_token_1_amount","type":"u64"}]},{"name":"init_user_pool_liquidity","discriminator":[227,221,200,212,36,107,149,36],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"pool_state"},{"name":"user_pool_liquidity","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,45,112,111,111,108,45,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"user"}]}},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"}],"args":[{"name":"partner","type":{"option":"pubkey"}}]},{"name":"initialize","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `init_amount_0` - the initial amount_0 to deposit","* `init_amount_1` - the initial amount_1 to deposit","* `open_time` - the timestamp allowed for swap","* `max_trade_fee_rate` - The maximum trade fee that can be charged on swaps","* `volatility_factor` - The volatility factor of the pool to determine the trade fee",""],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"creator","docs":["Address paying to create the pool. It can be anyone."],"writable":true,"signer":true},{"name":"amm_config","docs":["Which amm config the pool belongs to"]},{"name":"authority","docs":["sign transactions on behalf of the pool","for vault and lp_mint"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_0_mint"},{"kind":"account","path":"token_1_mint"}]}},{"name":"user_pool_liquidity","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,45,112,111,111,108,45,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"creator"}]}},{"name":"token_0_mint","docs":["Token_0 mint, the key must smaller than token_1 mint."]},{"name":"token_1_mint","docs":["Token_1 mint, the key must greater than token_0 mint."]},{"name":"creator_token_0","docs":["creator token 0 account"],"writable":true},{"name":"creator_token_1","docs":["creator token 1 account"],"writable":true},{"name":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}]}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}]}},{"name":"create_pool_fee","docs":["create pool fee account"],"writable":true,"address":"8PhehuioLjhJ35A5eavazJSwoXcA4J7WwzgoWDBDFSuY"},{"name":"observation_state","docs":["an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_0_program","docs":["Spl token program or token program 2022"]},{"name":"token_1_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"init_amount_0","type":"u64"},{"name":"init_amount_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"max_trade_fee_rate","type":"u64"},{"name":"volatility_factor","type":"u64"}]},{"name":"initialize_partner","docs":["Creates a new `Partner` account associated with a certain pool","","* `ctx` - The context of accounts","* `name` - The name associated with the partner","* `token_0_token_account` - Token account for receiving token0 tokens","* `token_1_token_account` - Token account for receiving token1 tokens",""],"discriminator":[165,62,179,112,129,50,173,144],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"authority","signer":true},{"name":"pool_state"},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"partner","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"name","type":"string"},{"name":"token_0_token_account","type":"pubkey"},{"name":"token_1_token_account","type":"pubkey"}]},{"name":"initialize_pool_partners","docs":["Initializes a new `PoolPartnerInfos` account unique to a particular pool","","* `ctx` - The context of accounts","* `partner_share_rate` - A fraction representing the partner's share of protocol fees",""],"discriminator":[99,11,108,186,1,126,209,251],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"pool_state"},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"oracle_based_swap_base_input","docs":["Swap the tokens in the pool base input amount, using oracle price and Curve calculator combined.","","# Arguments","","* `ctx`- The context of accounts","* `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate","* `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage",""],"discriminator":[239,82,192,187,160,26,223,223],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"input_token_program","docs":["SPL program for input token transfers"]},{"name":"output_token_program","docs":["SPL program for output token transfers"]},{"name":"input_token_mint","docs":["The mint of input token"]},{"name":"output_token_mint","docs":["The mint of output token"]},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true}],"args":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"pool_config_update","discriminator":[196,212,99,63,59,117,248,223],"accounts":[{"name":"authority","signer":true},{"name":"pool_state","writable":true},{"name":"amm_config"}],"args":[{"name":"h1","type":"u128"}]},{"name":"pool_config_update_v2","discriminator":[228,161,199,222,53,172,121,238],"accounts":[{"name":"authority","signer":true},{"name":"pool_state","writable":true},{"name":"amm_config"}],"args":[{"name":"h1","type":"u128"},{"name":"price_fetched_at","type":"u64"}]},{"name":"pool_config_update_v3","discriminator":[123,135,23,15,174,100,120,152],"accounts":[{"name":"authority","signer":true},{"name":"pool_state","writable":true},{"name":"amm_config"},{"name":"observation_state","writable":true},{"name":"actor","pda":{"seeds":[{"kind":"const","value":[97,99,116,111,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"h1","type":"u128"},{"name":"h2","type":"u128"},{"name":"price_fetched_at","type":"u64"},{"name":"min_trade_rate_at_oracle_price","type":{"option":"u32"}},{"name":"oracle_price_delay_fee_rate_per_second","type":{"option":"u32"}},{"name":"max_oracle_price_delay_fee","type":{"option":"u32"}},{"name":"drift_factor","type":{"option":"u32"}},{"name":"max_drift_factor","type":{"option":"u32"}},{"name":"volatility_factor","type":{"option":"u64"}}]},{"name":"rebalance_kamino","docs":["Migrate from Meteora Dlmm to Gamma"],"discriminator":[153,94,34,16,92,181,147,215],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"gamma_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"token_vault","docs":["The vault token account for token 0"],"writable":true},{"name":"token_mint","writable":true},{"name":"kamino_reserve","writable":true},{"name":"kamino_lending_market","writable":true,"address":"7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF"},{"name":"lending_market_authority"},{"name":"reserve_liquidity_supply","writable":true},{"name":"reserve_collateral_mint","writable":true},{"name":"gamma_pool_destination_collateral","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,107,97,109,105,110,111,95,100,101,112,111,115,105,116,115]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint"}]}},{"name":"instruction_sysvar_account","address":"Sysvar1nstructions1111111111111111111111111"},{"name":"liquidity_token_program"},{"name":"collateral_token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"kamino_program","address":"KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"swap_base_input","docs":["Swap the tokens in the pool base input amount","","# Arguments","","* `ctx`- The context of accounts","* `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate","* `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage",""],"discriminator":[143,190,90,218,196,30,51,222],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"input_token_program","docs":["SPL program for input token transfers"]},{"name":"output_token_program","docs":["SPL program for output token transfers"]},{"name":"input_token_mint","docs":["The mint of input token"]},{"name":"output_token_mint","docs":["The mint of output token"]},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true}],"args":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"swap_base_output","docs":["Swap the tokens in the pool base output amount","","# Arguments","","* `ctx`- The context of accounts","* `max_amount_in` - input amount prevents excessive slippage","* `amount_out` - amount of output token",""],"discriminator":[55,217,98,86,163,74,180,173],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"input_token_program","docs":["SPL program for input token transfers"]},{"name":"output_token_program","docs":["SPL program for output token transfers"]},{"name":"input_token_mint","docs":["The mint of input token"]},{"name":"output_token_mint","docs":["The mint of output token"]},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true}],"args":[{"name":"_max_amount_in","type":"u64"},{"name":"_amount_out","type":"u64"}]},{"name":"update_amm_config","docs":["Updates the owner of the amm config","Must be called by the current owner or admin","","# Arguments","","* `ctx`- The context of accounts","* `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0","* `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1","* `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2","* `new_owner`- The config's new owner, be set when `param` is 3","* `new_fund_owner`- The config's new fund owner, be set when `param` is 4","* `param`- The vaule can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The amm config owner or admin"],"signer":true,"address":"9QcHinaHcJFdzSHeiF1yGchcuQk3qPFNV13q6dZJbAny"},{"name":"amm_config","docs":["The amm config account to update"],"writable":true}],"args":[{"name":"param","type":"u16"},{"name":"value","type":"u64"}]},{"name":"update_partner","docs":["Authority-permissioned instruction to update certain fields in a pool, e.g token-accounts","","* `ctx` - The context of accounts","* `token_account_0` - (optional) update for the token_0_token_account field","* `token_account_1` - (optional) update for the token_1_token_account field",""],"discriminator":[19,112,236,81,127,55,21,196],"accounts":[{"name":"authority","signer":true,"relations":["partner"]},{"name":"partner","writable":true}],"args":[{"name":"token_account_0","type":{"option":"pubkey"}},{"name":"token_account_1","type":{"option":"pubkey"}}]},{"name":"update_partner_fees","docs":["Updates claimable fee amounts for all `PartnerInfo`s in a `PoolPartnerInfos` account","","* `ctx` - The context of accounts",""],"discriminator":[154,142,122,49,239,161,232,29],"accounts":[{"name":"pool_state","writable":true},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}}],"args":[]},{"name":"update_pool","docs":["Update pool status for given vaule","","# Arguments","","* `ctx`- The context of accounts","* `param`- The param of pool status","* `status` - The value",""],"discriminator":[239,214,170,78,36,35,30,34],"accounts":[{"name":"authority","signer":true},{"name":"pool_state","writable":true},{"name":"actor","pda":{"seeds":[{"kind":"const","value":[97,99,116,111,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"param","type":"u32"},{"name":"value","type":"u64"}]},{"name":"withdraw","docs":["Withdraw lp for token0 ande token1","","# Arguments","","* `ctx`- The context of accounts","* `lp_token_amount` - Amount of pool tokens to burn. User receives an output of token a and b based on the percentage of the pool tokens that are returned.","* `minimum_token_0_amount` - Minimum amount of token 0 to receive, prevents excessive slippage","* `minimum_token_1_amount` - Minimum amount of token 1 to receive, prevents excessive slippage",""],"discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"owner","docs":["Owner of the liquidity provided"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state account"],"writable":true},{"name":"user_pool_liquidity","docs":["User pool liquidity account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,45,112,111,111,108,45,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"owner"}]}},{"name":"token_0_account","docs":["The owner's token account for receive token_0"],"writable":true},{"name":"token_1_account","docs":["The owner's token account for receive token_1"],"writable":true},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token_0 vault"],"writable":true},{"name":"vault_1_mint","docs":["The mint of token_1 vault"],"writable":true},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"kamino_program","address":"KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"},{"name":"instruction_sysvar_account","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"minimum_token_0_amount","type":"u64"},{"name":"minimum_token_1_amount","type":"u64"}]}],"accounts":[{"name":"Actor","discriminator":[46,77,47,204,204,54,34,88]},{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"Partner","discriminator":[122,43,246,239,141,56,243,182]},{"name":"PoolPartnerInfos","discriminator":[130,98,226,231,158,49,44,231]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"RewardInfo","discriminator":[39,7,129,22,241,96,83,133]},{"name":"UserPoolLiquidity","discriminator":[0,141,89,29,236,6,14,15]},{"name":"UserRewardInfo","discriminator":[110,57,251,139,250,236,213,178]}],"types":[{"name":"Actor","type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"is_admin","type":"bool"}]}},{"name":"AmmConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"disable_create_pool","type":"bool"},{"name":"index","docs":["Config index"],"type":"u16"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of bip (10^-6)"],"type":"u64"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u64"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of bip (10^-6)"],"type":"u64"},{"name":"create_pool_fee","docs":["Fee for creating a new pool"],"type":"u64"},{"name":"protocol_owner","docs":["Address of the protocol fee owner"],"type":"pubkey"},{"name":"fund_owner","docs":["Address of the fund fee owner"],"type":"pubkey"},{"name":"referral_project","docs":["Address of the referral project"],"type":"pubkey"},{"name":"max_open_time","docs":["Max open time for a pool in seconds"],"type":"u64"},{"name":"secondary_admin","type":"pubkey"},{"name":"padding","docs":["padding"],"type":{"array":["u64",7]}}]}},{"name":"LpChangeEvent","docs":["Emitted when deposit or withdraw"],"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"lp_amount_before","type":"u64"},{"name":"token_0_vault_before","type":"u64"},{"name":"token_1_vault_before","type":"u64"},{"name":"token_0_amount","type":"u64"},{"name":"token_1_amount","type":"u64"},{"name":"token_0_transfer_fee","type":"u64"},{"name":"token_1_transfer_fee","type":"u64"},{"name":"change_type","type":"u8"}]}},{"name":"MigrationEvent","docs":["Emitted when migration"],"type":{"kind":"struct","fields":[{"name":"from_pool","type":"pubkey"},{"name":"to_pool","type":"pubkey"},{"name":"token_0_amount_withdrawn","type":"u64"},{"name":"token_1_amount_withdrawn","type":"u64"},{"name":"lp_tokens_migrated","type":"u128"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u64"},{"name":"cumulative_token_0_price_x32","docs":["The cumulative of token0 price during the duration time, Q32.32, the remaining 64 bit for overflow"],"type":"u128"},{"name":"cumulative_token_1_price_x32","docs":["The cumulative of token1 price during the duration time, Q32.32, the remaining 64 bit for overflow"],"type":"u128"}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is enabled"],"type":"bool"},{"name":"observation_index","docs":["The most recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding"],"type":{"array":["u64",4]}}]}},{"name":"Partner","docs":["Account storing information for a protocol participating in the Gamma partner program"],"type":{"kind":"struct","fields":[{"name":"name","docs":["Protocol name"],"type":"string"},{"name":"authority","docs":["The authority for this account"],"type":"pubkey"},{"name":"pool_state","docs":["The pool which this partner account belongs to"],"type":"pubkey"},{"name":"token_0_token_account","docs":["The token-account that receives token0 tokens"],"type":"pubkey"},{"name":"token_1_token_account","docs":["The token-account that receives token1 tokens"],"type":"pubkey"}]}},{"name":"PartnerInfo","serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"partner","docs":["The address of the partner account."],"type":"pubkey"},{"name":"lp_token_linked_with_partner","docs":["This stores the LP tokens that are linked with the partner, i.e owned by customers of the partner."],"type":"u64"},{"name":"total_claimed_fee_amount_token_0","docs":["The total fee-amount token0 claimed by the partner"],"type":"u64"},{"name":"total_claimed_fee_amount_token_1","docs":["The total fee-amount token1 claimed by the partner"],"type":"u64"},{"name":"total_earned_fee_amount_token_0","docs":["The total fee-amount token0 calculated for the partner"],"type":"u64"},{"name":"total_earned_fee_amount_token_1","docs":["The total fee-amount token1 calculated for the partner"],"type":"u64"}]}},{"name":"PoolPartnerInfos","docs":["PDA storing all the information for valid pool partners"],"serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"last_observed_fee_amount_token_0","docs":["The observed fee-amount token0 as at the last infos update"],"type":"u64"},{"name":"last_observed_fee_amount_token_1","docs":["The observed fee-amount token1 as at the last infos update"],"type":"u64"},{"name":"infos","docs":["Partner infos"],"type":{"array":[{"defined":{"name":"PartnerInfo"}},5]}}]}},{"name":"PoolState","serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"amm_config","docs":["To which AmmConfig the pool belongs to"],"type":"pubkey"},{"name":"pool_creator","docs":["Pool Creator"],"type":"pubkey"},{"name":"token_0_vault","docs":["Vault to store Token A of the pool"],"type":"pubkey"},{"name":"token_1_vault","docs":["Vault to store Token B of the pool"],"type":"pubkey"},{"name":"h1","docs":["Scaled to 9 decimal places.","This means `token1/token0`"],"type":"u128"},{"name":"h2","type":"u64"},{"name":"h3","type":"u32"},{"name":"h4","type":"u32"},{"name":"token_0_mint","docs":["Mint info of Token A"],"type":"pubkey"},{"name":"token_1_mint","docs":["Mint info of Token B"],"type":"pubkey"},{"name":"token_0_program","docs":["token_0 program"],"type":"pubkey"},{"name":"token_1_program","docs":["token_1_program"],"type":"pubkey"},{"name":"observation_key","docs":["Observation account to store the oracle data"],"type":"pubkey"},{"name":"auth_bump","type":"u8"},{"name":"status","docs":["Bitwise represenation of the state of the pool","Bit0: 1 - Disable Deposit(value will be 1), 0 - Deposit can be done(normal)","Bit1: 1 - Disable Withdraw(value will be 2), 0 - Withdraw can be done(normal)","Bit2: 1 - Disable Swap(value will be 4), 0 - Swap can be done(normal)"],"type":"u8"},{"name":"_padding2","docs":["lp_mint decimals"],"type":"u8"},{"name":"mint_0_decimals","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_1_decimals","type":"u8"},{"name":"lp_supply","docs":["True circulating supply of lp_mint tokens without burns and lock-ups"],"type":"u64"},{"name":"protocol_fees_token_0","docs":["The amount of token_0 and token_1 owed to Liquidity Provider"],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","docs":["The timestamp allowed for swap in the pool"],"type":"u64"},{"name":"recent_epoch","docs":["recent epoch"],"type":"u64"},{"name":"cumulative_trade_fees_token_0","docs":["Trade fees of token_0 after every swap"],"type":"u128"},{"name":"cumulative_trade_fees_token_1","docs":["Trade fees of token_1 after every swap"],"type":"u128"},{"name":"cumulative_volume_token_0","docs":["Cummulative volume of token_0"],"type":"u128"},{"name":"cumulative_volume_token_1","docs":["Cummulative volume of token_1"],"type":"u128"},{"name":"latest_dynamic_fee_rate","docs":["latest dynamic fee rate"],"type":"u64"},{"name":"max_trade_fee_rate","type":"u64"},{"name":"volatility_factor","type":"u64"},{"name":"token_0_vault_amount","type":"u64"},{"name":"token_1_vault_amount","type":"u64"},{"name":"max_shared_token0","type":"u64"},{"name":"max_shared_token1","type":"u64"},{"name":"h16","type":"u32"},{"name":"h15","type":"u32"},{"name":"h14","type":"u32"},{"name":"h13","type":"u32"},{"name":"h12","type":"u32"},{"name":"h10","type":"u32"},{"name":"_padding3","type":{"array":["u8",8]}},{"name":"token_0_amount_in_kamino","type":"u64"},{"name":"token_1_amount_in_kamino","type":"u64"},{"name":"withdrawn_kamino_profit_token_0","type":"u64"},{"name":"withdrawn_kamino_profit_token_1","type":"u64"},{"name":"partner_share_rate","docs":["Fraction of protocol tokens shared with partners. Denominator is 1_000_000"],"type":"u64"},{"name":"partner_protocol_fees_token_0","docs":["amount of protocol fees owed to referral partners(token0)"],"type":"u64"},{"name":"partner_protocol_fees_token_1","docs":["amount of protocol fees owed to referral partners(token1)"],"type":"u64"},{"name":"min_swap_at_spot_price","docs":["We later in future want to allow any LP to come and create a Pool of sol-usdc, where they can configure all the params.","They also might want to define a max and min price for swaps, until which they want to allow swaps.","This can be thought of similar to the ranges in CLMM.","{token1/token0} with 9 Decimals"],"type":"u64"},{"name":"max_swap_at_spot_price","type":"u64"},{"name":"h20","type":"u128"},{"name":"padding","docs":["padding"],"type":{"array":["u64",1]}}]}},{"name":"RewardInfo","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"start_at","type":"u64"},{"name":"end_rewards_at","type":"u64"},{"name":"mint","type":"pubkey"},{"name":"total_to_disburse","type":"u64"},{"name":"rewarded_by","type":"pubkey"},{"name":"amount_disbursed","type":"u64"}]}},{"name":"SwapEvent","type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"input_vault_before","docs":["pool vault - trade_fees"],"type":"u64"},{"name":"output_vault_before","docs":["pool_vault - trade_fees"],"type":"u64"},{"name":"input_amount","docs":["calculate result without transfer fees"],"type":"u64"},{"name":"output_amount","docs":["calculate result without transfer fees"],"type":"u64"},{"name":"input_mint","docs":["input mint for the swap"],"type":"pubkey"},{"name":"output_mint","docs":["output mint for the swap"],"type":"pubkey"},{"name":"input_transfer_fee","docs":["transfer fees on input token using token extensions"],"type":"u64"},{"name":"output_transfer_fee","docs":["transfer fees on output token using token extensions"],"type":"u64"},{"name":"base_input","type":"bool"},{"name":"dynamic_fee","docs":["dynamic_fees after this swap"],"type":"u128"}]}},{"name":"UserPoolLiquidity","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"pool_state","type":"pubkey"},{"name":"token_0_deposited","type":"u128"},{"name":"token_1_deposited","type":"u128"},{"name":"token_0_withdrawn","type":"u128"},{"name":"token_1_withdrawn","type":"u128"},{"name":"lp_tokens_owned","type":"u128"},{"name":"_p1","type":"u64"},{"name":"_p2","type":"u8"},{"name":"first_investment_at","type":"u64"},{"name":"partner","type":{"option":"pubkey"}},{"name":"padding","type":{"array":["u8",15]}}]}},{"name":"UserRewardInfo","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"reward_info","type":"pubkey"},{"name":"pool_state","type":"pubkey"},{"name":"total_claimed","type":"u64"},{"name":"total_rewards","type":"u64"},{"name":"rewards_last_calculated_at","type":"u64"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/goosefx_v2.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.json b/olddocs/archivekbot2/idls/goosefx_v2.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.json new file mode 100644 index 0000000..da5ac1e --- /dev/null +++ b/olddocs/archivekbot2/idls/goosefx_v2.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.json @@ -0,0 +1 @@ +{"version":"0.3.0","name":"gfx_ssl_v2","instructions":[{"name":"crankPriceHistories","accounts":[{"name":"poolRegistry","isMut":false,"isSigner":false}],"args":[]},{"name":"internalSwap","accounts":[{"name":"poolRegistry","isMut":false,"isSigner":false},{"name":"pair","isMut":true,"isSigner":false},{"name":"sslAMainToken","isMut":true,"isSigner":false},{"name":"sslBMainToken","isMut":true,"isSigner":false},{"name":"sslASecondaryToken","isMut":true,"isSigner":false},{"name":"sslBSecondaryToken","isMut":true,"isSigner":false},{"name":"tokenAPriceHistory","isMut":true,"isSigner":false},{"name":"tokenAOracle","isMut":false,"isSigner":false},{"name":"tokenBPriceHistory","isMut":true,"isSigner":false},{"name":"tokenBOracle","isMut":false,"isSigner":false},{"name":"sslPoolASigner","isMut":false,"isSigner":false},{"name":"sslPoolBSigner","isMut":false,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"claimFees","accounts":[{"name":"poolRegistry","isMut":false,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"sslFeeVault","isMut":true,"isSigner":false},{"name":"ownerAta","isMut":true,"isSigner":false},{"name":"liquidityAccount","isMut":true,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createLiquidityAccount","accounts":[{"name":"poolRegistry","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"liquidityAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"closeLiquidityAccount","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"rentRecipient","isMut":true,"isSigner":false},{"name":"liquidityAccount","isMut":true,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"deposit","accounts":[{"name":"liquidityAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"userAta","isMut":true,"isSigner":false},{"name":"sslPoolSigner","isMut":false,"isSigner":false},{"name":"poolVault","isMut":true,"isSigner":false},{"name":"sslFeeVault","isMut":true,"isSigner":false},{"name":"poolRegistry","isMut":true,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"liquidityAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"userAta","isMut":true,"isSigner":false},{"name":"sslPoolSigner","isMut":false,"isSigner":false},{"name":"poolVault","isMut":true,"isSigner":false},{"name":"sslFeeVault","isMut":true,"isSigner":false},{"name":"poolRegistry","isMut":true,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"swap","accounts":[{"name":"pair","isMut":true,"isSigner":false},{"name":"poolRegistry","isMut":true,"isSigner":false},{"name":"userWallet","isMut":false,"isSigner":false},{"name":"userWallet","isMut":false,"isSigner":true},{"name":"sslPoolInSigner","isMut":false,"isSigner":false},{"name":"sslPoolOutSigner","isMut":false,"isSigner":false},{"name":"userAtaIn","isMut":true,"isSigner":false},{"name":"userAtaOut","isMut":true,"isSigner":false},{"name":"sslOutMainVault","isMut":true,"isSigner":false},{"name":"sslOutSecondaryVault","isMut":true,"isSigner":false},{"name":"sslInMainVault","isMut":true,"isSigner":false},{"name":"sslInSecondaryVault","isMut":true,"isSigner":false},{"name":"sslOutFeeVault","isMut":true,"isSigner":false},{"name":"sslOutFeeDestination","isMut":true,"isSigner":false},{"name":"outputTokenPriceHistory","isMut":true,"isSigner":false},{"name":"outputTokenOracle","isMut":false,"isSigner":false},{"name":"inputTokenPriceHistory","isMut":true,"isSigner":false},{"name":"inputTokenOracle","isMut":false,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amountIn","type":"u64"},{"name":"minOut","type":"u64"}]}],"accounts":[{"name":"EventEmitter","type":{"kind":"struct","fields":[{"name":"eventId","type":"i64"}]}},{"name":"LiquidityAccount","type":{"kind":"struct","fields":[{"name":"poolRegistry","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"amountDeposited","type":"u64"},{"name":"lastObservedTap","type":"u64"},{"name":"lastClaimed","type":"i64"},{"name":"totalEarned","type":"u64"},{"name":"createdAt","type":"i64"},{"name":"lastDepositAt","type":"u64"},{"name":"lastObsRewardsPerShare","type":{"array":["u8",16]}},{"name":"space","type":{"array":["u8",104]}}]}},{"name":"HistoricalDecimal","type":{"kind":"struct","fields":[{"name":"num","type":"i64"},{"name":"scale","type":"u32"},{"name":"pad0","type":{"array":["u8",4]}}]}},{"name":"HistoricalPrice","type":{"kind":"struct","fields":[{"name":"price","type":{"defined":"HistoricalDecimal"}},{"name":"slot","type":"u64"}]}},{"name":"OraclePriceHistory","type":{"kind":"struct","fields":[{"name":"oracleType","type":"u8"},{"name":"minimumElapsedSlots","type":"u8"},{"name":"maxSlotPriceStaleness","type":"u8"},{"name":"backupOracleType","type":"u8"},{"name":"backupOracle2Type","type":"u8"},{"name":"pad0","type":{"array":["u8",3]}},{"name":"poolRegistry","type":"publicKey"},{"name":"oracleAddress","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"numUpdates","type":"u64"},{"name":"backupOracle","type":"publicKey"},{"name":"latestBackupOraclePrice","type":{"defined":"HistoricalPrice"}},{"name":"backupOracle2","type":"publicKey"},{"name":"latestBackupOracle2Price","type":{"defined":"HistoricalPrice"}},{"name":"space","type":{"array":["u8",16]}},{"name":"priceHistory","type":{"array":[{"defined":"HistoricalPrice"},256]}}]}},{"name":"Pair","type":{"kind":"struct","fields":[{"name":"poolRegistry","type":"publicKey"},{"name":"mints","type":{"defined":"(Pubkey,Pubkey)"}},{"name":"feeCollector","type":{"defined":"(Pubkey,Pubkey)"}},{"name":"normalRouteFeeRates","type":{"defined":"(u16,u16)"}},{"name":"totalFeesGeneratedNative","type":{"defined":"([u8;16],[u8;16])"}},{"name":"totalHistoricalVolume","type":{"array":["u8",16]}},{"name":"totalInternallySwapped","type":{"defined":"([u8;16],[u8;16])"}},{"name":"preferredRouteFeeRates","type":{"defined":"(u16,u16)"}},{"name":"space","type":{"array":["u8",124]}}]}},{"name":"SSLPool","type":{"kind":"struct","fields":[{"name":"status","type":"u8"},{"name":"assetType","type":"u8"},{"name":"pad0","type":{"array":["u8",6]}},{"name":"mint","type":"publicKey"},{"name":"mintDecimals","type":"u8"},{"name":"bump","type":"u8"},{"name":"pad1","type":{"array":["u8",6]}},{"name":"totalAccumulatedLpReward","type":"u64"},{"name":"totalLiquidityDeposits","type":"u64"},{"name":"oraclePriceHistories","type":{"array":["publicKey",3]}},{"name":"mathParams","type":{"defined":"SSLMathParams"}},{"name":"rewardsPerShare","type":{"array":["u8",16]}},{"name":"space","type":{"array":["u8",48]}}]}},{"name":"PoolRegistry","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"seed","type":"publicKey"},{"name":"suspendAdmin","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"pricingAlgo","type":"u8"},{"name":"pad0","type":{"array":["u8",6]}},{"name":"numEntries","type":"u32"},{"name":"pad1","type":{"array":["u8",4]}},{"name":"categoricalPoolTokenRatios","type":{"array":["u16",16]}},{"name":"space","type":{"array":["u8",96]}},{"name":"entries","type":{"array":[{"defined":"SSLPool"},32]}}]}}],"types":[{"name":"ConfigPairParams","type":{"kind":"struct","fields":[{"name":"mintOneNormalRouteFeeRate","type":{"option":"u16"}},{"name":"mintTwoNormalRouteFeeRate","type":{"option":"u16"}},{"name":"mintOnePreferredRouteFeeRate","type":{"option":"u16"}},{"name":"mintTwoPreferredRouteFeeRate","type":{"option":"u16"}}]}},{"name":"SSLMathConfig","type":{"kind":"struct","fields":[{"name":"meanWindow","type":{"option":"u8"}},{"name":"stdWindow","type":{"option":"u8"}},{"name":"fixedPriceDistance","type":{"option":"u16"}},{"name":"minimumPriceDistance","type":{"option":"u16"}},{"name":"stdWeight","type":{"option":"u32"}},{"name":"latestPriceWeight","type":{"option":"u16"}},{"name":"checkPriceGapCount","type":{"option":"u16"}}]}},{"name":"SSLMathParams","type":{"kind":"struct","fields":[{"name":"meanWindow","type":"u8"},{"name":"stdWindow","type":"u8"},{"name":"fixedPriceDistance","type":"u16"},{"name":"minimumPriceDistance","type":"u16"},{"name":"deprecated0","type":"u16"},{"name":"latestPriceWeight","type":"u16"},{"name":"checkPriceGapCount","type":"u16"},{"name":"pad0","type":{"array":["u8",4]}},{"name":"stdWeight","type":"u32"},{"name":"pad1","type":{"array":["u8",4]}},{"name":"space","type":{"array":["u8",32]}}]}},{"name":"MaxPoolTokenRatio","type":{"kind":"struct","fields":[{"name":"inputToken","type":{"defined":"AssetType"}},{"name":"outputToken","type":{"defined":"AssetType"}},{"name":"poolTokenRatio","type":"u16"}]}},{"name":"PoolRegistryConfig","type":{"kind":"struct","fields":[{"name":"newAdmin","type":{"option":"publicKey"}},{"name":"newSuspendAdmin","type":{"option":"publicKey"}},{"name":"maxPoolTokenRatios","type":{"vec":{"defined":"MaxPoolTokenRatio"}}},{"name":"pricingAlgo","type":{"option":{"defined":"PricingAlgo"}}}]}},{"name":"OracleType","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Pyth"},{"name":"Switchboardv2"},{"name":"Invalid"}]}},{"name":"AssetType","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"BlueChip"},{"name":"Volatile"},{"name":"Stable"},{"name":"Invalid"}]}},{"name":"ConfigSSLPoolStatus","type":{"kind":"enum","variants":[{"name":"Active"},{"name":"Suspended"},{"name":"Locked"}]}},{"name":"PricingAlgo","type":{"kind":"enum","variants":[{"name":"Version1"},{"name":"Version2"},{"name":"Version3"},{"name":"Invalid"}]}},{"name":"SSLPoolStatus","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Active"},{"name":"Suspended"},{"name":"Locked"},{"name":"Invalid"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/guacswap.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.json b/olddocs/archivekbot2/idls/guacswap.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.json new file mode 100644 index 0000000..4f0b79b --- /dev/null +++ b/olddocs/archivekbot2/idls/guacswap.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.json @@ -0,0 +1 @@ +{"version":"0.1.1","name":"guacswap","instructions":[{"name":"createPool","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":true},{"name":"poolYAccount","isMut":true,"isSigner":true},{"name":"adminXAccount","isMut":true,"isSigner":false},{"name":"adminYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"projectOwner","isMut":false,"isSigner":false},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"lpFee","type":{"defined":"FixedPoint"}},{"name":"buybackFee","type":{"defined":"FixedPoint"}},{"name":"projectFee","type":{"defined":"FixedPoint"}},{"name":"mercantiFee","type":{"defined":"FixedPoint"}},{"name":"initialTokenX","type":{"defined":"Token"}},{"name":"initialTokenY","type":{"defined":"Token"}},{"name":"bump","type":"u8"}]},{"name":"createProvider","accounts":[{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"tokenXAmount","type":{"defined":"Token"}},{"name":"tokenYAmount","type":{"defined":"Token"}},{"name":"bump","type":"u8"}]},{"name":"createState","accounts":[{"name":"state","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"addTokens","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"deltaX","type":{"defined":"Token"}},{"name":"deltaY","type":{"defined":"Token"}}]},{"name":"withdrawBuyback","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"buybackXAccount","isMut":true,"isSigner":false},{"name":"buybackYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"swap","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"swapperXAccount","isMut":true,"isSigner":false},{"name":"swapperYAccount","isMut":true,"isSigner":false},{"name":"swapper","isMut":true,"isSigner":true},{"name":"referrerXAccount","isMut":true,"isSigner":false},{"name":"referrerYAccount","isMut":true,"isSigner":false},{"name":"referrer","isMut":true,"isSigner":false},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"deltaIn","type":{"defined":"Token"}},{"name":"priceLimit","type":{"defined":"FixedPoint"}},{"name":"xToY","type":"bool"}]},{"name":"withdrawShares","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"shares","type":{"defined":"Token"}}]},{"name":"withdrawLpFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawProjectFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"projectOwnerXAccount","isMut":true,"isSigner":false},{"name":"projectOwnerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"projectOwner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"supply","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"createDualFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenProjectFirst","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"createTripleFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenProjectFirst","isMut":false,"isSigner":false},{"name":"tokenProjectSecond","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":true},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"supplyProjectSecond","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"withdrawRewards","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"closePool","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"buybackXAccount","isMut":true,"isSigner":false},{"name":"buybackYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawMercantiFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"mercantiXAccount","isMut":true,"isSigner":false},{"name":"mercantiYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"addSupply","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"supplyProjectSecond","type":{"defined":"Token"}},{"name":"duration","type":"u64"}]},{"name":"updateFees","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false}],"args":[{"name":"newBuybackFee","type":{"defined":"FixedPoint"}},{"name":"newProjectFee","type":{"defined":"FixedPoint"}},{"name":"newProviderFee","type":{"defined":"FixedPoint"}},{"name":"newMercantiFee","type":{"defined":"FixedPoint"}}]},{"name":"resetFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateRewardTokens","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"newTokenMarcoAccount","isMut":true,"isSigner":true},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"forceWithdrawRewards","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","account":"Provider","path":"provider.owner"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Farm","type":{"kind":"struct","fields":[{"name":"pool","type":"publicKey"},{"name":"tokens","type":{"array":["publicKey",3]}},{"name":"tokenAccounts","type":{"array":["publicKey",3]}},{"name":"supply","type":{"array":[{"defined":"Token"},3]}},{"name":"supplyLeft","type":{"array":[{"defined":"Token"},3]}},{"name":"accumulatedSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"offsetSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"startTime","type":"u64"},{"name":"endTime","type":"u64"},{"name":"lastUpdate","type":"u64"},{"name":"bump","type":"u8"},{"name":"farmType","type":{"defined":"FarmType"}}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"tokenX","type":"publicKey"},{"name":"tokenY","type":"publicKey"},{"name":"poolXAccount","type":"publicKey"},{"name":"poolYAccount","type":"publicKey"},{"name":"admin","type":"publicKey"},{"name":"projectOwner","type":"publicKey"},{"name":"tokenXReserve","type":{"defined":"Token"}},{"name":"tokenYReserve","type":{"defined":"Token"}},{"name":"selfShares","type":{"defined":"Token"}},{"name":"allShares","type":{"defined":"Token"}},{"name":"buybackAmountX","type":{"defined":"Token"}},{"name":"buybackAmountY","type":{"defined":"Token"}},{"name":"projectAmountX","type":{"defined":"Token"}},{"name":"projectAmountY","type":{"defined":"Token"}},{"name":"mercantiAmountX","type":{"defined":"Token"}},{"name":"mercantiAmountY","type":{"defined":"Token"}},{"name":"lpAccumulatorX","type":{"defined":"FixedPoint"}},{"name":"lpAccumulatorY","type":{"defined":"FixedPoint"}},{"name":"constK","type":{"defined":"Product"}},{"name":"price","type":{"defined":"FixedPoint"}},{"name":"lpFee","type":{"defined":"FixedPoint"}},{"name":"buybackFee","type":{"defined":"FixedPoint"}},{"name":"projectFee","type":{"defined":"FixedPoint"}},{"name":"mercantiFee","type":{"defined":"FixedPoint"}},{"name":"farmCount","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"Provider","type":{"kind":"struct","fields":[{"name":"tokenX","type":"publicKey"},{"name":"tokenY","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"shares","type":{"defined":"Token"}},{"name":"lastFeeAccumulatorX","type":{"defined":"FixedPoint"}},{"name":"lastFeeAccumulatorY","type":{"defined":"FixedPoint"}},{"name":"lastSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"lastWithdrawTime","type":"u64"},{"name":"tokensOwedX","type":{"defined":"Token"}},{"name":"tokensOwedY","type":{"defined":"Token"}},{"name":"currentFarmCount","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"State","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"programAuthority","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"nonce","type":"u8"}]}}],"types":[{"name":"FixedPoint","type":{"kind":"struct","fields":[{"name":"v","type":"u128"}]}},{"name":"Token","type":{"kind":"struct","fields":[{"name":"v","type":"u64"}]}},{"name":"Product","type":{"kind":"struct","fields":[{"name":"v","type":"u128"}]}},{"name":"FarmType","type":{"kind":"enum","variants":[{"name":"Single"},{"name":"Dual"},{"name":"Triple"}]}}],"errors":[{"code":6000,"name":"DeltaTooBig","msg":"Delta greater than provider's tokens"},{"code":6001,"name":"TokenUnderflow","msg":"Token amount underflow"},{"code":6002,"name":"WrongRatio","msg":"Wrong tokens ratio"},{"code":6003,"name":"TooMuchShares","msg":"Too much shares provided"},{"code":6004,"name":"SwapToBig","msg":"Swap too big"},{"code":6005,"name":"FeeExceeded","msg":"Fee exceeded 100%"},{"code":6007,"name":"ScalesNotEqual","msg":"Scales have to be equal"},{"code":6008,"name":"FeeExceededDeltaOut","msg":"Fees exceeded delta_out"},{"code":6009,"name":"PriceLimitExceeded","msg":"Price limit exceeded"},{"code":6010,"name":"MintMismatch","msg":"Mint mismatch"},{"code":6011,"name":"TokensAreTheSame","msg":"Tokens are the same"},{"code":6012,"name":"WrongFarm","msg":"Cannot add supply to wrong farm"},{"code":6013,"name":"RewardsExceedingSupply","msg":"Cannot withdraw rewards exceeding supply left"},{"code":6014,"name":"FarmNotEnded","msg":"Farm has not ended, cannot add additional rewards"},{"code":6015,"name":"ZeroAmount","msg":"Must provide a nonzero amount"},{"code":6016,"name":"InvariantDecreased","msg":"Invariant has changed"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/helium_treasury_management.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.json b/olddocs/archivekbot2/idls/helium_treasury_management.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.json new file mode 100644 index 0000000..ce12606 --- /dev/null +++ b/olddocs/archivekbot2/idls/helium_treasury_management.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.json @@ -0,0 +1 @@ +{"address":"treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5","metadata":{"name":"treasury_management","version":"0.2.3","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"initialize_treasury_management_v0","discriminator":[149,3,201,108,130,56,56,210],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"treasury_management","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,101,97,115,117,114,121,95,109,97,110,97,103,101,109,101,110,116]},{"kind":"account","path":"supply_mint"}]}},{"name":"treasury_mint"},{"name":"supply_mint"},{"name":"mint_authority","signer":true},{"name":"circuit_breaker","writable":true,"pda":{"seeds":[{"kind":"const","value":[97,99,99,111,117,110,116,95,119,105,110,100,111,119,101,100,95,98,114,101,97,107,101,114]},{"kind":"account","path":"treasury"}],"program":{"kind":"account","path":"circuit_breaker_program"}}},{"name":"treasury","writable":true,"pda":{"seeds":[{"kind":"account","path":"treasury_management"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"treasury_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":"circuit_breaker_program","address":"circAbx64bbsscPbQzZAUvuXpHqrCe6fLMzc2uKXz9g"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"args","type":{"defined":{"name":"InitializeTreasuryManagementArgsV0"}}}]},{"name":"redeem_v0","discriminator":[235,127,171,139,119,77,235,118],"accounts":[{"name":"treasury_management","pda":{"seeds":[{"kind":"const","value":[116,114,101,97,115,117,114,121,95,109,97,110,97,103,101,109,101,110,116]},{"kind":"account","path":"supply_mint"}]}},{"name":"treasury_mint","relations":["treasury_management"]},{"name":"supply_mint","writable":true,"relations":["treasury_management"]},{"name":"treasury","writable":true,"relations":["treasury_management"]},{"name":"circuit_breaker","writable":true,"pda":{"seeds":[{"kind":"const","value":[97,99,99,111,117,110,116,95,119,105,110,100,111,119,101,100,95,98,114,101,97,107,101,114]},{"kind":"account","path":"treasury"}],"program":{"kind":"account","path":"circuit_breaker_program"}}},{"name":"from","writable":true},{"name":"to","writable":true},{"name":"owner","signer":true,"relations":["from"]},{"name":"circuit_breaker_program","address":"circAbx64bbsscPbQzZAUvuXpHqrCe6fLMzc2uKXz9g"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"args","type":{"defined":{"name":"RedeemArgsV0"}}}]},{"name":"update_treasury_management_v0","discriminator":[209,139,90,226,249,149,89,217],"accounts":[{"name":"treasury_management","writable":true},{"name":"authority","signer":true,"relations":["treasury_management"]}],"args":[{"name":"args","type":{"defined":{"name":"UpdateTreasuryManagementArgsV0"}}}]}],"accounts":[{"name":"AccountWindowedCircuitBreakerV0","discriminator":[134,11,69,100,90,132,174,187]},{"name":"TreasuryManagementV0","discriminator":[68,111,120,209,16,110,215,59]}],"errors":[{"code":6000,"name":"Frozen","msg":"Treasury management is currently frozen"},{"code":6001,"name":"ArithmeticError","msg":"Error in arithmetic"}],"types":[{"name":"AccountWindowedCircuitBreakerV0","type":{"kind":"struct","fields":[{"name":"token_account","type":"pubkey"},{"name":"authority","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"config","type":{"defined":{"name":"WindowedCircuitBreakerConfigV0"}}},{"name":"last_window","type":{"defined":{"name":"WindowV0"}}},{"name":"bump_seed","type":"u8"}]}},{"name":"Curve","type":{"kind":"enum","variants":[{"name":"ExponentialCurveV0","fields":[{"name":"k","type":"u128"}]}]}},{"name":"InitializeTreasuryManagementArgsV0","type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"curve","type":{"defined":{"name":"Curve"}}},{"name":"freeze_unix_time","type":"i64"},{"name":"window_config","type":{"defined":{"name":"WindowedCircuitBreakerConfigV0"}}}]}},{"name":"RedeemArgsV0","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"expected_output_amount","type":"u64"}]}},{"name":"ThresholdType","type":{"kind":"enum","variants":[{"name":"Percent"},{"name":"Absolute"}]}},{"name":"TreasuryManagementV0","type":{"kind":"struct","fields":[{"name":"treasury_mint","type":"pubkey"},{"name":"supply_mint","type":"pubkey"},{"name":"authority","type":"pubkey"},{"name":"treasury","type":"pubkey"},{"name":"curve","docs":["The bonding curve to use"],"type":{"defined":{"name":"Curve"}}},{"name":"freeze_unix_time","docs":["Freeze this curve at this time."],"type":"i64"},{"name":"bump_seed","type":"u8"}]}},{"name":"UpdateTreasuryManagementArgsV0","type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"curve","type":{"defined":{"name":"Curve"}}},{"name":"freeze_unix_time","type":"i64"}]}},{"name":"WindowV0","type":{"kind":"struct","fields":[{"name":"last_aggregated_value","type":"u64"},{"name":"last_unix_timestamp","type":"i64"}]}},{"name":"WindowedCircuitBreakerConfigV0","type":{"kind":"struct","fields":[{"name":"window_size_seconds","type":"u64"},{"name":"threshold_type","type":{"defined":{"name":"ThresholdType"}}},{"name":"threshold","type":"u64"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/hylo_exchange.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.json b/olddocs/archivekbot2/idls/hylo_exchange.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.json new file mode 100644 index 0000000..87e57a3 --- /dev/null +++ b/olddocs/archivekbot2/idls/hylo_exchange.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.json @@ -0,0 +1 @@ +{"address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn","metadata":{"name":"hylo_exchange","version":"0.1.4","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"get_stats","discriminator":[241,65,112,185,230,140,139,177],"accounts":[{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"levercoin_mint","pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"sol_usd_pyth_feed"}],"args":[],"returns":{"defined":{"name":"ExchangeStats"}}},{"name":"harvest_yield","discriminator":[28,200,150,200,69,56,38,133],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"stablecoin_fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"stablecoin_fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"stablecoin_fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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":"levercoin_fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"levercoin_fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"levercoin_fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_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":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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":"levercoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_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_auth","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}],"program":{"kind":"account","path":"hylo_stability_pool"}}},{"name":"sol_usd_pyth_feed"},{"name":"hylo_stability_pool","address":"HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ"},{"name":"lst_registry","writable":true,"relations":["hylo"]},{"name":"lut_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"initialize_lst_registry","discriminator":[148,180,49,29,133,6,9,59],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"registry_auth","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,114,101,103,105,115,116,114,121,95,97,117,116,104]}]}},{"name":"lst_registry","writable":true},{"name":"lut_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"slot","type":"u64"}]},{"name":"initialize_lst_registry_calculators","discriminator":[109,166,101,171,217,202,83,166],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"lst_registry_auth","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,114,101,103,105,115,116,114,121,95,97,117,116,104]}]}},{"name":"lst_registry","writable":true,"relations":["hylo"]},{"name":"lut_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize_mints","discriminator":[189,84,85,142,177,200,57,22],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]}},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]}},{"name":"stablecoin_metadata","writable":true},{"name":"levercoin_metadata","writable":true},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize_protocol","discriminator":[188,233,252,106,134,146,202,91],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"treasury"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program_data"},{"name":"hylo_exchange","address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"}],"args":[{"name":"oracle_interval_secs","type":"u64"},{"name":"stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}},{"name":"levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}},{"name":"yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}}]},{"name":"mint_levercoin","discriminator":[91,156,221,157,151,186,223,231],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_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":"lst_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_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":"lst_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_mint"}]}},{"name":"user_lst_ta","writable":true},{"name":"user_levercoin_ta","writable":true},{"name":"lst_mint"},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]}},{"name":"sol_usd_pyth_feed"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"amount_lst_to_deposit","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}]},{"name":"mint_stablecoin","discriminator":[196,235,215,70,211,5,214,238],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_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":"lst_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_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":"lst_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_mint"}]}},{"name":"user_lst_ta","writable":true},{"name":"user_stablecoin_ta","writable":true},{"name":"lst_mint"},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"sol_usd_pyth_feed"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"amount_lst_to_deposit","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}]},{"name":"redeem_levercoin","discriminator":[132,166,215,32,46,131,174,44],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_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":"lst_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_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":"lst_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_mint"}]}},{"name":"user_levercoin_ta","writable":true},{"name":"user_lst_ta","writable":true},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"lst_mint"},{"name":"sol_usd_pyth_feed"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_to_redeem","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}]},{"name":"redeem_stablecoin","discriminator":[69,46,6,97,170,130,160,237],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_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":"lst_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_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":"lst_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_mint"}]}},{"name":"user_stablecoin_ta","writable":true},{"name":"user_lst_ta","writable":true},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"lst_mint"},{"name":"sol_usd_pyth_feed"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_to_redeem","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}]},{"name":"register_lst","discriminator":[167,114,254,24,190,221,82,107],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"lst_header","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_mint"}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"registry_auth","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,114,101,103,105,115,116,114,121,95,97,117,116,104]}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_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":"lst_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_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":"lst_mint"},{"name":"lst_registry","writable":true,"relations":["hylo"]},{"name":"lst_stake_pool_state"},{"name":"sanctum_calculator_program"},{"name":"sanctum_calculator_state"},{"name":"stake_pool_program_data"},{"name":"stake_pool_program"},{"name":"lut_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"swap_lever_to_stable","discriminator":[167,111,84,179,69,7,135,48],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"sol_usd_pyth_feed"},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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_stablecoin_ta","writable":true},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"user_levercoin_ta","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_levercoin","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}],"returns":{"defined":{"name":"SwapLeverToStableEventV1"}}},{"name":"swap_lst","discriminator":[37,144,201,101,137,182,241,42],"accounts":[{"name":"user","signer":true},{"name":"hylo"},{"name":"lst_a_mint"},{"name":"lst_a_user_ta","writable":true},{"name":"lst_a_vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_a_mint"}]}},{"name":"lst_a_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"lst_a_vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_a_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":"lst_a_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_a_mint"}]}},{"name":"lst_b_mint"},{"name":"lst_b_user_ta","writable":true},{"name":"lst_b_vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_b_mint"}]}},{"name":"lst_b_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"lst_b_vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_b_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":"lst_b_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_b_mint"}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_a_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_a_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":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_lst_a","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}]},{"name":"swap_stable_to_lever","discriminator":[123,194,84,140,192,193,193,161],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"sol_usd_pyth_feed"},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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_stablecoin_ta","writable":true},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"user_levercoin_ta","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_stablecoin","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}],"returns":{"defined":{"name":"SwapStableToLeverEventV1"}}},{"name":"update_admin","discriminator":[161,176,40,213,60,184,179,228],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"program_data"},{"name":"hylo_exchange","address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"},{"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":"new_admin","type":"pubkey"}]},{"name":"update_levercoin_fees","discriminator":[183,123,195,23,63,151,104,31],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}}]},{"name":"update_lst_prices","discriminator":[3,34,88,178,240,40,85,148],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"lst_registry","writable":true,"relations":["hylo"]},{"name":"lut_program","address":"AddressLookupTab1e1111111111111111111111111"},{"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":"update_lst_swap_fee","discriminator":[129,125,10,188,94,219,63,217],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_lst_swap_fee","type":{"defined":{"name":"UFixValue64"}}}]},{"name":"update_oracle_conf_tolerance","discriminator":[59,81,210,112,245,81,187,151],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_oracle_conf_tolerance","type":{"defined":{"name":"UFixValue64"}}}]},{"name":"update_oracle_interval","discriminator":[67,242,44,246,210,94,99,214],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_oracle_interval_secs","type":"u64"}]},{"name":"update_sol_usd_oracle","discriminator":[95,236,18,102,201,114,89,54],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_oracle","type":"pubkey"}]},{"name":"update_stability_pool","discriminator":[241,157,233,64,49,184,93,137],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_stability_pool","type":"pubkey"}]},{"name":"update_stability_thresholds","discriminator":[250,58,160,105,52,84,93,167],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}}]},{"name":"update_stablecoin_fees","discriminator":[49,74,146,60,3,38,96,4],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}}]},{"name":"update_treasury","discriminator":[60,16,243,66,96,59,254,131],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_treasury","type":"pubkey"}]},{"name":"update_yield_harvest_config","discriminator":[140,91,46,213,44,179,201,32],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}}]},{"name":"withdraw_fees","discriminator":[198,212,171,109,144,215,174,89],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"treasury","writable":true,"relations":["hylo"]},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"fee_token_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"fee_token_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":"treasury_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"treasury"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"fee_token_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":"fee_token_mint"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":[]}],"accounts":[{"name":"Hylo","discriminator":[114,161,169,210,204,175,149,174]},{"name":"LstHeader","discriminator":[125,135,217,151,122,202,138,59]},{"name":"PriceUpdateV2","discriminator":[34,241,35,99,157,126,244,205]}],"events":[{"name":"ExchangeStats","discriminator":[74,24,38,211,126,124,214,158]},{"name":"HarvestYieldEventV1","discriminator":[236,194,171,214,66,200,158,27]},{"name":"HarvestYieldEventV2","discriminator":[46,204,60,91,154,15,240,7]},{"name":"MintLevercoinEventV0","discriminator":[71,135,154,151,170,173,218,125]},{"name":"MintLevercoinEventV1","discriminator":[77,221,3,200,106,110,9,245]},{"name":"MintLevercoinEventV2","discriminator":[153,16,148,142,11,127,114,15]},{"name":"MintStablecoinEventV0","discriminator":[181,185,32,71,11,248,162,100]},{"name":"MintStablecoinEventV1","discriminator":[102,41,35,191,18,74,142,16]},{"name":"MintStablecoinEventV2","discriminator":[173,104,166,28,0,52,94,246]},{"name":"RedeemLevercoinEventV0","discriminator":[92,186,13,68,23,219,194,81]},{"name":"RedeemLevercoinEventV1","discriminator":[44,209,148,186,40,214,48,242]},{"name":"RedeemLevercoinEventV2","discriminator":[136,249,79,60,114,254,234,38]},{"name":"RedeemStablecoinEventV0","discriminator":[98,11,53,77,188,71,107,168]},{"name":"RedeemStablecoinEventV1","discriminator":[172,179,174,150,249,177,177,201]},{"name":"RedeemStablecoinEventV2","discriminator":[36,163,198,40,252,128,99,179]},{"name":"RegisterLstEvent","discriminator":[67,129,63,97,144,52,195,33]},{"name":"SwapLeverToStableEventV0","discriminator":[50,170,61,23,136,163,174,145]},{"name":"SwapLeverToStableEventV1","discriminator":[201,228,47,118,19,214,21,45]},{"name":"SwapLstEventV0","discriminator":[246,70,176,207,42,167,214,67]},{"name":"SwapStableToLeverEventV0","discriminator":[134,28,79,7,117,57,126,174]},{"name":"SwapStableToLeverEventV1","discriminator":[184,185,154,14,36,128,241,53]},{"name":"UpdateAdminEvent","discriminator":[225,152,171,87,246,63,66,234]},{"name":"UpdateLevercoinFeesEvent","discriminator":[84,176,60,195,204,115,242,169]},{"name":"UpdateLstPricesEvent","discriminator":[104,0,189,118,195,155,77,151]},{"name":"UpdateLstSwapFeeEvent","discriminator":[139,68,196,130,145,148,173,212]},{"name":"UpdateOracleAddressEvent","discriminator":[28,247,140,128,156,178,148,53]},{"name":"UpdateOracleConfEvent","discriminator":[190,89,82,192,231,31,206,91]},{"name":"UpdateOracleIntervalEvent","discriminator":[190,132,209,41,79,137,195,226]},{"name":"UpdateStabilityPoolEvent","discriminator":[220,82,162,130,152,212,135,63]},{"name":"UpdateStabilityThresholdsEvent","discriminator":[36,117,167,25,25,39,46,189]},{"name":"UpdateStablecoinFeesEvent","discriminator":[38,140,45,231,238,94,115,249]},{"name":"UpdateTreasuryEvent","discriminator":[104,210,213,227,230,150,146,19]},{"name":"UpdateYieldHarvestConfigEvent","discriminator":[67,168,96,20,78,117,245,206]},{"name":"WithdrawFeesEvent","discriminator":[236,118,138,90,139,173,177,89]}],"errors":[{"code":6000,"name":"LevercoinRedeemDisabled","msg":"Cannot redeem levercoin due to stability mode. NAV would be 0 or lower."},{"code":6001,"name":"LeverToStableDisabled","msg":"Levercoin to stablecoin swap disabled due to stability mode."},{"code":6002,"name":"StableToLeverDisabled","msg":"Stablecoin to levercoin swap disabled due to stability mode."},{"code":6003,"name":"SanctumCpi","msg":"Error during CPI to Sanctum LST/SOL calculator."},{"code":6004,"name":"LstRegistryAlreadyInitialized","msg":"LST registry cannot be initialized twice."},{"code":6005,"name":"LstRegistryEmpty","msg":"LST specific accounts found empty when attempting to load registry."},{"code":6006,"name":"LstRegistryPreamble","msg":"Sanctum calculator contexts in LST registry preamble are malformed."},{"code":6007,"name":"LstRegistryLookupTableDeser","msg":"Failed to deserialize registry lookup table."},{"code":6008,"name":"LstRegistryLookupTableInvalid","msg":"Contents of LST registry did not match remaining_accounts."},{"code":6009,"name":"LstBlockInvalid","msg":"Mint/vault/pool accounts in registry block do not match header."},{"code":6010,"name":"LstContextInvalid","msg":"Attempted to register an LST with invalid Sanctum context accounts."},{"code":6011,"name":"LstAdditionOverflow","msg":"Addition overflow while computing total SOL in LST registry."},{"code":6012,"name":"LstPriceOutdated","msg":"Cached LST price not from current epoch. Run pricing crank to update."},{"code":6013,"name":"LstPriceDelta","msg":"Failed to compute delta between current and previous LST prices."},{"code":6014,"name":"LstPriceEpochsInvalid","msg":"Found current epoch less than previous in LST header."},{"code":6015,"name":"LstSolAppreciation","msg":"Overflow while computing LST SOL appreciation."},{"code":6016,"name":"StablecoinMintDisabled","msg":"Stablecoin mint disabled. Protocol is in Mode2 or Depeg."},{"code":6017,"name":"LevercoinMintDisabled","msg":"Levercoin mint disabled. Protocol is in Depeg."},{"code":6018,"name":"YieldHarvestConfigValidation","msg":"Yield harvest configuration percentages failed validation."},{"code":6019,"name":"YieldHarvestDisabled","msg":"Yield harvest disabled due to protocol collateral ratio."},{"code":6020,"name":"YieldHarvestAllocation","msg":"Arithmetic error while computing yield harvest allocation."},{"code":6021,"name":"YieldHarvestEpoch","msg":"Yield harvest already occurred during this epoch."},{"code":6022,"name":"YieldHarvestHasNotRun","msg":"Yield harvest has not yet occurred during this epoch."},{"code":6023,"name":"ZeroRedeem","msg":"Cannot withdraw amount of 0 in a redemption action."},{"code":6024,"name":"ZeroMint","msg":"Cannot deposit amount of 0 in a minting action."},{"code":6025,"name":"ZeroSwap","msg":"Cannot swap amount of 0."},{"code":6026,"name":"IdentitySwap","msg":"Cannot swap from an asset to itself."}],"types":[{"name":"ExchangeStats","docs":["Stats"],"type":{"kind":"struct","fields":[{"name":"total_value_locked","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_supply","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_supply","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_ratio","type":{"defined":{"name":"UFixValue64"}}},{"name":"stability_mode","type":{"defined":{"name":"StabilityMode"}}},{"name":"yield_harvest_cache","type":{"defined":{"name":"YieldHarvestCache"}}}]}},{"name":"FeePair","docs":["Represents the spread of fees between mint and redeem for protocol tokens.","All fees must be in basis points to represent a fractional percentage","directly applicable to a token amount e.g. `0.XXXX` or `bips x 10^-4`."],"type":{"kind":"struct","fields":[{"name":"mint","type":{"defined":{"name":"UFixValue64"}}},{"name":"redeem","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"HarvestYieldEventV1","docs":["Cranks"],"type":{"kind":"struct","fields":[{"name":"harvestable_stablecoin","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_extracted","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_to_pool","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"HarvestYieldEventV2","type":{"kind":"struct","fields":[{"name":"harvest_token_mint","type":"pubkey"},{"name":"total_sol_harvested","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_extracted","type":{"defined":{"name":"UFixValue64"}}},{"name":"token_to_pool","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"Hylo","type":{"kind":"struct","fields":[{"name":"admin","type":"pubkey"},{"name":"treasury","type":"pubkey"},{"name":"lst_registry","type":"pubkey"},{"name":"stablecoin_mint","type":"pubkey"},{"name":"levercoin_mint","type":"pubkey"},{"name":"stability_pool","type":"pubkey"},{"name":"stablecoin_mint_bump","type":"u8"},{"name":"stablecoin_auth_bump","type":"u8"},{"name":"levercoin_mint_bump","type":"u8"},{"name":"levercoin_auth_bump","type":"u8"},{"name":"registry_auth_bump","type":"u8"},{"name":"total_sol_cache_bump","type":"u8"},{"name":"oracle_interval_secs","type":"u64"},{"name":"stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}},{"name":"levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}},{"name":"total_sol_cache","type":{"defined":{"name":"TotalSolCache"}}},{"name":"yield_harvest_cache","type":{"defined":{"name":"YieldHarvestCache"}}},{"name":"yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}},{"name":"stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}},{"name":"oracle_conf_tolerance","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_oracle","type":"pubkey"},{"name":"lst_swap_fee","type":{"defined":{"name":"UFixValue64"}}},{"name":"_reserved","type":{"array":["u8",78]}}]}},{"name":"LevercoinFees","type":{"kind":"struct","fields":[{"name":"normal","type":{"defined":{"name":"FeePair"}}},{"name":"mode_1","type":{"defined":{"name":"FeePair"}}},{"name":"mode_2","type":{"defined":{"name":"FeePair"}}}]}},{"name":"LstHeader","docs":["Header for a specific LST. Should be the first entry in the block of","accounts, and contains references to the rest of the accounts."],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"pool_state","type":"pubkey"},{"name":"stake_program","type":{"defined":{"name":"LstStakePoolProgram"}}},{"name":"prev_price_sol","type":{"defined":{"name":"LstSolPrice"}}},{"name":"price_sol","type":{"defined":{"name":"LstSolPrice"}}},{"name":"last_yield_harvest_epoch","type":"u64"},{"name":"_reserved","type":{"array":["u8",64]}}]}},{"name":"LstSolPrice","docs":["Captures the true LST price in SOL for the current epoch."],"type":{"kind":"struct","fields":[{"name":"price","type":{"defined":{"name":"UFixValue64"}}},{"name":"epoch","type":"u64"}]}},{"name":"LstStakePoolProgram","type":{"kind":"enum","variants":[{"name":"Spl"},{"name":"SanctumSpl"},{"name":"SanctumSplMulti"},{"name":"Marinade"}]}},{"name":"MintLevercoinEventV0","docs":["`MintLevercoin`"],"type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"total_supply","type":"u64"},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_deposited","type":"u64"},{"name":"collateral_ratio","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"MintLevercoinEventV1","type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"MintLevercoinEventV2","type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_mint","type":"pubkey"},{"name":"lst_sol_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_deposited","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_deposited","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"MintStablecoinEventV0","docs":["`MintStablecoin`"],"type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"total_supply","type":"u64"},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_deposited","type":"u64"},{"name":"collateral_ratio","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"MintStablecoinEventV1","type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"MintStablecoinEventV2","type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_mint","type":"pubkey"},{"name":"lst_sol_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_deposited","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_deposited","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"PriceFeedMessage","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"feed_id","docs":["`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."],"type":{"array":["u8",32]}},{"name":"price","type":"i64"},{"name":"conf","type":"u64"},{"name":"exponent","type":"i32"},{"name":"publish_time","docs":["The timestamp of this price update in seconds"],"type":"i64"},{"name":"prev_publish_time","docs":["The timestamp of the previous price update. This field is intended to allow users to","identify the single unique price update for any moment in time:","for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.","","Note that there may not be such an update while we are migrating to the new message-sending logic,","as some price updates on pythnet may not be sent to other chains (because the message-sending","logic may not have triggered). We can solve this problem by making the message-sending mandatory","(which we can do once publishers have migrated over).","","Additionally, this field may be equal to publish_time if the message is sent on a slot where","where the aggregation was unsuccesful. This problem will go away once all publishers have","migrated over to a recent version of pyth-agent."],"type":"i64"},{"name":"ema_price","type":"i64"},{"name":"ema_conf","type":"u64"}]}},{"name":"PriceUpdateV2","docs":["A price update account. This account is used by the Pyth Receiver program to store a verified price update from a Pyth price feed.","It contains:","- `write_authority`: The write authority for this account. This authority can close this account to reclaim rent or update the account to contain a different price update.","- `verification_level`: The [`VerificationLevel`] of this price update. This represents how many Wormhole guardian signatures have been verified for this price update.","- `price_message`: The actual price update.","- `posted_slot`: The slot at which this price update was posted."],"type":{"kind":"struct","fields":[{"name":"write_authority","type":"pubkey"},{"name":"verification_level","type":{"defined":{"name":"VerificationLevel"}}},{"name":"price_message","type":{"defined":{"name":"PriceFeedMessage"}}},{"name":"posted_slot","type":"u64"}]}},{"name":"RedeemLevercoinEventV0","docs":["`RedeemLevercoin`"],"type":{"kind":"struct","fields":[{"name":"redeemed","type":"u64"},{"name":"total_supply","type":"u64"},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_ratio","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RedeemLevercoinEventV1","type":{"kind":"struct","fields":[{"name":"redeemed","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RedeemLevercoinEventV2","type":{"kind":"struct","fields":[{"name":"redeemed","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_mint","type":"pubkey"},{"name":"lst_sol_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_deposited","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RedeemStablecoinEventV0","docs":["`RedeemStablecoin`"],"type":{"kind":"struct","fields":[{"name":"redeemed","type":"u64"},{"name":"total_supply","type":"u64"},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_ratio","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RedeemStablecoinEventV1","type":{"kind":"struct","fields":[{"name":"redeemed","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RedeemStablecoinEventV2","type":{"kind":"struct","fields":[{"name":"redeemed","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_mint","type":"pubkey"},{"name":"lst_sol_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_deposited","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RegisterLstEvent","docs":["Admin"],"type":{"kind":"struct","fields":[{"name":"header","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"pool_state","type":"pubkey"}]}},{"name":"SlippageConfig","docs":["Client specified slippage tolerance paired with expected token amount."],"type":{"kind":"struct","fields":[{"name":"expected_token_out","type":{"defined":{"name":"UFixValue64"}}},{"name":"slippage_tolerance","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"StabilityMode","docs":["Mode of operation based on the protocol's current collateral ratio.","See whitepaper for more."],"type":{"kind":"enum","variants":[{"name":"Normal"},{"name":"Mode1"},{"name":"Mode2"},{"name":"Depeg"}]}},{"name":"StablecoinFees","type":{"kind":"struct","fields":[{"name":"normal","type":{"defined":{"name":"FeePair"}}},{"name":"mode_1","type":{"defined":{"name":"FeePair"}}}]}},{"name":"SwapLeverToStableEventV0","type":{"kind":"struct","fields":[{"name":"levercoin_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_minted","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"SwapLeverToStableEventV1","type":{"kind":"struct","fields":[{"name":"levercoin_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_minted_user","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_minted_fees","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"SwapLstEventV0","type":{"kind":"struct","fields":[{"name":"lst_a_mint","type":"pubkey"},{"name":"lst_a_in","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_a_fees_extracted","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_b_mint","type":"pubkey"},{"name":"lst_b_out","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"SwapStableToLeverEventV0","docs":["Swaps"],"type":{"kind":"struct","fields":[{"name":"stablecoin_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_minted","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"SwapStableToLeverEventV1","type":{"kind":"struct","fields":[{"name":"stablecoin_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_fees","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"TotalSolCache","type":{"kind":"struct","fields":[{"name":"current_update_epoch","type":"u64"},{"name":"total_sol","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UFixValue64","docs":["A value-space `Fix` where base is always 10 and bits are a concrete type.","Intended for serialized storage in Solana accounts where generics won't work."],"type":{"kind":"struct","fields":[{"name":"bits","type":"u64"},{"name":"exp","type":"i8"}]}},{"name":"UpdateAdminEvent","type":{"kind":"struct","fields":[{"name":"old_admin","type":"pubkey"},{"name":"new_admin","type":"pubkey"}]}},{"name":"UpdateLevercoinFeesEvent","type":{"kind":"struct","fields":[{"name":"old_levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}},{"name":"new_levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}}]}},{"name":"UpdateLstPricesEvent","type":{"kind":"struct","fields":[{"name":"updated_mints","type":{"vec":"pubkey"}},{"name":"new_total_sol","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UpdateLstSwapFeeEvent","type":{"kind":"struct","fields":[{"name":"old_lst_swap_fee","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_lst_swap_fee","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UpdateOracleAddressEvent","type":{"kind":"struct","fields":[{"name":"old_oracle","type":"pubkey"},{"name":"new_oracle","type":"pubkey"}]}},{"name":"UpdateOracleConfEvent","type":{"kind":"struct","fields":[{"name":"old_oracle_conf_tolerance","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_oracle_conf_tolerance","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UpdateOracleIntervalEvent","type":{"kind":"struct","fields":[{"name":"old_oracle_interval_secs","type":"u64"},{"name":"new_oracle_interval_secs","type":"u64"}]}},{"name":"UpdateStabilityPoolEvent","type":{"kind":"struct","fields":[{"name":"old_stability_pool","type":"pubkey"},{"name":"new_stability_pool","type":"pubkey"}]}},{"name":"UpdateStabilityThresholdsEvent","type":{"kind":"struct","fields":[{"name":"old_stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"old_stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UpdateStablecoinFeesEvent","type":{"kind":"struct","fields":[{"name":"old_stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}},{"name":"new_stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}}]}},{"name":"UpdateTreasuryEvent","type":{"kind":"struct","fields":[{"name":"old_treasury","type":"pubkey"},{"name":"new_treasury","type":"pubkey"}]}},{"name":"UpdateYieldHarvestConfigEvent","type":{"kind":"struct","fields":[{"name":"old_yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}},{"name":"new_yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}}]}},{"name":"VerificationLevel","docs":["Pyth price updates are bridged to all blockchains via Wormhole.","Using the price updates on another chain requires verifying the signatures of the Wormhole guardians.","The usual process is to check the signatures for two thirds of the total number of guardians, but this can be cumbersome on Solana because of the transaction size limits,","so we also allow for partial verification.","","This enum represents how much a price update has been verified:","- If `Full`, we have verified the signatures for two thirds of the current guardians.","- If `Partial`, only `num_signatures` guardian signatures have been checked.","","# Warning","Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."],"type":{"kind":"enum","variants":[{"name":"Partial","fields":[{"name":"num_signatures","type":"u8"}]},{"name":"Full"}]}},{"name":"WithdrawFeesEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"treasury_ata","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"YieldHarvestCache","docs":["Records epoch yield harvest information for off-chain consumers."],"type":{"kind":"struct","fields":[{"name":"epoch","type":"u64"},{"name":"stability_pool_cap","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_yield_to_pool","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"YieldHarvestConfig","docs":["Captures yield harvest configuration as two basis point values:"],"type":{"kind":"struct","fields":[{"name":"allocation","type":{"defined":{"name":"UFixValue64"}}},{"name":"fee","type":{"defined":{"name":"UFixValue64"}}}]}}],"constants":[{"name":"FEE_AUTH","type":{"array":["u8",8]},"value":"[102, 101, 101, 95, 97, 117, 116, 104]"},{"name":"HYLO","type":{"array":["u8",4]},"value":"[104, 121, 108, 111]"},{"name":"HYUSD","type":{"array":["u8",5]},"value":"[104, 121, 85, 83, 68]"},{"name":"LST_HEADER","type":{"array":["u8",10]},"value":"[108, 115, 116, 95, 104, 101, 97, 100, 101, 114]"},{"name":"LST_REGISTRY_AUTH","type":{"array":["u8",17]},"value":"[108, 115, 116, 95, 114, 101, 103, 105, 115, 116, 114, 121, 95, 97, 117, 116, 104]"},{"name":"MINT_AUTH","type":{"array":["u8",9]},"value":"[109, 105, 110, 116, 95, 97, 117, 116, 104]"},{"name":"POOL_AUTH","type":{"array":["u8",9]},"value":"[112, 111, 111, 108, 95, 97, 117, 116, 104]"},{"name":"VAULT_AUTH","type":{"array":["u8",10]},"value":"[118, 97, 117, 108, 116, 95, 97, 117, 116, 104]"},{"name":"XSOL","type":{"array":["u8",4]},"value":"[120, 83, 79, 76]"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/hylo_stability_pool.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.json b/olddocs/archivekbot2/idls/hylo_stability_pool.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.json new file mode 100644 index 0000000..8844cbd --- /dev/null +++ b/olddocs/archivekbot2/idls/hylo_stability_pool.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.json @@ -0,0 +1 @@ +{"address":"HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ","metadata":{"name":"hylo_stability_pool","version":"0.1.4","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"get_stats","discriminator":[241,65,112,185,230,140,139,177],"accounts":[{"name":"pool_config","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_mint","pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"pool_auth","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"stablecoin_pool","pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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":"levercoin_pool","pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_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":"lp_token_mint","pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,100,95,104,121,85,83,68]}]}},{"name":"sol_usd_pyth_feed"}],"args":[],"returns":{"defined":{"name":"StabilityPoolStats"}}},{"name":"initialize_lp_token_mint","discriminator":[188,32,168,40,166,152,159,156],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["pool_config"]},{"name":"pool_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"lp_token_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"lp_token_mint"}]}},{"name":"lp_token_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,100,95,104,121,85,83,68]}]}},{"name":"lp_token_metadata","writable":true},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize_stability_pool","discriminator":[220,103,253,62,133,245,74,222],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"pool_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"pool_auth","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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":"levercoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_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":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_mint","pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program_data"},{"name":"hylo_stability_pool","address":"HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ"}],"args":[]},{"name":"rebalance_lever_to_stable","discriminator":[194,252,113,42,31,248,184,211],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"pool_config","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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_auth","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"levercoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_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":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"sol_usd_pyth_feed"},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"hylo_event_authority"},{"name":"hylo_exchange_program","address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"rebalance_stable_to_lever","discriminator":[210,59,29,161,20,10,3,68],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"pool_config","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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_auth","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"levercoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_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":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"sol_usd_pyth_feed"},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"hylo_event_authority"},{"name":"hylo_exchange_program","address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"update_admin","discriminator":[161,176,40,213,60,184,179,228],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"pool_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"program_data"},{"name":"hylo_stability_pool","address":"HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ"},{"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":"new_admin","type":"pubkey"}]},{"name":"update_withdrawal_fee","discriminator":[165,235,231,25,127,99,244,133],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["pool_config"]},{"name":"pool_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"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":"new_withdrawal_fee","type":{"defined":{"name":"UFixValue64"}}}]},{"name":"user_deposit","discriminator":[186,198,140,233,129,39,98,153],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"pool_config","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_mint","pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"user_stablecoin_ta","writable":true},{"name":"user_lp_token_ta","writable":true},{"name":"pool_auth","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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":"levercoin_pool","pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_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":"lp_token_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"lp_token_mint"}]}},{"name":"lp_token_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,100,95,104,121,85,83,68]}]}},{"name":"sol_usd_pyth_feed"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_stablecoin","type":"u64"}]},{"name":"user_withdraw","discriminator":[53,254,26,242,119,237,73,33],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"pool_config","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"user_stablecoin_ta","writable":true},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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_lp_token_ta","writable":true},{"name":"pool_auth","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_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":"levercoin_mint","pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_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_levercoin_ta","writable":true},{"name":"lp_token_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"lp_token_mint"}]}},{"name":"lp_token_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,100,95,104,121,85,83,68]}]}},{"name":"sol_usd_pyth_feed"},{"name":"hylo_event_authority"},{"name":"hylo_exchange_program","address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_lp_token","type":"u64"}]}],"accounts":[{"name":"Hylo","discriminator":[114,161,169,210,204,175,149,174]},{"name":"PoolConfig","discriminator":[26,108,14,123,116,230,129,43]},{"name":"PriceUpdateV2","discriminator":[34,241,35,99,157,126,244,205]}],"events":[{"name":"RebalanceLeverToStableEvent","discriminator":[177,3,181,27,187,44,49,109]},{"name":"RebalanceStableToLeverEvent","discriminator":[117,99,97,34,247,186,34,198]},{"name":"StabilityPoolStats","discriminator":[146,92,252,198,221,148,242,182]},{"name":"UpdateAdminEvent","discriminator":[225,152,171,87,246,63,66,234]},{"name":"UpdateWithdrawalFeeEvent","discriminator":[204,60,32,187,54,211,107,115]},{"name":"UserDepositEvent","discriminator":[70,55,110,118,235,187,239,33]},{"name":"UserWithdrawEventV0","discriminator":[142,135,121,155,248,252,59,161]},{"name":"UserWithdrawEventV1","discriminator":[51,241,35,135,62,237,83,122]}],"errors":[{"code":6000,"name":"RebalanceDisabled","msg":"Rebalance is disabled due to stability or pool amount constraint not \\\n being met."},{"code":6001,"name":"DepositDisabled","msg":"Deposits to pool disabled due to active rebalancing."}],"types":[{"name":"FeePair","docs":["Represents the spread of fees between mint and redeem for protocol tokens.","All fees must be in basis points to represent a fractional percentage","directly applicable to a token amount e.g. `0.XXXX` or `bips x 10^-4`."],"type":{"kind":"struct","fields":[{"name":"mint","type":{"defined":{"name":"UFixValue64"}}},{"name":"redeem","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"Hylo","type":{"kind":"struct","fields":[{"name":"admin","type":"pubkey"},{"name":"treasury","type":"pubkey"},{"name":"lst_registry","type":"pubkey"},{"name":"stablecoin_mint","type":"pubkey"},{"name":"levercoin_mint","type":"pubkey"},{"name":"stability_pool","type":"pubkey"},{"name":"stablecoin_mint_bump","type":"u8"},{"name":"stablecoin_auth_bump","type":"u8"},{"name":"levercoin_mint_bump","type":"u8"},{"name":"levercoin_auth_bump","type":"u8"},{"name":"registry_auth_bump","type":"u8"},{"name":"total_sol_cache_bump","type":"u8"},{"name":"oracle_interval_secs","type":"u64"},{"name":"stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}},{"name":"levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}},{"name":"total_sol_cache","type":{"defined":{"name":"TotalSolCache"}}},{"name":"yield_harvest_cache","type":{"defined":{"name":"YieldHarvestCache"}}},{"name":"yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}},{"name":"stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}},{"name":"oracle_conf_tolerance","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_oracle","type":"pubkey"},{"name":"lst_swap_fee","type":{"defined":{"name":"UFixValue64"}}},{"name":"_reserved","type":{"array":["u8",78]}}]}},{"name":"LevercoinFees","type":{"kind":"struct","fields":[{"name":"normal","type":{"defined":{"name":"FeePair"}}},{"name":"mode_1","type":{"defined":{"name":"FeePair"}}},{"name":"mode_2","type":{"defined":{"name":"FeePair"}}}]}},{"name":"PoolConfig","type":{"kind":"struct","fields":[{"name":"admin","type":"pubkey"},{"name":"pool_auth_bump","type":"u8"},{"name":"lp_token_auth_bump","type":"u8"},{"name":"lp_token_mint_bump","type":"u8"},{"name":"withdrawal_fee","type":{"defined":{"name":"UFixValue64"}}},{"name":"_reserved","type":{"array":["u8",55]}}]}},{"name":"PriceFeedMessage","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"feed_id","docs":["`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."],"type":{"array":["u8",32]}},{"name":"price","type":"i64"},{"name":"conf","type":"u64"},{"name":"exponent","type":"i32"},{"name":"publish_time","docs":["The timestamp of this price update in seconds"],"type":"i64"},{"name":"prev_publish_time","docs":["The timestamp of the previous price update. This field is intended to allow users to","identify the single unique price update for any moment in time:","for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.","","Note that there may not be such an update while we are migrating to the new message-sending logic,","as some price updates on pythnet may not be sent to other chains (because the message-sending","logic may not have triggered). We can solve this problem by making the message-sending mandatory","(which we can do once publishers have migrated over).","","Additionally, this field may be equal to publish_time if the message is sent on a slot where","where the aggregation was unsuccesful. This problem will go away once all publishers have","migrated over to a recent version of pyth-agent."],"type":"i64"},{"name":"ema_price","type":"i64"},{"name":"ema_conf","type":"u64"}]}},{"name":"PriceUpdateV2","docs":["A price update account. This account is used by the Pyth Receiver program to store a verified price update from a Pyth price feed.","It contains:","- `write_authority`: The write authority for this account. This authority can close this account to reclaim rent or update the account to contain a different price update.","- `verification_level`: The [`VerificationLevel`] of this price update. This represents how many Wormhole guardian signatures have been verified for this price update.","- `price_message`: The actual price update.","- `posted_slot`: The slot at which this price update was posted."],"type":{"kind":"struct","fields":[{"name":"write_authority","type":"pubkey"},{"name":"verification_level","type":{"defined":{"name":"VerificationLevel"}}},{"name":"price_message","type":{"defined":{"name":"PriceFeedMessage"}}},{"name":"posted_slot","type":"u64"}]}},{"name":"RebalanceLeverToStableEvent","type":{"kind":"struct","fields":[{"name":"levercoin_swapped","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RebalanceStableToLeverEvent","type":{"kind":"struct","fields":[{"name":"stablecoin_swapped","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"StabilityPoolStats","type":{"kind":"struct","fields":[{"name":"lp_token_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"lp_token_supply","type":{"defined":{"name":"UFixValue64"}}},{"name":"stability_pool_cap","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_in_pool","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_in_pool","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"StablecoinFees","type":{"kind":"struct","fields":[{"name":"normal","type":{"defined":{"name":"FeePair"}}},{"name":"mode_1","type":{"defined":{"name":"FeePair"}}}]}},{"name":"TotalSolCache","type":{"kind":"struct","fields":[{"name":"current_update_epoch","type":"u64"},{"name":"total_sol","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UFixValue64","docs":["A value-space `Fix` where base is always 10 and bits are a concrete type.","Intended for serialized storage in Solana accounts where generics won't work."],"type":{"kind":"struct","fields":[{"name":"bits","type":"u64"},{"name":"exp","type":"i8"}]}},{"name":"UpdateAdminEvent","type":{"kind":"struct","fields":[{"name":"old_admin","type":"pubkey"},{"name":"new_admin","type":"pubkey"}]}},{"name":"UpdateWithdrawalFeeEvent","type":{"kind":"struct","fields":[{"name":"old_withdrawal_fee","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_withdrawal_fee","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UserDepositEvent","type":{"kind":"struct","fields":[{"name":"stablecoin_deposited","type":{"defined":{"name":"UFixValue64"}}},{"name":"lp_token_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"lp_token_minted","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UserWithdrawEventV0","type":{"kind":"struct","fields":[{"name":"lp_token_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_withdrawn","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UserWithdrawEventV1","type":{"kind":"struct","fields":[{"name":"lp_token_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_fees","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"VerificationLevel","docs":["Pyth price updates are bridged to all blockchains via Wormhole.","Using the price updates on another chain requires verifying the signatures of the Wormhole guardians.","The usual process is to check the signatures for two thirds of the total number of guardians, but this can be cumbersome on Solana because of the transaction size limits,","so we also allow for partial verification.","","This enum represents how much a price update has been verified:","- If `Full`, we have verified the signatures for two thirds of the current guardians.","- If `Partial`, only `num_signatures` guardian signatures have been checked.","","# Warning","Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."],"type":{"kind":"enum","variants":[{"name":"Partial","fields":[{"name":"num_signatures","type":"u8"}]},{"name":"Full"}]}},{"name":"YieldHarvestCache","docs":["Records epoch yield harvest information for off-chain consumers."],"type":{"kind":"struct","fields":[{"name":"epoch","type":"u64"},{"name":"stability_pool_cap","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_yield_to_pool","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"YieldHarvestConfig","docs":["Captures yield harvest configuration as two basis point values:"],"type":{"kind":"struct","fields":[{"name":"allocation","type":{"defined":{"name":"UFixValue64"}}},{"name":"fee","type":{"defined":{"name":"UFixValue64"}}}]}}],"constants":[{"name":"POOL_AUTH","type":{"array":["u8",9]},"value":"[112, 111, 111, 108, 95, 97, 117, 116, 104]"},{"name":"POOL_CONFIG","type":{"array":["u8",11]},"value":"[112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]"},{"name":"STAKED_HYUSD","type":{"array":["u8",12]},"value":"[115, 116, 97, 107, 101, 100, 95, 104, 121, 85, 83, 68]"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/jito_tip_distribution.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7..json b/olddocs/archivekbot2/idls/jito_tip_distribution.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7..json new file mode 100644 index 0000000..ddfecc4 --- /dev/null +++ b/olddocs/archivekbot2/idls/jito_tip_distribution.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7..json @@ -0,0 +1 @@ +{"address":"4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7","metadata":{"name":"jito_tip_distribution","version":"0.1.5","spec":"0.1.0","description":"Tip distribution program, responsible for distributing funds to entitled parties."},"instructions":[{"name":"claim","docs":["Claims tokens from the [TipDistributionAccount]."],"discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"config"},{"name":"tip_distribution_account","writable":true},{"name":"merkle_root_upload_authority","signer":true},{"name":"claim_status","docs":["Status of the claim. Used to prevent the same party from claiming multiple times."],"writable":true},{"name":"claimant","docs":["Receiver of the funds."],"writable":true},{"name":"payer","docs":["Who is paying for the claim."],"writable":true,"signer":true},{"name":"system_program"}],"args":[{"name":"bump","type":"u8"},{"name":"amount","type":"u64"},{"name":"proof","type":{"vec":{"array":["u8",32]}}}]},{"name":"close_claim_status","docs":["Anyone can invoke this only after the [TipDistributionAccount] has expired.","This instruction will return any rent back to `claimant` and close the account"],"discriminator":[163,214,191,165,245,188,17,185],"accounts":[{"name":"config"},{"name":"claim_status","writable":true},{"name":"claim_status_payer","docs":["Receiver of the funds."],"writable":true}],"args":[]},{"name":"close_tip_distribution_account","docs":["Anyone can invoke this only after the [TipDistributionAccount] has expired.","This instruction will send any unclaimed funds to the designated `expired_funds_account`","before closing and returning the rent exempt funds to the validator."],"discriminator":[47,136,208,190,125,243,74,227],"accounts":[{"name":"config"},{"name":"expired_funds_account","writable":true},{"name":"tip_distribution_account","writable":true},{"name":"validator_vote_account","writable":true},{"name":"signer","docs":["Anyone can crank this instruction."],"writable":true,"signer":true}],"args":[{"name":"_epoch","type":"u64"}]},{"name":"initialize","docs":["Initialize a singleton instance of the [Config] account."],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"config","writable":true},{"name":"system_program"},{"name":"initializer","writable":true,"signer":true}],"args":[{"name":"authority","type":"pubkey"},{"name":"expired_funds_account","type":"pubkey"},{"name":"num_epochs_valid","type":"u64"},{"name":"max_validator_commission_bps","type":"u16"},{"name":"bump","type":"u8"}]},{"name":"initialize_merkle_root_upload_config","discriminator":[232,87,72,14,89,40,40,27],"accounts":[{"name":"config","writable":true},{"name":"merkle_root_upload_config","writable":true},{"name":"authority","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program"}],"args":[{"name":"authority","type":"pubkey"},{"name":"original_authority","type":"pubkey"}]},{"name":"initialize_tip_distribution_account","docs":["Initialize a new [TipDistributionAccount] associated with the given validator vote key","and current epoch."],"discriminator":[120,191,25,182,111,49,179,55],"accounts":[{"name":"config"},{"name":"tip_distribution_account","writable":true},{"name":"validator_vote_account","docs":["The validator's vote account is used to check this transaction's signer is also the authorized withdrawer."]},{"name":"signer","docs":["Must be equal to the supplied validator vote account's authorized withdrawer."],"writable":true,"signer":true},{"name":"system_program"}],"args":[{"name":"merkle_root_upload_authority","type":"pubkey"},{"name":"validator_commission_bps","type":"u16"},{"name":"bump","type":"u8"}]},{"name":"migrate_tda_merkle_root_upload_authority","discriminator":[13,226,163,144,56,202,214,23],"accounts":[{"name":"tip_distribution_account","writable":true},{"name":"merkle_root_upload_config"}],"args":[]},{"name":"update_config","docs":["Update config fields. Only the [Config] authority can invoke this."],"discriminator":[29,158,252,191,10,83,219,99],"accounts":[{"name":"config","writable":true},{"name":"authority","writable":true,"signer":true}],"args":[{"name":"new_config","type":{"defined":{"name":"Config"}}}]},{"name":"update_merkle_root_upload_config","discriminator":[128,227,159,139,176,128,118,2],"accounts":[{"name":"config"},{"name":"merkle_root_upload_config","writable":true},{"name":"authority","signer":true},{"name":"system_program"}],"args":[{"name":"authority","type":"pubkey"},{"name":"original_authority","type":"pubkey"}]},{"name":"upload_merkle_root","docs":["Uploads a merkle root to the provided [TipDistributionAccount]. This instruction may be","invoked many times as long as the account is at least one epoch old and not expired; and","no funds have already been claimed. Only the `merkle_root_upload_authority` has the","authority to invoke."],"discriminator":[70,3,110,29,199,190,205,176],"accounts":[{"name":"config"},{"name":"tip_distribution_account","writable":true},{"name":"merkle_root_upload_authority","writable":true,"signer":true}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"max_total_claim","type":"u64"},{"name":"max_num_nodes","type":"u64"}]}],"accounts":[{"name":"ClaimStatus","discriminator":[22,183,249,157,247,95,150,96]},{"name":"Config","discriminator":[155,12,170,224,30,250,204,130]},{"name":"MerkleRootUploadConfig","discriminator":[213,125,30,192,25,121,87,33]},{"name":"TipDistributionAccount","discriminator":[85,64,113,198,234,94,120,123]}],"events":[{"name":"ClaimStatusClosedEvent","discriminator":[188,143,237,229,192,182,164,118]},{"name":"ClaimedEvent","discriminator":[144,172,209,86,144,87,84,115]},{"name":"ConfigUpdatedEvent","discriminator":[245,158,129,99,60,100,214,220]},{"name":"MerkleRootUploadAuthorityUpdatedEvent","discriminator":[83,157,58,165,200,171,8,106]},{"name":"MerkleRootUploadedEvent","discriminator":[94,233,236,49,52,224,181,167]},{"name":"TipDistributionAccountClosedEvent","discriminator":[246,152,49,154,9,79,25,58]},{"name":"TipDistributionAccountInitializedEvent","discriminator":[39,165,224,61,40,140,139,255]},{"name":"ValidatorCommissionBpsUpdatedEvent","discriminator":[4,34,92,25,228,88,51,206]}],"errors":[{"code":6000,"name":"AccountValidationFailure","msg":"Account failed validation."},{"code":6001,"name":"ArithmeticError","msg":"Encountered an arithmetic under/overflow error."},{"code":6002,"name":"ExceedsMaxClaim","msg":"The maximum number of funds to be claimed has been exceeded."},{"code":6003,"name":"ExceedsMaxNumNodes","msg":"The maximum number of claims has been exceeded."},{"code":6004,"name":"ExpiredTipDistributionAccount","msg":"The given TipDistributionAccount has expired."},{"code":6005,"name":"FundsAlreadyClaimed","msg":"The funds for the given index and TipDistributionAccount have already been claimed."},{"code":6006,"name":"InvalidParameters","msg":"Supplied invalid parameters."},{"code":6007,"name":"InvalidProof","msg":"The given proof is invalid."},{"code":6008,"name":"InvalidVoteAccountData","msg":"Failed to deserialize the supplied vote account data."},{"code":6009,"name":"MaxValidatorCommissionFeeBpsExceeded","msg":"Validator's commission basis points must be less than or equal to the Config account's max_validator_commission_bps."},{"code":6010,"name":"PrematureCloseTipDistributionAccount","msg":"The given TipDistributionAccount is not ready to be closed."},{"code":6011,"name":"PrematureCloseClaimStatus","msg":"The given ClaimStatus account is not ready to be closed."},{"code":6012,"name":"PrematureMerkleRootUpload","msg":"Must wait till at least one epoch after the tip distribution account was created to upload the merkle root."},{"code":6013,"name":"RootNotUploaded","msg":"No merkle root has been uploaded to the given TipDistributionAccount."},{"code":6014,"name":"Unauthorized","msg":"Unauthorized signer."},{"code":6015,"name":"InvalidTdaForMigration","msg":"TDA not valid for migration."}],"types":[{"name":"ClaimStatus","docs":["Gives us an audit trail of who and what was claimed; also enforces and only-once claim by any party."],"type":{"kind":"struct","fields":[{"name":"is_claimed","docs":["If true, the tokens have been claimed."],"type":"bool"},{"name":"claimant","docs":["Authority that claimed the tokens. Allows for delegated rewards claiming."],"type":"pubkey"},{"name":"claim_status_payer","docs":["The payer who created the claim."],"type":"pubkey"},{"name":"slot_claimed_at","docs":["When the funds were claimed."],"type":"u64"},{"name":"amount","docs":["Amount of funds claimed."],"type":"u64"},{"name":"expires_at","docs":["The epoch (upto and including) that tip funds can be claimed.","Copied since TDA can be closed, need to track to avoid making multiple claims"],"type":"u64"},{"name":"bump","docs":["The bump used to generate this account"],"type":"u8"}]}},{"name":"ClaimStatusClosedEvent","type":{"kind":"struct","fields":[{"name":"claim_status_payer","docs":["Account where funds were transferred to."],"type":"pubkey"},{"name":"claim_status_account","docs":["[ClaimStatus] account that was closed."],"type":"pubkey"}]}},{"name":"ClaimedEvent","type":{"kind":"struct","fields":[{"name":"tip_distribution_account","docs":["[TipDistributionAccount] claimed from."],"type":"pubkey"},{"name":"payer","docs":["User that paid for the claim, may or may not be the same as claimant."],"type":"pubkey"},{"name":"claimant","docs":["Account that received the funds."],"type":"pubkey"},{"name":"amount","docs":["Amount of funds to distribute."],"type":"u64"}]}},{"name":"Config","type":{"kind":"struct","fields":[{"name":"authority","docs":["Account with authority over this PDA."],"type":"pubkey"},{"name":"expired_funds_account","docs":["We want to expire funds after some time so that validators can be refunded the rent.","Expired funds will get transferred to this account."],"type":"pubkey"},{"name":"num_epochs_valid","docs":["Specifies the number of epochs a merkle root is valid for before expiring."],"type":"u64"},{"name":"max_validator_commission_bps","docs":["The maximum commission a validator can set on their distribution account."],"type":"u16"},{"name":"bump","docs":["The bump used to generate this account"],"type":"u8"}]}},{"name":"ConfigUpdatedEvent","type":{"kind":"struct","fields":[{"name":"authority","docs":["Who updated it."],"type":"pubkey"}]}},{"name":"MerkleRoot","type":{"kind":"struct","fields":[{"name":"root","docs":["The 256-bit merkle root."],"type":{"array":["u8",32]}},{"name":"max_total_claim","docs":["Maximum number of funds that can ever be claimed from this [MerkleRoot]."],"type":"u64"},{"name":"max_num_nodes","docs":["Maximum number of nodes that can ever be claimed from this [MerkleRoot]."],"type":"u64"},{"name":"total_funds_claimed","docs":["Total funds that have been claimed."],"type":"u64"},{"name":"num_nodes_claimed","docs":["Number of nodes that have been claimed."],"type":"u64"}]}},{"name":"MerkleRootUploadAuthorityUpdatedEvent","type":{"kind":"struct","fields":[{"name":"old_authority","type":"pubkey"},{"name":"new_authority","type":"pubkey"}]}},{"name":"MerkleRootUploadConfig","docs":["Singleton account that allows overriding TDA's merkle upload authority"],"type":{"kind":"struct","fields":[{"name":"override_authority","docs":["The authority that overrides the TipDistributionAccount merkle_root_upload_authority"],"type":"pubkey"},{"name":"original_upload_authority","docs":["The original merkle root upload authority that can be changed to the new overrided","authority. E.g. Jito Labs authority GZctHpWXmsZC1YHACTGGcHhYxjdRqQvTpYkb9LMvxDib"],"type":"pubkey"},{"name":"bump","docs":["The bump used to generate this account"],"type":"u8"}]}},{"name":"MerkleRootUploadedEvent","type":{"kind":"struct","fields":[{"name":"merkle_root_upload_authority","docs":["Who uploaded the root."],"type":"pubkey"},{"name":"tip_distribution_account","docs":["Where the root was uploaded to."],"type":"pubkey"}]}},{"name":"TipDistributionAccount","docs":["The account that validators register as **tip_receiver** with the tip-payment program."],"type":{"kind":"struct","fields":[{"name":"validator_vote_account","docs":["The validator's vote account, also the recipient of remaining lamports after","upon closing this account."],"type":"pubkey"},{"name":"merkle_root_upload_authority","docs":["The only account authorized to upload a merkle-root for this account."],"type":"pubkey"},{"name":"merkle_root","docs":["The merkle root used to verify user claims from this account."],"type":{"option":{"defined":{"name":"MerkleRoot"}}}},{"name":"epoch_created_at","docs":["Epoch for which this account was created."],"type":"u64"},{"name":"validator_commission_bps","docs":["The commission basis points this validator charges."],"type":"u16"},{"name":"expires_at","docs":["The epoch (upto and including) that tip funds can be claimed."],"type":"u64"},{"name":"bump","docs":["The bump used to generate this account"],"type":"u8"}]}},{"name":"TipDistributionAccountClosedEvent","type":{"kind":"struct","fields":[{"name":"expired_funds_account","docs":["Account where unclaimed funds were transferred to."],"type":"pubkey"},{"name":"tip_distribution_account","docs":["[TipDistributionAccount] closed."],"type":"pubkey"},{"name":"expired_amount","docs":["Unclaimed amount transferred."],"type":"u64"}]}},{"name":"TipDistributionAccountInitializedEvent","type":{"kind":"struct","fields":[{"name":"tip_distribution_account","type":"pubkey"}]}},{"name":"ValidatorCommissionBpsUpdatedEvent","type":{"kind":"struct","fields":[{"name":"tip_distribution_account","type":"pubkey"},{"name":"old_commission_bps","type":"u16"},{"name":"new_commission_bps","type":"u16"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/jupiter_aprepro_smart_wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.json b/olddocs/archivekbot2/idls/jupiter_aprepro_smart_wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.json new file mode 100644 index 0000000..7cc97ac --- /dev/null +++ b/olddocs/archivekbot2/idls/jupiter_aprepro_smart_wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"jupiter_smart_wallet","instructions":[{"name":"initialize","accounts":[{"name":"vault","isMut":false,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"userSigner","type":{"array":["u8",64]}},{"name":"label","type":"string"}]},{"name":"flashSwapApprove","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"wsolMint","isMut":false,"isSigner":false},{"name":"vaultWsol","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"keeperInputAccount","isMut":true,"isSigner":false},{"name":"inputVault","isMut":true,"isSigner":false},{"name":"outputVault","isMut":true,"isSigner":false,"docs":["CHECKED: in implementation code"]},{"name":"inputTokenProgram","isMut":false,"isSigner":false},{"name":"outputTokenProgram","isMut":false,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recoveryId","type":"u8"},{"name":"priorityFeeLamports","type":"u64"},{"name":"inputAmount","type":"u64"},{"name":"minOut","type":"u64"}]},{"name":"preFlashSwapApprove","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"vaultWsol","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"inputMint","isMut":true,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"keeperInputAccount","isMut":false,"isSigner":false},{"name":"referrer","isMut":true,"isSigner":false},{"name":"inputVault","isMut":true,"isSigner":false},{"name":"outputVault","isMut":true,"isSigner":false,"docs":["CHECKED: in implementation code"]},{"name":"inputTokenProgram","isMut":false,"isSigner":false},{"name":"outputTokenProgram","isMut":false,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recoveryId","type":"u8"},{"name":"priorityFeeLamports","type":"u64"},{"name":"inputAmount","type":"u64"},{"name":"minOut","type":"u64"},{"name":"postSwapIxIndex","type":"u8"},{"name":"feeBps","type":"u16"},{"name":"referralShareBps","type":"u16"},{"name":"useDurableNonce","type":"bool"},{"name":"maxOut","type":"u64"}]},{"name":"postSwap","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"wsolMint","isMut":false,"isSigner":false},{"name":"vaultWsol","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"referrer","isMut":true,"isSigner":false},{"name":"outputVault","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"withdraw","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"vaultTokenAccount","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recoveryId","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"withdrawToken","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"receiver","isMut":false,"isSigner":false},{"name":"receiverTokenAccount","isMut":true,"isSigner":false},{"name":"vaultTokenAccount","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recoveryId","type":"u8"},{"name":"amount","type":"u64"}]}],"accounts":[{"name":"VaultInfo","type":{"kind":"struct","fields":[{"name":"vault","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"createdAt","type":"i64"},{"name":"label","type":"string"},{"name":"transientNonces","type":{"array":["u64",32]}},{"name":"userSigner","type":{"array":["u8",64]}},{"name":"swapInProgress","type":"bool"},{"name":"preSwapAmount","type":"u64"},{"name":"minOut","type":"u64"},{"name":"feeBps","type":"u16"},{"name":"referralShareBps","type":"u16"},{"name":"maxOut","type":"u64"},{"name":"reserved","type":{"array":["u8",31]}},{"name":"durableNonces","type":{"vec":"u64"}}]}}],"types":[{"name":"SwapApproval","type":{"kind":"struct","fields":[{"name":"nonce","type":"u64"},{"name":"inputMint","type":"publicKey"},{"name":"outputMint","type":"publicKey"},{"name":"inputAmount","type":"u64"},{"name":"priorityFeeLamports","type":"u64"},{"name":"useDurableNonce","type":"bool"}]}},{"name":"WithdrawApproval","type":{"kind":"struct","fields":[{"name":"nonce","type":"u64"},{"name":"amount","type":"u64"},{"name":"withdrawalAddress","type":"publicKey"}]}},{"name":"WithdrawTokenApproval","type":{"kind":"struct","fields":[{"name":"nonce","type":"u64"},{"name":"amount","type":"u64"},{"name":"mint","type":"publicKey"},{"name":"withdrawalAddress","type":"publicKey"}]}},{"name":"BurnApproval","type":{"kind":"struct","fields":[{"name":"nonce","type":"u64"},{"name":"mint","type":"publicKey"}]}}],"events":[{"name":"Initialize","fields":[{"name":"vaultKey","type":"publicKey","index":false},{"name":"userKey","type":{"array":["u8",64]},"index":false}]},{"name":"Withdraw","fields":[{"name":"vaultKey","type":"publicKey","index":false},{"name":"receiverKey","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"Swap","fields":[{"name":"userKey","type":{"array":["u8",64]},"index":false},{"name":"vaultKey","type":"publicKey","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"inputAmount","type":"u64","index":false},{"name":"baseFeeAmount","type":"u64","index":false}]},{"name":"Refer","fields":[{"name":"vaultKey","type":"publicKey","index":false},{"name":"referrerKey","type":"publicKey","index":false},{"name":"shareAmount","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"MathOverflow"},{"code":6001,"name":"AddressMismatch"},{"code":6002,"name":"Unauthorized"},{"code":6003,"name":"UnauthorizedKeeper"},{"code":6004,"name":"ProgramMismatch"},{"code":6005,"name":"UnexpectedSwapProgram"},{"code":6006,"name":"UnexpectedSwapInstruction"},{"code":6007,"name":"WrongSwapOutAccount"},{"code":6008,"name":"InvalidSwapMint"},{"code":6009,"name":"ExceedSlippageSetting"},{"code":6010,"name":"AmountMismatch"},{"code":6011,"name":"MissingSwapInstructions"},{"code":6012,"name":"InvalidPublicKey"},{"code":6013,"name":"InvalidApproval"},{"code":6014,"name":"ExpiredApproval"},{"code":6015,"name":"ExpiredOrder"},{"code":6016,"name":"InsufficientSOLForFees"},{"code":6017,"name":"InvalidNonce"},{"code":6018,"name":"ViolateMinOut"},{"code":6019,"name":"FeeTooHigh"},{"code":6020,"name":"NonceInvalid"},{"code":6021,"name":"NonceUsed"},{"code":6022,"name":"NonceLimit"},{"code":6023,"name":"UnableToVerify"},{"code":6024,"name":"MissingPreSwapIx"},{"code":6025,"name":"MissingPostSwapIx"},{"code":6026,"name":"InvalidBps"},{"code":6027,"name":"TooLargeFee"},{"code":6028,"name":"InvalidReceiverTokenAccount"},{"code":6029,"name":"Deprecated"},{"code":6030,"name":"ViolateMaxOut"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/jupiter_dca.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.json b/olddocs/archivekbot2/idls/jupiter_dca.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.json new file mode 100644 index 0000000..bfcf77a --- /dev/null +++ b/olddocs/archivekbot2/idls/jupiter_dca.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"dca","instructions":[{"name":"openDca","accounts":[{"name":"dca","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":true},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"userAta","isMut":true,"isSigner":false},{"name":"inAta","isMut":true,"isSigner":false},{"name":"outAta","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"applicationIdx","type":"u64"},{"name":"inAmount","type":"u64"},{"name":"inAmountPerCycle","type":"u64"},{"name":"cycleFrequency","type":"i64"},{"name":"minOutAmount","type":{"option":"u64"}},{"name":"maxOutAmount","type":{"option":"u64"}},{"name":"startAt","type":{"option":"i64"}},{"name":"closeWsolInAta","type":{"option":"bool"}}]},{"name":"openDcaV2","accounts":[{"name":"dca","isMut":true,"isSigner":false},{"name":"user","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"userAta","isMut":true,"isSigner":false},{"name":"inAta","isMut":true,"isSigner":false},{"name":"outAta","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"applicationIdx","type":"u64"},{"name":"inAmount","type":"u64"},{"name":"inAmountPerCycle","type":"u64"},{"name":"cycleFrequency","type":"i64"},{"name":"minOutAmount","type":{"option":"u64"}},{"name":"maxOutAmount","type":{"option":"u64"}},{"name":"startAt","type":{"option":"i64"}}]},{"name":"closeDca","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"inAta","isMut":true,"isSigner":false},{"name":"outAta","isMut":true,"isSigner":false},{"name":"userInAta","isMut":true,"isSigner":false},{"name":"userOutAta","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"withdraw","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"dcaAta","isMut":true,"isSigner":false},{"name":"userInAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"userOutAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"withdrawParams","type":{"defined":"WithdrawParams"}}]},{"name":"deposit","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inAta","isMut":true,"isSigner":false},{"name":"userInAta","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"depositIn","type":"u64"}]},{"name":"withdrawFees","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"mint","isMut":false,"isSigner":false},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["CHECK"]},{"name":"programFeeAta","isMut":true,"isSigner":false},{"name":"adminFeeAta","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"initiateFlashFill","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false,"docs":["The token to borrow"]},{"name":"keeperInAta","isMut":true,"isSigner":false,"docs":["The account to send borrowed tokens to"]},{"name":"inAta","isMut":true,"isSigner":false,"docs":["The account to borrow from"]},{"name":"outAta","isMut":false,"isSigner":false,"docs":["The account to repay to"]},{"name":"instructionsSysvar","isMut":false,"isSigner":false,"docs":["Solana Instructions Sysvar"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"fulfillFlashFill","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"keeperInAta","isMut":false,"isSigner":false},{"name":"inAta","isMut":false,"isSigner":false},{"name":"outAta","isMut":false,"isSigner":false},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["CHECK"]},{"name":"feeAta","isMut":true,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false,"docs":["Solana Instructions Sysvar"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"repayAmount","type":"u64"}]},{"name":"initiateDlmmFill","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false,"docs":["The token to borrow"]},{"name":"keeperInAta","isMut":true,"isSigner":false,"docs":["The account to send borrowed tokens to"]},{"name":"inAta","isMut":true,"isSigner":false,"docs":["The account to borrow from"]},{"name":"outAta","isMut":false,"isSigner":false,"docs":["The account to repay to"]},{"name":"instructionsSysvar","isMut":false,"isSigner":false,"docs":["Solana Instructions Sysvar"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"fulfillDlmmFill","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"keeperInAta","isMut":false,"isSigner":false},{"name":"inAta","isMut":false,"isSigner":false},{"name":"outAta","isMut":false,"isSigner":false},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["CHECK"]},{"name":"feeAta","isMut":true,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false,"docs":["Solana Instructions Sysvar"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"repayAmount","type":"u64"}]},{"name":"transfer","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"dcaOutAta","isMut":true,"isSigner":false},{"name":"userOutAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"intermediateAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"endAndClose","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"inAta","isMut":true,"isSigner":false},{"name":"outAta","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userOutAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"initUserOutAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"intermediateAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Dca","type":{"kind":"struct","fields":[{"name":"user","type":"publicKey"},{"name":"inputMint","type":"publicKey"},{"name":"outputMint","type":"publicKey"},{"name":"idx","type":"u64"},{"name":"nextCycleAt","type":"i64"},{"name":"inDeposited","type":"u64"},{"name":"inWithdrawn","type":"u64"},{"name":"outWithdrawn","type":"u64"},{"name":"inUsed","type":"u64"},{"name":"outReceived","type":"u64"},{"name":"inAmountPerCycle","type":"u64"},{"name":"cycleFrequency","type":"i64"},{"name":"nextCycleAmountLeft","type":"u64"},{"name":"inAccount","type":"publicKey"},{"name":"outAccount","type":"publicKey"},{"name":"minOutAmount","type":"u64"},{"name":"maxOutAmount","type":"u64"},{"name":"keeperInBalanceBeforeBorrow","type":"u64"},{"name":"dcaOutBalanceBeforeSwap","type":"u64"},{"name":"createdAt","type":"i64"},{"name":"bump","type":"u8"}]}}],"types":[{"name":"WithdrawParams","type":{"kind":"struct","fields":[{"name":"withdrawAmount","type":"u64"},{"name":"withdrawal","type":{"defined":"Withdrawal"}}]}},{"name":"Withdrawal","type":{"kind":"enum","variants":[{"name":"In"},{"name":"Out"}]}}],"events":[{"name":"CollectedFee","fields":[{"name":"userKey","type":"publicKey","index":false},{"name":"dcaKey","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"Filled","fields":[{"name":"userKey","type":"publicKey","index":false},{"name":"dcaKey","type":"publicKey","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false},{"name":"feeMint","type":"publicKey","index":false},{"name":"fee","type":"u64","index":false}]},{"name":"Opened","fields":[{"name":"userKey","type":"publicKey","index":false},{"name":"dcaKey","type":"publicKey","index":false},{"name":"inDeposited","type":"u64","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"cycleFrequency","type":"i64","index":false},{"name":"inAmountPerCycle","type":"u64","index":false},{"name":"createdAt","type":"i64","index":false}]},{"name":"Closed","fields":[{"name":"userKey","type":"publicKey","index":false},{"name":"dcaKey","type":"publicKey","index":false},{"name":"inDeposited","type":"u64","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"cycleFrequency","type":"i64","index":false},{"name":"inAmountPerCycle","type":"u64","index":false},{"name":"createdAt","type":"i64","index":false},{"name":"totalInWithdrawn","type":"u64","index":false},{"name":"totalOutWithdrawn","type":"u64","index":false},{"name":"unfilledAmount","type":"u64","index":false},{"name":"userClosed","type":"bool","index":false}]},{"name":"Withdraw","fields":[{"name":"dcaKey","type":"publicKey","index":false},{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false},{"name":"userWithdraw","type":"bool","index":false}]},{"name":"Deposit","fields":[{"name":"dcaKey","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"InvalidAmount","msg":"Invalid deposit amount"},{"code":6001,"name":"InvalidCycleAmount","msg":"Invalid deposit amount"},{"code":6002,"name":"InvalidPair","msg":"Invalid pair"},{"code":6003,"name":"TooFrequent","msg":"Too frequent DCA cycle"},{"code":6004,"name":"InvalidMinPrice","msg":"Minimum price constraint must be greater than 0"},{"code":6005,"name":"InvalidMaxPrice","msg":"Maximum price constraint must be greater than 0"},{"code":6006,"name":"InAmountInsufficient","msg":"In amount needs to be more than in amount per cycle"},{"code":6007,"name":"Unauthorized","msg":"Wrong user"},{"code":6008,"name":"NoInATA","msg":"inAta not passed in"},{"code":6009,"name":"NoUserInATA","msg":"userInAta not passed in"},{"code":6010,"name":"NoOutATA","msg":"outAta not passed in"},{"code":6011,"name":"NoUserOutATA","msg":"userOutAta not passed in"},{"code":6012,"name":"InsufficientBalanceInProgram","msg":"Trying to withdraw more than available"},{"code":6013,"name":"InvalidDepositAmount","msg":"Deposit should be more than 0"},{"code":6014,"name":"UserInsufficientBalance","msg":"User has insufficient balance"},{"code":6015,"name":"UnauthorizedKeeper","msg":"Unauthorized Keeper"},{"code":6016,"name":"UnrecognizedProgram","msg":"Unrecognized Program"},{"code":6017,"name":"MathErrors","msg":"Calculation errors"},{"code":6018,"name":"KeeperNotTimeToFill","msg":"Not time to fill"},{"code":6019,"name":"OrderFillAmountWrong","msg":"Order amount wrong"},{"code":6020,"name":"SwapOutAmountBelowMinimum","msg":"Out amount below expectations"},{"code":6021,"name":"WrongAdmin","msg":"Wrong admin"},{"code":6022,"name":"MathOverflow","msg":"Overflow in arithmetic operation"},{"code":6023,"name":"AddressMismatch","msg":"Address Mismatch"},{"code":6024,"name":"ProgramMismatch","msg":"Program Mismatch"},{"code":6025,"name":"IncorrectRepaymentAmount","msg":"Incorrect Repayment Amount"},{"code":6026,"name":"CannotBorrowBeforeRepay","msg":"Cannot Borrow Before Repay"},{"code":6027,"name":"NoRepaymentInstructionFound","msg":"No Repayment Found"},{"code":6028,"name":"MissingSwapInstructions","msg":"Missing Swap Instruction"},{"code":6029,"name":"UnexpectedSwapProgram","msg":"Expected Instruction to use Jupiter Swap Program"},{"code":6030,"name":"InvalidSwapMint","msg":"Invalid Swap Mint"},{"code":6031,"name":"UnknownInstruction","msg":"Unknown Instruction"},{"code":6032,"name":"MissingRepayInstructions","msg":"Missing Repay Instruction"},{"code":6033,"name":"KeeperShortchanged","msg":"Keeper Shortchanged"},{"code":6034,"name":"WrongSwapOutAccount","msg":"Jup Swap to Wrong Out Account"},{"code":6035,"name":"WrongTransferAmount","msg":"Transfer amount should be exactly account balance"},{"code":6036,"name":"InsufficientBalanceForRent","msg":"Insufficient balance for rent"},{"code":6037,"name":"UnexpectedSolBalance","msg":"Unexpected SOL amount in intermediate account"},{"code":6038,"name":"InsufficientWsolForTransfer","msg":"Too little WSOL to perform transfer"},{"code":6039,"name":"MissedInstruction","msg":"Did not call initiate_flash_fill"},{"code":6040,"name":"WrongProgram","msg":"Did not call this program's initiate_flash_fill"},{"code":6041,"name":"BalanceNotZero","msg":"Can't close account with balance"},{"code":6042,"name":"UnexpectedWSOLLeftover","msg":"Should not have WSOL leftover in DCA out-token account"},{"code":6043,"name":"IntermediateAccountNotSet","msg":"Should pass in a WSOL intermediate account when transferring SOL"},{"code":6044,"name":"UnexpectedSwapInstruction","msg":"Did not call jup swap"},{"code":6045,"name":"SwapOutLessThanUserMinimum","msg":"Expect more from swap"},{"code":6046,"name":"SwapOutMoreThanUserMaximum","msg":"Expect less from swap"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/jupiter_limit_order.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.json b/olddocs/archivekbot2/idls/jupiter_limit_order.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.json new file mode 100644 index 0000000..1f67468 --- /dev/null +++ b/olddocs/archivekbot2/idls/jupiter_limit_order.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"limit_order","instructions":[{"name":"initializeOrder","accounts":[{"name":"base","isMut":false,"isSigner":true},{"name":"maker","isMut":true,"isSigner":true},{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false,"docs":["CHECK"]},{"name":"makerInputAccount","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"makerOutputAccount","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"makingAmount","type":"u64"},{"name":"takingAmount","type":"u64"},{"name":"expiredAt","type":{"option":"i64"}}]},{"name":"fillOrder","accounts":[{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"maker","isMut":true,"isSigner":false},{"name":"taker","isMut":false,"isSigner":true},{"name":"takerOutputAccount","isMut":true,"isSigner":false},{"name":"makerOutputAccount","isMut":true,"isSigner":false},{"name":"takerInputAccount","isMut":true,"isSigner":false},{"name":"feeAuthority","isMut":false,"isSigner":false},{"name":"programFeeAccount","isMut":true,"isSigner":false},{"name":"referral","isMut":true,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"makingAmount","type":"u64"},{"name":"maxTakingAmount","type":"u64"}]},{"name":"preFlashFillOrder","accounts":[{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"taker","isMut":false,"isSigner":true},{"name":"takerOutputAccount","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"inputMintTokenProgram","isMut":false,"isSigner":false},{"name":"instruction","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"makingAmount","type":"u64"}]},{"name":"flashFillOrder","accounts":[{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"maker","isMut":true,"isSigner":false},{"name":"taker","isMut":false,"isSigner":true},{"name":"makerOutputAccount","isMut":true,"isSigner":false},{"name":"takerInputAccount","isMut":true,"isSigner":false},{"name":"feeAuthority","isMut":false,"isSigner":false},{"name":"programFeeAccount","isMut":true,"isSigner":false},{"name":"referral","isMut":true,"isSigner":false,"isOptional":true},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"inputMintTokenProgram","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"outputMintTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxTakingAmount","type":"u64"}]},{"name":"cancelOrder","accounts":[{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false,"docs":["CHECK"]},{"name":"maker","isMut":true,"isSigner":true},{"name":"makerInputAccount","isMut":true,"isSigner":false,"docs":["CHECK, it is not important if it is sol input mint"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"cancelExpiredOrder","accounts":[{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false,"docs":["CHECK"]},{"name":"maker","isMut":true,"isSigner":false},{"name":"makerInputAccount","isMut":true,"isSigner":false,"docs":["CHECK, it is not important if it is sol input mint"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"withdrawFee","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["CHECK"]},{"name":"programFeeAccount","isMut":true,"isSigner":false},{"name":"adminTokenAcocunt","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"initFee","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"feeAuthority","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"makerFee","type":"u64"},{"name":"makerStableFee","type":"u64"},{"name":"takerFee","type":"u64"},{"name":"takerStableFee","type":"u64"}]},{"name":"updateFee","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"feeAuthority","isMut":true,"isSigner":false}],"args":[{"name":"makerFee","type":"u64"},{"name":"makerStableFee","type":"u64"},{"name":"takerFee","type":"u64"},{"name":"takerStableFee","type":"u64"}]}],"accounts":[{"name":"Fee","type":{"kind":"struct","fields":[{"name":"makerFee","type":"u64"},{"name":"makerStableFee","type":"u64"},{"name":"takerFee","type":"u64"},{"name":"takerStableFee","type":"u64"}]}},{"name":"Order","type":{"kind":"struct","fields":[{"name":"maker","type":"publicKey"},{"name":"inputMint","type":"publicKey"},{"name":"outputMint","type":"publicKey"},{"name":"waiting","type":"bool"},{"name":"oriMakingAmount","type":"u64"},{"name":"oriTakingAmount","type":"u64"},{"name":"makingAmount","type":"u64"},{"name":"takingAmount","type":"u64"},{"name":"makerInputAccount","type":"publicKey"},{"name":"makerOutputAccount","type":"publicKey"},{"name":"reserve","type":"publicKey"},{"name":"borrowMakingAmount","type":"u64"},{"name":"expiredAt","type":{"option":"i64"}},{"name":"base","type":"publicKey"},{"name":"referral","type":{"option":"publicKey"}}]}}],"events":[{"name":"TradeEvent","fields":[{"name":"orderKey","type":"publicKey","index":false},{"name":"taker","type":"publicKey","index":false},{"name":"remainingInAmount","type":"u64","index":false},{"name":"remainingOutAmount","type":"u64","index":false},{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false}]},{"name":"CancelOrderEvent","fields":[{"name":"orderKey","type":"publicKey","index":false}]},{"name":"CreateOrderEvent","fields":[{"name":"orderKey","type":"publicKey","index":false},{"name":"maker","type":"publicKey","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false},{"name":"expiredAt","type":{"option":"i64"},"index":false}]}],"errors":[{"code":6000,"name":"InvalidMakingAmount"},{"code":6001,"name":"InvalidTakingAmount"},{"code":6002,"name":"InvalidMaxTakingAmount"},{"code":6003,"name":"InvalidCalculation"},{"code":6004,"name":"InvalidInputAccount"},{"code":6005,"name":"InvalidOutputAccount"},{"code":6006,"name":"InvalidPair"},{"code":6007,"name":"MissingReferral"},{"code":6008,"name":"OrderExpired"},{"code":6009,"name":"OrderNotExpired"},{"code":6010,"name":"InvalidKeeper"},{"code":6011,"name":"MathOverflow"},{"code":6012,"name":"ProgramMismatch"},{"code":6013,"name":"UnknownInstruction"},{"code":6014,"name":"MissingRepayInstructions"},{"code":6015,"name":"InvalidOrder"},{"code":6016,"name":"InvalidBorrowMakingAmount"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/jupiter_limit_order_v2.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.json b/olddocs/archivekbot2/idls/jupiter_limit_order_v2.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.json new file mode 100644 index 0000000..4d7c8c5 --- /dev/null +++ b/olddocs/archivekbot2/idls/jupiter_limit_order_v2.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.json @@ -0,0 +1 @@ +{"address":"j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X","metadata":{"name":"limit_order_2","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"cancel_dust_order","discriminator":[197,112,189,164,79,48,23,246],"accounts":[{"name":"signer","signer":true},{"name":"maker","writable":true,"relations":["order"]},{"name":"order","writable":true},{"name":"input_mint_reserve","writable":true},{"name":"maker_input_mint_account","writable":true},{"name":"input_mint"},{"name":"input_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"}],"args":[{"name":"params","type":{"defined":{"name":"CancelDustOrderParams"}}}]},{"name":"cancel_order","discriminator":[95,129,237,240,8,49,223,132],"accounts":[{"name":"signer","signer":true},{"name":"maker","writable":true,"relations":["order"]},{"name":"order","writable":true},{"name":"input_mint_reserve","writable":true},{"name":"maker_input_mint_account","writable":true,"optional":true},{"name":"input_mint"},{"name":"input_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":"fill_order","discriminator":[232,122,115,25,199,143,136,162],"accounts":[{"name":"taker","writable":true,"signer":true},{"name":"maker","writable":true,"relations":["order"]},{"name":"order","writable":true},{"name":"taker_input_mint_account","writable":true},{"name":"taker_output_mint_account","writable":true},{"name":"maker_output_mint_account","writable":true,"optional":true},{"name":"fee_account","writable":true},{"name":"order_input_mint_account","writable":true},{"name":"input_mint"},{"name":"input_token_program"},{"name":"output_mint"},{"name":"output_token_program"},{"name":"jupiter_program","address":"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"},{"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":"params","type":{"defined":{"name":"FillOrderParams"}}}]},{"name":"flash_fill_order","discriminator":[252,104,18,134,164,78,18,140],"accounts":[{"name":"taker","writable":true,"signer":true},{"name":"maker","writable":true,"relations":["order"]},{"name":"order","writable":true},{"name":"input_mint_reserve","writable":true},{"name":"maker_output_mint_account","writable":true,"optional":true},{"name":"taker_output_mint_account","writable":true,"optional":true},{"name":"fee_account","writable":true},{"name":"input_token_program"},{"name":"output_mint"},{"name":"output_token_program"},{"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":"params","type":{"defined":{"name":"FlashFillOrderParams"}}}]},{"name":"initialize_order","discriminator":[133,110,74,175,112,159,245,159],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"maker","signer":true},{"name":"order","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,100,101,114]},{"kind":"account","path":"maker"},{"kind":"arg","path":"unique_id"}]}},{"name":"input_mint_reserve","writable":true,"pda":{"seeds":[{"kind":"account","path":"order"},{"kind":"account","path":"input_token_program"},{"kind":"account","path":"input_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":"maker_input_mint_account","writable":true},{"name":"fee","pda":{"seeds":[{"kind":"const","value":[102,101,101]}]}},{"name":"referral","optional":true},{"name":"input_mint"},{"name":"output_mint"},{"name":"input_token_program"},{"name":"output_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"}],"args":[{"name":"params","type":{"defined":{"name":"InitializeOrderParams"}}}]},{"name":"pre_flash_fill_order","discriminator":[240,47,153,68,13,190,225,42],"accounts":[{"name":"taker","signer":true},{"name":"order","writable":true},{"name":"input_mint_reserve","writable":true},{"name":"taker_input_mint_account","writable":true},{"name":"input_mint"},{"name":"input_token_program"},{"name":"instruction","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"PreFlashFillOrderParams"}}}]},{"name":"update_fee","discriminator":[232,253,195,247,148,212,73,222],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"fee_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"UpdateFeeParams"}}}]},{"name":"withdraw_fee","discriminator":[14,122,231,218,31,238,223,150],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"fee_authority","docs":["CHECK"],"pda":{"seeds":[{"kind":"const","value":[102,101,101]}]}},{"name":"program_fee_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"token_program"},{"name":"mint"}],"args":[]}],"accounts":[{"name":"Fee","discriminator":[24,55,150,250,168,27,101,178]},{"name":"Order","discriminator":[134,173,223,185,77,86,28,51]}],"events":[{"name":"CancelDustOrderEvent","discriminator":[124,190,74,28,177,40,200,220]},{"name":"CancelOrderEvent","discriminator":[174,66,141,17,4,224,162,77]},{"name":"CreateOrderEvent","discriminator":[49,142,72,166,230,29,84,84]},{"name":"TradeEvent","discriminator":[189,219,127,211,78,230,97,238]}],"errors":[{"code":6000,"name":"InvalidMakingAmount"},{"code":6001,"name":"InvalidTakingAmount"},{"code":6002,"name":"InvalidMaxTakingAmount"},{"code":6003,"name":"InvalidInputAccount"},{"code":6004,"name":"InvalidMakerOutputAccount"},{"code":6005,"name":"InvalidTakerOutputAccount"},{"code":6006,"name":"InvalidPair"},{"code":6007,"name":"OrderExpired"},{"code":6008,"name":"OrderNotExpired"},{"code":6009,"name":"InvalidAdmin"},{"code":6010,"name":"InvalidKeeper"},{"code":6011,"name":"MathOverflow"},{"code":6012,"name":"ProgramMismatch"},{"code":6013,"name":"UnknownInstruction"},{"code":6014,"name":"MissingRepayInstructions"},{"code":6015,"name":"InvalidOrder"},{"code":6016,"name":"InvalidBorrowMakingAmount"},{"code":6017,"name":"InvalidExpiredDate"},{"code":6018,"name":"FeeBpsTooLow"},{"code":6019,"name":"FeeBpsTooHigh"},{"code":6020,"name":"TransferTaxMint"},{"code":6021,"name":"InvalidOutputMint"},{"code":6022,"name":"InvalidMinTakingAmount"},{"code":6023,"name":"InvalidSwapData"},{"code":6024,"name":"InvalidSwapInputAmount"},{"code":6025,"name":"InvalidSwappedAmount"},{"code":6026,"name":"InvalidDustOrder"},{"code":6027,"name":"UnsupportedMint"}],"types":[{"name":"CancelDustOrderEvent","type":{"kind":"struct","fields":[{"name":"order_key","type":"pubkey"},{"name":"one_usd_input_mint_amount","type":"u64"}]}},{"name":"CancelDustOrderParams","type":{"kind":"struct","fields":[{"name":"one_usd_input_mint_amount","type":"u64"}]}},{"name":"CancelOrderEvent","type":{"kind":"struct","fields":[{"name":"order_key","type":"pubkey"}]}},{"name":"CreateOrderEvent","type":{"kind":"struct","fields":[{"name":"order_key","type":"pubkey"},{"name":"maker","type":"pubkey"},{"name":"input_mint","type":"pubkey"},{"name":"output_mint","type":"pubkey"},{"name":"input_token_program","type":"pubkey"},{"name":"output_token_program","type":"pubkey"},{"name":"making_amount","type":"u64"},{"name":"taking_amount","type":"u64"},{"name":"expired_at","type":{"option":"i64"}},{"name":"fee_bps","type":"u16"},{"name":"fee_account","type":"pubkey"},{"name":"slippage_bps","type":"u16"}]}},{"name":"Fee","type":{"kind":"struct","fields":[{"name":"normal_fee_bps","type":"u16"},{"name":"stable_fee_bps","type":"u16"}]}},{"name":"FillOrderParams","type":{"kind":"struct","fields":[{"name":"input_amount","type":"u64"},{"name":"swap_data","type":"bytes"}]}},{"name":"FlashFillOrderParams","type":{"kind":"struct","fields":[{"name":"max_taking_amount","type":"u64"}]}},{"name":"InitializeOrderParams","type":{"kind":"struct","fields":[{"name":"unique_id","type":"u64"},{"name":"making_amount","type":"u64"},{"name":"taking_amount","type":"u64"},{"name":"expired_at","type":{"option":"i64"}},{"name":"fee_bps","type":{"option":"u16"}},{"name":"slippage_bps","type":{"option":"u16"}}]}},{"name":"Order","type":{"kind":"struct","fields":[{"name":"maker","type":"pubkey"},{"name":"input_mint","type":"pubkey"},{"name":"output_mint","type":"pubkey"},{"name":"input_token_program","type":"pubkey"},{"name":"output_token_program","type":"pubkey"},{"name":"input_mint_reserve","type":"pubkey"},{"name":"unique_id","type":"u64"},{"name":"ori_making_amount","type":"u64"},{"name":"ori_taking_amount","type":"u64"},{"name":"making_amount","type":"u64"},{"name":"taking_amount","type":"u64"},{"name":"borrow_making_amount","type":"u64"},{"name":"expired_at","type":{"option":"i64"}},{"name":"fee_bps","type":"u16"},{"name":"fee_account","type":"pubkey"},{"name":"created_at","type":"i64"},{"name":"updated_at","type":"i64"},{"name":"bump","type":"u8"},{"name":"slippage_bps","type":"u16"}]}},{"name":"PreFlashFillOrderParams","type":{"kind":"struct","fields":[{"name":"making_amount","type":"u64"}]}},{"name":"TradeEvent","type":{"kind":"struct","fields":[{"name":"order_key","type":"pubkey"},{"name":"taker","type":"pubkey"},{"name":"remaining_making_amount","type":"u64"},{"name":"remaining_taking_amount","type":"u64"},{"name":"making_amount","type":"u64"},{"name":"taking_amount","type":"u64"}]}},{"name":"UpdateFeeParams","type":{"kind":"struct","fields":[{"name":"normal_fee_bps","type":"u16"},{"name":"stable_fee_bps","type":"u16"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/jupiter_locker.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.json b/olddocs/archivekbot2/idls/jupiter_locker.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.json new file mode 100644 index 0000000..fbbf423 --- /dev/null +++ b/olddocs/archivekbot2/idls/jupiter_locker.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.json @@ -0,0 +1 @@ +{"address":"LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn","metadata":{"name":"locker","version":"0.4.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"cancel_vesting_escrow","docs":["Cancel a vesting escrow.","- The claimable token will be transferred to recipient","- The remaining token will be transferred to the creator","This instruction supports both splToken and token2022","# Arguments","","* ctx - The accounts needed by instruction.","* remaining_accounts_info: additional accounts needed by instruction",""],"discriminator":[217,233,13,3,143,101,53,201],"accounts":[{"name":"escrow","docs":["Escrow."],"writable":true},{"name":"token_mint","docs":["Mint."],"writable":true,"relations":["escrow"]},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"creator_token","docs":["Creator Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"recipient_token","docs":["Receipient Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"rent_receiver","docs":["CHECKED: The Token Account will receive the rent"],"writable":true},{"name":"signer","docs":["Signer."],"writable":true,"signer":true},{"name":"memo_program","docs":["Memo program."],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"token_program","docs":["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":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"claim","docs":["Claim maximum amount from the vesting escrow","# Arguments","","* ctx - The accounts needed by instruction.","* max_amount - The maximum amount claimed by the recipient",""],"discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"escrow","docs":["Escrow."],"writable":true},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"escrow"}],"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":"recipient","docs":["Recipient."],"writable":true,"signer":true,"relations":["escrow"]},{"name":"recipient_token","docs":["Recipient Token Account."],"writable":true},{"name":"token_program","docs":["Token program."],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"max_amount","type":"u64"}]},{"name":"claim_v2","docs":["Claim maximum amount from the vesting escrow","This instruction supports both splToken and token2022","# Arguments","","* ctx - The accounts needed by instruction.","* max_amount - The maximum amount claimed by the recipient","* remaining_accounts_info: additional accounts needed by instruction",""],"discriminator":[229,87,46,162,21,157,231,114],"accounts":[{"name":"escrow","docs":["Escrow."],"writable":true},{"name":"token_mint","docs":["Mint."],"relations":["escrow"]},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"recipient","docs":["Recipient."],"writable":true,"signer":true,"relations":["escrow"]},{"name":"recipient_token","docs":["Recipient Token Account."],"writable":true},{"name":"memo_program","docs":["Memo program."],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"token_program","docs":["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":"max_amount","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"close_vesting_escrow","docs":["Close vesting escrow","- Close vesting escrow and escrow ATA and escrow metadata if recipient already claimed all tokens","- Rent receiver must be escrow's creator","This instruction supports both splToken and token2022","# Arguments","","* ctx - The accounts needed by instruction.","* remaining_accounts_info: additional accounts needed by instruction",""],"discriminator":[221,185,95,135,136,67,252,87],"accounts":[{"name":"escrow","docs":["Escrow."],"writable":true},{"name":"escrow_metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[101,115,99,114,111,119,95,109,101,116,97,100,97,116,97]},{"kind":"account","path":"escrow"}]}},{"name":"token_mint","docs":["Mint."],"writable":true},{"name":"escrow_token","writable":true},{"name":"creator_token","writable":true},{"name":"creator","docs":["Creator."],"writable":true,"signer":true,"relations":["escrow"]},{"name":"token_program","docs":["Token program."]},{"name":"memo_program","docs":["Memo program."],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"create_root_escrow","docs":["Create root escrow"],"discriminator":[116,212,12,188,77,226,32,201],"accounts":[{"name":"base","signer":true},{"name":"root_escrow","docs":["Root Escrow."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[114,111,111,116,95,101,115,99,114,111,119]},{"kind":"account","path":"base"},{"kind":"account","path":"token_mint"},{"kind":"arg","path":"params.version"}]}},{"name":"token_mint"},{"name":"payer","docs":["payer."],"writable":true,"signer":true},{"name":"creator"},{"name":"system_program","docs":["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":"params","type":{"defined":{"name":"CreateRootEscrowParameters"}}}]},{"name":"create_vesting_escrow","docs":["Create a vesting escrow for the given params","# Arguments","","* ctx - The accounts needed by instruction.","* params - The params needed by instruction.","* vesting_start_time - The creation time of this escrow","* cliff_time - Trade cliff time of the escrow","* frequency - How frequent the claimable amount will be updated","* cliff_unlock_amount - The amount unlocked after cliff time","* amount_per_period - The amount unlocked per vesting period","* number_of_period - The total number of vesting period","* update_recipient_mode - Decide who can update the recipient of the escrow","* cancel_mode - Decide who can cancel the the escrow",""],"discriminator":[23,100,197,94,222,153,38,90],"accounts":[{"name":"base","docs":["Base."],"writable":true,"signer":true},{"name":"escrow","docs":["Escrow."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[101,115,99,114,111,119]},{"kind":"account","path":"base"}]}},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"sender_token.mint","account":"TokenAccount"}],"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":"sender","docs":["Sender."],"writable":true,"signer":true},{"name":"sender_token","docs":["Sender Token Account."],"writable":true},{"name":"recipient"},{"name":"token_program","docs":["Token program."],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["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":"params","type":{"defined":{"name":"CreateVestingEscrowParameters"}}}]},{"name":"create_vesting_escrow_from_root","docs":["Crate vesting escrow from root"],"discriminator":[6,238,161,108,252,114,246,91],"accounts":[{"name":"root_escrow","docs":["Root Escrow."],"writable":true},{"name":"base","pda":{"seeds":[{"kind":"const","value":[98,97,115,101]},{"kind":"account","path":"root_escrow"},{"kind":"account","path":"recipient"}]}},{"name":"escrow","docs":["Escrow."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[101,115,99,114,111,119]},{"kind":"account","path":"base"}]}},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"root_escrow_token","writable":true,"pda":{"seeds":[{"kind":"account","path":"root_escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"token_mint","docs":["Mint."],"relations":["root_escrow"]},{"name":"payer","docs":["Rent Payer"],"writable":true,"signer":true},{"name":"recipient"},{"name":"system_program","docs":["system program."],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["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":"params","type":{"defined":{"name":"CreateVestingEscrowFromRootParams"}}},{"name":"proof","type":{"vec":{"array":["u8",32]}}},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"create_vesting_escrow_metadata","docs":["Create vesting escrow metadata","# Arguments","","* ctx - The accounts needed by instruction.","* params - The params needed by instruction.","* name - The name of the vesting escrow","* description - The description of the vesting escrow","* creator_email - The email of the creator","* recipient_email - The email of the recipient",""],"discriminator":[93,78,33,103,173,125,70,0],"accounts":[{"name":"escrow","docs":["The [Escrow]."],"writable":true},{"name":"creator","docs":["Creator of the escrow."],"signer":true,"relations":["escrow"]},{"name":"escrow_metadata","docs":["The [ProposalMeta]."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[101,115,99,114,111,119,95,109,101,116,97,100,97,116,97]},{"kind":"account","path":"escrow"}]}},{"name":"payer","docs":["Payer of the [ProposalMeta]."],"writable":true,"signer":true},{"name":"system_program","docs":["system program."],"address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"CreateVestingEscrowMetadataParameters"}}}]},{"name":"create_vesting_escrow_v2","docs":["Create a vesting escrow for the given params","This instruction supports both splToken and token2022","# Arguments","","* ctx - The accounts needed by instruction.","* params - The params needed by instruction.","* vesting_start_time - The creation time of this escrow","* cliff_time - Trade cliff time of the escrow","* frequency - How frequent the claimable amount will be updated","* cliff_unlock_amount - The amount unlocked after cliff time","* amount_per_period - The amount unlocked per vesting period","* number_of_period - The total number of vesting period","* update_recipient_mode - Decide who can update the recipient of the escrow","* cancel_mode - Decide who can cancel the the escrow","* remaining_accounts_info: additional accounts needed by instruction",""],"discriminator":[181,155,104,183,182,128,35,47],"accounts":[{"name":"base","docs":["Base."],"writable":true,"signer":true},{"name":"escrow","docs":["Escrow."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[101,115,99,114,111,119]},{"kind":"account","path":"base"}]}},{"name":"token_mint"},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"sender","docs":["Sender."],"writable":true,"signer":true},{"name":"sender_token","docs":["Sender Token Account."],"writable":true},{"name":"recipient"},{"name":"token_program","docs":["Token program."]},{"name":"system_program","docs":["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":"params","type":{"defined":{"name":"CreateVestingEscrowParameters"}}},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"fund_root_escrow","docs":["Fund root escrow"],"discriminator":[251,106,189,200,108,15,144,95],"accounts":[{"name":"root_escrow","docs":["Root Escrow."],"writable":true},{"name":"token_mint","relations":["root_escrow"]},{"name":"root_escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"root_escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"payer","docs":["Payer."],"writable":true,"signer":true},{"name":"payer_token","docs":["Payer Token Account."],"writable":true},{"name":"token_program","docs":["Token program."]},{"name":"system_program","docs":["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"}],"args":[{"name":"max_amount","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"update_vesting_escrow_recipient","docs":["Update vesting escrow metadata","# Arguments","","* ctx - The accounts needed by instruction.","* new_recipient - The address of the new recipient","* new_recipient_email - The email of the new recipient",""],"discriminator":[26,242,127,255,237,109,47,206],"accounts":[{"name":"escrow","docs":["Escrow."],"writable":true},{"name":"escrow_metadata","docs":["Escrow metadata."],"writable":true,"optional":true},{"name":"signer","docs":["Signer."],"writable":true,"signer":true},{"name":"system_program","docs":["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":"new_recipient","type":"pubkey"},{"name":"new_recipient_email","type":{"option":"string"}}]}],"accounts":[{"name":"RootEscrow","discriminator":[253,209,220,107,206,191,71,158]},{"name":"VestingEscrow","discriminator":[244,119,183,4,73,116,135,195]},{"name":"VestingEscrowMetadata","discriminator":[24,204,166,104,87,158,76,13]}],"events":[{"name":"EventCancelVestingEscrow","discriminator":[113,2,117,173,195,39,101,155]},{"name":"EventCancelVestingEscrowV3","discriminator":[41,143,236,79,116,120,91,143]},{"name":"EventClaim","discriminator":[171,144,1,189,120,200,38,11]},{"name":"EventClaimV3","discriminator":[229,197,142,10,41,122,171,154]},{"name":"EventCloseClaimStatus","discriminator":[87,68,38,194,241,155,125,107]},{"name":"EventCloseVestingEscrow","discriminator":[45,141,253,209,196,133,21,204]},{"name":"EventCreateRootEscrow","discriminator":[105,216,97,182,27,224,199,228]},{"name":"EventCreateVestingEscrow","discriminator":[248,222,89,61,170,208,131,117]},{"name":"EventFundRootEscrow","discriminator":[74,8,68,181,198,235,138,81]},{"name":"EventUpdateVestingEscrowRecipient","discriminator":[206,218,33,65,133,237,131,57]}],"errors":[{"code":6000,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6001,"name":"FrequencyIsZero","msg":"Frequency is zero"},{"code":6002,"name":"InvalidEscrowTokenAddress","msg":"Invalid escrow token address"},{"code":6003,"name":"InvalidUpdateRecipientMode","msg":"Invalid update recipient mode"},{"code":6004,"name":"InvalidCancelMode","msg":"Invalid cancel mode"},{"code":6005,"name":"NotPermitToDoThisAction","msg":"Not permit to do this action"},{"code":6006,"name":"InvalidRecipientTokenAccount","msg":"Invalid recipient token account"},{"code":6007,"name":"InvalidCreatorTokenAccount","msg":"Invalid creator token account"},{"code":6008,"name":"InvalidEscrowMetadata","msg":"Invalid escrow metadata"},{"code":6009,"name":"InvalidVestingStartTime","msg":"Invalid vesting start time"},{"code":6010,"name":"AlreadyCancelled","msg":"Already cancelled"},{"code":6011,"name":"CancelledAtIsZero","msg":"Cancelled timestamp is zero"},{"code":6012,"name":"IncorrectTokenProgramId","msg":"Invalid token program ID"},{"code":6013,"name":"TransferFeeCalculationFailure","msg":"Calculate transfer fee failure"},{"code":6014,"name":"UnsupportedMint","msg":"Unsupported mint"},{"code":6015,"name":"InvalidRemainingAccountSlice","msg":"Invalid remaining accounts"},{"code":6016,"name":"InsufficientRemainingAccounts","msg":"Insufficient remaining accounts"},{"code":6017,"name":"DuplicatedRemainingAccountTypes","msg":"Same accounts type is provided more than once"},{"code":6018,"name":"NoTransferHookProgram","msg":"Missing remaining accounts for transfer hook."},{"code":6019,"name":"ClaimingIsNotFinished","msg":"Claiming is not finished"},{"code":6020,"name":"InvalidMerkleProof","msg":"Invalid merkle proof"},{"code":6021,"name":"EscrowNotCancelled","msg":"Escrow is not cancelled"},{"code":6022,"name":"AmountIsZero","msg":"Amount is zero"},{"code":6023,"name":"InvalidParams","msg":"Invalid params"}],"types":[{"name":"AccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookEscrow"}]}},{"name":"CreateRootEscrowParameters","type":{"kind":"struct","fields":[{"name":"max_claim_amount","type":"u64"},{"name":"max_escrow","type":"u64"},{"name":"version","type":"u64"},{"name":"root","type":{"array":["u8",32]}}]}},{"name":"CreateVestingEscrowFromRootParams","type":{"kind":"struct","fields":[{"name":"vesting_start_time","type":"u64"},{"name":"cliff_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"amount_per_period","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"update_recipient_mode","type":"u8"},{"name":"cancel_mode","type":"u8"}]}},{"name":"CreateVestingEscrowMetadataParameters","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"description","type":"string"},{"name":"creator_email","type":"string"},{"name":"recipient_email","type":"string"}]}},{"name":"CreateVestingEscrowParameters","docs":["Accounts for [locker::create_vesting_escrow]."],"type":{"kind":"struct","fields":[{"name":"vesting_start_time","type":"u64"},{"name":"cliff_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"amount_per_period","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"update_recipient_mode","type":"u8"},{"name":"cancel_mode","type":"u8"}]}},{"name":"EventCancelVestingEscrow","type":{"kind":"struct","fields":[{"name":"escrow","type":"pubkey"},{"name":"signer","type":"pubkey"},{"name":"claimable_amount","type":"u64"},{"name":"remaining_amount","type":"u64"},{"name":"cancelled_at","type":"u64"}]}},{"name":"EventCancelVestingEscrowV3","type":{"kind":"struct","fields":[{"name":"escrow","type":"pubkey"},{"name":"signer","type":"pubkey"},{"name":"remaining_amount","type":"u64"},{"name":"cancelled_at","type":"u64"}]}},{"name":"EventClaim","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"current_ts","type":"u64"},{"name":"escrow","type":"pubkey"}]}},{"name":"EventClaimV3","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"current_ts","type":"u64"},{"name":"escrow","type":"pubkey"},{"name":"vesting_start_time","type":"u64"},{"name":"cliff_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"amount_per_period","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"recipient","type":"pubkey"}]}},{"name":"EventCloseClaimStatus","type":{"kind":"struct","fields":[{"name":"escrow","type":"pubkey"},{"name":"recipient","type":"pubkey"},{"name":"rent_receiver","type":"pubkey"}]}},{"name":"EventCloseVestingEscrow","type":{"kind":"struct","fields":[{"name":"escrow","type":"pubkey"}]}},{"name":"EventCreateRootEscrow","type":{"kind":"struct","fields":[{"name":"root_escrow","type":"pubkey"},{"name":"max_claim_amount","type":"u64"},{"name":"max_escrow","type":"u64"},{"name":"version","type":"u64"},{"name":"root","type":{"array":["u8",32]}}]}},{"name":"EventCreateVestingEscrow","type":{"kind":"struct","fields":[{"name":"vesting_start_time","type":"u64"},{"name":"cliff_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"amount_per_period","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"update_recipient_mode","type":"u8"},{"name":"cancel_mode","type":"u8"},{"name":"recipient","type":"pubkey"},{"name":"escrow","type":"pubkey"}]}},{"name":"EventFundRootEscrow","type":{"kind":"struct","fields":[{"name":"root_escrow","type":"pubkey"},{"name":"funded_amount","type":"u64"}]}},{"name":"EventUpdateVestingEscrowRecipient","type":{"kind":"struct","fields":[{"name":"escrow","type":"pubkey"},{"name":"old_recipient","type":"pubkey"},{"name":"new_recipient","type":"pubkey"},{"name":"signer","type":"pubkey"}]}},{"name":"RemainingAccountsInfo","type":{"kind":"struct","fields":[{"name":"slices","type":{"vec":{"defined":{"name":"RemainingAccountsSlice"}}}}]}},{"name":"RemainingAccountsSlice","type":{"kind":"struct","fields":[{"name":"accounts_type","type":{"defined":{"name":"AccountsType"}}},{"name":"length","type":"u8"}]}},{"name":"RootEscrow","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"token_mint","docs":["token mint"],"type":"pubkey"},{"name":"creator","docs":["creator of the escrow"],"type":"pubkey"},{"name":"base","docs":["escrow base key"],"type":"pubkey"},{"name":"root","docs":["256 bit merkle root"],"type":{"array":["u8",32]}},{"name":"bump","docs":["bump"],"type":"u8"},{"name":"token_program_flag","docs":["token program flag"],"type":"u8"},{"name":"padding_0","docs":["padding"],"type":{"array":["u8",6]}},{"name":"max_claim_amount","docs":["max claim amount"],"type":"u64"},{"name":"max_escrow","docs":["max escrow"],"type":"u64"},{"name":"total_funded_amount","docs":["total funded amount"],"type":"u64"},{"name":"total_escrow_created","docs":["total escrow created"],"type":"u64"},{"name":"total_distribute_amount","docs":["total distributed amount"],"type":"u64"},{"name":"version","docs":["version"],"type":"u64"},{"name":"padding","docs":["padding"],"type":"u64"},{"name":"buffer","docs":["buffer"],"type":{"array":["u128",5]}}]}},{"name":"VestingEscrow","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"recipient","docs":["recipient address"],"type":"pubkey"},{"name":"token_mint","docs":["token mint"],"type":"pubkey"},{"name":"creator","docs":["creator of the escrow"],"type":"pubkey"},{"name":"base","docs":["escrow base key"],"type":"pubkey"},{"name":"escrow_bump","docs":["escrow bump"],"type":"u8"},{"name":"update_recipient_mode","docs":["update_recipient_mode"],"type":"u8"},{"name":"cancel_mode","docs":["cancel_mode"],"type":"u8"},{"name":"token_program_flag","docs":["token program flag"],"type":"u8"},{"name":"padding_0","docs":["padding"],"type":{"array":["u8",4]}},{"name":"cliff_time","docs":["cliff time"],"type":"u64"},{"name":"frequency","docs":["frequency"],"type":"u64"},{"name":"cliff_unlock_amount","docs":["cliff unlock amount"],"type":"u64"},{"name":"amount_per_period","docs":["amount per period"],"type":"u64"},{"name":"number_of_period","docs":["number of period"],"type":"u64"},{"name":"total_claimed_amount","docs":["total claimed amount"],"type":"u64"},{"name":"vesting_start_time","docs":["vesting start time"],"type":"u64"},{"name":"cancelled_at","docs":["cancelled_at"],"type":"u64"},{"name":"padding_1","docs":["buffer"],"type":"u64"},{"name":"buffer","docs":["buffer"],"type":{"array":["u128",5]}}]}},{"name":"VestingEscrowMetadata","docs":["Metadata about an escrow."],"type":{"kind":"struct","fields":[{"name":"escrow","docs":["The [Escrow]."],"type":"pubkey"},{"name":"name","docs":["Name of escrow."],"type":"string"},{"name":"description","docs":["Description of escrow."],"type":"string"},{"name":"creator_email","docs":["Email of creator"],"type":"string"},{"name":"recipient_email","docs":["Email of recipient"],"type":"string"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/jupiter_perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.json b/olddocs/archivekbot2/idls/jupiter_perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.json new file mode 100644 index 0000000..f6b69b0 --- /dev/null +++ b/olddocs/archivekbot2/idls/jupiter_perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"perpetuals","instructions":[{"name":"init","accounts":[{"name":"upgradeAuthority","isMut":true,"isSigner":true},{"name":"admin","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":true,"isSigner":false},{"name":"perpetualsProgram","isMut":false,"isSigner":false},{"name":"perpetualsProgramData","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitParams"}}]},{"name":"addPool","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AddPoolParams"}}]},{"name":"addCustody","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"custodyTokenMint","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AddCustodyParams"}}]},{"name":"setCustodyConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetCustodyConfigParams"}}]},{"name":"setPoolConfig","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetPoolConfigParams"}}]},{"name":"setPerpetualsConfig","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetPerpetualsConfigParams"}}]},{"name":"transferAdmin","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"newAdmin","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"TransferAdminParams"}}]},{"name":"withdrawFees2","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"receivingTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"WithdrawFees2Params"}}]},{"name":"createTokenMetadata","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CreateTokenMetadataParams"}}]},{"name":"createTokenLedger","accounts":[{"name":"tokenLedger","isMut":true,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"reallocCustody","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"custody","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"reallocPool","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"pool","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"createAndDelegateStakeAccount","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeInfo","isMut":true,"isSigner":false},{"name":"validatorVoteAccount","isMut":false,"isSigner":false},{"name":"stakeConfig","isMut":false,"isSigner":false},{"name":"wsolMint","isMut":false,"isSigner":false},{"name":"tempWsolAccount","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CreateAndDelegateStakeAccountParams"}}]},{"name":"unstake","accounts":[{"name":"operator","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeInfo","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawStake","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeInfo","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"redeemStake","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":false,"isSigner":false},{"name":"stakeInfo","isMut":true,"isSigner":false}],"args":[]},{"name":"operatorSetCustodyConfig","accounts":[{"name":"operator","isMut":false,"isSigner":true},{"name":"custody","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"OperatorSetCustodyConfigParams"}}]},{"name":"operatorSetPoolConfig","accounts":[{"name":"operator","isMut":false,"isSigner":true},{"name":"pool","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"OperatorSetPoolConfigParams"}}]},{"name":"testInit","accounts":[{"name":"upgradeAuthority","isMut":true,"isSigner":true},{"name":"admin","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"TestInitParams"}}]},{"name":"setTestTime","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetTestTimeParams"}}]},{"name":"setTokenLedger","accounts":[{"name":"tokenLedger","isMut":true,"isSigner":false},{"name":"tokenAccount","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"swap2","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"receivingCustody","isMut":true,"isSigner":false},{"name":"receivingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"dispensingCustody","isMut":true,"isSigner":false},{"name":"dispensingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"Swap2Params"}}]},{"name":"swapWithTokenLedger","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"receivingCustody","isMut":true,"isSigner":false},{"name":"receivingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"dispensingCustody","isMut":true,"isSigner":false},{"name":"dispensingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenLedger","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instruction","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SwapWithTokenLedgerParams"}}]},{"name":"instantIncreasePositionPreSwap","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"receivingCustody","isMut":true,"isSigner":false},{"name":"receivingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"dispensingCustody","isMut":true,"isSigner":false},{"name":"dispensingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instruction","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantIncreasePositionPreSwapParams"}}]},{"name":"addLiquidity2","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"lpTokenAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AddLiquidity2Params"}}]},{"name":"removeLiquidity2","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"lpTokenAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RemoveLiquidity2Params"}}]},{"name":"createIncreasePositionMarketRequest","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CreateIncreasePositionMarketRequestParams"}}]},{"name":"createDecreasePositionRequest2","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"desiredMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CreateDecreasePositionRequest2Params"}}]},{"name":"createDecreasePositionMarketRequest","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"desiredMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CreateDecreasePositionMarketRequestParams"}}]},{"name":"updateDecreasePositionRequest2","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UpdateDecreasePositionRequest2Params"}}]},{"name":"closePositionRequest2","accounts":[{"name":"keeper","isMut":true,"isSigner":true,"isOptional":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"ownerAta","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"closePositionRequest3","accounts":[{"name":"keeper","isMut":true,"isSigner":true,"isOptional":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"ownerAta","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"increasePosition4","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"IncreasePosition4Params"}}]},{"name":"increasePositionPreSwap","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"keeperAta","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":false,"isSigner":false},{"name":"instruction","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"IncreasePositionPreSwapParams"}}]},{"name":"increasePositionWithInternalSwap","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"receivingCustody","isMut":true,"isSigner":false},{"name":"receivingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"IncreasePositionWithInternalSwapParams"}}]},{"name":"decreasePosition4","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DecreasePosition4Params"}}]},{"name":"decreasePositionWithInternalSwap","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"dispensingCustody","isMut":true,"isSigner":false},{"name":"dispensingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DecreasePositionWithInternalSwapParams"}}]},{"name":"decreasePositionWithTpsl","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"owner","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DecreasePositionWithTpslParams"}}]},{"name":"decreasePositionWithTpslAndInternalSwap","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"owner","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"dispensingCustody","isMut":true,"isSigner":false},{"name":"dispensingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DecreasePositionWithTpslAndInternalSwapParams"}}]},{"name":"liquidateFullPosition4","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"LiquidateFullPosition4Params"}}]},{"name":"refreshAssetsUnderManagement","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RefreshAssetsUnderManagementParams"}}]},{"name":"setMaxGlobalSizes","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"custody","isMut":true,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetMaxGlobalSizesParams"}}]},{"name":"instantCreateTpsl","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"desiredMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantCreateTpslParams"}}]},{"name":"instantCreateLimitOrder","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantCreateLimitOrderParams"}}]},{"name":"instantIncreasePosition","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenLedger","isMut":false,"isSigner":false,"isOptional":true},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantIncreasePositionParams"}}]},{"name":"instantDecreasePosition","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"desiredMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantDecreasePositionParams"}}]},{"name":"instantDecreasePosition2","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"desiredMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantDecreasePosition2Params"}}]},{"name":"instantUpdateLimitOrder","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantUpdateLimitOrderParams"}}]},{"name":"instantUpdateTpsl","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantUpdateTpslParams"}}]},{"name":"getAddLiquidityAmountAndFee2","accounts":[{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"GetAddLiquidityAmountAndFee2Params"}}],"returns":{"defined":"AmountAndFee"}},{"name":"getRemoveLiquidityAmountAndFee2","accounts":[{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"GetRemoveLiquidityAmountAndFee2Params"}}],"returns":{"defined":"AmountAndFee"}},{"name":"getAssetsUnderManagement2","accounts":[{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"GetAssetsUnderManagement2Params"}}],"returns":"u128"},{"name":"borrowFromCustody","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"BorrowFromCustodyParams"}}]},{"name":"repayToCustody","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RepayToCustodyParams"}}]},{"name":"depositCollateralForBorrows","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"collateralTokenAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DepositParams"}}]},{"name":"withdrawCollateralForBorrows","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"collateralTokenAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"WithdrawParams"}}]},{"name":"liquidateBorrowPosition","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"collateralTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"LiquidateBorrowPositionParams"}}]},{"name":"partialLiquidateBorrowPosition","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"collateralTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"PartialLiquidateBorrowPositionParams"}}]},{"name":"closeBorrowPosition","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CloseBorrowPositionParams"}}]}],"accounts":[{"name":"BorrowPosition","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"pool","type":"publicKey"},{"name":"custody","type":"publicKey"},{"name":"openTime","type":"i64"},{"name":"updateTime","type":"i64"},{"name":"borrowSize","type":"u128"},{"name":"cumulativeCompoundedInterestSnapshot","type":"u128"},{"name":"lockedCollateral","type":"u64"},{"name":"bump","type":"u8"},{"name":"lastBorrowed","type":"i64"}]}},{"name":"Custody","type":{"kind":"struct","fields":[{"name":"pool","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"tokenAccount","type":"publicKey"},{"name":"decimals","type":"u8"},{"name":"isStable","type":"bool"},{"name":"oracle","type":{"defined":"OracleParams"}},{"name":"pricing","type":{"defined":"PricingParams"}},{"name":"permissions","type":{"defined":"Permissions"}},{"name":"targetRatioBps","type":"u64"},{"name":"assets","type":{"defined":"Assets"}},{"name":"fundingRateState","type":{"defined":"FundingRateState"}},{"name":"bump","type":"u8"},{"name":"tokenAccountBump","type":"u8"},{"name":"increasePositionBps","type":"u64"},{"name":"decreasePositionBps","type":"u64"},{"name":"maxPositionSizeUsd","type":"u64"},{"name":"dovesOracle","type":"publicKey"},{"name":"jumpRateState","type":{"defined":"JumpRateState"}},{"name":"dovesAgOracle","type":"publicKey"},{"name":"priceImpactBuffer","type":{"defined":"PriceImpactBuffer"}},{"name":"borrowLendParameters","type":{"defined":"BorrowLendParams"}},{"name":"borrowsFundingRateState","type":{"defined":"FundingRateState"}},{"name":"debt","type":"u128"},{"name":"borrowLendInterestsAccured","type":"u128"},{"name":"borrowLimitInTokenAmount","type":"u64"},{"name":"minInterestFeeBps","type":"u64"},{"name":"minInterestFeeGracePeriodSeconds","type":"u64"},{"name":"totalStakedAmountLamports","type":"u64"},{"name":"maxTotalStakedAmountLamports","type":"u64"},{"name":"externalSwapFeeMultiplierBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"withdrawalLimitTokenAmount","type":"u64"},{"name":"withdrawalTokenAmountAccumulated","type":"u64"},{"name":"withdrawalLimitLastResetAt","type":"i64"},{"name":"withdrawalLimitIntervalSeconds","type":"u64"}]}},{"name":"Perpetuals","type":{"kind":"struct","fields":[{"name":"permissions","type":{"defined":"Permissions"}},{"name":"pools","type":{"vec":"publicKey"}},{"name":"admin","type":"publicKey"},{"name":"transferAuthorityBump","type":"u8"},{"name":"perpetualsBump","type":"u8"},{"name":"inceptionTime","type":"i64"}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"custodies","type":{"vec":"publicKey"}},{"name":"aumUsd","type":"u128"},{"name":"limit","type":{"defined":"Limit"}},{"name":"fees","type":{"defined":"Fees"}},{"name":"poolApr","type":{"defined":"PoolApr"}},{"name":"maxRequestExecutionSec","type":"i64"},{"name":"bump","type":"u8"},{"name":"lpTokenBump","type":"u8"},{"name":"inceptionTime","type":"i64"},{"name":"parameterUpdateOracle","type":{"defined":"Secp256k1Pubkey"}},{"name":"aumUsdUpdatedAt","type":"i64"},{"name":"maxTriggerPriceDiffBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"maxLpTokenPriceChangeBps","type":"u64"},{"name":"aumUsdRefreshedAtSlot","type":"u64"}]}},{"name":"PositionRequest","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"pool","type":"publicKey"},{"name":"custody","type":"publicKey"},{"name":"position","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"openTime","type":"i64"},{"name":"updateTime","type":"i64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"collateralDelta","type":"u64"},{"name":"requestChange","type":{"defined":"RequestChange"}},{"name":"requestType","type":{"defined":"RequestType"}},{"name":"side","type":{"defined":"Side"}},{"name":"priceSlippage","type":{"option":"u64"}},{"name":"jupiterMinimumOut","type":{"option":"u64"}},{"name":"preSwapAmount","type":{"option":"u64"}},{"name":"triggerPrice","type":{"option":"u64"}},{"name":"triggerAboveThreshold","type":{"option":"bool"}},{"name":"entirePosition","type":{"option":"bool"}},{"name":"executed","type":"bool"},{"name":"counter","type":"u64"},{"name":"bump","type":"u8"},{"name":"referral","type":{"option":"publicKey"}}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"pool","type":"publicKey"},{"name":"custody","type":"publicKey"},{"name":"collateralCustody","type":"publicKey"},{"name":"openTime","type":"i64"},{"name":"updateTime","type":"i64"},{"name":"side","type":{"defined":"Side"}},{"name":"price","type":"u64"},{"name":"sizeUsd","type":"u64"},{"name":"collateralUsd","type":"u64"},{"name":"realisedPnlUsd","type":"i64"},{"name":"cumulativeInterestSnapshot","type":"u128"},{"name":"lockedAmount","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"StakeInfo","type":{"kind":"struct","fields":[{"name":"pool","type":"publicKey"},{"name":"stakeAccount","type":"publicKey"},{"name":"currentStakedAmountLamports","type":"u64"},{"name":"totalStakingRewardsLamports","type":"u64"},{"name":"lastUpdatedAt","type":"i64"},{"name":"deactivating","type":"bool"},{"name":"stakeAccountIndex","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"TokenLedger","type":{"kind":"struct","fields":[{"name":"tokenAccount","type":"publicKey"},{"name":"amount","type":"u64"}]}}],"types":[{"name":"AddCustodyParams","type":{"kind":"struct","fields":[{"name":"isStable","type":"bool"},{"name":"oracle","type":{"defined":"OracleParams"}},{"name":"pricing","type":{"defined":"PricingParams"}},{"name":"permissions","type":{"defined":"Permissions"}},{"name":"hourlyFundingDbps","type":"u64"},{"name":"targetRatioBps","type":"u64"},{"name":"increasePositionBps","type":"u64"},{"name":"decreasePositionBps","type":"u64"},{"name":"dovesOracle","type":"publicKey"},{"name":"maxPositionSizeUsd","type":"u64"},{"name":"jumpRate","type":{"defined":"JumpRateState"}},{"name":"priceImpactFeeFactor","type":"u64"},{"name":"priceImpactExponent","type":"f32"},{"name":"deltaImbalanceThresholdDecimal","type":"u64"},{"name":"maxFeeBps","type":"u64"},{"name":"dovesAgOracle","type":"publicKey"}]}},{"name":"AddLiquidity2Params","type":{"kind":"struct","fields":[{"name":"tokenAmountIn","type":"u64"},{"name":"minLpAmountOut","type":"u64"},{"name":"tokenAmountPreSwap","type":{"option":"u64"}}]}},{"name":"AddPoolParams","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"limit","type":{"defined":"Limit"}},{"name":"fees","type":{"defined":"Fees"}},{"name":"maxRequestExecutionSec","type":"i64"}]}},{"name":"BorrowFromCustodyParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"CloseBorrowPositionParams","type":{"kind":"struct","fields":[]}},{"name":"CreateAndDelegateStakeAccountParams","type":{"kind":"struct","fields":[{"name":"stakeAccountIndex","type":"u64"},{"name":"stakeAmountLamports","type":"u64"}]}},{"name":"CreateDecreasePositionMarketRequestParams","type":{"kind":"struct","fields":[{"name":"collateralUsdDelta","type":"u64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"priceSlippage","type":"u64"},{"name":"jupiterMinimumOut","type":{"option":"u64"}},{"name":"entirePosition","type":{"option":"bool"}},{"name":"counter","type":"u64"}]}},{"name":"CreateDecreasePositionRequest2Params","type":{"kind":"struct","fields":[{"name":"collateralUsdDelta","type":"u64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"requestType","type":{"defined":"RequestType"}},{"name":"priceSlippage","type":{"option":"u64"}},{"name":"jupiterMinimumOut","type":{"option":"u64"}},{"name":"triggerPrice","type":{"option":"u64"}},{"name":"triggerAboveThreshold","type":{"option":"bool"}},{"name":"entirePosition","type":{"option":"bool"}},{"name":"counter","type":"u64"}]}},{"name":"CreateIncreasePositionMarketRequestParams","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"collateralTokenDelta","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"priceSlippage","type":"u64"},{"name":"jupiterMinimumOut","type":{"option":"u64"}},{"name":"counter","type":"u64"}]}},{"name":"CreateTokenMetadataParams","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"DecreasePosition4Params","type":{"kind":"struct","fields":[]}},{"name":"DecreasePositionWithInternalSwapParams","type":{"kind":"struct","fields":[]}},{"name":"DecreasePositionWithTpslAndInternalSwapParams","type":{"kind":"struct","fields":[]}},{"name":"DecreasePositionWithTpslParams","type":{"kind":"struct","fields":[]}},{"name":"DepositParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"GetAddLiquidityAmountAndFee2Params","type":{"kind":"struct","fields":[{"name":"tokenAmountIn","type":"u64"}]}},{"name":"GetAssetsUnderManagement2Params","type":{"kind":"struct","fields":[{"name":"mode","type":{"option":{"defined":"PriceCalcMode"}}}]}},{"name":"GetRemoveLiquidityAmountAndFee2Params","type":{"kind":"struct","fields":[{"name":"lpAmountIn","type":"u64"}]}},{"name":"IncreasePosition4Params","type":{"kind":"struct","fields":[]}},{"name":"IncreasePositionPreSwapParams","type":{"kind":"struct","fields":[]}},{"name":"IncreasePositionWithInternalSwapParams","type":{"kind":"struct","fields":[]}},{"name":"InitParams","type":{"kind":"struct","fields":[{"name":"allowSwap","type":"bool"},{"name":"allowAddLiquidity","type":"bool"},{"name":"allowRemoveLiquidity","type":"bool"},{"name":"allowIncreasePosition","type":"bool"},{"name":"allowDecreasePosition","type":"bool"},{"name":"allowCollateralWithdrawal","type":"bool"},{"name":"allowLiquidatePosition","type":"bool"}]}},{"name":"InstantCreateLimitOrderParams","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"collateralTokenDelta","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"triggerPrice","type":"u64"},{"name":"triggerAboveThreshold","type":"bool"},{"name":"counter","type":"u64"},{"name":"requestTime","type":"i64"}]}},{"name":"InstantCreateTpslParams","type":{"kind":"struct","fields":[{"name":"collateralUsdDelta","type":"u64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"triggerPrice","type":"u64"},{"name":"triggerAboveThreshold","type":"bool"},{"name":"entirePosition","type":"bool"},{"name":"counter","type":"u64"},{"name":"requestTime","type":"i64"}]}},{"name":"InstantDecreasePosition2Params","type":{"kind":"struct","fields":[{"name":"collateralUsdDelta","type":"u64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"priceSlippage","type":"u64"},{"name":"entirePosition","type":{"option":"bool"}},{"name":"requestTime","type":"i64"},{"name":"counter","type":"u64"}]}},{"name":"InstantDecreasePositionParams","type":{"kind":"struct","fields":[{"name":"collateralUsdDelta","type":"u64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"priceSlippage","type":"u64"},{"name":"entirePosition","type":{"option":"bool"}},{"name":"requestTime","type":"i64"}]}},{"name":"InstantIncreasePositionPreSwapParams","type":{"kind":"struct","fields":[{"name":"amountIn","type":"u64"},{"name":"minAmountOut","type":"u64"}]}},{"name":"InstantIncreasePositionParams","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"collateralTokenDelta","type":{"option":"u64"}},{"name":"side","type":{"defined":"Side"}},{"name":"priceSlippage","type":"u64"},{"name":"requestTime","type":"i64"}]}},{"name":"InstantUpdateLimitOrderParams","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"triggerPrice","type":"u64"},{"name":"requestTime","type":"i64"}]}},{"name":"InstantUpdateTpslParams","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"triggerPrice","type":"u64"},{"name":"requestTime","type":"i64"}]}},{"name":"LiquidateBorrowPositionParams","type":{"kind":"struct","fields":[]}},{"name":"LiquidateFullPosition4Params","type":{"kind":"struct","fields":[]}},{"name":"OperatorSetCustodyConfigParams","type":{"kind":"struct","fields":[{"name":"pricing","type":{"defined":"PricingParams"}},{"name":"hourlyFundingDbps","type":"u64"},{"name":"targetRatioBps","type":"u64"},{"name":"increasePositionBps","type":"u64"},{"name":"decreasePositionBps","type":"u64"},{"name":"maxPositionSizeUsd","type":"u64"},{"name":"jumpRate","type":{"defined":"JumpRateState"}},{"name":"priceImpactFeeFactor","type":"u64"},{"name":"priceImpactExponent","type":"f32"},{"name":"deltaImbalanceThresholdDecimal","type":"u64"},{"name":"maxFeeBps","type":"u64"},{"name":"borrowLendParameters","type":{"defined":"BorrowLendParams"}},{"name":"borrowHourlyFundingDbps","type":"u64"},{"name":"borrowLimitInTokenAmount","type":"u64"},{"name":"minInterestFeeBps","type":"u64"},{"name":"minInterestFeeGracePeriodSeconds","type":"u64"},{"name":"maxTotalStakedAmountLamports","type":"u64"},{"name":"externalSwapFeeMultiplierBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"withdrawalLimitTokenAmount","type":"u64"},{"name":"withdrawalLimitIntervalSeconds","type":"u64"}]}},{"name":"OperatorSetPoolConfigParams","type":{"kind":"struct","fields":[{"name":"fees","type":{"defined":"Fees"}},{"name":"limit","type":{"defined":"Limit"}},{"name":"maxRequestExecutionSec","type":"i64"},{"name":"maxTriggerPriceDiffBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"maxLpTokenPriceChangeBps","type":"u64"}]}},{"name":"PartialLiquidateBorrowPositionParams","type":{"kind":"struct","fields":[]}},{"name":"RefreshAssetsUnderManagementParams","type":{"kind":"struct","fields":[]}},{"name":"RemoveLiquidity2Params","type":{"kind":"struct","fields":[{"name":"lpAmountIn","type":"u64"},{"name":"minAmountOut","type":"u64"}]}},{"name":"RepayToCustodyParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"SetCustodyConfigParams","type":{"kind":"struct","fields":[{"name":"oracle","type":{"defined":"OracleParams"}},{"name":"pricing","type":{"defined":"PricingParams"}},{"name":"permissions","type":{"defined":"Permissions"}},{"name":"hourlyFundingDbps","type":"u64"},{"name":"targetRatioBps","type":"u64"},{"name":"increasePositionBps","type":"u64"},{"name":"decreasePositionBps","type":"u64"},{"name":"dovesOracle","type":"publicKey"},{"name":"maxPositionSizeUsd","type":"u64"},{"name":"jumpRate","type":{"defined":"JumpRateState"}},{"name":"priceImpactFeeFactor","type":"u64"},{"name":"priceImpactExponent","type":"f32"},{"name":"deltaImbalanceThresholdDecimal","type":"u64"},{"name":"maxFeeBps","type":"u64"},{"name":"dovesAgOracle","type":"publicKey"},{"name":"borrowLendParameters","type":{"defined":"BorrowLendParams"}},{"name":"borrowHourlyFundingDbps","type":"u64"},{"name":"borrowLimitInTokenAmount","type":"u64"},{"name":"minInterestFeeBps","type":"u64"},{"name":"minInterestFeeGracePeriodSeconds","type":"u64"},{"name":"maxTotalStakedAmountLamports","type":"u64"},{"name":"externalSwapFeeMultiplierBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"withdrawalLimitIntervalSeconds","type":"u64"},{"name":"withdrawalLimitTokenAmount","type":"u64"}]}},{"name":"SetMaxGlobalSizesParams","type":{"kind":"struct","fields":[{"name":"maxGlobalLongSize","type":"u64"},{"name":"maxGlobalShortSize","type":"u64"},{"name":"recoveryId","type":"u8"},{"name":"signature","type":{"array":["u8",64]}},{"name":"referenceId","type":{"array":["u8",16]}},{"name":"timestamp","type":"u64"}]}},{"name":"SetPerpetualsConfigParams","type":{"kind":"struct","fields":[{"name":"permissions","type":{"defined":"Permissions"}}]}},{"name":"SetPoolConfigParams","type":{"kind":"struct","fields":[{"name":"fees","type":{"defined":"Fees"}},{"name":"limit","type":{"defined":"Limit"}},{"name":"maxRequestExecutionSec","type":"i64"},{"name":"parameterUpdateOracle","type":{"defined":"Secp256k1Pubkey"}},{"name":"maxTriggerPriceDiffBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"maxLpTokenPriceChangeBps","type":"u64"}]}},{"name":"SetTestTimeParams","type":{"kind":"struct","fields":[{"name":"time","type":"i64"}]}},{"name":"Swap2Params","type":{"kind":"struct","fields":[{"name":"amountIn","type":"u64"},{"name":"minAmountOut","type":"u64"}]}},{"name":"SwapWithTokenLedgerParams","type":{"kind":"struct","fields":[{"name":"minAmountOut","type":"u64"}]}},{"name":"TestInitParams","type":{"kind":"struct","fields":[{"name":"allowSwap","type":"bool"},{"name":"allowAddLiquidity","type":"bool"},{"name":"allowRemoveLiquidity","type":"bool"},{"name":"allowIncreasePosition","type":"bool"},{"name":"allowDecreasePosition","type":"bool"},{"name":"allowCollateralWithdrawal","type":"bool"},{"name":"allowLiquidatePosition","type":"bool"}]}},{"name":"TransferAdminParams","type":{"kind":"struct","fields":[]}},{"name":"UpdateDecreasePositionRequest2Params","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"triggerPrice","type":"u64"}]}},{"name":"WithdrawParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"WithdrawFees2Params","type":{"kind":"struct","fields":[]}},{"name":"PriceImpactBuffer","type":{"kind":"struct","fields":[{"name":"openInterest","type":{"array":["i64",60]}},{"name":"lastUpdated","type":"i64"},{"name":"feeFactor","type":"u64"},{"name":"exponent","type":"f32"},{"name":"deltaImbalanceThresholdDecimal","type":"u64"},{"name":"maxFeeBps","type":"u64"}]}},{"name":"Assets","type":{"kind":"struct","fields":[{"name":"feesReserves","type":"u64"},{"name":"owned","type":"u64"},{"name":"locked","type":"u64"},{"name":"guaranteedUsd","type":"u64"},{"name":"globalShortSizes","type":"u64"},{"name":"globalShortAveragePrices","type":"u64"}]}},{"name":"PricingParams","type":{"kind":"struct","fields":[{"name":"tradeImpactFeeScalar","type":"u64"},{"name":"buffer","type":"u64"},{"name":"swapSpread","type":"u64"},{"name":"maxLeverage","type":"u64"},{"name":"maxGlobalLongSizes","type":"u64"},{"name":"maxGlobalShortSizes","type":"u64"}]}},{"name":"FundingRateState","type":{"kind":"struct","fields":[{"name":"cumulativeInterestRate","type":"u128"},{"name":"lastUpdate","type":"i64"},{"name":"hourlyFundingDbps","type":"u64"}]}},{"name":"JumpRateState","type":{"kind":"struct","fields":[{"name":"minRateBps","type":"u64"},{"name":"maxRateBps","type":"u64"},{"name":"targetRateBps","type":"u64"},{"name":"targetUtilizationRate","type":"u64"}]}},{"name":"BorrowLendParams","type":{"kind":"struct","fields":[{"name":"borrowsLimitInBps","type":"u64"},{"name":"maintainanceMarginBps","type":"u64"},{"name":"protocolFeeBps","type":"u64"},{"name":"liquidationMargin","type":"u64"},{"name":"liquidationFeeBps","type":"u64"}]}},{"name":"OraclePrice","type":{"kind":"struct","fields":[{"name":"price","type":"u64"},{"name":"exponent","type":"i32"}]}},{"name":"Price","type":{"kind":"struct","fields":[{"name":"price","type":"u64"},{"name":"expo","type":"i32"},{"name":"publishTime","type":"i64"}]}},{"name":"OracleParams","type":{"kind":"struct","fields":[{"name":"oracleAccount","type":"publicKey"},{"name":"oracleType","type":{"defined":"OracleType"}},{"name":"buffer","type":"u64"},{"name":"maxPriceAgeSec","type":"u32"}]}},{"name":"AmountAndFee","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"fee","type":"u64"},{"name":"feeBps","type":"u64"}]}},{"name":"Permissions","type":{"kind":"struct","fields":[{"name":"allowSwap","type":"bool"},{"name":"allowAddLiquidity","type":"bool"},{"name":"allowRemoveLiquidity","type":"bool"},{"name":"allowIncreasePosition","type":"bool"},{"name":"allowDecreasePosition","type":"bool"},{"name":"allowCollateralWithdrawal","type":"bool"},{"name":"allowLiquidatePosition","type":"bool"}]}},{"name":"Fees","type":{"kind":"struct","fields":[{"name":"swapMultiplier","type":"u64"},{"name":"stableSwapMultiplier","type":"u64"},{"name":"addRemoveLiquidityBps","type":"u64"},{"name":"swapBps","type":"u64"},{"name":"taxBps","type":"u64"},{"name":"stableSwapBps","type":"u64"},{"name":"stableSwapTaxBps","type":"u64"},{"name":"liquidationRewardBps","type":"u64"},{"name":"protocolShareBps","type":"u64"}]}},{"name":"PoolApr","type":{"kind":"struct","fields":[{"name":"lastUpdated","type":"i64"},{"name":"feeAprBps","type":"u64"},{"name":"realizedFeeUsd","type":"u64"}]}},{"name":"Limit","type":{"kind":"struct","fields":[{"name":"maxAumUsd","type":"u128"},{"name":"tokenWeightageBufferBps","type":"u128"},{"name":"buffer","type":"u64"}]}},{"name":"Secp256k1Pubkey","type":{"kind":"struct","fields":[{"name":"prefix","type":"u8"},{"name":"key","type":{"array":["u8",32]}}]}},{"name":"PriceImpactMechanism","type":{"kind":"enum","variants":[{"name":"TradeSize"},{"name":"DeltaImbalance"}]}},{"name":"OracleType","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Test"},{"name":"Pyth"}]}},{"name":"PriceCalcMode","type":{"kind":"enum","variants":[{"name":"Min"},{"name":"Max"},{"name":"Ignore"}]}},{"name":"PriceStaleTolerance","type":{"kind":"enum","variants":[{"name":"Strict"},{"name":"Loose"}]}},{"name":"TradePoolType","type":{"kind":"enum","variants":[{"name":"Increase"},{"name":"Decrease"}]}},{"name":"RequestType","type":{"kind":"enum","variants":[{"name":"Market"},{"name":"Trigger"}]}},{"name":"RequestChange","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Increase"},{"name":"Decrease"}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Long"},{"name":"Short"}]}}],"events":[{"name":"CreatePositionRequestEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralMint","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralDelta","type":"u64","index":false},{"name":"priceSlippage","type":{"option":"u64"},"index":false},{"name":"jupiterMinimumOut","type":{"option":"u64"},"index":false},{"name":"preSwapAmount","type":{"option":"u64"},"index":false},{"name":"requestChange","type":"u8","index":false},{"name":"openTime","type":"i64","index":false},{"name":"referral","type":{"option":"publicKey"},"index":false}]},{"name":"InstantCreateTpslEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralDelta","type":"u64","index":false},{"name":"entirePosition","type":"bool","index":false},{"name":"openTime","type":"i64","index":false}]},{"name":"InstantUpdateTpslEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralDelta","type":"u64","index":false},{"name":"entirePosition","type":"bool","index":false},{"name":"updateTime","type":"i64","index":false}]},{"name":"ClosePositionRequestEvent","fields":[{"name":"entirePosition","type":{"option":"bool"},"index":false},{"name":"executed","type":"bool","index":false},{"name":"requestChange","type":"u8","index":false},{"name":"requestType","type":"u8","index":false},{"name":"side","type":"u8","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"openTime","type":"i64","index":false}]},{"name":"IncreasePositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"positionRequestChange","type":"u8","index":false},{"name":"positionRequestType","type":"u8","index":false},{"name":"positionRequestCollateralDelta","type":"u64","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralUsdDelta","type":"u64","index":false},{"name":"collateralTokenDelta","type":"u64","index":false},{"name":"price","type":"u64","index":false},{"name":"priceSlippage","type":{"option":"u64"},"index":false},{"name":"feeToken","type":"u64","index":false},{"name":"feeUsd","type":"u64","index":false},{"name":"openTime","type":"i64","index":false},{"name":"referral","type":{"option":"publicKey"},"index":false},{"name":"positionFeeUsd","type":"u64","index":false},{"name":"fundingFeeUsd","type":"u64","index":false},{"name":"priceImpactFeeUsd","type":"u64","index":false}]},{"name":"IncreasePositionPreSwapEvent","fields":[{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"transferAmount","type":"u64","index":false},{"name":"collateralCustodyPreSwapAmount","type":"u64","index":false}]},{"name":"DecreasePositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"positionRequestChange","type":"u8","index":false},{"name":"positionRequestType","type":"u8","index":false},{"name":"hasProfit","type":"bool","index":false},{"name":"pnlDelta","type":"u64","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"transferAmountUsd","type":"u64","index":false},{"name":"transferToken","type":{"option":"u64"},"index":false},{"name":"price","type":"u64","index":false},{"name":"priceSlippage","type":{"option":"u64"},"index":false},{"name":"feeUsd","type":"u64","index":false},{"name":"openTime","type":"i64","index":false},{"name":"referral","type":{"option":"publicKey"},"index":false},{"name":"positionFeeUsd","type":"u64","index":false},{"name":"fundingFeeUsd","type":"u64","index":false},{"name":"priceImpactFeeUsd","type":"u64","index":false},{"name":"originalPositionCollateralUsd","type":"u64","index":false},{"name":"positionCollateralUsd","type":"u64","index":false},{"name":"positionOpenTime","type":"i64","index":false},{"name":"positionPrice","type":"u64","index":false}]},{"name":"DecreasePositionPostSwapEvent","fields":[{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"swapAmount","type":"u64","index":false},{"name":"jupiterMinimumOut","type":{"option":"u64"},"index":false}]},{"name":"LiquidateFullPositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionCollateralMint","type":"publicKey","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"hasProfit","type":"bool","index":false},{"name":"pnlDelta","type":"u64","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"transferAmountUsd","type":"u64","index":false},{"name":"transferToken","type":"u64","index":false},{"name":"price","type":"u64","index":false},{"name":"feeUsd","type":"u64","index":false},{"name":"liquidationFeeUsd","type":"u64","index":false},{"name":"openTime","type":"i64","index":false},{"name":"positionFeeUsd","type":"u64","index":false},{"name":"fundingFeeUsd","type":"u64","index":false},{"name":"priceImpactFeeUsd","type":"u64","index":false},{"name":"originalPositionCollateralUsd","type":"u64","index":false},{"name":"positionCollateralUsd","type":"u64","index":false},{"name":"positionOpenTime","type":"i64","index":false},{"name":"positionPrice","type":"u64","index":false}]},{"name":"PoolSwapEvent","fields":[{"name":"receivingCustodyKey","type":"publicKey","index":false},{"name":"dispensingCustodyKey","type":"publicKey","index":false},{"name":"poolKey","type":"publicKey","index":false},{"name":"amountIn","type":"u64","index":false},{"name":"amountOut","type":"u64","index":false},{"name":"swapUsdAmount","type":"u64","index":false},{"name":"amountOutAfterFees","type":"u64","index":false},{"name":"feeBps","type":"u64","index":false},{"name":"ownerKey","type":"publicKey","index":false},{"name":"receivingAccountKey","type":"publicKey","index":false}]},{"name":"PoolSwapExactOutEvent","fields":[{"name":"receivingCustodyKey","type":"publicKey","index":false},{"name":"dispensingCustodyKey","type":"publicKey","index":false},{"name":"poolKey","type":"publicKey","index":false},{"name":"amountIn","type":"u64","index":false},{"name":"amountInAfterFees","type":"u64","index":false},{"name":"amountOut","type":"u64","index":false},{"name":"swapUsdAmount","type":"u64","index":false},{"name":"feeBps","type":"u64","index":false},{"name":"ownerKey","type":"publicKey","index":false},{"name":"receivingAccountKey","type":"publicKey","index":false}]},{"name":"AddLiquidityEvent","fields":[{"name":"custodyKey","type":"publicKey","index":false},{"name":"poolKey","type":"publicKey","index":false},{"name":"tokenAmountIn","type":"u64","index":false},{"name":"prePoolAmountUsd","type":"u128","index":false},{"name":"tokenAmountUsd","type":"u64","index":false},{"name":"feeBps","type":"u64","index":false},{"name":"tokenAmountAfterFee","type":"u64","index":false},{"name":"mintAmountUsd","type":"u64","index":false},{"name":"lpAmount","type":"u64","index":false},{"name":"postPoolAmountUsd","type":"u128","index":false}]},{"name":"RemoveLiquidityEvent","fields":[{"name":"custodyKey","type":"publicKey","index":false},{"name":"poolKey","type":"publicKey","index":false},{"name":"lpAmountIn","type":"u64","index":false},{"name":"removeAmountUsd","type":"u64","index":false},{"name":"feeBps","type":"u64","index":false},{"name":"removeTokenAmount","type":"u64","index":false},{"name":"tokenAmountAfterFee","type":"u64","index":false},{"name":"postPoolAmountUsd","type":"u128","index":false}]},{"name":"InstantCreateLimitOrderEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralMint","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralDelta","type":"u64","index":false},{"name":"openTime","type":"i64","index":false}]},{"name":"InstantIncreasePositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralUsdDelta","type":"u64","index":false},{"name":"collateralTokenDelta","type":"u64","index":false},{"name":"price","type":"u64","index":false},{"name":"priceSlippage","type":"u64","index":false},{"name":"feeToken","type":"u64","index":false},{"name":"feeUsd","type":"u64","index":false},{"name":"openTime","type":"i64","index":false},{"name":"referral","type":{"option":"publicKey"},"index":false},{"name":"positionFeeUsd","type":"u64","index":false},{"name":"fundingFeeUsd","type":"u64","index":false},{"name":"priceImpactFeeUsd","type":"u64","index":false}]},{"name":"InstantDecreasePositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"desiredMint","type":"publicKey","index":false},{"name":"hasProfit","type":"bool","index":false},{"name":"pnlDelta","type":"u64","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"transferAmountUsd","type":"u64","index":false},{"name":"transferToken","type":"u64","index":false},{"name":"price","type":"u64","index":false},{"name":"priceSlippage","type":"u64","index":false},{"name":"feeUsd","type":"u64","index":false},{"name":"openTime","type":"i64","index":false},{"name":"referral","type":{"option":"publicKey"},"index":false},{"name":"positionFeeUsd","type":"u64","index":false},{"name":"fundingFeeUsd","type":"u64","index":false},{"name":"originalPositionCollateralUsd","type":"u64","index":false},{"name":"positionCollateralUsd","type":"u64","index":false},{"name":"priceImpactFeeUsd","type":"u64","index":false},{"name":"positionOpenTime","type":"i64","index":false},{"name":"positionPrice","type":"u64","index":false},{"name":"positionRequest","type":{"option":"publicKey"},"index":false}]},{"name":"DepositCollateralEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"depositAmount","type":"u64","index":false},{"name":"userTokenAccount","type":"publicKey","index":false},{"name":"time","type":"i64","index":false}]},{"name":"WithdrawCollateralEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"withdrawAmount","type":"u64","index":false},{"name":"userTokenAccount","type":"publicKey","index":false},{"name":"custody","type":"publicKey","index":false},{"name":"previousCollateralAmount","type":"u64","index":false},{"name":"collateralAmount","type":"u64","index":false},{"name":"collateralAmountUsd","type":"u64","index":false},{"name":"marginUsd","type":"u64","index":false},{"name":"time","type":"i64","index":false}]},{"name":"BorrowFromCustodyEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"sizeCustodyToken","type":"u64","index":false},{"name":"collateralAmount","type":"u64","index":false},{"name":"collateralAmountUsd","type":"u64","index":false},{"name":"marginUsd","type":"u64","index":false},{"name":"updateTime","type":"i64","index":false}]},{"name":"RepayToCustodyEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"sizeCustodyToken","type":"u64","index":false},{"name":"updateTime","type":"i64","index":false},{"name":"interest","type":"u128","index":false}]},{"name":"LiquidateBorrowPositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"collateralLockedInUsd","type":"u64","index":false},{"name":"collateralLockedInLp","type":"u64","index":false},{"name":"remainingCollateralInLp","type":"u64","index":false},{"name":"custodyTokenPrice","type":"u64","index":false},{"name":"totalBorrowsInUsd","type":"u64","index":false},{"name":"liquidationFeeUsd","type":"u64","index":false},{"name":"liquidationTime","type":"i64","index":false}]},{"name":"RedeemStakeEvent","fields":[{"name":"custody","type":"publicKey","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"stakeInfo","type":"publicKey","index":false},{"name":"stakeRewards","type":"u64","index":false},{"name":"custodyTotalStakedAmount","type":"u64","index":false},{"name":"currentStakedAmount","type":"u64","index":false},{"name":"totalStakingRewards","type":"u64","index":false},{"name":"redeemTime","type":"i64","index":false}]},{"name":"WithdrawStakeEvent","fields":[{"name":"custody","type":"publicKey","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"stakeInfo","type":"publicKey","index":false},{"name":"stakeRewards","type":"u64","index":false},{"name":"custodyTotalStakedAmount","type":"u64","index":false},{"name":"totalStakingRewards","type":"u64","index":false},{"name":"withdrawAmount","type":"u64","index":false},{"name":"withdrawTime","type":"i64","index":false}]},{"name":"DelegateStakeEvent","fields":[{"name":"custody","type":"publicKey","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"stakeInfo","type":"publicKey","index":false},{"name":"custodyTotalStakedAmount","type":"u64","index":false},{"name":"stakeAmount","type":"u64","index":false},{"name":"validatorVoteAccount","type":"publicKey","index":false},{"name":"delegateTime","type":"i64","index":false}]},{"name":"WithdrawFeesEvent","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"custody","type":"publicKey","index":false},{"name":"custodyMint","type":"publicKey","index":false},{"name":"receivingTokenAccount","type":"publicKey","index":false},{"name":"totalTradeSwapFees","type":"u64","index":false},{"name":"poolTradeSwapFees","type":"u64","index":false},{"name":"protocolTradeSwapFees","type":"u64","index":false},{"name":"totalBorrowLendingFees","type":"u64","index":false},{"name":"poolBorrowLendingFees","type":"u64","index":false},{"name":"protocolBorrowLendingFees","type":"u64","index":false},{"name":"poolTotalFeesUsd","type":"u64","index":false},{"name":"aprBpsBefore","type":"u64","index":false},{"name":"aprBpsAfter","type":"u64","index":false},{"name":"aprBpsUpdatedAt","type":"i64","index":false},{"name":"poolRealizedFeeUsdBefore","type":"u64","index":false},{"name":"poolRealizedFeeUsdAfter","type":"u64","index":false},{"name":"curtime","type":"i64","index":false}]}],"errors":[{"code":6000,"name":"MathOverflow","msg":"Overflow in arithmetic operation"},{"code":6001,"name":"UnsupportedOracle","msg":"Unsupported price oracle"},{"code":6002,"name":"InvalidOracleAccount","msg":"Invalid oracle account"},{"code":6003,"name":"StaleOraclePrice","msg":"Stale oracle price"},{"code":6004,"name":"InvalidOraclePrice","msg":"Invalid oracle price"},{"code":6005,"name":"InvalidEnvironment","msg":"Instruction is not allowed in production"},{"code":6006,"name":"InvalidCollateralAccount","msg":"Invalid collateral account"},{"code":6007,"name":"InvalidCollateralAmount","msg":"Invalid collateral amount"},{"code":6008,"name":"CollateralSlippage","msg":"Collateral slippage"},{"code":6009,"name":"InvalidPositionState","msg":"Invalid position state"},{"code":6010,"name":"InvalidPerpetualsConfig","msg":"Invalid perpetuals config"},{"code":6011,"name":"InvalidPoolConfig","msg":"Invalid pool config"},{"code":6012,"name":"InvalidInstruction","msg":"Invalid instruction"},{"code":6013,"name":"InvalidCustodyConfig","msg":"Invalid custody config"},{"code":6014,"name":"InvalidCustodyBalance","msg":"Invalid custody balance"},{"code":6015,"name":"InvalidArgument","msg":"Invalid argument"},{"code":6016,"name":"InvalidPositionRequest","msg":"Invalid position request"},{"code":6017,"name":"InvalidPositionRequestInputAta","msg":"Invalid position request input ata"},{"code":6018,"name":"InvalidMint","msg":"Invalid mint"},{"code":6019,"name":"InsufficientTokenAmount","msg":"Insufficient token amount"},{"code":6020,"name":"InsufficientAmountReturned","msg":"Insufficient token amount returned"},{"code":6021,"name":"MaxPriceSlippage","msg":"Price slippage limit exceeded"},{"code":6022,"name":"MaxLeverage","msg":"Position leverage limit exceeded"},{"code":6023,"name":"CustodyAmountLimit","msg":"Custody amount limit exceeded"},{"code":6024,"name":"PoolAmountLimit","msg":"Pool amount limit exceeded"},{"code":6025,"name":"PersonalPoolAmountLimit","msg":"Personal pool amount limit exceeded"},{"code":6026,"name":"UnsupportedToken","msg":"Token is not supported"},{"code":6027,"name":"InstructionNotAllowed","msg":"Instruction is not allowed at this time"},{"code":6028,"name":"JupiterProgramMismatch","msg":"Jupiter Program ID mismatch"},{"code":6029,"name":"ProgramMismatch","msg":"Program ID mismatch"},{"code":6030,"name":"AddressMismatch","msg":"Address mismatch"},{"code":6031,"name":"KeeperATAMissing","msg":"Missing keeper ATA"},{"code":6032,"name":"SwapAmountMismatch","msg":"Swap amount mismatch"},{"code":6033,"name":"CPINotAllowed","msg":"CPI not allowed"},{"code":6034,"name":"InvalidKeeper","msg":"Invalid Keeper"},{"code":6035,"name":"ExceedExecutionPeriod","msg":"Exceed execution period"},{"code":6036,"name":"InvalidRequestType","msg":"Invalid Request Type"},{"code":6037,"name":"InvalidTriggerPrice","msg":"Invalid Trigger Price"},{"code":6038,"name":"TriggerPriceSlippage","msg":"Trigger Price Slippage"},{"code":6039,"name":"MissingTriggerPrice","msg":"Missing Trigger Price"},{"code":6040,"name":"MissingPriceSlippage","msg":"Missing Price Slippage"},{"code":6041,"name":"InvalidPriceCalcMode","msg":"Invalid Price Calc Mode"},{"code":6042,"name":"RequestUpdatedTooRecent","msg":"Request Updated Too Recent"},{"code":6043,"name":"ExceedTokenWeightage","msg":"Exceed Token Weightage"},{"code":6044,"name":"OraclePublishTimeTooEarly","msg":"Oracle Publish Time Too Early"},{"code":6045,"name":"PullOraclePublishTimeTooEarly","msg":"Pull Oracle Publish Time Too Early"},{"code":6046,"name":"StalePullOraclePrice","msg":"Stale Pull Oracle Price"},{"code":6047,"name":"InvalidPullOraclePrice","msg":"Invalid Pull Oracle Price"},{"code":6048,"name":"PullOracleNotVerified","msg":"Pull Oracle Not Verified"},{"code":6049,"name":"PriceDiffTooLarge","msg":"Price Diff Between Pull and Push Oracle is Too Large"},{"code":6050,"name":"InvalidDovesOraclePrice","msg":"Invalid Doves Oracle Price"},{"code":6051,"name":"InvalidRequestTime","msg":"Invalid Request Time"},{"code":6052,"name":"PositionUpdatedTooRecent","msg":"Position Updated Too Recent"},{"code":6053,"name":"LedgerTokenAccountDoesNotMatch","msg":"Ledger token account does not match"},{"code":6054,"name":"InvalidTokenLedger","msg":"Invalid token ledger"},{"code":6055,"name":"OraclePriceDifferenceTooLarge","msg":"Oracle Price Difference Too Large"},{"code":6056,"name":"InvalidOracleSigner","msg":"Invalid Oracle Signer"},{"code":6057,"name":"InvalidOracleTimestamp","msg":"Invalid Oracle Timestamp"},{"code":6058,"name":"InvalidMaxGlobalLongSize","msg":"New Max Global Long Size Too Low"},{"code":6059,"name":"InvalidMaxGlobalShortSize","msg":"New Max Global Short Size Too Low"},{"code":6060,"name":"BorrowsDisabled","msg":"Borrows disabled for this custody"},{"code":6061,"name":"BorrowLimitsExceeded","msg":"Borrows limit exceeded for this custody"},{"code":6062,"name":"WithdrawExceedsMarginLimits","msg":"Withdraw exceeds margin of the custody"},{"code":6063,"name":"CannotLiquidate","msg":"Cannot liquidate"},{"code":6064,"name":"CannotDelegateStake","msg":"Cannot delegate stake to deactivated account"},{"code":6065,"name":"ExceededMaxTotalStakedAmount","msg":"Max total staked amount exceeded"},{"code":6066,"name":"LpTokenPriceChangeLimitExceeded","msg":"LP token price change exceeds limit"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/jupiter_stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.json b/olddocs/archivekbot2/idls/jupiter_stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.json new file mode 100644 index 0000000..106f2b7 --- /dev/null +++ b/olddocs/archivekbot2/idls/jupiter_stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.json @@ -0,0 +1 @@ +{"address":"JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr","metadata":{"name":"jup_stable","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"create_benefactor","discriminator":[184,241,45,0,53,40,201,54],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"operator"},{"name":"payer","writable":true,"signer":true},{"name":"benefactor_authority"},{"name":"benefactor","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,101,110,101,102,97,99,116,111,114]},{"kind":"account","path":"benefactor_authority"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"mint_fee_rate","type":"u16"},{"name":"redeem_fee_rate","type":"u16"}]},{"name":"create_operator","discriminator":[145,40,238,75,181,252,59,11],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"payer","writable":true,"signer":true},{"name":"operator"},{"name":"new_operator_authority"},{"name":"new_operator","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,111,114]},{"kind":"account","path":"new_operator_authority"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"OperatorRole"}}}]},{"name":"create_vault","discriminator":[29,237,247,208,193,82,54,135],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"operator"},{"name":"payer","writable":true,"signer":true},{"name":"mint"},{"name":"config"},{"name":"authority","relations":["config"]},{"name":"vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"authority"},{"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":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"delete_benefactor","discriminator":[216,227,84,147,79,177,152,147],"accounts":[{"name":"operator_authority","writable":true,"signer":true,"relations":["operator"]},{"name":"operator"},{"name":"receiver","writable":true},{"name":"benefactor","writable":true}],"args":[]},{"name":"delete_operator","discriminator":[208,84,168,116,138,201,98,16],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"payer","writable":true,"signer":true},{"name":"operator"},{"name":"deleted_operator","writable":true}],"args":[]},{"name":"init","discriminator":[220,59,207,236,108,250,47,100],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"operator","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,111,114]},{"kind":"account","path":"upgrade_authority"}]}},{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[97,117,116,104,111,114,105,116,121]}]}},{"name":"mint","writable":true,"signer":true},{"name":"metadata","writable":true},{"name":"program_data"},{"name":"program","address":"JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr"},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"decimals","type":"u8"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"manage_benefactor","discriminator":[22,231,128,62,115,219,149,14],"accounts":[{"name":"operator_authority","writable":true,"signer":true,"relations":["operator"]},{"name":"operator"},{"name":"benefactor","writable":true}],"args":[{"name":"action","type":{"defined":{"name":"BenefactorManagementAction"}}}]},{"name":"manage_config","discriminator":[119,51,144,55,24,242,232,231],"accounts":[{"name":"operator_authority","writable":true,"signer":true,"relations":["operator"]},{"name":"operator"},{"name":"config","writable":true}],"args":[{"name":"action","type":{"defined":{"name":"ConfigManagementAction"}}}]},{"name":"manage_operator","discriminator":[82,172,106,235,147,246,96,85],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"operator"},{"name":"managed_operator","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"action","type":{"defined":{"name":"OperatorManagementAction"}}}]},{"name":"manage_vault","discriminator":[165,7,106,242,73,193,195,128],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"operator"},{"name":"vault","writable":true}],"args":[{"name":"action","type":{"defined":{"name":"VaultManagementAction"}}}]},{"name":"mint","discriminator":[51,57,225,47,182,146,137,166],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"user_collateral_token_account","writable":true},{"name":"user_lp_token_account","writable":true},{"name":"config","writable":true},{"name":"authority"},{"name":"lp_mint","writable":true},{"name":"vault","writable":true},{"name":"vault_mint"},{"name":"custodian"},{"name":"custodian_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"custodian"},{"kind":"account","path":"vault_token_program"},{"kind":"account","path":"vault_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":"benefactor","writable":true},{"name":"lp_token_program"},{"name":"vault_token_program"},{"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":"amount","type":"u64"},{"name":"min_amount_out","type":"u64"}]},{"name":"redeem","discriminator":[184,12,86,149,70,196,97,225],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"user_lp_token_account","writable":true},{"name":"user_collateral_token_account","writable":true},{"name":"config","writable":true},{"name":"authority"},{"name":"lp_mint","writable":true},{"name":"vault","writable":true},{"name":"vault_token_account","writable":true},{"name":"vault_mint"},{"name":"benefactor","writable":true},{"name":"lp_token_program"},{"name":"vault_token_program"},{"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":"amount","type":"u64"},{"name":"min_amount_out","type":"u64"}]},{"name":"withdraw","discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"operator"},{"name":"custodian"},{"name":"custodian_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"custodian"},{"kind":"account","path":"token_program"},{"kind":"account","path":"vault_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":"config"},{"name":"authority"},{"name":"vault","writable":true},{"name":"vault_token_account","writable":true},{"name":"vault_mint"},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]}],"accounts":[{"name":"Benefactor","discriminator":[98,159,41,233,19,232,104,12]},{"name":"Config","discriminator":[155,12,170,224,30,250,204,130]},{"name":"Operator","discriminator":[219,31,188,145,69,139,204,117]},{"name":"Vault","discriminator":[211,8,232,43,2,152,117,119]}],"events":[{"name":"MintV0Event","discriminator":[217,98,231,213,105,77,68,88]},{"name":"MintV1Event","discriminator":[63,113,88,48,163,187,48,83]},{"name":"RedeemV0Event","discriminator":[50,202,68,30,122,77,84,153]},{"name":"RedeemV1Event","discriminator":[67,51,207,92,219,144,44,2]}],"errors":[{"code":6000,"name":"SomeError","msg":""},{"code":6001,"name":"AdminArrayFull","msg":"Admin Array Full"},{"code":6002,"name":"NotAuthorized","msg":"Not Authorized"},{"code":6003,"name":"BadInput","msg":"Bad Input"},{"code":6004,"name":"BenefactorDisabled","msg":"Benefactor Disabled"},{"code":6005,"name":"BenefactorActive","msg":"Benefactor Active"},{"code":6006,"name":"VaultNotActive","msg":"Vault Not Active"},{"code":6007,"name":"InsufficientAmount","msg":"Insufficient Amount"},{"code":6008,"name":"InvalidFeeRate","msg":"Invalid Fee Rate"},{"code":6009,"name":"MintLimitExceeded","msg":"Mint Limit Exceeded"},{"code":6010,"name":"RedeemLimitExceeded","msg":"Redeem Limit Exceeded"},{"code":6011,"name":"SlippageToleranceExceeded","msg":"Slippage Tolerance Exceeded"},{"code":6012,"name":"MathOverflow","msg":"Math Overflow"},{"code":6013,"name":"InvalidLPMint","msg":"Invalid LP Mint"},{"code":6014,"name":"InvalidVaultMint","msg":"Invalid Vault Mint"},{"code":6015,"name":"InvalidAuthority","msg":"Invalid Authority"},{"code":6016,"name":"InvalidVaultTokenAccount","msg":"Invalid Vault Token Account"},{"code":6017,"name":"InvalidTokenProgram","msg":"Invalid Token Program"},{"code":6018,"name":"InvalidVaultFeeTokenAccount","msg":"Invalid Vault Fee Token Account"},{"code":6019,"name":"BadOracle","msg":"Bad Oracle"},{"code":6020,"name":"NoValidPrice","msg":"No Valid Price"},{"code":6021,"name":"InvalidBenefactor","msg":"Invalid Benefactor"},{"code":6022,"name":"InvalidCustodian","msg":"Invalid Custodian"},{"code":6023,"name":"InvalidPeriodLimit","msg":"Invalid Rate Limit Window"},{"code":6024,"name":"MissingOracleAccounts","msg":"Missing Oracle Accounts"},{"code":6025,"name":"NoOraclesFound","msg":"No Oracles Found"},{"code":6026,"name":"ZeroAmount","msg":"Zero Amount"},{"code":6027,"name":"ProtocolPaused","msg":"Protocol Paused"},{"code":6028,"name":"OperatorDisabled","msg":"Operator Disabled"},{"code":6029,"name":"VaultDisabled","msg":"Vault Disabled"},{"code":6030,"name":"VaultEnabled","msg":"Vault Enabled"},{"code":6031,"name":"VaultIsDry","msg":"Vault Is Dry"},{"code":6032,"name":"InvalidPegPriceUSD","msg":"Invalid Peg Price USD"},{"code":6033,"name":"NoValidOracle","msg":"No Valid Oracle"},{"code":6034,"name":"PriceConfidenceTooWide","msg":"Price Confidence Too Wide"},{"code":6035,"name":"OperatorCannotDeleteItself","msg":"Operator Cannot Delete Itself"}],"types":[{"name":"Benefactor","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"status","type":{"defined":{"name":"BenefactorStatus"}}},{"name":"_padding0","type":{"array":["u8",7]}},{"name":"mint_fee_rate","type":"u16"},{"name":"redeem_fee_rate","type":"u16"},{"name":"_padding1","type":{"array":["u8",4]}},{"name":"period_limits","type":{"array":[{"defined":{"name":"PeriodLimit"}},4]}},{"name":"total_minted","type":{"array":["u8",16]}},{"name":"total_redeemed","type":{"array":["u8",16]}},{"name":"fee_overrides","type":{"array":[{"defined":{"name":"FeeOverride"}},4]}},{"name":"reserved","type":{"array":["u8",96]}}]}},{"name":"BenefactorManagementAction","type":{"kind":"enum","variants":[{"name":"Disable"},{"name":"SetStatus","fields":[{"name":"status","type":{"defined":{"name":"BenefactorStatus"}}}]},{"name":"UpdateFeeRates","fields":[{"name":"mint_fee_rate","type":"u16"},{"name":"redeem_fee_rate","type":"u16"}]},{"name":"UpdatePeriodLimit","fields":[{"name":"index","type":"u8"},{"name":"duration_seconds","type":"u64"},{"name":"max_mint_amount","type":"u64"},{"name":"max_redeem_amount","type":"u64"}]},{"name":"ResetPeriodLimit","fields":[{"name":"index","type":"u8"}]},{"name":"UpdateFeeOverride","fields":[{"name":"index","type":"u8"},{"name":"mint","type":"pubkey"},{"name":"mint_fee_rate","type":"u16"},{"name":"redeem_fee_rate","type":"u16"}]},{"name":"DeleteFeeOverride","fields":[{"name":"index","type":"u8"}]}]}},{"name":"BenefactorStatus","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Active"},{"name":"Disabled"}]}},{"name":"Config","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"authority","type":"pubkey"},{"name":"token_program","type":"pubkey"},{"name":"period_limits","type":{"array":[{"defined":{"name":"PeriodLimit"}},4]}},{"name":"peg_price_usd","type":"u64"},{"name":"decimals","type":"u8"},{"name":"is_mint_redeem_enabled","type":"u8"},{"name":"authority_bump","type":"u8"},{"name":"config_bump","type":"u8"},{"name":"_padding","type":{"array":["u8",4]}},{"name":"reserved","type":{"array":["u8",192]}}]}},{"name":"ConfigManagementAction","type":{"kind":"enum","variants":[{"name":"Pause"},{"name":"UpdatePauseFlag","fields":[{"name":"is_mint_redeem_enabled","type":"bool"}]},{"name":"UpdatePeriodLimit","fields":[{"name":"index","type":"u8"},{"name":"duration_seconds","type":"u64"},{"name":"max_mint_amount","type":"u64"},{"name":"max_redeem_amount","type":"u64"}]},{"name":"ResetPeriodLimit","fields":[{"name":"index","type":"u8"}]},{"name":"SetPegPriceUSD","fields":[{"name":"peg_price_usd","type":"u64"}]}]}},{"name":"DovesOracle","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"reserved1","type":{"array":["u8",32]}},{"name":"reserved2","type":{"array":["u8",32]}},{"name":"reserved3","type":{"array":["u8",24]}}]}},{"name":"EmptyOracle","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"reserved","type":{"array":["u8",32]}},{"name":"reserved1","type":{"array":["u8",32]}},{"name":"reserved2","type":{"array":["u8",32]}},{"name":"reserved3","type":{"array":["u8",24]}}]}},{"name":"FeeOverride","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"mint_fee_rate","type":"u16"},{"name":"redeem_fee_rate","type":"u16"},{"name":"_padding","type":{"array":["u8",4]}}]}},{"name":"MintV0Event","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"net_amount","type":"u64"},{"name":"oracle_price","type":"u64"},{"name":"one_to_one_amount","type":"u64"},{"name":"oracle_amount","type":"u64"},{"name":"mint_amount","type":"u64"}]}},{"name":"MintV1Event","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"net_amount","type":"u64"},{"name":"oracle_price","type":"u64"},{"name":"one_to_one_amount","type":"u64"},{"name":"oracle_amount","type":"u64"},{"name":"mint_amount","type":"u64"},{"name":"collateral","type":"pubkey"},{"name":"benefactor","type":"pubkey"}]}},{"name":"Operator","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"operator_authority","type":"pubkey"},{"name":"role","type":"u64"},{"name":"status","type":{"defined":{"name":"OperatorStatus"}}},{"name":"_padding0","type":{"array":["u8",7]}},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"OperatorManagementAction","type":{"kind":"enum","variants":[{"name":"SetStatus","fields":[{"name":"status","type":{"defined":{"name":"OperatorStatus"}}}]},{"name":"SetRole","fields":[{"name":"role","type":{"defined":{"name":"OperatorRole"}}}]},{"name":"ClearRole","fields":[{"name":"role","type":{"defined":{"name":"OperatorRole"}}}]}]}},{"name":"OperatorRole","type":{"kind":"enum","variants":[{"name":"Admin"},{"name":"PeriodManager"},{"name":"GlobalDisabler"},{"name":"VaultManager"},{"name":"VaultDisabler"},{"name":"BenefactorManager"},{"name":"BenefactorDisabler"},{"name":"PegManager"},{"name":"CollateralManager"}]}},{"name":"OperatorStatus","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Enabled"},{"name":"Disabled"}]}},{"name":"OracleConfig","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Pyth","fields":[{"array":["u8",32]},"pubkey"]},{"name":"SwitchboardOnDemand","fields":["pubkey"]},{"name":"Doves","fields":["pubkey"]}]}},{"name":"OracleType","repr":{"kind":"c"},"type":{"kind":"enum","variants":[{"name":"Empty","fields":[{"defined":{"name":"EmptyOracle"}}]},{"name":"Pyth","fields":[{"defined":{"name":"PythV2Oracle"}}]},{"name":"Doves","fields":[{"defined":{"name":"DovesOracle"}}]},{"name":"SwitchboardOnDemand","fields":[{"defined":{"name":"SwitchboardOnDemandOracle"}}]}]}},{"name":"PeriodLimit","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"duration_seconds","docs":["Window duration in seconds (0 = disabled)"],"type":"u64"},{"name":"max_mint_amount","docs":["Maximum mint amount in this window"],"type":"u64"},{"name":"max_redeem_amount","docs":["Maximum redeem amount in this window"],"type":"u64"},{"name":"minted_amount","docs":["Amount minted in current window"],"type":"u64"},{"name":"redeemed_amount","docs":["Amount redeemed in current window"],"type":"u64"},{"name":"window_start","docs":["Window start timestamp"],"type":"i64"}]}},{"name":"PythV2Oracle","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"feed_id","type":{"array":["u8",32]}},{"name":"account","type":"pubkey"},{"name":"reserved1","type":{"array":["u8",32]}},{"name":"reserved2","type":{"array":["u8",24]}}]}},{"name":"RedeemV0Event","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"net_amount","type":"u64"},{"name":"oracle_price","type":"u64"},{"name":"one_to_one_amount","type":"u64"},{"name":"oracle_amount","type":"u64"},{"name":"redeem_amount","type":"u64"}]}},{"name":"RedeemV1Event","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"net_amount","type":"u64"},{"name":"oracle_price","type":"u64"},{"name":"one_to_one_amount","type":"u64"},{"name":"oracle_amount","type":"u64"},{"name":"redeem_amount","type":"u64"},{"name":"collateral","type":"pubkey"},{"name":"benefactor","type":"pubkey"}]}},{"name":"SwitchboardOnDemandOracle","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"reserved","type":{"array":["u8",32]}},{"name":"reserved1","type":{"array":["u8",32]}},{"name":"reserved2","type":{"array":["u8",24]}}]}},{"name":"Vault","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"custodian","type":"pubkey"},{"name":"token_account","type":"pubkey"},{"name":"token_program","type":"pubkey"},{"name":"stalesness_threshold","type":"u64"},{"name":"min_oracle_price_usd","type":"u64"},{"name":"max_oracle_price_usd","type":"u64"},{"name":"status","type":{"defined":{"name":"VaultStatus"}}},{"name":"_padding1","type":{"array":["u8",7]}},{"name":"bump","type":"u8"},{"name":"decimals","type":"u8"},{"name":"_padding2","type":{"array":["u8",6]}},{"name":"oracles","type":{"array":[{"defined":{"name":"OracleType"}},5]}},{"name":"_padding3","type":{"array":["u8",3]}},{"name":"period_limits","type":{"array":[{"defined":{"name":"PeriodLimit"}},4]}},{"name":"reserved1","type":{"array":["u8",32]}},{"name":"total_minted","type":{"array":["u8",16]}},{"name":"total_redeemed","type":{"array":["u8",16]}},{"name":"reserved","type":{"array":["u8",256]}}]}},{"name":"VaultManagementAction","type":{"kind":"enum","variants":[{"name":"Disable"},{"name":"SetStatus","fields":[{"name":"status","type":{"defined":{"name":"VaultStatus"}}}]},{"name":"UpdateOracle","fields":[{"name":"index","type":"u8"},{"name":"oracle","type":{"defined":{"name":"OracleConfig"}}}]},{"name":"UpdatePeriodLimit","fields":[{"name":"index","type":"u8"},{"name":"duration_seconds","type":"u64"},{"name":"max_mint_amount","type":"u64"},{"name":"max_redeem_amount","type":"u64"}]},{"name":"ResetPeriodLimit","fields":[{"name":"index","type":"u8"}]},{"name":"SetCustodian","fields":[{"name":"new_custodian","type":"pubkey"}]},{"name":"SetStalesnessThreshold","fields":[{"name":"stalesness_threshold","type":"u64"}]},{"name":"SetMinOraclePrice","fields":[{"name":"min_oracle_price_usd","type":"u64"}]},{"name":"SetMaxOraclePrice","fields":[{"name":"max_oracle_price_usd","type":"u64"}]}]}},{"name":"VaultStatus","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Enabled"},{"name":"Disabled"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/jupiter_v4.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.json b/olddocs/archivekbot2/idls/jupiter_v4.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.json new file mode 100644 index 0000000..cd8a53a --- /dev/null +++ b/olddocs/archivekbot2/idls/jupiter_v4.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"jupiter","instructions":[{"name":"route","accounts":[{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"destinationTokenAccount","isMut":false,"isSigner":false}],"args":[{"name":"swapLeg","type":{"defined":"SwapLeg"}},{"name":"inAmount","type":"u64"},{"name":"quotedOutAmount","type":"u64"},{"name":"slippageBps","type":"u16"},{"name":"platformFeeBps","type":"u8"}]},{"name":"whirlpoolSwapExactOutput","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenAuthority","isMut":false,"isSigner":true},{"name":"whirlpool","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountA","isMut":true,"isSigner":false},{"name":"tokenVaultA","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountB","isMut":true,"isSigner":false},{"name":"tokenVaultB","isMut":true,"isSigner":false},{"name":"tickArray0","isMut":true,"isSigner":false},{"name":"tickArray1","isMut":true,"isSigner":false},{"name":"tickArray2","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false,"docs":["Oracle is currently unused and will be enabled on subsequent updates"]}],"args":[{"name":"outAmount","type":"u64"},{"name":"inAmountWithSlippage","type":{"defined":"AmountWithSlippage"}},{"name":"aToB","type":"bool"},{"name":"platformFeeBps","type":"u8"}]},{"name":"raydiumSwapExactOutput","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"ammId","isMut":true,"isSigner":false},{"name":"ammAuthority","isMut":false,"isSigner":false},{"name":"ammOpenOrders","isMut":true,"isSigner":false},{"name":"poolCoinTokenAccount","isMut":true,"isSigner":false},{"name":"poolPcTokenAccount","isMut":true,"isSigner":false},{"name":"serumProgramId","isMut":false,"isSigner":false},{"name":"serumMarket","isMut":true,"isSigner":false},{"name":"serumBids","isMut":true,"isSigner":false},{"name":"serumAsks","isMut":true,"isSigner":false},{"name":"serumEventQueue","isMut":true,"isSigner":false},{"name":"serumCoinVaultAccount","isMut":true,"isSigner":false},{"name":"serumPcVaultAccount","isMut":true,"isSigner":false},{"name":"serumVaultSigner","isMut":false,"isSigner":false},{"name":"userSourceTokenAccount","isMut":true,"isSigner":false},{"name":"userDestinationTokenAccount","isMut":true,"isSigner":false},{"name":"userSourceOwner","isMut":false,"isSigner":true}],"args":[{"name":"outAmount","type":"u64"},{"name":"inAmountWithSlippage","type":{"defined":"AmountWithSlippage"}},{"name":"platformFeeBps","type":"u8"}]},{"name":"raydiumClmmSwapExactOutput","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"ammConfig","isMut":false,"isSigner":false},{"name":"poolState","isMut":true,"isSigner":false},{"name":"inputTokenAccount","isMut":true,"isSigner":false},{"name":"outputTokenAccount","isMut":true,"isSigner":false},{"name":"inputVault","isMut":true,"isSigner":false},{"name":"outputVault","isMut":true,"isSigner":false},{"name":"observationState","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tickArray","isMut":true,"isSigner":false}],"args":[{"name":"outAmount","type":"u64"},{"name":"inAmountWithSlippage","type":{"defined":"AmountWithSlippage"}},{"name":"platformFeeBps","type":"u8"}]},{"name":"createOpenOrders","accounts":[{"name":"openOrders","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"market","isMut":false,"isSigner":false}],"args":[]},{"name":"createOpenOrderV2","accounts":[{"name":"openOrders","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"market","isMut":false,"isSigner":false}],"args":[]},{"name":"mercurialSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"swapState","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"poolAuthority","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"sourceTokenAccount","isMut":true,"isSigner":false},{"name":"destinationTokenAccount","isMut":true,"isSigner":false}],"args":[]},{"name":"cykuraSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"signer","isMut":false,"isSigner":true},{"name":"factoryState","isMut":false,"isSigner":false},{"name":"poolState","isMut":true,"isSigner":false},{"name":"inputTokenAccount","isMut":true,"isSigner":false},{"name":"outputTokenAccount","isMut":true,"isSigner":false},{"name":"inputVault","isMut":true,"isSigner":false},{"name":"outputVault","isMut":true,"isSigner":false},{"name":"lastObservationState","isMut":true,"isSigner":false},{"name":"coreProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"serumSwap","accounts":[{"name":"market","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"vaultSigner","isMut":false,"isSigner":false}]},{"name":"authority","isMut":false,"isSigner":true},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"saberSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"swap","isMut":false,"isSigner":false},{"name":"swapAuthority","isMut":false,"isSigner":false},{"name":"userAuthority","isMut":false,"isSigner":false},{"name":"inputUserAccount","isMut":true,"isSigner":false},{"name":"inputTokenAccount","isMut":true,"isSigner":false},{"name":"outputUserAccount","isMut":true,"isSigner":false},{"name":"outputTokenAccount","isMut":true,"isSigner":false},{"name":"feesTokenAccount","isMut":true,"isSigner":false}],"args":[]},{"name":"saberAddDecimals","accounts":[{"name":"addDecimalsProgram","isMut":false,"isSigner":false},{"name":"wrapper","isMut":false,"isSigner":false},{"name":"wrapperMint","isMut":true,"isSigner":false},{"name":"wrapperUnderlyingTokens","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"userUnderlyingTokens","isMut":true,"isSigner":false},{"name":"userWrappedTokens","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"tokenSwap","accounts":[{"name":"tokenSwapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"swap","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"source","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"destination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"poolFee","isMut":true,"isSigner":false}],"args":[]},{"name":"senchaSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"swap","isMut":true,"isSigner":false},{"name":"userAuthority","isMut":false,"isSigner":false},{"name":"inputUserAccount","isMut":true,"isSigner":false},{"name":"inputTokenAccount","isMut":true,"isSigner":false},{"name":"inputFeesAccount","isMut":true,"isSigner":false},{"name":"outputUserAccount","isMut":true,"isSigner":false},{"name":"outputTokenAccount","isMut":true,"isSigner":false},{"name":"outputFeesAccount","isMut":true,"isSigner":false}],"args":[]},{"name":"stepSwap","accounts":[{"name":"tokenSwapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"swap","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"source","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"destination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"poolFee","isMut":true,"isSigner":false}],"args":[]},{"name":"cropperSwap","accounts":[{"name":"tokenSwapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"swap","isMut":false,"isSigner":false},{"name":"swapState","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"source","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"destination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"poolFee","isMut":true,"isSigner":false}],"args":[]},{"name":"raydiumSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"ammId","isMut":true,"isSigner":false},{"name":"ammAuthority","isMut":false,"isSigner":false},{"name":"ammOpenOrders","isMut":true,"isSigner":false},{"name":"poolCoinTokenAccount","isMut":true,"isSigner":false},{"name":"poolPcTokenAccount","isMut":true,"isSigner":false},{"name":"serumProgramId","isMut":false,"isSigner":false},{"name":"serumMarket","isMut":true,"isSigner":false},{"name":"serumBids","isMut":true,"isSigner":false},{"name":"serumAsks","isMut":true,"isSigner":false},{"name":"serumEventQueue","isMut":true,"isSigner":false},{"name":"serumCoinVaultAccount","isMut":true,"isSigner":false},{"name":"serumPcVaultAccount","isMut":true,"isSigner":false},{"name":"serumVaultSigner","isMut":false,"isSigner":false},{"name":"userSourceTokenAccount","isMut":true,"isSigner":false},{"name":"userDestinationTokenAccount","isMut":true,"isSigner":false},{"name":"userSourceOwner","isMut":false,"isSigner":true}],"args":[]},{"name":"cremaSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"clmmConfig","isMut":false,"isSigner":false},{"name":"clmmpool","isMut":true,"isSigner":false},{"name":"tokenA","isMut":false,"isSigner":false},{"name":"tokenB","isMut":false,"isSigner":false},{"name":"accountA","isMut":true,"isSigner":false},{"name":"accountB","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tickArrayMap","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"partner","isMut":false,"isSigner":false},{"name":"partnerAtaA","isMut":true,"isSigner":false},{"name":"partnerAtaB","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"lifinitySwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"amm","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"sourceInfo","isMut":true,"isSigner":false},{"name":"destinationInfo","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"feeAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"pythAccount","isMut":false,"isSigner":false},{"name":"pythPcAccount","isMut":false,"isSigner":false},{"name":"configAccount","isMut":true,"isSigner":false}],"args":[]},{"name":"marinadeDeposit","accounts":[{"name":"marinadeFinanceProgram","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":true,"isSigner":false},{"name":"liqPoolMsolLegAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"transferFrom","isMut":true,"isSigner":false},{"name":"mintTo","isMut":true,"isSigner":false},{"name":"msolMintAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"userWsolTokenAccount","isMut":true,"isSigner":false},{"name":"tempWsolTokenAccount","isMut":true,"isSigner":false},{"name":"userTransferAuthority","isMut":true,"isSigner":true},{"name":"wsolMint","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"marinadeUnstake","accounts":[{"name":"marinadeFinanceProgram","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":true,"isSigner":false},{"name":"treasuryMsolAccount","isMut":true,"isSigner":false},{"name":"getMsolFrom","isMut":true,"isSigner":false},{"name":"getMsolFromAuthority","isMut":false,"isSigner":true},{"name":"transferSolTo","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"userWsolTokenAccount","isMut":true,"isSigner":false}],"args":[]},{"name":"aldrinSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"poolSigner","isMut":false,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"baseTokenVault","isMut":true,"isSigner":false},{"name":"quoteTokenVault","isMut":true,"isSigner":false},{"name":"feePoolTokenAccount","isMut":true,"isSigner":false},{"name":"walletAuthority","isMut":false,"isSigner":true},{"name":"userBaseTokenAccount","isMut":true,"isSigner":false},{"name":"userQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"aldrinV2Swap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"poolSigner","isMut":false,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"baseTokenVault","isMut":true,"isSigner":false},{"name":"quoteTokenVault","isMut":true,"isSigner":false},{"name":"feePoolTokenAccount","isMut":true,"isSigner":false},{"name":"walletAuthority","isMut":false,"isSigner":true},{"name":"userBaseTokenAccount","isMut":true,"isSigner":false},{"name":"userQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"curve","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"whirlpoolSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenAuthority","isMut":false,"isSigner":true},{"name":"whirlpool","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountA","isMut":true,"isSigner":false},{"name":"tokenVaultA","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountB","isMut":true,"isSigner":false},{"name":"tokenVaultB","isMut":true,"isSigner":false},{"name":"tickArray0","isMut":true,"isSigner":false},{"name":"tickArray1","isMut":true,"isSigner":false},{"name":"tickArray2","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false,"docs":["Oracle is currently unused and will be enabled on subsequent updates"]}],"args":[]},{"name":"invariantSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"tickmap","isMut":true,"isSigner":false},{"name":"accountX","isMut":true,"isSigner":false},{"name":"accountY","isMut":true,"isSigner":false},{"name":"reserveX","isMut":true,"isSigner":false},{"name":"reserveY","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"meteoraSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"userSourceToken","isMut":true,"isSigner":false},{"name":"userDestinationToken","isMut":true,"isSigner":false},{"name":"aVault","isMut":true,"isSigner":false},{"name":"bVault","isMut":true,"isSigner":false},{"name":"aTokenVault","isMut":true,"isSigner":false},{"name":"bTokenVault","isMut":true,"isSigner":false},{"name":"aVaultLpMint","isMut":true,"isSigner":false},{"name":"bVaultLpMint","isMut":true,"isSigner":false},{"name":"aVaultLp","isMut":true,"isSigner":false},{"name":"bVaultLp","isMut":true,"isSigner":false},{"name":"adminTokenFee","isMut":true,"isSigner":false},{"name":"user","isMut":false,"isSigner":true},{"name":"vaultProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"goosefxSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"controller","isMut":false,"isSigner":false},{"name":"pair","isMut":true,"isSigner":false},{"name":"sslIn","isMut":true,"isSigner":false},{"name":"sslOut","isMut":true,"isSigner":false},{"name":"liabilityVaultIn","isMut":true,"isSigner":false},{"name":"swappedLiabilityVaultIn","isMut":true,"isSigner":false},{"name":"liabilityVaultOut","isMut":true,"isSigner":false},{"name":"swappedLiabilityVaultOut","isMut":true,"isSigner":false},{"name":"userInAta","isMut":true,"isSigner":false},{"name":"userOutAta","isMut":true,"isSigner":false},{"name":"feeCollectorAta","isMut":true,"isSigner":false},{"name":"userWallet","isMut":false,"isSigner":true},{"name":"feeCollector","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"deltafiSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"marketConfig","isMut":false,"isSigner":false},{"name":"swapInfo","isMut":true,"isSigner":false},{"name":"userSourceToken","isMut":true,"isSigner":false},{"name":"userDestinationToken","isMut":true,"isSigner":false},{"name":"swapSourceToken","isMut":true,"isSigner":false},{"name":"swapDestinationToken","isMut":true,"isSigner":false},{"name":"deltafiUser","isMut":true,"isSigner":false},{"name":"adminDestinationToken","isMut":true,"isSigner":false},{"name":"pythPriceBase","isMut":false,"isSigner":false},{"name":"pythPriceQuote","isMut":false,"isSigner":false},{"name":"userAuthority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"balansolSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"pool","isMut":true,"isSigner":false},{"name":"taxMan","isMut":true,"isSigner":false},{"name":"bidMint","isMut":false,"isSigner":false},{"name":"treasurer","isMut":false,"isSigner":false},{"name":"srcTreasury","isMut":true,"isSigner":false},{"name":"srcAssociatedTokenAccount","isMut":true,"isSigner":false},{"name":"askMint","isMut":false,"isSigner":false},{"name":"dstTreasury","isMut":true,"isSigner":false},{"name":"dstAssociatedTokenAccount","isMut":true,"isSigner":false},{"name":"dstTokenAccountTaxman","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"marcoPoloSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"swapperXAccount","isMut":true,"isSigner":false},{"name":"swapperYAccount","isMut":true,"isSigner":false},{"name":"swapper","isMut":true,"isSigner":true},{"name":"referrerXAccount","isMut":true,"isSigner":false},{"name":"referrerYAccount","isMut":true,"isSigner":false},{"name":"referrer","isMut":true,"isSigner":false},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"dradexSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"pair","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"dexUser","isMut":false,"isSigner":false},{"name":"marketUser","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"t0Vault","isMut":true,"isSigner":false},{"name":"t1Vault","isMut":true,"isSigner":false},{"name":"t0User","isMut":true,"isSigner":false},{"name":"t1User","isMut":true,"isSigner":false},{"name":"master","isMut":false,"isSigner":false},{"name":"signer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"logger","isMut":false,"isSigner":false}],"args":[]},{"name":"lifinityV2Swap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"amm","isMut":true,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"sourceInfo","isMut":true,"isSigner":false},{"name":"destinationInfo","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"feeAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"oracleMainAccount","isMut":false,"isSigner":false},{"name":"oracleSubAccount","isMut":false,"isSigner":false},{"name":"oraclePcAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"raydiumClmmSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"ammConfig","isMut":false,"isSigner":false},{"name":"poolState","isMut":true,"isSigner":false},{"name":"inputTokenAccount","isMut":true,"isSigner":false},{"name":"outputTokenAccount","isMut":true,"isSigner":false},{"name":"inputVault","isMut":true,"isSigner":false},{"name":"outputVault","isMut":true,"isSigner":false},{"name":"observationState","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tickArray","isMut":true,"isSigner":false}],"args":[]},{"name":"phoenixSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"logAuthority","isMut":false,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"trader","isMut":false,"isSigner":true},{"name":"baseAccount","isMut":true,"isSigner":false},{"name":"quoteAccount","isMut":true,"isSigner":false},{"name":"baseVault","isMut":true,"isSigner":false},{"name":"quoteVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"claimBonk","accounts":[{"name":"openOrders","isMut":false,"isSigner":false},{"name":"bonkMint","isMut":false,"isSigner":false},{"name":"openOrdersBonkTokenAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"openOrdersOwner","isMut":true,"isSigner":false},{"name":"claimerTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]}],"types":[{"name":"AmountWithSlippage","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"slippageBps","type":"u16"}]}},{"name":"SplitLegDeeper","type":{"kind":"struct","fields":[{"name":"percent","type":"u8"},{"name":"swapLeg","type":{"defined":"SwapLegSwap"}}]}},{"name":"SplitLeg","type":{"kind":"struct","fields":[{"name":"percent","type":"u8"},{"name":"swapLeg","type":{"defined":"SwapLegDeeper"}}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Bid"},{"name":"Ask"}]}},{"name":"SwapLegSwap","type":{"kind":"enum","variants":[{"name":"PlaceholderOne"},{"name":"PlaceholderTwo"},{"name":"Swap","fields":[{"name":"swap","type":{"defined":"Swap"}}]}]}},{"name":"SwapLegDeeper","type":{"kind":"enum","variants":[{"name":"Chain","fields":[{"name":"swap_legs","type":{"vec":{"defined":"SwapLegSwap"}}}]},{"name":"Split","fields":[{"name":"split_legs","type":{"vec":{"defined":"SplitLegDeeper"}}}]},{"name":"Swap","fields":[{"name":"swap","type":{"defined":"Swap"}}]}]}},{"name":"SwapLeg","type":{"kind":"enum","variants":[{"name":"Chain","fields":[{"name":"swap_legs","type":{"vec":{"defined":"SwapLegDeeper"}}}]},{"name":"Split","fields":[{"name":"split_legs","type":{"vec":{"defined":"SplitLeg"}}}]},{"name":"Swap","fields":[{"name":"swap","type":{"defined":"Swap"}}]}]}},{"name":"Swap","type":{"kind":"enum","variants":[{"name":"Saber"},{"name":"SaberAddDecimalsDeposit"},{"name":"SaberAddDecimalsWithdraw"},{"name":"TokenSwap"},{"name":"Sencha"},{"name":"Step"},{"name":"Cropper"},{"name":"Raydium"},{"name":"Crema","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"Lifinity"},{"name":"Mercurial"},{"name":"Cykura"},{"name":"Serum","fields":[{"name":"side","type":{"defined":"Side"}}]},{"name":"MarinadeDeposit"},{"name":"MarinadeUnstake"},{"name":"Aldrin","fields":[{"name":"side","type":{"defined":"Side"}}]},{"name":"AldrinV2","fields":[{"name":"side","type":{"defined":"Side"}}]},{"name":"Whirlpool","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"Invariant","fields":[{"name":"x_to_y","type":"bool"}]},{"name":"Meteora"},{"name":"GooseFX"},{"name":"DeltaFi","fields":[{"name":"stable","type":"bool"}]},{"name":"Balansol"},{"name":"MarcoPolo","fields":[{"name":"x_to_y","type":"bool"}]},{"name":"Dradex","fields":[{"name":"side","type":{"defined":"Side"}}]},{"name":"LifinityV2"},{"name":"RaydiumClmm"},{"name":"Openbook","fields":[{"name":"side","type":{"defined":"Side"}}]},{"name":"Phoenix","fields":[{"name":"side","type":{"defined":"Side"}}]}]}}],"events":[{"name":"Swap","fields":[{"name":"amm","type":"publicKey","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"inputAmount","type":"u64","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"outputAmount","type":"u64","index":false}]},{"name":"Fee","fields":[{"name":"account","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"EmptyRoute","msg":"Empty route"},{"code":6001,"name":"SlippageToleranceExceeded","msg":"Slippage tolerance exceeded"},{"code":6002,"name":"InvalidCalculation","msg":"Invalid calculation"},{"code":6003,"name":"MissingPlatformFeeAccount","msg":"Missing platform fee account"},{"code":6004,"name":"InvalidSlippage","msg":"Invalid slippage"},{"code":6005,"name":"NotEnoughPercent","msg":"Not enough percent to 100"},{"code":6006,"name":"InAmountsStackIsEmpty","msg":"In amounts stack is empty"},{"code":6007,"name":"OutAmountsStackIsEmpty","msg":"Out amounts stack is empty"},{"code":6008,"name":"NotEnoughAccountKeys","msg":"Not Enough Account keys"},{"code":6009,"name":"NonZeroMinimumOutAmountNotSupported","msg":"Non zero minimum out amount not supported"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/jupiter_v6.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.json b/olddocs/archivekbot2/idls/jupiter_v6.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.json new file mode 100644 index 0000000..f385542 --- /dev/null +++ b/olddocs/archivekbot2/idls/jupiter_v6.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.json @@ -0,0 +1 @@ +{"address":"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4","metadata":{"name":"jupiter","version":"0.1.0","spec":"0.1.0","description":"Jupiter aggregator program"},"instructions":[{"name":"claim","discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"wallet","writable":true,"address":"7JQeyNK55fkUPUmEotupBFpiBGpgEQYLe8Ht1VdSfxcP"},{"name":"program_authority","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"id","type":"u8"}],"returns":"u64"},{"name":"claim_token","discriminator":[116,206,27,191,166,19,0,73],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"wallet","address":"7JQeyNK55fkUPUmEotupBFpiBGpgEQYLe8Ht1VdSfxcP"},{"name":"program_authority"},{"name":"program_token_account","writable":true},{"name":"destination_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"wallet"},{"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":"mint"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"id","type":"u8"}],"returns":"u64"},{"name":"close_token","discriminator":[26,74,236,151,104,64,183,249],"accounts":[{"name":"operator","signer":true,"address":"9RAufBfjGQjDfrwxeyKmZWPADHSb8HcoqCdrmpqvCr1g"},{"name":"wallet","writable":true,"address":"7JQeyNK55fkUPUmEotupBFpiBGpgEQYLe8Ht1VdSfxcP"},{"name":"program_authority"},{"name":"program_token_account","writable":true},{"name":"mint","writable":true},{"name":"token_program"}],"args":[{"name":"id","type":"u8"},{"name":"burn_all","type":"bool"}]},{"name":"create_token_ledger","discriminator":[232,242,197,253,240,143,129,52],"accounts":[{"name":"token_ledger","writable":true,"signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_token_account","discriminator":[147,241,123,100,244,132,174,118],"accounts":[{"name":"token_account","writable":true},{"name":"user","writable":true,"signer":true},{"name":"mint"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bump","type":"u8"}]},{"name":"close_wsol_token_account","discriminator":[203,129,103,133,197,125,107,86],"accounts":[{"name":"token_account","writable":true},{"name":"user","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"exact_out_route","discriminator":[208,51,239,151,123,43,237,92],"accounts":[{"name":"token_program"},{"name":"user_transfer_authority","signer":true},{"name":"user_source_token_account","writable":true},{"name":"user_destination_token_account","writable":true},{"name":"destination_token_account","writable":true,"optional":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"token_2022_program","optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"out_amount","type":"u64"},{"name":"quoted_in_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"route","discriminator":[229,23,203,151,122,227,173,42],"accounts":[{"name":"token_program"},{"name":"user_transfer_authority","signer":true},{"name":"user_source_token_account","writable":true},{"name":"user_destination_token_account","writable":true},{"name":"destination_token_account","writable":true,"optional":true},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"in_amount","type":"u64"},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"route_with_token_ledger","discriminator":[150,86,71,116,167,93,14,104],"accounts":[{"name":"token_program"},{"name":"user_transfer_authority","signer":true},{"name":"user_source_token_account","writable":true},{"name":"user_destination_token_account","writable":true},{"name":"destination_token_account","writable":true,"optional":true},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"token_ledger"},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"set_token_ledger","discriminator":[228,85,185,112,78,79,77,2],"accounts":[{"name":"token_ledger","writable":true},{"name":"token_account"}],"args":[]},{"name":"shared_accounts_exact_out_route","discriminator":[176,209,105,168,154,125,69,62],"accounts":[{"name":"token_program"},{"name":"program_authority"},{"name":"user_transfer_authority","signer":true},{"name":"source_token_account","writable":true},{"name":"program_source_token_account","writable":true},{"name":"program_destination_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"token_2022_program","optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"id","type":"u8"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"out_amount","type":"u64"},{"name":"quoted_in_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"shared_accounts_route","discriminator":[193,32,155,51,65,214,156,129],"accounts":[{"name":"token_program"},{"name":"program_authority"},{"name":"user_transfer_authority","signer":true},{"name":"source_token_account","writable":true},{"name":"program_source_token_account","writable":true},{"name":"program_destination_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"token_2022_program","optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"id","type":"u8"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"in_amount","type":"u64"},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"shared_accounts_route_with_token_ledger","discriminator":[230,121,143,80,119,159,106,170],"accounts":[{"name":"token_program"},{"name":"program_authority"},{"name":"user_transfer_authority","signer":true},{"name":"source_token_account","writable":true},{"name":"program_source_token_account","writable":true},{"name":"program_destination_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"token_2022_program","optional":true},{"name":"token_ledger"},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"id","type":"u8"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"exact_out_route_v2","discriminator":[157,138,184,82,21,244,243,36],"accounts":[{"name":"user_transfer_authority","signer":true},{"name":"user_source_token_account","writable":true},{"name":"user_destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"source_token_program"},{"name":"destination_token_program"},{"name":"destination_token_account","writable":true,"optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"out_amount","type":"u64"},{"name":"quoted_in_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u16"},{"name":"positive_slippage_bps","type":"u16"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStepV2"}}}}],"returns":"u64"},{"name":"route_v2","discriminator":[187,100,250,204,49,196,175,20],"accounts":[{"name":"user_transfer_authority","signer":true},{"name":"user_source_token_account","writable":true},{"name":"user_destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"source_token_program"},{"name":"destination_token_program"},{"name":"destination_token_account","writable":true,"optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"in_amount","type":"u64"},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u16"},{"name":"positive_slippage_bps","type":"u16"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStepV2"}}}}],"returns":"u64"},{"name":"shared_accounts_exact_out_route_v2","discriminator":[53,96,229,202,216,187,250,24],"accounts":[{"name":"program_authority"},{"name":"user_transfer_authority","signer":true},{"name":"source_token_account","writable":true},{"name":"program_source_token_account","writable":true},{"name":"program_destination_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"source_token_program"},{"name":"destination_token_program"},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"id","type":"u8"},{"name":"out_amount","type":"u64"},{"name":"quoted_in_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u16"},{"name":"positive_slippage_bps","type":"u16"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStepV2"}}}}],"returns":"u64"},{"name":"shared_accounts_route_v2","discriminator":[209,152,83,147,124,254,216,233],"accounts":[{"name":"program_authority"},{"name":"user_transfer_authority","signer":true},{"name":"source_token_account","writable":true},{"name":"program_source_token_account","writable":true},{"name":"program_destination_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"source_token_program"},{"name":"destination_token_program"},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"id","type":"u8"},{"name":"in_amount","type":"u64"},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u16"},{"name":"positive_slippage_bps","type":"u16"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStepV2"}}}}],"returns":"u64"}],"accounts":[{"name":"TokenLedger","discriminator":[156,247,9,188,54,108,85,77]}],"events":[{"name":"FeeEvent","discriminator":[73,79,78,127,184,213,13,220]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"SwapsEvent","discriminator":[152,47,78,235,192,96,110,106]},{"name":"CandidateSwapResults","discriminator":[45,9,244,30,229,52,168,123]},{"name":"CandidateSwapQuoteError","discriminator":[248,134,37,55,145,177,114,79]},{"name":"BestSwapOutAmountViolation","discriminator":[124,66,196,51,218,173,46,93]}],"errors":[{"code":6000,"name":"EmptyRoute","msg":"Empty route"},{"code":6001,"name":"SlippageToleranceExceeded","msg":"Slippage tolerance exceeded"},{"code":6002,"name":"InvalidCalculation","msg":"Invalid calculation"},{"code":6003,"name":"MissingPlatformFeeAccount","msg":"Missing platform fee account"},{"code":6004,"name":"InvalidSlippage","msg":"Invalid slippage"},{"code":6005,"name":"NotEnoughPercent","msg":"Not enough percent to 100"},{"code":6006,"name":"InvalidInputIndex","msg":"Token input index is invalid"},{"code":6007,"name":"InvalidOutputIndex","msg":"Token output index is invalid"},{"code":6008,"name":"NotEnoughAccountKeys","msg":"Not Enough Account keys"},{"code":6009,"name":"NonZeroMinimumOutAmountNotSupported","msg":"Non zero minimum out amount not supported"},{"code":6010,"name":"InvalidRoutePlan","msg":"Invalid route plan"},{"code":6011,"name":"InvalidReferralAuthority","msg":"Invalid referral authority"},{"code":6012,"name":"LedgerTokenAccountDoesNotMatch","msg":"Token account doesn't match the ledger"},{"code":6013,"name":"InvalidTokenLedger","msg":"Invalid token ledger"},{"code":6014,"name":"IncorrectTokenProgramID","msg":"Token program ID is invalid"},{"code":6015,"name":"TokenProgramNotProvided","msg":"Token program not provided"},{"code":6016,"name":"SwapNotSupported","msg":"Swap not supported"},{"code":6017,"name":"ExactOutAmountNotMatched","msg":"Exact out amount doesn't match"},{"code":6018,"name":"SourceAndDestinationMintCannotBeTheSame","msg":"Source mint and destination mint cannot the same"},{"code":6019,"name":"InvalidMint","msg":"Invalid mint"},{"code":6020,"name":"InvalidProgramAuthority","msg":"Invalid program authority"},{"code":6021,"name":"InvalidOutputTokenAccount","msg":"Invalid output token account"},{"code":6022,"name":"InvalidFeeWallet","msg":"Invalid fee wallet"},{"code":6023,"name":"InvalidAuthority","msg":"Invalid authority"},{"code":6024,"name":"InsufficientFunds","msg":"Insufficient funds"},{"code":6025,"name":"InvalidTokenAccount","msg":"Invalid token account"},{"code":6026,"name":"BondingCurveAlreadyCompleted","msg":"Bonding curve already completed"}],"types":[{"name":"FeeEvent","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"RemainingAccountsInfo","type":{"kind":"struct","fields":[{"name":"slices","type":{"vec":{"defined":{"name":"RemainingAccountsSlice"}}}}]}},{"name":"RemainingAccountsSlice","type":{"kind":"struct","fields":[{"name":"accounts_type","type":"u8"},{"name":"length","type":"u8"}]}},{"name":"AccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookA"},{"name":"TransferHookB"},{"name":"TransferHookReward"},{"name":"TransferHookInput"},{"name":"TransferHookIntermediate"},{"name":"TransferHookOutput"},{"name":"SupplementalTickArrays"},{"name":"SupplementalTickArraysOne"},{"name":"SupplementalTickArraysTwo"}]}},{"name":"DefiTunaAccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookA"},{"name":"TransferHookB"},{"name":"TransferHookInput"},{"name":"TransferHookIntermediate"},{"name":"TransferHookOutput"},{"name":"SupplementalTickArrays"},{"name":"SupplementalTickArraysOne"},{"name":"SupplementalTickArraysTwo"}]}},{"name":"RoutePlanStep","type":{"kind":"struct","fields":[{"name":"swap","type":{"defined":{"name":"Swap"}}},{"name":"percent","type":"u8"},{"name":"input_index","type":"u8"},{"name":"output_index","type":"u8"}]}},{"name":"RoutePlanStepV2","type":{"kind":"struct","fields":[{"name":"swap","type":{"defined":{"name":"Swap"}}},{"name":"bps","type":"u16"},{"name":"input_index","type":"u8"},{"name":"output_index","type":"u8"}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Bid"},{"name":"Ask"}]}},{"name":"BisonFiPredictSide","type":{"kind":"enum","variants":[{"name":"Yes"},{"name":"No"}]}},{"name":"Swap","type":{"kind":"enum","variants":[{"name":"Saber"},{"name":"SaberAddDecimalsDeposit"},{"name":"SaberAddDecimalsWithdraw"},{"name":"TokenSwap"},{"name":"Sencha"},{"name":"Step"},{"name":"Cropper"},{"name":"Raydium"},{"name":"Crema","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"Lifinity"},{"name":"Mercurial"},{"name":"Cykura"},{"name":"Serum","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"MarinadeDeposit"},{"name":"MarinadeUnstake"},{"name":"Aldrin","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"AldrinV2","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"Whirlpool","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"Invariant","fields":[{"name":"x_to_y","type":"bool"}]},{"name":"Meteora"},{"name":"GooseFX"},{"name":"DeltaFi","fields":[{"name":"stable","type":"bool"}]},{"name":"Balansol"},{"name":"MarcoPolo","fields":[{"name":"x_to_y","type":"bool"}]},{"name":"Dradex","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"LifinityV2"},{"name":"RaydiumClmm"},{"name":"Openbook","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"Phoenix","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"Symmetry","fields":[{"name":"from_token_id","type":"u64"},{"name":"to_token_id","type":"u64"}]},{"name":"TokenSwapV2"},{"name":"HeliumTreasuryManagementRedeemV0"},{"name":"StakeDexStakeWrappedSol"},{"name":"StakeDexSwapViaStake","fields":[{"name":"bridge_stake_seed","type":"u32"}]},{"name":"GooseFXV2"},{"name":"Perps"},{"name":"PerpsAddLiquidity"},{"name":"PerpsRemoveLiquidity"},{"name":"MeteoraDlmm"},{"name":"OpenBookV2","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"RaydiumClmmV2"},{"name":"StakeDexPrefundWithdrawStakeAndDepositStake","fields":[{"name":"bridge_stake_seed","type":"u32"}]},{"name":"Clone","fields":[{"name":"pool_index","type":"u8"},{"name":"quantity_is_input","type":"bool"},{"name":"quantity_is_collateral","type":"bool"}]},{"name":"SanctumS","fields":[{"name":"src_lst_value_calc_accs","type":"u8"},{"name":"dst_lst_value_calc_accs","type":"u8"},{"name":"src_lst_index","type":"u32"},{"name":"dst_lst_index","type":"u32"}]},{"name":"SanctumSAddLiquidity","fields":[{"name":"lst_value_calc_accs","type":"u8"},{"name":"lst_index","type":"u32"}]},{"name":"SanctumSRemoveLiquidity","fields":[{"name":"lst_value_calc_accs","type":"u8"},{"name":"lst_index","type":"u32"}]},{"name":"RaydiumCP"},{"name":"WhirlpoolSwapV2","fields":[{"name":"a_to_b","type":"bool"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"OneIntro"},{"name":"PumpWrappedBuy"},{"name":"PumpWrappedSell"},{"name":"PerpsV2"},{"name":"PerpsV2AddLiquidity"},{"name":"PerpsV2RemoveLiquidity"},{"name":"MoonshotWrappedBuy"},{"name":"MoonshotWrappedSell"},{"name":"StabbleStableSwap"},{"name":"StabbleWeightedSwap"},{"name":"Obric","fields":[{"name":"x_to_y","type":"bool"}]},{"name":"FoxBuyFromEstimatedCost"},{"name":"FoxClaimPartial","fields":[{"name":"is_y","type":"bool"}]},{"name":"SolFi","fields":[{"name":"is_quote_to_base","type":"bool"}]},{"name":"SolayerDelegateNoInit"},{"name":"SolayerUndelegateNoInit"},{"name":"TokenMill","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"DaosFunBuy"},{"name":"DaosFunSell"},{"name":"ZeroFi"},{"name":"StakeDexWithdrawWrappedSol"},{"name":"VirtualsBuy"},{"name":"VirtualsSell"},{"name":"Perena","fields":[{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"}]},{"name":"PumpSwapBuy"},{"name":"PumpSwapSell"},{"name":"Gamma"},{"name":"MeteoraDlmmSwapV2","fields":[{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"Woofi"},{"name":"MeteoraDammV2"},{"name":"MeteoraDynamicBondingCurveSwap"},{"name":"StabbleStableSwapV2"},{"name":"StabbleWeightedSwapV2"},{"name":"RaydiumLaunchlabBuy","fields":[{"name":"share_fee_rate","type":"u64"}]},{"name":"RaydiumLaunchlabSell","fields":[{"name":"share_fee_rate","type":"u64"}]},{"name":"BoopdotfunWrappedBuy"},{"name":"BoopdotfunWrappedSell"},{"name":"Plasma","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"GoonFi","fields":[{"name":"is_bid","type":"bool"},{"name":"blacklist_bump","type":"u8"}]},{"name":"HumidiFi","fields":[{"name":"swap_id","type":"u64"},{"name":"is_base_to_quote","type":"bool"}]},{"name":"MeteoraDynamicBondingCurveSwapWithRemainingAccounts"},{"name":"TesseraV","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"PumpWrappedBuyV2"},{"name":"PumpWrappedSellV2"},{"name":"PumpSwapBuyV2"},{"name":"PumpSwapSellV2"},{"name":"Heaven","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"SolFiV2","fields":[{"name":"is_quote_to_base","type":"bool"}]},{"name":"Aquifer"},{"name":"PumpWrappedBuyV3"},{"name":"PumpWrappedSellV3"},{"name":"PumpSwapBuyV3"},{"name":"PumpSwapSellV3"},{"name":"JupiterLendDeposit"},{"name":"JupiterLendRedeem"},{"name":"DefiTuna","fields":[{"name":"a_to_b","type":"bool"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"AlphaQ","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"RaydiumV2"},{"name":"SarosDlmm","fields":[{"name":"swap_for_y","type":"bool"}]},{"name":"Futarchy","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"MeteoraDammV2WithRemainingAccounts"},{"name":"Obsidian"},{"name":"WhaleStreet","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"DynamicV1","fields":[{"name":"candidate_swaps","type":{"vec":{"defined":{"name":"CandidateSwap"}}}},{"name":"best_position","type":{"option":"u8"}}]},{"name":"PumpWrappedBuyV4"},{"name":"PumpWrappedSellV4"},{"name":"CarrotIssue"},{"name":"CarrotRedeem"},{"name":"Manifest","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"BisonFi","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"HumidiFiV2","fields":[{"name":"swap_id","type":"u64"},{"name":"is_base_to_quote","type":"bool"}]},{"name":"PerenaStar","fields":[{"name":"is_mint","type":"bool"}]},{"name":"JupiterRfqV2","fields":[{"name":"side","type":{"defined":{"name":"Side"}}},{"name":"fill_data","type":"bytes"}]},{"name":"GoonFiV2","fields":[{"name":"is_bid","type":"bool"}]},{"name":"Scorch","fields":[{"name":"swap_id","type":"u128"}]},{"name":"VaultLiquidUnstake","fields":[{"name":"lst_amounts","type":{"array":["u64",5]}},{"name":"seed","type":"u64"}]},{"name":"XOrca"},{"name":"Quantum","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"WhaleStreetV2","fields":[{"name":"side","type":{"defined":{"name":"Side"}}},{"name":"auth_amount_in","type":"u64"},{"name":"auth","type":"u64"}]},{"name":"Riptide","fields":[{"name":"amount_is_token_a","type":"bool"}]},{"name":"RunnerRodeo"},{"name":"TaurusFi","fields":[{"name":"is_base_in","type":"bool"}]},{"name":"Omnipair"},{"name":"MSwap"},{"name":"Hylo","fields":[{"name":"swap_type","type":{"defined":{"name":"HyloSwapType"}}}]},{"name":"VoltrDeposit"},{"name":"VoltrWithdraw"},{"name":"SanctumSV2","fields":[{"name":"src_lst_value_calc_accs","type":"u8"},{"name":"dst_lst_value_calc_accs","type":"u8"},{"name":"src_lst_index","type":"u32"},{"name":"dst_lst_index","type":"u32"}]},{"name":"LemmingsFi","fields":[{"name":"is_base_in","type":"bool"}]},{"name":"ScaleVmmBuy"},{"name":"ScaleVmmSell"},{"name":"ScaleAmmBuy"},{"name":"ScaleAmmSell"},{"name":"BisonFiV2","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"Trends"},{"name":"HumaDeposit"},{"name":"HumaInstantWithdraw"},{"name":"Kipseli","fields":[{"name":"is_base_to_quote","type":"bool"}]},{"name":"DynamicV2","fields":[{"name":"candidate_swaps","type":{"vec":{"defined":{"name":"CandidateSwapWithBps"}}}},{"name":"max_split_quote_calls","type":"u8"},{"name":"max_split_candidates","type":"u8"}]},{"name":"PumpSwapBuyV3WithCashbackClaim"},{"name":"PumpSwapSellV3WithCashbackClaim"},{"name":"PumpWrappedBuyV4WithCashbackClaim"},{"name":"PumpWrappedSellV4WithCashbackClaim"},{"name":"GoonFiV3","fields":[{"name":"is_bid","type":"bool"}]},{"name":"PumpWrappedBuyV5","fields":[{"name":"claim_cashback","type":"bool"}]},{"name":"PumpWrappedSellV5","fields":[{"name":"claim_cashback","type":"bool"}]},{"name":"ZeroFiSwapV2"},{"name":"BisonFiPredict","fields":[{"name":"side","type":{"defined":{"name":"BisonFiPredictSide"}}},{"name":"is_buy","type":"bool"}]},{"name":"ByrealDynamicV3"},{"name":"Flux","fields":[{"name":"swap_id","type":"u64"},{"name":"base_to_quote","type":"bool"}]}]}},{"name":"CandidateSwapWithBps","type":{"kind":"struct","fields":[{"name":"candidate_swap","type":{"defined":{"name":"CandidateSwap"}}},{"name":"bps","type":"u32"}]}},{"name":"CandidateSwap","type":{"kind":"enum","variants":[{"name":"HumidiFi","fields":[{"name":"swap_id","type":"u64"},{"name":"is_base_to_quote","type":"bool"}]},{"name":"TesseraV","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"HumidiFiV2","fields":[{"name":"swap_id","type":"u64"},{"name":"is_base_to_quote","type":"bool"}]},{"name":"RaydiumV2"},{"name":"RaydiumClmm"},{"name":"Whirlpool","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"ZeroFi"},{"name":"BisonFiV2","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"GoonFiV2","fields":[{"name":"is_bid","type":"bool"}]},{"name":"GoonFiV3","fields":[{"name":"is_bid","type":"bool"}]},{"name":"WhirlpoolV2","fields":[{"name":"a_to_b","type":"bool"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"ZeroFiSwapV2"}]}},{"name":"HyloSwapType","type":{"kind":"enum","variants":[{"name":"MintStable"},{"name":"RedeemStable"},{"name":"MintLever"},{"name":"RedeemLever"},{"name":"SwapStableToLever"},{"name":"SwapLeverToStable"},{"name":"StabilityPoolDeposit"},{"name":"StabilityPoolWithdraw"}]}},{"name":"SwapEvent","type":{"kind":"struct","fields":[{"name":"amm","type":"pubkey"},{"name":"input_mint","type":"pubkey"},{"name":"input_amount","type":"u64"},{"name":"output_mint","type":"pubkey"},{"name":"output_amount","type":"u64"}]}},{"name":"SwapEventV2","type":{"kind":"struct","fields":[{"name":"input_mint","type":"pubkey"},{"name":"input_amount","type":"u64"},{"name":"output_mint","type":"pubkey"},{"name":"output_amount","type":"u64"}]}},{"name":"SwapsEvent","type":{"kind":"struct","fields":[{"name":"swap_events","type":{"vec":{"defined":{"name":"SwapEventV2"}}}}]}},{"name":"TokenLedger","type":{"kind":"struct","fields":[{"name":"token_account","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"BestSwapOutAmountViolation","type":{"kind":"struct","fields":[{"name":"expected_out_amount","type":"u64"},{"name":"out_amount","type":"u64"}]}},{"name":"CandidateSwapResult","type":{"kind":"enum","variants":[{"name":"OutAmount","fields":["u64"]},{"name":"ProgramError","fields":["u64"]}]}},{"name":"CandidateSwapResults","type":{"kind":"struct","fields":[{"name":"results","type":{"vec":{"defined":{"name":"CandidateSwapResult"}}}}]}},{"name":"CandidateSwapQuoteError","type":{"kind":"struct","fields":[{"name":"candidate_index","type":"u64"},{"name":"in_amount","type":"u64"},{"name":"error_code","type":"u64"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/kamino.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.json b/olddocs/archivekbot2/idls/kamino.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.json new file mode 100644 index 0000000..eb8500e --- /dev/null +++ b/olddocs/archivekbot2/idls/kamino.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"yvaults","instructions":[{"name":"initializeStrategy","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false,"docs":["Program owner also checked."]},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":true,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false}],"args":[{"name":"strategyType","type":"u64"},{"name":"tokenACollateralId","type":"u64"},{"name":"tokenBCollateralId","type":"u64"}]},{"name":"initializeKaminoReward","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":true},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"kaminoRewardIndex","type":"u64"},{"name":"collateralToken","type":"u64"}]},{"name":"addKaminoRewards","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"rewardAta","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"kaminoRewardIndex","type":"u64"},{"name":"amount","type":"u64"}]},{"name":"initializeGlobalConfig","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeCollateralInfo","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"collInfo","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateCollateralInfo","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u64"},{"name":"mode","type":"u64"},{"name":"value","type":{"array":["u8",32]}}]},{"name":"insertCollateralInfo","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u64"},{"name":"params","type":{"defined":"CollateralInfoParams"}}]},{"name":"initializeSharesMetadata","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":false,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"updateSharesMetadata","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":false,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"updateGlobalConfig","accounts":[{"name":"adminAuthority","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"key","type":"u16"},{"name":"index","type":"u16"},{"name":"value","type":{"array":["u8",32]}}]},{"name":"updateTreasuryFeeVault","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"feeMint","isMut":false,"isSigner":false},{"name":"treasuryFeeVault","isMut":true,"isSigner":false},{"name":"treasuryFeeVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralId","type":"u16"}]},{"name":"updateStrategyConfig","accounts":[{"name":"adminAuthority","isMut":false,"isSigner":true},{"name":"newAccount","isMut":false,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"mode","type":"u16"},{"name":"value","type":{"array":["u8",128]}}]},{"name":"updateRewardMapping","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":true},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"rewardIndex","type":"u8"},{"name":"collateralToken","type":"u8"}]},{"name":"openLiquidityPosition","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"positionMint","isMut":true,"isSigner":false},{"name":"positionMetadataAccount","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"system","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"oldTickArrayLowerOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldTickArrayUpperOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldPositionMintOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldPositionTokenAccountOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true},{"name":"consensusAccount","isMut":false,"isSigner":false}],"args":[{"name":"tickLowerIndex","type":"i64"},{"name":"tickUpperIndex","type":"i64"},{"name":"bump","type":"u8"}]},{"name":"closeStrategy","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"oldPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldPositionMintOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldPositionTokenAccountOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldTickArrayLowerOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldTickArrayUpperOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"userTokenAAta","isMut":true,"isSigner":false},{"name":"userTokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":true,"isSigner":false},{"name":"tokenBMint","isMut":true,"isSigner":false},{"name":"reward0Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"reward1Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"reward2Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"kaminoReward0Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"kaminoReward1Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"kaminoReward2Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userReward0Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userReward1Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userReward2Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userKaminoReward0Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userKaminoReward1Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userKaminoReward2Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"system","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"deposit","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"tickArrayLower","isMut":false,"isSigner":false},{"name":"tickArrayUpper","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"tokenMaxA","type":"u64"},{"name":"tokenMaxB","type":"u64"}]},{"name":"invest","accounts":[{"name":"actionsAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":true,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"referencePriceTick","type":"i32"}]},{"name":"depositAndInvest","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false,"docs":["check that the pool is owned either by orca or by raydium"]},{"name":"position","isMut":true,"isSigner":false},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"tokenMaxA","type":"u64"},{"name":"tokenMaxB","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenAVault","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenBVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"positionTokenAccount","isMut":true,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"sharesAmount","type":"u64"}]},{"name":"executiveWithdraw","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":false,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"action","type":"u8"}]},{"name":"collectFeesAndRewards","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenAVault","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenBVault","isMut":true,"isSigner":false},{"name":"treasuryFeeVaultAuthority","isMut":false,"isSigner":false},{"name":"reward0Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"reward1Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"reward2Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"poolRewardVault0","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"poolRewardVault1","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"poolRewardVault2","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"swapRewards","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenAVault","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenBVault","isMut":true,"isSigner":false},{"name":"treasuryFeeVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"userTokenAAta","isMut":true,"isSigner":false},{"name":"userTokenBAta","isMut":true,"isSigner":false},{"name":"userRewardTokenAccount","isMut":true,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"scopePricesReward","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"rewardTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"tokenAIn","type":"u64"},{"name":"tokenBIn","type":"u64"},{"name":"rewardIndex","type":"u64"},{"name":"rewardCollateralId","type":"u64"},{"name":"minCollateralTokenOut","type":"u64"}]},{"name":"checkExpectedVaultsBalances","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"tokenAAta","isMut":false,"isSigner":false},{"name":"tokenBAta","isMut":false,"isSigner":false}],"args":[{"name":"tokenAAtaBalance","type":"u64"},{"name":"tokenBAtaBalance","type":"u64"}]},{"name":"singleTokenDepositAndInvestWithMin","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false,"docs":["check that the pool is owned either by orca or by raydium"]},{"name":"position","isMut":true,"isSigner":false},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"tokenAMinPostDepositBalance","type":"u64"},{"name":"tokenBMinPostDepositBalance","type":"u64"}]},{"name":"singleTokenDepositWithMin","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"tickArrayLower","isMut":false,"isSigner":false},{"name":"tickArrayUpper","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"tokenAMinPostDepositBalance","type":"u64"},{"name":"tokenBMinPostDepositBalance","type":"u64"}]},{"name":"flashSwapUnevenVaultsStart","docs":["Start of a Flash swap uneven vaults.","","This needs to be the first instruction of the transaction or preceded only by a","ComputeBudget.","","This ix has to be paired with a `flash_swap_uneven_vaults_end` (`FlashSwapUnevenVaultsEnd`)","as the last instruction of the transaction. No other instruction targeted the program is","allowed.","The instructions between the start and end instructions are expected to perform the swap."],"accounts":[{"name":"swapper","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tickArrayLower","isMut":false,"isSigner":false},{"name":"tickArrayUpper","isMut":false,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"consensusAccount","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"aToB","type":"bool"}]},{"name":"flashSwapUnevenVaultsEnd","docs":["End of Flash swap uneven vaults.","","See [`flash_swap_uneven_vaults_start`] for details.","","Warning: This instruction is allowed to be used independently from","`FlashSwapUnevenVaultsStart` and shall not perform any operation","that can be exploited when used alone."],"accounts":[{"name":"swapper","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tickArrayLower","isMut":false,"isSigner":false},{"name":"tickArrayUpper","isMut":false,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"consensusAccount","isMut":false,"isSigner":false}],"args":[{"name":"minRepayAmount","type":"u64"},{"name":"amountToLeaveToUser","type":"u64"},{"name":"aToB","type":"bool"}]},{"name":"emergencySwap","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tickArray0","isMut":true,"isSigner":false,"docs":["Payer must send this correctly."]},{"name":"tickArray1","isMut":true,"isSigner":false,"docs":["Payer must send this correctly."]},{"name":"tickArray2","isMut":true,"isSigner":false,"docs":["Payer must send this correctly."]},{"name":"oracle","isMut":true,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false}],"args":[{"name":"aToB","type":"bool"},{"name":"targetLimitBps","type":"u64"}]},{"name":"withdrawFromTreasury","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"treasuryFeeVault","isMut":true,"isSigner":false},{"name":"treasuryFeeVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"permisionlessWithdrawFromTreasury","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"treasuryFeeVault","isMut":true,"isSigner":false},{"name":"treasuryFeeVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawFromTopup","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"topupVault","isMut":true,"isSigner":false},{"name":"system","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"changePool","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"oldPosition","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"newPool","isMut":false,"isSigner":false},{"name":"strategyRewardVault0OrBaseVaultAuthority","isMut":false,"isSigner":false},{"name":"strategyRewardVault1OrBaseVaultAuthority","isMut":false,"isSigner":false},{"name":"strategyRewardVault2OrBaseVaultAuthority","isMut":false,"isSigner":false}],"args":[]},{"name":"closeProgramAccount","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"program","isMut":false,"isSigner":false},{"name":"programData","isMut":false,"isSigner":false},{"name":"closingAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"orcaSwap","accounts":[{"name":"funder","isMut":true,"isSigner":true},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"tokenAuthority","isMut":false,"isSigner":false},{"name":"whirlpool","isMut":false,"isSigner":false},{"name":"tokenOwnerAccountA","isMut":false,"isSigner":false},{"name":"tokenVaultA","isMut":false,"isSigner":false},{"name":"tokenOwnerAccountB","isMut":false,"isSigner":false},{"name":"tokenVaultB","isMut":false,"isSigner":false},{"name":"tokenMintA","isMut":false,"isSigner":false},{"name":"tokenMintB","isMut":false,"isSigner":false},{"name":"tickArray0","isMut":false,"isSigner":false},{"name":"tickArray1","isMut":false,"isSigner":false},{"name":"tickArray2","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"whirlpoolProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"otherAmountThreshold","type":"u64"},{"name":"sqrtPriceLimit","type":"u128"},{"name":"amountSpecifiedIsInput","type":"bool"},{"name":"aToB","type":"bool"}]},{"name":"signTerms","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"ownerSignatureState","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"signature","type":{"array":["u8",64]}}]},{"name":"updateStrategyAdmin","accounts":[{"name":"pendingAdmin","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false}],"args":[]},{"name":"resizeTokenInfos","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"tokenInfos","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"deprecateCollateralInfo","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u64"}]}],"accounts":[{"name":"Whirlpool","docs":["External types"],"type":{"kind":"struct","fields":[{"name":"whirlpoolsConfig","type":"publicKey"},{"name":"whirlpoolBump","type":{"array":["u8",1]}},{"name":"tickSpacing","type":"u16"},{"name":"tickSpacingSeed","type":{"array":["u8",2]}},{"name":"feeRate","type":"u16"},{"name":"protocolFeeRate","type":"u16"},{"name":"liquidity","type":"u128"},{"name":"sqrtPrice","type":"u128"},{"name":"tickCurrentIndex","type":"i32"},{"name":"protocolFeeOwedA","type":"u64"},{"name":"protocolFeeOwedB","type":"u64"},{"name":"tokenMintA","type":"publicKey"},{"name":"tokenVaultA","type":"publicKey"},{"name":"feeGrowthGlobalA","type":"u128"},{"name":"tokenMintB","type":"publicKey"},{"name":"tokenVaultB","type":"publicKey"},{"name":"feeGrowthGlobalB","type":"u128"},{"name":"rewardLastUpdatedTimestamp","type":"u64"},{"name":"rewardInfos","type":{"array":[{"defined":"WhirlpoolRewardInfo"},3]}}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"publicKey"},{"name":"positionMint","type":"publicKey"},{"name":"liquidity","type":"u128"},{"name":"tickLowerIndex","type":"i32"},{"name":"tickUpperIndex","type":"i32"},{"name":"feeGrowthCheckpointA","type":"u128"},{"name":"feeOwedA","type":"u64"},{"name":"feeGrowthCheckpointB","type":"u128"},{"name":"feeOwedB","type":"u64"},{"name":"rewardInfos","type":{"array":[{"defined":"PositionRewardInfo"},3]}}]}},{"name":"PoolState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"ammConfig","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"tokenMint0","docs":["Token pair of the pool, where token_mint_0 address < token_mint_1 address"],"type":"publicKey"},{"name":"tokenMint1","type":"publicKey"},{"name":"tokenVault0","docs":["Token pair vault"],"type":"publicKey"},{"name":"tokenVault1","type":"publicKey"},{"name":"observationKey","docs":["observation account key"],"type":"publicKey"},{"name":"mintDecimals0","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mintDecimals1","type":"u8"},{"name":"tickSpacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"liquidity","docs":["The currently in range liquidity available to the pool."],"type":"u128"},{"name":"sqrtPriceX64","docs":["The current price of the pool as a sqrt(token_1/token_0) Q64.64 value"],"type":"u128"},{"name":"tickCurrent","docs":["The current tick of the pool, i.e. according to the last tick transition that was run."],"type":"i32"},{"name":"observationIndex","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"observationUpdateDuration","type":"u16"},{"name":"feeGrowthGlobal0X64","docs":["The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per","unit of liquidity for the entire life of the pool."],"type":"u128"},{"name":"feeGrowthGlobal1X64","type":"u128"},{"name":"protocolFeesToken0","docs":["The amounts of token_0 and token_1 that are owed to the protocol."],"type":"u64"},{"name":"protocolFeesToken1","type":"u64"},{"name":"swapInAmountToken0","docs":["The amounts in and out of swap token_0 and token_1"],"type":"u128"},{"name":"swapOutAmountToken1","type":"u128"},{"name":"swapInAmountToken1","type":"u128"},{"name":"swapOutAmountToken0","type":"u128"},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable open position and increase liquidity, 0: normal","bit1, 1: disable decrease liquidity, 0: normal","bit2, 1: disable collect fee, 0: normal","bit3, 1: disable collect reward, 0: normal","bit4, 1: disable swap, 0: normal"],"type":"u8"},{"name":"padding","docs":["Leave blank for future use"],"type":{"array":["u8",7]}},{"name":"rewardInfos","type":{"array":[{"defined":"RewardInfo"},3]}},{"name":"tickArrayBitmap","docs":["Packed initialized tick array state"],"type":{"array":["u64",16]}},{"name":"totalFeesToken0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"totalFeesClaimedToken0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"totalFeesToken1","type":"u64"},{"name":"totalFeesClaimedToken1","type":"u64"},{"name":"fundFeesToken0","type":"u64"},{"name":"fundFeesToken1","type":"u64"},{"name":"openTime","type":"u64"},{"name":"padding1","type":{"array":["u64",25]}},{"name":"padding2","type":{"array":["u64",32]}}]}},{"name":"PersonalPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"nftMint","docs":["Mint address of the tokenized position"],"type":"publicKey"},{"name":"poolId","docs":["The ID of the pool with which this token is connected"],"type":"publicKey"},{"name":"tickLowerIndex","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tickUpperIndex","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"feeGrowthInside0LastX64","docs":["The token_0 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"feeGrowthInside1LastX64","docs":["The token_1 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"tokenFeesOwed0","docs":["The fees owed to the position owner in token_0, as of the last computation"],"type":"u64"},{"name":"tokenFeesOwed1","docs":["The fees owed to the position owner in token_1, as of the last computation"],"type":"u64"},{"name":"rewardInfos","type":{"array":[{"defined":"PositionRewardInfo"},3]}},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"ProtocolPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"poolId","docs":["The ID of the pool with which this token is connected"],"type":"publicKey"},{"name":"tickLowerIndex","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tickUpperIndex","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"feeGrowthInside0LastX64","docs":["The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"feeGrowthInside1LastX64","docs":["The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"tokenFeesOwed0","docs":["The fees owed to the position owner in token_0"],"type":"u64"},{"name":"tokenFeesOwed1","docs":["The fees owed to the position owner in token_1"],"type":"u64"},{"name":"rewardGrowthInside","docs":["The reward growth per unit of liquidity as of the last update to liquidity"],"type":{"array":["u128",3]}},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"WhirlpoolStrategy","type":{"kind":"struct","fields":[{"name":"adminAuthority","type":"publicKey"},{"name":"globalConfig","type":"publicKey"},{"name":"baseVaultAuthority","type":"publicKey"},{"name":"baseVaultAuthorityBump","type":"u64"},{"name":"pool","type":"publicKey"},{"name":"poolTokenVaultA","type":"publicKey"},{"name":"poolTokenVaultB","type":"publicKey"},{"name":"tickArrayLower","type":"publicKey"},{"name":"tickArrayUpper","type":"publicKey"},{"name":"position","type":"publicKey"},{"name":"positionMint","type":"publicKey"},{"name":"positionMetadata","type":"publicKey"},{"name":"positionTokenAccount","type":"publicKey"},{"name":"tokenAVault","type":"publicKey"},{"name":"tokenBVault","type":"publicKey"},{"name":"deprecated0","type":{"array":["publicKey",2]}},{"name":"deprecated1","type":{"array":["u64",2]}},{"name":"tokenAMint","type":"publicKey"},{"name":"tokenBMint","type":"publicKey"},{"name":"tokenAMintDecimals","type":"u64"},{"name":"tokenBMintDecimals","type":"u64"},{"name":"tokenAAmounts","type":"u64"},{"name":"tokenBAmounts","type":"u64"},{"name":"tokenACollateralId","type":"u64"},{"name":"tokenBCollateralId","type":"u64"},{"name":"deprecated2","type":"publicKey"},{"name":"deprecated3","type":"publicKey"},{"name":"sharesMint","type":"publicKey"},{"name":"sharesMintDecimals","type":"u64"},{"name":"sharesMintAuthority","type":"publicKey"},{"name":"sharesMintAuthorityBump","type":"u64"},{"name":"sharesIssued","type":"u64"},{"name":"status","type":"u64"},{"name":"reward0Amount","type":"u64"},{"name":"reward0Vault","type":"publicKey"},{"name":"reward0CollateralId","type":"u64"},{"name":"reward0Decimals","type":"u64"},{"name":"reward1Amount","type":"u64"},{"name":"reward1Vault","type":"publicKey"},{"name":"reward1CollateralId","type":"u64"},{"name":"reward1Decimals","type":"u64"},{"name":"reward2Amount","type":"u64"},{"name":"reward2Vault","type":"publicKey"},{"name":"reward2CollateralId","type":"u64"},{"name":"reward2Decimals","type":"u64"},{"name":"depositCapUsd","type":"u64"},{"name":"feesACumulative","type":"u64"},{"name":"feesBCumulative","type":"u64"},{"name":"reward0AmountCumulative","type":"u64"},{"name":"reward1AmountCumulative","type":"u64"},{"name":"reward2AmountCumulative","type":"u64"},{"name":"depositCapUsdPerIxn","type":"u64"},{"name":"withdrawalCapA","type":{"defined":"WithdrawalCaps"}},{"name":"withdrawalCapB","type":{"defined":"WithdrawalCaps"}},{"name":"maxPriceDeviationBps","type":"u64"},{"name":"swapVaultMaxSlippageBps","type":"u32"},{"name":"swapVaultMaxSlippageFromReferenceBps","type":"u32"},{"name":"strategyType","type":"u64"},{"name":"padding0","type":"u64"},{"name":"withdrawFee","type":"u64"},{"name":"feesFee","type":"u64"},{"name":"reward0Fee","type":"u64"},{"name":"reward1Fee","type":"u64"},{"name":"reward2Fee","type":"u64"},{"name":"positionTimestamp","type":"u64"},{"name":"kaminoRewards","type":{"array":[{"defined":"KaminoRewardInfo"},3]}},{"name":"strategyDex","type":"u64"},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","type":"publicKey"},{"name":"allowDepositWithoutInvest","type":"u64"},{"name":"raydiumPoolConfigOrBaseVaultAuthority","type":"publicKey"},{"name":"depositBlocked","type":"u8"},{"name":"creationStatus","type":"u8"},{"name":"investBlocked","type":"u8"},{"name":"shareCalculationMethod","docs":["share_calculation_method can be either DOLAR_BASED=0 or PROPORTION_BASED=1"],"type":"u8"},{"name":"withdrawBlocked","type":"u8"},{"name":"reservedFlag2","type":"u8"},{"name":"localAdminBlocked","type":"u8"},{"name":"flashVaultSwapAllowed","type":"u8"},{"name":"referenceSwapPriceA","type":{"defined":"Price"}},{"name":"referenceSwapPriceB","type":{"defined":"Price"}},{"name":"isCommunity","type":"u8"},{"name":"rebalanceType","type":"u8"},{"name":"flashSwapInProgress","type":"u8"},{"name":"padding1","type":{"array":["u8",5]}},{"name":"rebalanceRaw","type":{"defined":"RebalanceRaw"}},{"name":"padding2","type":{"array":["u8",7]}},{"name":"tokenAFeesFromRewardsCumulative","type":"u64"},{"name":"tokenBFeesFromRewardsCumulative","type":"u64"},{"name":"strategyLookupTable","type":"publicKey"},{"name":"lastSwapUnevenStepTimestamp","type":"u64"},{"name":"farm","type":"publicKey"},{"name":"rebalancesCap","type":{"defined":"WithdrawalCaps"}},{"name":"padding3NonZeroed","type":{"array":["u64",4]}},{"name":"tokenATokenProgram","type":"publicKey"},{"name":"tokenBTokenProgram","type":"publicKey"},{"name":"pendingAdmin","type":"publicKey"},{"name":"maxDeviationFromRefPriceOnInvestBps","type":"u32"},{"name":"padding3","type":"u32"},{"name":"lastInvestSlot","type":"u64"},{"name":"padding4","type":"u64"},{"name":"padding5","type":{"array":["u128",12]}},{"name":"padding6","type":{"array":["u128",32]}},{"name":"padding7","type":{"array":["u128",32]}},{"name":"padding8","type":{"array":["u128",32]}}]}},{"name":"GlobalConfig","type":{"kind":"struct","fields":[{"name":"emergencyMode","type":"u64"},{"name":"blockDeposit","type":"u64"},{"name":"blockInvest","type":"u64"},{"name":"blockWithdraw","type":"u64"},{"name":"blockCollectFees","type":"u64"},{"name":"blockCollectRewards","type":"u64"},{"name":"blockSwapRewards","type":"u64"},{"name":"blockSwapUnevenVaults","type":"u32"},{"name":"blockEmergencySwap","type":"u32"},{"name":"minWithdrawalFeeBps","type":"u64"},{"name":"scopeProgramId","type":"publicKey"},{"name":"deprecated","type":"publicKey"},{"name":"padding0NonZeroed","type":{"array":["u64",256]}},{"name":"actionsAuthority","type":"publicKey"},{"name":"adminAuthority","type":"publicKey"},{"name":"treasuryFeeVaults","type":{"array":["publicKey",256]}},{"name":"tokenInfos","type":"publicKey"},{"name":"blockLocalAdmin","type":"u64"},{"name":"minPerformanceFeeBps","type":"u64"},{"name":"minSwapUnevenSlippageToleranceBps","type":"u64"},{"name":"minReferencePriceSlippageToleranceBps","type":"u64"},{"name":"actionsAfterRebalanceDelaySeconds","type":"u64"},{"name":"treasuryFeeVaultReceiver","type":"publicKey"},{"name":"scopePriceIds","type":{"array":["publicKey",16]}},{"name":"maxDeviationFromRefPriceOnInvestBps","type":"u32"},{"name":"padding1","type":"u32"},{"name":"investCooldownSlots","type":"u64"},{"name":"minInvestTriggerValueUsd","type":"u64"},{"name":"padding","type":{"array":["u64",1968]}}]}},{"name":"CollateralInfos","type":{"kind":"struct","fields":[{"name":"infos","type":{"array":[{"defined":"CollateralInfo"},303]}}]}},{"name":"ScopeChainAccount","type":{"kind":"struct","fields":[{"name":"chainArray","type":{"array":[{"array":["u16",4]},512]}}]}},{"name":"TermsSignature","type":{"kind":"struct","fields":[{"name":"signature","type":{"array":["u8",64]}}]}}],"types":[{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growthInsideCheckpoint","type":"u128"},{"name":"amountOwed","type":"u64"}]}},{"name":"WhirlpoolRewardInfo","type":{"kind":"struct","fields":[{"name":"mint","docs":["Reward token mint."],"type":"publicKey"},{"name":"vault","docs":["Reward vault token account."],"type":"publicKey"},{"name":"authority","docs":["Authority account that has permission to initialize the reward and set emissions."],"type":"publicKey"},{"name":"emissionsPerSecondX64","docs":["Q64.64 number that indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"growthGlobalX64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"RewardInfo","type":{"kind":"struct","fields":[{"name":"rewardState","docs":["Reward state"],"type":"u8"},{"name":"openTime","docs":["Reward open time"],"type":"u64"},{"name":"endTime","docs":["Reward end time"],"type":"u64"},{"name":"lastUpdateTime","docs":["Reward last update time"],"type":"u64"},{"name":"emissionsPerSecondX64","docs":["Q64.64 number indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"rewardTotalEmissioned","docs":["The total amount of reward emissioned"],"type":"u64"},{"name":"rewardClaimed","docs":["The total amount of claimed reward"],"type":"u64"},{"name":"tokenMint","docs":["Reward token mint."],"type":"publicKey"},{"name":"tokenVault","docs":["Reward vault token account."],"type":"publicKey"},{"name":"authority","docs":["The owner that has permission to set reward param"],"type":"publicKey"},{"name":"rewardGrowthGlobalX64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"RebalanceRaw","type":{"kind":"struct","fields":[{"name":"params","type":{"array":["u8",128]}},{"name":"state","type":{"array":["u8",256]}},{"name":"referencePriceType","type":"u8"}]}},{"name":"CollateralInfo","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"lowerHeuristic","type":"u64"},{"name":"upperHeuristic","type":"u64"},{"name":"expHeuristic","type":"u64"},{"name":"maxTwapDivergenceBps","type":"u64"},{"name":"scopeTwapPriceChain","type":{"array":["u16",4]}},{"name":"scopePriceChain","type":{"array":["u16",4]}},{"name":"name","type":{"array":["u8",32]}},{"name":"maxAgePriceSeconds","type":"u64"},{"name":"maxAgeTwapSeconds","type":"u64"},{"name":"maxIgnorableAmountAsReward","type":"u64"},{"name":"disabled","type":"u8"},{"name":"padding0","type":{"array":["u8",7]}},{"name":"scopeStakingRateChain","type":{"array":["u16",4]}},{"name":"scopeFeed","type":"publicKey"},{"name":"padding","type":{"array":["u64",4]}}]}},{"name":"CollateralInfoParams","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"lowerHeuristic","type":"u64"},{"name":"upperHeuristic","type":"u64"},{"name":"expHeuristic","type":"u64"},{"name":"maxTwapDivergenceBps","type":"u64"},{"name":"scopeTwapPriceChain","type":{"array":["u16",4]}},{"name":"scopePriceChain","type":{"array":["u16",4]}},{"name":"name","type":{"array":["u8",32]}},{"name":"maxAgePriceSeconds","type":"u64"},{"name":"maxAgeTwapSeconds","type":"u64"},{"name":"maxIgnorableAmountAsReward","type":"u64"},{"name":"disabled","type":"u8"},{"name":"scopeStakingRateChain","type":{"array":["u16",4]}},{"name":"scopeFeed","type":"publicKey"}]}},{"name":"KaminoRewardInfo","type":{"kind":"struct","fields":[{"name":"decimals","type":"u64"},{"name":"rewardVault","type":"publicKey"},{"name":"rewardMint","type":"publicKey"},{"name":"rewardCollateralId","type":"u64"},{"name":"lastIssuanceTs","type":"u64"},{"name":"rewardPerSecond","type":"u64"},{"name":"amountUncollected","type":"u64"},{"name":"amountIssuedCumulative","type":"u64"},{"name":"amountAvailable","type":"u64"}]}},{"name":"WithdrawalCaps","type":{"kind":"struct","fields":[{"name":"configCapacity","type":"i64"},{"name":"currentTotal","type":"i64"},{"name":"lastIntervalStartTimestamp","type":"u64"},{"name":"configIntervalLengthSeconds","type":"u64"}]}},{"name":"Price","type":{"kind":"struct","fields":[{"name":"value","type":"u64"},{"name":"exp","type":"u64"}]}},{"name":"RebalanceAutodriftParams","type":{"kind":"struct","fields":[{"name":"initDriftTicksPerEpoch","type":"u32"},{"name":"ticksBelowMid","type":"i32"},{"name":"ticksAboveMid","type":"i32"},{"name":"frontrunMultiplierBps","type":"u16"},{"name":"stakingRateASource","type":{"defined":"StakingRateSource"}},{"name":"stakingRateBSource","type":{"defined":"StakingRateSource"}},{"name":"initDriftDirection","type":{"defined":"DriftDirection"}}]}},{"name":"RebalanceAutodriftWindow","type":{"kind":"struct","fields":[{"name":"stakingRateA","type":{"option":{"defined":"Price"}}},{"name":"stakingRateB","type":{"option":{"defined":"Price"}}},{"name":"epoch","type":"u64"},{"name":"theoreticalTick","type":"i32"},{"name":"stratMidTick","type":"i32"}]}},{"name":"RebalanceAutodriftState","type":{"kind":"struct","fields":[{"name":"lastWindow","type":{"defined":"RebalanceAutodriftWindow"}},{"name":"currentWindow","type":{"defined":"RebalanceAutodriftWindow"}},{"name":"step","type":{"defined":"RebalanceAutodriftStep"}}]}},{"name":"RebalanceDriftParams","type":{"kind":"struct","fields":[{"name":"startMidTick","type":"i32"},{"name":"ticksBelowMid","type":"i32"},{"name":"ticksAboveMid","type":"i32"},{"name":"secondsPerTick","type":"u64"},{"name":"direction","type":{"defined":"DriftDirection"}}]}},{"name":"RebalanceDriftState","type":{"kind":"struct","fields":[{"name":"step","type":{"defined":"RebalanceDriftStep"}},{"name":"lastDriftTimestamp","type":"u64"},{"name":"lastMidTick","type":"i32"}]}},{"name":"RebalanceExpanderState","type":{"kind":"struct","fields":[{"name":"initialPoolPrice","type":"u128"},{"name":"expansionCount","type":"u16"}]}},{"name":"RebalanceManualState","type":{"kind":"struct","fields":[]}},{"name":"PeriodicRebalanceState","type":{"kind":"struct","fields":[{"name":"lastRebalanceTimestamp","type":"u64"}]}},{"name":"RebalancePricePercentageWithResetState","type":{"kind":"struct","fields":[{"name":"lastRebalanceLowerResetPoolPrice","type":"u128"},{"name":"lastRebalanceUpperResetPoolPrice","type":"u128"}]}},{"name":"RebalancePricePercentageState","type":{"kind":"struct","fields":[{"name":"lastRebalanceLowerPoolPrice","type":"u128"},{"name":"lastRebalanceUpperPoolPrice","type":"u128"}]}},{"name":"RebalanceTakeProfitState","type":{"kind":"struct","fields":[{"name":"step","type":{"defined":"RebalanceTakeProfitStep"}}]}},{"name":"BinAddLiquidityStrategy","type":{"kind":"enum","variants":[{"name":"Uniform","fields":[{"name":"currentBinIndex","type":"i32"},{"name":"lowerBinIndex","type":"i32"},{"name":"upperBinIndex","type":"i32"},{"name":"amountXToDeposit","type":"u64"},{"name":"amountYToDeposit","type":"u64"},{"name":"xCurrentBin","type":"u64"},{"name":"yCurrentBin","type":"u64"}]},{"name":"CurrentTick","fields":["i32"]}]}},{"name":"SimulationPrice","type":{"kind":"enum","variants":[{"name":"PoolPrice"},{"name":"SqrtPrice","fields":["u128"]},{"name":"TickIndex","fields":["i32"]}]}},{"name":"DexSpecificPrice","type":{"kind":"enum","variants":[{"name":"SqrtPrice","fields":["u128"]},{"name":"Q64_64","fields":["u128"]}]}},{"name":"RemoveLiquidityMode","type":{"kind":"enum","variants":[{"name":"Liquidity","fields":["u128"]},{"name":"Bps","fields":["u16"]},{"name":"All"}]}},{"name":"WithdrawalCapAccumulatorAction","type":{"kind":"enum","variants":[{"name":"KeepAccumulator"},{"name":"ResetAccumulator"}]}},{"name":"RebalanceEffects","type":{"kind":"enum","variants":[{"name":"NewRange","fields":["i32","i32"]},{"name":"WithdrawAndFreeze"}]}},{"name":"SwapLimit","type":{"kind":"enum","variants":[{"name":"Bps","fields":["u64"]},{"name":"Absolute","fields":[{"name":"srcAmountToSwap","docs":["Amount of src token expected by the user to perform the swap"],"type":"u64"},{"name":"dstAmountToVault","docs":["Amount of dst token the user provides in exchange"],"type":"u64"},{"name":"aToB","type":"bool"}]}]}},{"name":"MintingMethod","type":{"kind":"enum","variants":[{"name":"PriceBased"},{"name":"Proportional"}]}},{"name":"GlobalConfigOption","type":{"kind":"enum","variants":[{"name":"EmergencyMode"},{"name":"BlockDeposit"},{"name":"BlockInvest"},{"name":"BlockWithdraw"},{"name":"BlockCollectFees"},{"name":"BlockCollectRewards"},{"name":"BlockSwapRewards"},{"name":"BlockSwapUnevenVaults"},{"name":"WithdrawalFeeBps"},{"name":"DeprecatedSwapDiscountBps"},{"name":"ActionsAuthority"},{"name":"DeprecatedTreasuryFeeVaults"},{"name":"AdminAuthority"},{"name":"BlockEmergencySwap"},{"name":"BlockLocalAdmin"},{"name":"UpdateTokenInfos"},{"name":"ScopeProgramId"},{"name":"UpdateScopePriceId"},{"name":"MinPerformanceFeeBps"},{"name":"MinSwapUnevenSlippageToleranceBps"},{"name":"MinReferencePriceSlippageToleranceBps"},{"name":"ActionsAfterRebalanceDelaySeconds"},{"name":"TreasuryFeeVaultReceiver"},{"name":"AddScopePriceId"},{"name":"MaxDeviationFromRefPriceOnInvestBps"},{"name":"InvestCooldownSlots"},{"name":"MinInvestTriggerValueUsd"}]}},{"name":"StrategyConfigOption","type":{"kind":"enum","variants":[{"name":"UpdateDepositCap"},{"name":"UpdateDepositCapIxn"},{"name":"UpdateWithdrawalCapACapacity"},{"name":"UpdateWithdrawalCapAInterval"},{"name":"UpdateWithdrawalCapACurrentTotal"},{"name":"UpdateWithdrawalCapBCapacity"},{"name":"UpdateWithdrawalCapBInterval"},{"name":"UpdateWithdrawalCapBCurrentTotal"},{"name":"UpdateMaxDeviationBps"},{"name":"UpdateSwapVaultMaxSlippage"},{"name":"UpdateStrategyType"},{"name":"UpdateDepositFee"},{"name":"UpdateWithdrawFee"},{"name":"UpdateCollectFeesFee"},{"name":"UpdateReward0Fee"},{"name":"UpdateReward1Fee"},{"name":"UpdateReward2Fee"},{"name":"UpdateAdminAuthority"},{"name":"KaminoRewardIndex0TS"},{"name":"KaminoRewardIndex1TS"},{"name":"KaminoRewardIndex2TS"},{"name":"KaminoRewardIndex0RewardPerSecond"},{"name":"KaminoRewardIndex1RewardPerSecond"},{"name":"KaminoRewardIndex2RewardPerSecond"},{"name":"UpdateDepositBlocked"},{"name":"UpdateRaydiumProtocolPositionOrBaseVaultAuthority"},{"name":"UpdateRaydiumPoolConfigOrBaseVaultAuthority"},{"name":"UpdateInvestBlocked"},{"name":"UpdateWithdrawBlocked"},{"name":"UpdateLocalAdminBlocked"},{"name":"DeprecatedUpdateCollateralIdA"},{"name":"DeprecatedUpdateCollateralIdB"},{"name":"UpdateFlashVaultSwap"},{"name":"AllowDepositWithoutInvest"},{"name":"UpdateSwapVaultMaxSlippageFromRef"},{"name":"ResetReferencePrices"},{"name":"UpdateStrategyCreationState"},{"name":"UpdateIsCommunity"},{"name":"UpdateRebalanceType"},{"name":"UpdateRebalanceParams"},{"name":"UpdateDepositMintingMethod"},{"name":"UpdateLookupTable"},{"name":"UpdateReferencePriceType"},{"name":"UpdateReward0Amount"},{"name":"UpdateReward1Amount"},{"name":"UpdateReward2Amount"},{"name":"UpdateFarm"},{"name":"UpdateRebalancesCapCapacity"},{"name":"UpdateRebalancesCapInterval"},{"name":"UpdateRebalancesCapCurrentTotal"},{"name":"DeprecatedUpdateSwapUnevenAuthority"},{"name":"UpdatePendingStrategyAdmin"},{"name":"UpdateMaxDeviationFromRefPriceOnInvestBps"}]}},{"name":"StrategyStatus","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Active"},{"name":"Frozen"},{"name":"Rebalancing"},{"name":"NoPosition"}]}},{"name":"StrategyType","type":{"kind":"enum","variants":[{"name":"Stable"},{"name":"Pegged"},{"name":"Volatile"}]}},{"name":"CreationStatus","type":{"kind":"enum","variants":[{"name":"IGNORED"},{"name":"SHADOW"},{"name":"LIVE"},{"name":"DEPRECATED"},{"name":"STAGING"}]}},{"name":"ExecutiveWithdrawAction","type":{"kind":"enum","variants":[{"name":"Freeze"},{"name":"Unfreeze"},{"name":"Rebalance"}]}},{"name":"ReferencePriceType","type":{"kind":"enum","variants":[{"name":"POOL"},{"name":"TWAP"}]}},{"name":"LiquidityCalculationMode","type":{"kind":"enum","variants":[{"name":"Deposit"},{"name":"Withdraw"}]}},{"name":"UpdateCollateralInfoMode","type":{"kind":"enum","variants":[{"name":"CollateralId"},{"name":"LowerHeuristic"},{"name":"UpperHeuristic"},{"name":"ExpHeuristic"},{"name":"TwapDivergence"},{"name":"UpdateScopeTwap"},{"name":"UpdateScopeChain"},{"name":"UpdateName"},{"name":"UpdatePriceMaxAge"},{"name":"UpdateTwapMaxAge"},{"name":"UpdateDisabled"},{"name":"UpdateStakingRateChain"},{"name":"UpdateMaxIgnorableAmountAsReward"},{"name":"UpdateScopeFeed"}]}},{"name":"BalanceStatus","type":{"kind":"enum","variants":[{"name":"Balanced"},{"name":"Unbalanced"}]}},{"name":"RebalanceAutodriftStep","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Autodrifting"}]}},{"name":"StakingRateSource","type":{"kind":"enum","variants":[{"name":"Constant"},{"name":"Scope"}]}},{"name":"DriftDirection","type":{"kind":"enum","variants":[{"name":"Increasing"},{"name":"Decreasing"}]}},{"name":"RebalanceDriftStep","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Drifting"}]}},{"name":"ExpanderStep","type":{"kind":"enum","variants":[{"name":"ExpandOrContract","fields":["u16"]},{"name":"Recenter"}]}},{"name":"RebalanceTakeProfitToken","type":{"kind":"enum","variants":[{"name":"A"},{"name":"B"}]}},{"name":"RebalanceTakeProfitStep","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"TakingProfit"},{"name":"Finished"}]}},{"name":"RebalanceAction","type":{"kind":"enum","variants":[{"name":"NewPriceRange","fields":[{"defined":"DexSpecificPrice"},{"defined":"DexSpecificPrice"}]},{"name":"NewTickRange","fields":["i32","i32"]},{"name":"WithdrawAndFreeze"}]}},{"name":"RebalanceType","type":{"kind":"enum","variants":[{"name":"Manual"},{"name":"PricePercentage"},{"name":"PricePercentageWithReset"},{"name":"Drift"},{"name":"TakeProfit"},{"name":"PeriodicRebalance"},{"name":"Expander"},{"name":"Autodrift"}]}},{"name":"CollateralTestToken","type":{"kind":"enum","variants":[{"name":"USDC"},{"name":"USDH"},{"name":"SOL"},{"name":"ETH"},{"name":"BTC"},{"name":"MSOL"},{"name":"STSOL"},{"name":"USDT"},{"name":"ORCA"},{"name":"MNDE"},{"name":"HBB"},{"name":"JSOL"},{"name":"USH"},{"name":"DAI"},{"name":"LDO"},{"name":"SCNSOL"},{"name":"UXD"},{"name":"HDG"},{"name":"DUST"},{"name":"USDR"},{"name":"RATIO"},{"name":"UXP"},{"name":"JITOSOL"},{"name":"RAY"},{"name":"BONK"},{"name":"SAMO"},{"name":"LaineSOL"},{"name":"BSOL"}]}},{"name":"ScopePriceIdTest","type":{"kind":"enum","variants":[{"name":"SOL"},{"name":"ETH"},{"name":"BTC"},{"name":"SRM"},{"name":"RAY"},{"name":"FTT"},{"name":"MSOL"},{"name":"scnSOL_SOL"},{"name":"BNB"},{"name":"AVAX"},{"name":"DaoSOL_SOL"},{"name":"SaberMSOL_SOL"},{"name":"USDH"},{"name":"StSOL"},{"name":"CSOL_SOL"},{"name":"CETH_ETH"},{"name":"CBTC_BTC"},{"name":"CMSOL_SOL"},{"name":"wstETH"},{"name":"LDO"},{"name":"USDC"},{"name":"CUSDC_USDC"},{"name":"USDT"},{"name":"ORCA"},{"name":"MNDE"},{"name":"HBB"},{"name":"CORCA_ORCA"},{"name":"CSLND_SLND"},{"name":"CSRM_SRM"},{"name":"CRAY_RAY"},{"name":"CFTT_FTT"},{"name":"CSTSOL_STSOL"},{"name":"SLND"},{"name":"DAI"},{"name":"JSOL_SOL"},{"name":"USH"},{"name":"UXD"},{"name":"USDH_TWAP"},{"name":"USH_TWAP"},{"name":"UXD_TWAP"},{"name":"HDG"},{"name":"DUST"},{"name":"USDR"},{"name":"USDR_TWAP"},{"name":"RATIO"},{"name":"UXP"},{"name":"KUXDUSDCORCA"},{"name":"JITOSOL_SOL"},{"name":"SOL_EMA"},{"name":"ETH_EMA"},{"name":"BTC_EMA"},{"name":"SRM_EMA"},{"name":"RAY_EMA"},{"name":"FTT_EMA"},{"name":"MSOL_EMA"},{"name":"BNB_EMA"},{"name":"AVAX_EMA"},{"name":"STSOL_EMA"},{"name":"USDC_EMA"},{"name":"USDT_EMA"},{"name":"SLND_EMA"},{"name":"DAI_EMA"},{"name":"wstETH_TWAP"},{"name":"DUST_TWAP"},{"name":"BONK"},{"name":"BONK_TWAP"},{"name":"SAMO"},{"name":"SAMO_TWAP"},{"name":"BSOL"},{"name":"LaineSOL"}]}},{"name":"DEX","type":{"kind":"enum","variants":[{"name":"Orca"},{"name":"Raydium"},{"name":"Meteora"}]}}],"errors":[{"code":6000,"name":"IntegerOverflow","msg":"Integer overflow"},{"code":6001,"name":"OperationForbidden","msg":"Operation Forbidden"},{"code":6002,"name":"ZeroAmount","msg":"[DEPRECATED] Zero amount"},{"code":6003,"name":"UnableToDeserializeAccount","msg":"Unable to deserialize account"},{"code":6004,"name":"VaultBalanceDoesNotMatchTokenA","msg":"[DEPRECATED] Vault balance does not match for token A"},{"code":6005,"name":"VaultBalanceDoesNotMatchTokenB","msg":"[DEPRECATED] Vault balance does not match for token B"},{"code":6006,"name":"SharesIssuedAmountDoesNotMatch","msg":"[DEPRECATED] Shares issued amount does not match"},{"code":6007,"name":"GlobalConfigKeyError","msg":"Key is not present in global config"},{"code":6008,"name":"SystemInEmergencyMode","msg":"[DEPRECATED] System is in emergency mode"},{"code":6009,"name":"GlobalDepositBlocked","msg":"Global deposit is currently blocked"},{"code":6010,"name":"GlobalWithdrawBlocked","msg":"Global withdraw is currently blocked"},{"code":6011,"name":"GlobalInvestBlocked","msg":"Global invest is currently blocked"},{"code":6012,"name":"OutOfRangeIntegralConversion","msg":"Out of range integral conversion attempted"},{"code":6013,"name":"MathOverflow","msg":"[DEPRECATED] Mathematical operation with overflow"},{"code":6014,"name":"TooMuchLiquidityToWithdraw","msg":"Unable to withdraw more liquidity than available in position"},{"code":6015,"name":"DepositAmountsZero","msg":"Deposit amounts must be greater than zero"},{"code":6016,"name":"SharesZero","msg":"Number of shares to withdraw must be greater than zero"},{"code":6017,"name":"StrategyNotActive","msg":"Strategy not active"},{"code":6018,"name":"UnharvestedAmounts","msg":"There are unharvested gains"},{"code":6019,"name":"InvalidRewardMapping","msg":"Reward mapping incorrect"},{"code":6020,"name":"InvalidRewardIndex","msg":"Reward index incorrect"},{"code":6021,"name":"OwnRewardUninitialized","msg":"Cannot use uninitialized reward vault"},{"code":6022,"name":"PriceNotValid","msg":"Price is not valid"},{"code":6023,"name":"SwapRewardImbalanced","msg":"Must provide almost equal amounts of tokens"},{"code":6024,"name":"SwapRewardTooSmall","msg":"Swap reward is zero or less than requested"},{"code":6025,"name":"SwapRewardLessThanRequested","msg":"Swap reward is less than what user requested as minimum"},{"code":6026,"name":"SwapRewardLessThanMinimum","msg":"Swap reward is less than minimum acceptable"},{"code":6027,"name":"WrongDiscriminator","msg":"Wrong discriminator"},{"code":6028,"name":"WrongMint","msg":"Wrong mint"},{"code":6029,"name":"WrongVault","msg":"Wrong vault"},{"code":6030,"name":"SwapAmountsZero","msg":"Swap amounts must be greater than zero"},{"code":6031,"name":"PriceTooOld","msg":"Price too old"},{"code":6032,"name":"CannotInvestZeroAmount","msg":"Cannot invest zero amount"},{"code":6033,"name":"MaxInvestableZero","msg":"Cannot have zero investable amount"},{"code":6034,"name":"CollectFeesBlocked","msg":"Collect fees is blocked"},{"code":6035,"name":"CollectRewardsBlocked","msg":"Collect rewards is blocked"},{"code":6036,"name":"SwapRewardsBlocked","msg":"Swap rewards is blocked"},{"code":6037,"name":"WrongRewardCollateralID","msg":"Reward collateral ID is incorrect for strategy"},{"code":6038,"name":"InvalidPositionAccount","msg":"Position account doesn't match internal records"},{"code":6039,"name":"CouldNotDeserializeScope","msg":"Scope account could not be deserialized"},{"code":6040,"name":"WrongCollateralID","msg":"[DEPRECATED] Collateral ID invalid for strategy"},{"code":6041,"name":"CollateralTokensExceedDepositCap","msg":"Collaterals exceed deposit cap"},{"code":6042,"name":"SwapUnevenVaultsBlocked","msg":"Swap uneven vaults is blocked"},{"code":6043,"name":"VaultsAreAlreadyBalanced","msg":"Cannot swap as vaults are already balanced"},{"code":6044,"name":"CannotSwapUnevenOutOfRange","msg":"Cannot swap uneven vaults when position is out of range"},{"code":6045,"name":"DivideByZero","msg":"Cannot divide by zero"},{"code":6046,"name":"DeltaATooLarge","msg":"[DEPRECATED] Delta A too large"},{"code":6047,"name":"DeltaBTooLarge","msg":"[DEPRECATED] Delta B too large"},{"code":6048,"name":"CannotExecutiveWithdrawZeroAmount","msg":"[DEPRECATED] Cannot executive withdraw zero amount"},{"code":6049,"name":"CannotWithdrawZeroAmount","msg":"Cannot withdraw zero amount"},{"code":6050,"name":"CannotCollectFeesOnZeroLiquidityPosition","msg":"[DEPRECATED] Cannot collect fees on zero liquidity position"},{"code":6051,"name":"StrategyNotActiveWhenDepositing","msg":"Cannot deposit inactive position"},{"code":6052,"name":"CannotOpenPositionWithExistingPosition","msg":"Cannot open position with existing opened position"},{"code":6053,"name":"CollateralTokensExceedDepositCapPerIxn","msg":"Collaterals exceed deposit ixn cap"},{"code":6054,"name":"CannotDepositOutOfRange","msg":"Cannot deposit when strategy out of range"},{"code":6055,"name":"CannotInvestOutOfRange","msg":"Cannot invest when strategy out of range"},{"code":6056,"name":"WithdrawalCapReached","msg":"Withdrawal cap is reached"},{"code":6057,"name":"TimestampDecrease","msg":"Timestamp decrease"},{"code":6058,"name":"CPINotAllowed","msg":"CPI not allowed"},{"code":6059,"name":"OrcaPriceTooDifferentFromScope","msg":"Cannot use orca price as it is too different from scope price"},{"code":6060,"name":"LowerTickLargerThanUpperTick","msg":"Lower tick larger than upper tick"},{"code":6061,"name":"LowerTickTooLow","msg":"Lower tick is lower than the minimal supported low tick"},{"code":6062,"name":"UpperTickTooLarge","msg":"Upper tick is larger than the maximum supported tick"},{"code":6063,"name":"LowerTickNotMultipleOfTickSpacing","msg":"Lower tick is not a multiple of tick spacing"},{"code":6064,"name":"UpperTickNotMultipleOfTickSpacing","msg":"Upper tick is not a multiple of tick spacing"},{"code":6065,"name":"CannotChangeAdminAuthority","msg":"Cannot change admin authority"},{"code":6066,"name":"CannotResizeAccount","msg":"Cannot resize with smaller new size"},{"code":6067,"name":"ScopeChainUpdateFailed","msg":"Scope chain update failed"},{"code":6068,"name":"PriceTooDivergentFromTwap","msg":"Price too divergent from twap"},{"code":6069,"name":"ExistingRewardOverride","msg":"[DEPRECATED] Can not override the existing reward"},{"code":6070,"name":"WrongKaminoRewardId","msg":"Kamino reward id exceeds the available slots"},{"code":6071,"name":"KaminoRewardNotExist","msg":"Kamino reward is not initialized"},{"code":6072,"name":"KaminoRewardAlreadyExists","msg":"Kamino reward is already initialized"},{"code":6073,"name":"KaminoCollateralNotValid","msg":"Kamino collateral is not valid"},{"code":6074,"name":"KaminoRewardExceedsAvailableAmount","msg":"[DEPRECATED] Expected kamino reward is bigger then the available amount within the vault"},{"code":6075,"name":"SwapUnevenVaultsOvershoot","msg":"Swap uneven vaults result in the opposite unbalance of the vaults"},{"code":6076,"name":"BpsNotInRange","msg":"Bps parameter passed to instruction is not in range"},{"code":6077,"name":"EmergencySwapBlocked","msg":"Emergency Swap is blocked"},{"code":6078,"name":"StrategyNotFrozen","msg":"Strategy is expected to be frozen for this operation"},{"code":6079,"name":"UnexpectedTokenAmountsPostSwap","msg":"Token left in vault post swap are lower than expected"},{"code":6080,"name":"AccountNotBelongToDEX","msg":"Account doesn't belong to the DEX"},{"code":6081,"name":"WrongDEXProgramID","msg":"Wrong DEX program ID"},{"code":6082,"name":"OrcaRewardUninitialized","msg":"Cannot use uninitialized orca reward vault"},{"code":6083,"name":"InvalidAdminAuthority","msg":"Invalid admin authority"},{"code":6084,"name":"PriceIsBiggerThanHeuristic","msg":"Token price is bigger than heuristic"},{"code":6085,"name":"PriceIsLowerThanHeuristic","msg":"Token price is lower than heuristic"},{"code":6086,"name":"AccountDifferentThanExpected","msg":"Account different than expected"},{"code":6087,"name":"SwapAmountsTooSmall","msg":"Swap amount below the minimum value"},{"code":6088,"name":"InvalidDexProgramId","msg":"Invalid dex program id"},{"code":6089,"name":"StrategyDepositBlocked","msg":"Strategy deposit is currently blocked"},{"code":6090,"name":"StrategyInvestBlocked","msg":"Strategy invest is currently blocked"},{"code":6091,"name":"StrategyWithdrawBlocked","msg":"Strategy withdraw is currently blocked"},{"code":6092,"name":"WrongSwapVaultDirection","msg":"Vault swap can't be performed in the required direction"},{"code":6093,"name":"SwapVaultsTooBig","msg":"Provided amount for vault swap is over the limit"},{"code":6094,"name":"SwapVaultsCashOutputBelowMinimum","msg":"Token out for cash based vault swap is below minimum expected"},{"code":6095,"name":"FlashIxsNotEnded","msg":"Flash ixs initiated without the closing ix in the transaction"},{"code":6096,"name":"FlashTxWithUnexpectedIxs","msg":"Some unexpected instructions are present in the tx. Either before or after the flash ixs, or some ix target the same program between"},{"code":6097,"name":"FlashIxsAccountMismatch","msg":"Some accounts differ between the two flash ixs"},{"code":6098,"name":"FlashIxsIncludeScope","msg":"A scope ix is present in a flash tx"},{"code":6099,"name":"FlashVaultSwapBlocked","msg":"Flash vault swap is blocked on this strategy"},{"code":6100,"name":"FlashVaultSwapWrongAmountToLeave","msg":"Unexpected amount of tokens in ata prior flash vault swap (wrong amount_to_leave_to_user)"},{"code":6101,"name":"DepositLessThanMinimum","msg":"Deposit amount less than minimal allowed"},{"code":6102,"name":"DepositWithoutInvestDisallowed","msg":"Cannot deposit without invest"},{"code":6103,"name":"InvalidScopeChain","msg":"Invalid Scope Chain"},{"code":6104,"name":"InvalidScopeTWAPChain","msg":"Invalid Scope TWAP Chain"},{"code":6105,"name":"PositionHasRemainingLiquidity","msg":"Existent position has liquidity, new position creation is forbidden"},{"code":6106,"name":"PoolRebalancing","msg":"Deposit is not allowed as pool is rebalancing"},{"code":6107,"name":"PermissionlessRebalancingDisabled","msg":"Permissionless rebalancing is disabled"},{"code":6108,"name":"ManualRebalanceInvalidOwner","msg":"Only the owner of the strategy can manually rebalance it"},{"code":6109,"name":"InvalidRebalanceType","msg":"Invalid rebalance type for the strategy"},{"code":6110,"name":"NoRebalanceNecessary","msg":"No rebalance necessary based on current rebalance type/parameters"},{"code":6111,"name":"TickArraysDoNotMatchRebalance","msg":"The given tick arrays do not match the rebalance result"},{"code":6112,"name":"StrategyPositionNotValid","msg":"Expected strategy position to be initialized"},{"code":6113,"name":"CouldNotDeserializeRebalanceState","msg":"Rebalance state could not be deserialized"},{"code":6114,"name":"CouldNotSerializeRebalanceState","msg":"Rebalance state could not be serialized"},{"code":6115,"name":"CouldNotDeserializeRebalanceParams","msg":"Rebalance params could not be deserialized"},{"code":6116,"name":"NotEnoughTokensForRatio","msg":"Deposit is not allowed as token amounts are not enough to match our holdings ratio"},{"code":6117,"name":"AmountsRepresentZeroShares","msg":"The provided amounts are too small"},{"code":6118,"name":"MaxLossExceeded","msg":"Rouding errors exceed the maximal loss tolerance"},{"code":6119,"name":"RewardNotStrategyToken","msg":"Reward does not match strategy token"},{"code":6120,"name":"DecimalToU64ConversionFailed","msg":"Decimal to u64 conversion failed"},{"code":6121,"name":"DecimalOperationFailed","msg":"Decimal operation failed"},{"code":6122,"name":"VaultBalancesCausesWrongSharesIssuance","msg":"Deposit is not allowed as the strategy is not fully invested in the pool "},{"code":6123,"name":"TokenDisabled","msg":"Token cannot be used in strategy creation"},{"code":6124,"name":"InvalidReferencePriceType","msg":"Invalid reference price type"},{"code":6125,"name":"TokenToSwapNotEnough","msg":"Token amount to be swapped is not enough"},{"code":6126,"name":"TokenAccountBalanceMismatch","msg":"Token amount in ata is different than the expected amount"},{"code":6127,"name":"UnexpectedProgramIdForPrerequisiteIx","msg":"Unexpected programID for prerequisite ix"},{"code":6128,"name":"ComputeFeesAndRewardsUpdateError","msg":"Got an error from the dex specific function while computing the fees/rewards update"},{"code":6129,"name":"SharesNotZero","msg":"There must be no shares issued when closing a strategy"},{"code":6130,"name":"InvalidScopeStakingRateChain","msg":"Invalid Scope staking rate Chain"},{"code":6131,"name":"StakingRateNotValid","msg":"Staking rate (provided by Scope) is not valid"},{"code":6132,"name":"DecimalToU128ConversionFailed","msg":"Decimal to u128 conversion failed"},{"code":6133,"name":"DecimalNegativeSqrtRoot","msg":"Decimal sqrt on negative number"},{"code":6134,"name":"DriftingOppositeDirection","msg":"Drifting strategy is moving in the opposite direction"},{"code":6135,"name":"WrongRewardCollateralId","msg":"Wrong reward collateral_id"},{"code":6136,"name":"CollateralInfoAlreadyExists","msg":"Collateral info already exists for given index"},{"code":6137,"name":"InvestTooEarly","msg":"Invest is too early after the position was opened"},{"code":6138,"name":"SwapUnevenTooEarly","msg":"Swap uneven is too early after the position was opened"},{"code":6139,"name":"FlashSwapTooEarly","msg":"Flash swap is too early after the position was opened"},{"code":6140,"name":"RebalancesCapReached","msg":"Rebalance caps reached, no rebalances are allowed until the end of the current interval"},{"code":6141,"name":"SwapUnevenInvalidAuthority","msg":"Cannot swap uneven because authority is set and the given signer does not correspond"},{"code":6142,"name":"InvalidTick","msg":"Invalid tick requested"},{"code":6143,"name":"MeteoraMathOverflow","msg":"Meteora math overflowed"},{"code":6144,"name":"StrategyTickArrayNotValid","msg":"Expected strategy tick arrays to be initialized"},{"code":6145,"name":"WrongEventAuthority","msg":"Wrong event authority"},{"code":6146,"name":"StrategyFieldUpdateNotAllowed","msg":"Strategy field update is not allowed"},{"code":6147,"name":"UnsupportedDex","msg":"DEX is not supported for this operation"},{"code":6148,"name":"InvalidBPSValue","msg":"Invalid BPS value provided"},{"code":6149,"name":"RewardVaultOverrideNotAllowed","msg":"Reward vault override not allowed"},{"code":6150,"name":"ComputeFeesAndRewardsInvalidReward","msg":"Got invalid reward from the dex specific function while computing the fees/rewards update"},{"code":6151,"name":"EmptyTreasury","msg":"No tokens to withdraw from treasury fee vault"},{"code":6152,"name":"ChangingPoolRewardMintMismatch","msg":"New pool reward mint does not match the old pool reward mint"},{"code":6153,"name":"ProvidedRewardVaultMismatch","msg":"The provided reward vault does not match the strategy state"},{"code":6154,"name":"RepeatedMint","msg":"The provided reward vault does not match the strategy state"},{"code":6155,"name":"UnsupportedTokenExtension","msg":"The token extension is not supported by the program"},{"code":6156,"name":"UnsupportedDexForToken22","msg":"Cannot initialize strategy with this dex while having a mint with token22"},{"code":6157,"name":"GlobalConfigInvalidScopePriceIndex","msg":"Scope price index is not present in global config"},{"code":6158,"name":"GlobalConfigScopePricesIdsFull","msg":"Scope prices ids array in global config is full"},{"code":6159,"name":"GlobalConfigAlreadyContainsScopePriceId","msg":"Scope prices ids array already contains given scope price id"},{"code":6160,"name":"GlobalConfigExpectedScopePricesAccount","msg":"Expected scope prices account being passed in when adding or updating a scope prices feed"},{"code":6161,"name":"RewardScopePriceAccountNotPresent","msg":"A reward scope price account should have been passed in, but it is missing"},{"code":6162,"name":"IncorrectScopePricesAccountID","msg":"Incorrect scope prices account id passed in"},{"code":6163,"name":"CouldNotCalculatePriceTwap","msg":"Could not calculate get_price_usd_unchecked()"},{"code":6164,"name":"ReferencePriceTooFarFromPoolPrice","msg":"Reference price is too far from the current pool price"},{"code":6165,"name":"InvestCooldownNotElapsed","msg":"Invest cooldown has not elapsed"},{"code":6166,"name":"InvestAmountBelowMinimum","msg":"Uninvested value is below the minimum invest trigger"},{"code":6167,"name":"DepositAndInvestDisabled","msg":"Deposit and invest is disabled on mainnet"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/kamino_farms.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.json b/olddocs/archivekbot2/idls/kamino_farms.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.json new file mode 100644 index 0000000..730916d --- /dev/null +++ b/olddocs/archivekbot2/idls/kamino_farms.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.json @@ -0,0 +1 @@ +{"version":"1.6.5","name":"farms","instructions":[{"name":"initializeGlobalConfig","accounts":[{"name":"globalAdmin","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"treasuryVaultsAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateGlobalConfig","accounts":[{"name":"globalAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[{"name":"mode","type":"u8"},{"name":"value","type":{"array":["u8",32]}}]},{"name":"initializeFarm","accounts":[{"name":"farmAdmin","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeFarmDelegated","accounts":[{"name":"farmAdmin","isMut":true,"isSigner":true},{"name":"farmDelegate","isMut":false,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeReward","accounts":[{"name":"farmAdmin","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"rewardTreasuryVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"treasuryVaultsAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"addRewards","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"payerRewardTokenAta","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"rewardIndex","type":"u64"}]},{"name":"updateFarmConfig","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"mode","type":"u16"},{"name":"data","type":"bytes"}]},{"name":"initializeUser","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":false},{"name":"delegatee","isMut":false,"isSigner":false},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"transferOwnership","accounts":[{"name":"oldOwner","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"newOwner","isMut":false,"isSigner":false},{"name":"oldUserState","isMut":true,"isSigner":false},{"name":"newUserState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"rewardUserOnce","accounts":[{"name":"delegateAuthority","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"userState","isMut":true,"isSigner":false}],"args":[{"name":"rewardIndex","type":"u64"},{"name":"amount","type":"u64"},{"name":"expectedRewardIssuedUnclaimed","type":"u64"}]},{"name":"refreshFarm","accounts":[{"name":"farmState","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"stake","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"userAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"setStakeDelegated","accounts":[{"name":"delegateAuthority","isMut":false,"isSigner":true},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false}],"args":[{"name":"newAmount","type":"u64"}]},{"name":"harvestReward","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"userRewardTokenAccount","isMut":true,"isSigner":false},{"name":"rewardsVault","isMut":true,"isSigner":false},{"name":"rewardsTreasuryVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"rewardIndex","type":"u64"}]},{"name":"unstake","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"stakeSharesScaled","type":"u128"}]},{"name":"refreshUserState","accounts":[{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"withdrawUnstakedDeposits","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"userAta","isMut":true,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawTreasury","accounts":[{"name":"globalAdmin","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardTreasuryVault","isMut":true,"isSigner":false},{"name":"treasuryVaultAuthority","isMut":false,"isSigner":false},{"name":"withdrawDestinationTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositToFarmVault","accounts":[{"name":"depositor","isMut":false,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"depositorAta","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawFromFarmVault","accounts":[{"name":"withdrawAuthority","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"withdrawerTokenAccount","isMut":true,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawSlashedAmount","accounts":[{"name":"crank","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"slashedAmountSpillAddress","isMut":true,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateFarmAdmin","accounts":[{"name":"pendingFarmAdmin","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false}],"args":[]},{"name":"updateGlobalConfigAdmin","accounts":[{"name":"pendingGlobalAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[]},{"name":"withdrawReward","accounts":[{"name":"farmAdmin","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"adminRewardTokenAta","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"rewardIndex","type":"u64"}]},{"name":"updateSecondDelegatedAuthority","accounts":[{"name":"globalAdmin","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"newSecondDelegatedAuthority","isMut":false,"isSigner":false}],"args":[]},{"name":"idlMissingTypes","accounts":[{"name":"globalAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[{"name":"globalConfigOptionKind","type":{"defined":"GlobalConfigOption"}},{"name":"farmConfigOptionKind","type":{"defined":"FarmConfigOption"}},{"name":"timeUnit","type":{"defined":"TimeUnit"}},{"name":"lockingMode","type":{"defined":"LockingMode"}},{"name":"rewardType","type":{"defined":"RewardType"}}]}],"accounts":[{"name":"FarmState","type":{"kind":"struct","fields":[{"name":"farmAdmin","type":"publicKey"},{"name":"globalConfig","type":"publicKey"},{"name":"token","type":{"defined":"TokenInfo"}},{"name":"rewardInfos","type":{"array":[{"defined":"RewardInfo"},10]}},{"name":"numRewardTokens","type":"u64"},{"name":"numUsers","docs":["Data used to calculate the rewards of the user"],"type":"u64"},{"name":"totalStakedAmount","docs":["The number of token in the `farm_vault` staked (getting rewards and fees)","Set such as `farm_vault.amount = total_staked_amount + total_pending_amount`"],"type":"u64"},{"name":"farmVault","type":"publicKey"},{"name":"farmVaultsAuthority","type":"publicKey"},{"name":"farmVaultsAuthorityBump","type":"u64"},{"name":"delegateAuthority","docs":["Only used for delegate farms","Set to `default()` otherwise"],"type":"publicKey"},{"name":"timeUnit","docs":["Raw representation of a `TimeUnit`","Seconds = 0, Slots = 1"],"type":"u8"},{"name":"isFarmFrozen","docs":["Automatically set to true in case of a full authority withdrawal","If true, the farm is frozen and no more deposits are allowed"],"type":"u8"},{"name":"isFarmDelegated","docs":["Indicates if the farm is a delegate farm","If true, the farm is a delegate farm and the `delegate_authority` is set*"],"type":"u8"},{"name":"isRewardUserOnceEnabled","docs":["If set to 1, indicates that the \"reward user once\" feature is enabled"],"type":"u8"},{"name":"isHarvestingPermissionless","type":"u8"},{"name":"padding0","type":{"array":["u8",3]}},{"name":"withdrawAuthority","docs":["Withdraw authority for the farm, allowed to lock deposited funds and withdraw them","Set to `default()` if unused (only the depositors can withdraw their funds)"],"type":"publicKey"},{"name":"depositWarmupPeriod","docs":["Delay between a user deposit and the moment it is considered as staked","0 if unused"],"type":"u32"},{"name":"withdrawalCooldownPeriod","docs":["Delay between a user unstake and the ability to withdraw his deposit."],"type":"u32"},{"name":"totalActiveStakeScaled","docs":["Total active stake of tokens in the farm (scaled from `Decimal` representation)."],"type":"u128"},{"name":"totalPendingStakeScaled","docs":["Total pending stake of tokens in the farm (scaled from `Decimal` representation).","(can be used by `withdraw_authority` but don't get rewards or fees)"],"type":"u128"},{"name":"totalPendingAmount","docs":["Total pending amount of tokens in the farm"],"type":"u64"},{"name":"slashedAmountCurrent","docs":["Slashed amounts from early withdrawal"],"type":"u64"},{"name":"slashedAmountCumulative","type":"u64"},{"name":"slashedAmountSpillAddress","type":"publicKey"},{"name":"lockingMode","docs":["Locking stake"],"type":"u64"},{"name":"lockingStartTimestamp","type":"u64"},{"name":"lockingDuration","type":"u64"},{"name":"lockingEarlyWithdrawalPenaltyBps","type":"u64"},{"name":"depositCapAmount","type":"u64"},{"name":"scopePrices","type":"publicKey"},{"name":"scopeOraclePriceId","type":"u64"},{"name":"scopeOracleMaxAge","type":"u64"},{"name":"pendingFarmAdmin","type":"publicKey"},{"name":"strategyId","type":"publicKey"},{"name":"delegatedRpsAdmin","type":"publicKey"},{"name":"vaultId","type":"publicKey"},{"name":"secondDelegatedAuthority","type":"publicKey"},{"name":"padding","type":{"array":["u64",74]}}]}},{"name":"GlobalConfig","type":{"kind":"struct","fields":[{"name":"globalAdmin","type":"publicKey"},{"name":"treasuryFeeBps","type":"u64"},{"name":"treasuryVaultsAuthority","type":"publicKey"},{"name":"treasuryVaultsAuthorityBump","type":"u64"},{"name":"pendingGlobalAdmin","type":"publicKey"},{"name":"padding1","type":{"array":["u128",126]}}]}},{"name":"UserState","type":{"kind":"struct","fields":[{"name":"userId","type":"u64"},{"name":"farmState","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"isFarmDelegated","docs":["Indicate if this user state is part of a delegated farm"],"type":"u8"},{"name":"padding0","type":{"array":["u8",7]}},{"name":"rewardsTallyScaled","docs":["Rewards tally used for computation of gained rewards","(scaled from `Decimal` representation)."],"type":{"array":["u128",10]}},{"name":"rewardsIssuedUnclaimed","docs":["Number of reward tokens ready for claim"],"type":{"array":["u64",10]}},{"name":"lastClaimTs","type":{"array":["u64",10]}},{"name":"activeStakeScaled","docs":["User stake deposited and usable, generating rewards and fees.","(scaled from `Decimal` representation)."],"type":"u128"},{"name":"pendingDepositStakeScaled","docs":["User stake deposited but not usable and not generating rewards yet.","(scaled from `Decimal` representation)."],"type":"u128"},{"name":"pendingDepositStakeTs","docs":["After this timestamp, pending user stake can be moved to user stake","Initialized to now() + delayed user stake period"],"type":"u64"},{"name":"pendingWithdrawalUnstakeScaled","docs":["User deposits unstaked, pending for withdrawal, not usable and not generating rewards.","(scaled from `Decimal` representation)."],"type":"u128"},{"name":"pendingWithdrawalUnstakeTs","docs":["After this timestamp, user can withdraw their deposit."],"type":"u64"},{"name":"bump","docs":["User bump used for account address validation"],"type":"u64"},{"name":"delegatee","docs":["Delegatee used for initialisation - useful to check against"],"type":"publicKey"},{"name":"lastStakeTs","type":"u64"},{"name":"rewardsIssuedCumulative","docs":["Cumulative rewards issued to the user - ONLY used for stats/analytics","DO NOT USE IN ANY CALCULATIONS","Old userStates will have this field populated only from the point of release","not reflecting any historical data before this was released"],"type":{"array":["u64",10]}},{"name":"padding1","type":{"array":["u64",40]}}]}},{"name":"OraclePrices","type":{"kind":"struct","fields":[{"name":"oracleMappings","type":"publicKey"},{"name":"prices","type":{"array":[{"defined":"DatedPrice"},512]}}]}}],"types":[{"name":"FarmConfigOption","type":{"kind":"enum","variants":[{"name":"UpdateRewardRps"},{"name":"UpdateRewardMinClaimDuration"},{"name":"WithdrawAuthority"},{"name":"DepositWarmupPeriod"},{"name":"WithdrawCooldownPeriod"},{"name":"RewardType"},{"name":"RpsDecimals"},{"name":"LockingMode"},{"name":"LockingStartTimestamp"},{"name":"LockingDuration"},{"name":"LockingEarlyWithdrawalPenaltyBps"},{"name":"DepositCapAmount"},{"name":"SlashedAmountSpillAddress"},{"name":"ScopePricesAccount"},{"name":"ScopeOraclePriceId"},{"name":"ScopeOracleMaxAge"},{"name":"UpdateRewardScheduleCurvePoints"},{"name":"UpdatePendingFarmAdmin"},{"name":"UpdateStrategyId"},{"name":"UpdateDelegatedRpsAdmin"},{"name":"UpdateVaultId"},{"name":"UpdateExtraDelegatedAuthority"},{"name":"UpdateIsRewardUserOnceEnabled"},{"name":"UpdateDelegatedAuthority"},{"name":"UpdateIsHarvestingPermissionless"}]}},{"name":"GlobalConfigOption","type":{"kind":"enum","variants":[{"name":"SetPendingGlobalAdmin"},{"name":"SetTreasuryFeeBps"}]}},{"name":"LockingMode","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Continuous"},{"name":"WithExpiry"}]}},{"name":"RewardInfo","type":{"kind":"struct","fields":[{"name":"token","type":{"defined":"TokenInfo"}},{"name":"rewardsVault","type":"publicKey"},{"name":"rewardsAvailable","type":"u64"},{"name":"rewardScheduleCurve","type":{"defined":"RewardScheduleCurve"}},{"name":"minClaimDurationSeconds","type":"u64"},{"name":"lastIssuanceTs","type":"u64"},{"name":"rewardsIssuedUnclaimed","type":"u64"},{"name":"rewardsIssuedCumulative","type":"u64"},{"name":"rewardPerShareScaled","type":"u128"},{"name":"placeholder0","type":"u64"},{"name":"rewardType","type":"u8"},{"name":"rewardsPerSecondDecimals","type":"u8"},{"name":"padding0","type":{"array":["u8",6]}},{"name":"padding1","type":{"array":["u64",20]}}]}},{"name":"RewardPerTimeUnitPoint","type":{"kind":"struct","fields":[{"name":"tsStart","type":"u64"},{"name":"rewardPerTimeUnit","type":"u64"}]}},{"name":"RewardScheduleCurve","type":{"kind":"struct","fields":[{"name":"points","docs":["This is a stepwise function, meaning that each point represents","how many rewards are issued per time unit since the beginning","of that point until the beginning of the next point.","This is not a linear curve, there is no interpolation going on.","A curve can be [[t0, 100], [t1, 50], [t2, 0]]","meaning that from t0 to t1, 100 rewards are issued per time unit,","from t1 to t2, 50 rewards are issued per time unit, and after t2 it stops","Another curve, can be [[t0, 100], [u64::max, 0]]","meaning that from t0 to u64::max, 100 rewards are issued per time unit"],"type":{"array":[{"defined":"RewardPerTimeUnitPoint"},20]}}]}},{"name":"RewardType","type":{"kind":"enum","variants":[{"name":"Proportional"},{"name":"Constant"}]}},{"name":"TimeUnit","type":{"kind":"enum","variants":[{"name":"Seconds"},{"name":"Slots"}]}},{"name":"TokenInfo","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"decimals","type":"u64"},{"name":"tokenProgram","type":"publicKey"},{"name":"padding","type":{"array":["u64",6]}}]}},{"name":"DatedPrice","type":{"kind":"struct","fields":[{"name":"price","type":{"defined":"Price"}},{"name":"lastUpdatedSlot","type":"u64"},{"name":"unixTimestamp","type":"u64"},{"name":"reserved","type":{"array":["u64",2]}},{"name":"reserved2","type":{"array":["u16",3]}},{"name":"index","type":"u16"}]}},{"name":"Price","type":{"kind":"struct","fields":[{"name":"value","type":"u64"},{"name":"exp","type":"u64"}]}}],"errors":[{"code":6000,"name":"StakeZero","msg":"Cannot stake 0 amount"},{"code":6001,"name":"UnstakeZero","msg":"Cannot unstake 0 amount"},{"code":6002,"name":"NothingToUnstake","msg":"Nothing to unstake"},{"code":6003,"name":"NoRewardToHarvest","msg":"No reward to harvest"},{"code":6004,"name":"NoRewardInList","msg":"Reward not present in reward list"},{"code":6005,"name":"RewardAlreadyInitialized","msg":"Reward already initialized"},{"code":6006,"name":"MaxRewardNumberReached","msg":"Max number of reward tokens reached"},{"code":6007,"name":"RewardDoesNotExist","msg":"Reward does not exist"},{"code":6008,"name":"WrongRewardVaultAccount","msg":"Reward vault exists but the account is wrong"},{"code":6009,"name":"RewardVaultMismatch","msg":"Reward vault pubkey does not match staking pool vault"},{"code":6010,"name":"RewardVaultAuthorityMismatch","msg":"Reward vault authority pubkey does not match staking pool vault"},{"code":6011,"name":"NothingStaked","msg":"Nothing staked, cannot collect any rewards"},{"code":6012,"name":"IntegerOverflow","msg":"Integer overflow"},{"code":6013,"name":"ConversionFailure","msg":"Conversion failure"},{"code":6014,"name":"UnexpectedAccount","msg":"Unexpected account in instruction"},{"code":6015,"name":"OperationForbidden","msg":"Operation forbidden"},{"code":6016,"name":"MathOverflow","msg":"Mathematical operation with overflow"},{"code":6017,"name":"MinClaimDurationNotReached","msg":"Minimum claim duration has not been reached"},{"code":6018,"name":"RewardsVaultHasDelegate","msg":"Reward vault has a delegate"},{"code":6019,"name":"RewardsVaultHasCloseAuthority","msg":"Reward vault has a close authority"},{"code":6020,"name":"FarmVaultHasDelegate","msg":"Farm vault has a delegate"},{"code":6021,"name":"FarmVaultHasCloseAuthority","msg":"Farm vault has a close authority"},{"code":6022,"name":"RewardsTreasuryVaultHasDelegate","msg":"Reward vault has a delegate"},{"code":6023,"name":"RewardsTreasuryVaultHasCloseAuthority","msg":"Reward vault has a close authority"},{"code":6024,"name":"UserAtaRewardVaultMintMissmatch","msg":"User ata and reward vault have different mints"},{"code":6025,"name":"UserAtaFarmTokenMintMissmatch","msg":"User ata and farm token have different mints"},{"code":6026,"name":"TokenFarmTokenMintMissmatch","msg":"Token mint and farm token have different mints"},{"code":6027,"name":"RewardAtaRewardMintMissmatch","msg":"Reward ata mint is different than reward mint"},{"code":6028,"name":"RewardAtaOwnerNotPayer","msg":"Reward ata owner is different than payer"},{"code":6029,"name":"InvalidGlobalConfigMode","msg":"Mode to update global_config is invalid"},{"code":6030,"name":"RewardIndexOutOfRange","msg":"Reward Index is higher than number of rewards"},{"code":6031,"name":"NothingToWithdraw","msg":"No tokens available to withdraw"},{"code":6032,"name":"UserDelegatedFarmNonDelegatedMissmatch","msg":"user, user_ref, authority and payer must match for non-delegated farm"},{"code":6033,"name":"AuthorityFarmDelegateMissmatch","msg":"Authority must match farm delegate authority"},{"code":6034,"name":"FarmNotDelegated","msg":"Farm not delegated, can not complete operation"},{"code":6035,"name":"FarmDelegated","msg":"Operation not allowed for delegated farm"},{"code":6036,"name":"UnstakeNotElapsed","msg":"Unstake lockup period is not elapsed. Deposit is locked until end of unstake period"},{"code":6037,"name":"PendingWithdrawalNotWithdrawnYet","msg":"Pending withdrawal already exist and not withdrawn yet"},{"code":6038,"name":"DepositZero","msg":"Cannot deposit zero amount directly to farm vault"},{"code":6039,"name":"InvalidConfigValue","msg":"Invalid config value"},{"code":6040,"name":"InvalidPenaltyPercentage","msg":"Invalid penalty percentage"},{"code":6041,"name":"EarlyWithdrawalNotAllowed","msg":"Early withdrawal not allowed"},{"code":6042,"name":"InvalidLockingTimestamps","msg":"Invalid locking timestamps"},{"code":6043,"name":"InvalidRpsCurvePoint","msg":"Invalid reward rate curve point"},{"code":6044,"name":"InvalidTimestamp","msg":"Invalid timestamp"},{"code":6045,"name":"DepositCapReached","msg":"Deposit cap reached"},{"code":6046,"name":"MissingScopePrices","msg":"Missing Scope Prices"},{"code":6047,"name":"ScopeOraclePriceTooOld","msg":"Scope Oracle Price Too Old"},{"code":6048,"name":"InvalidOracleConfig","msg":"Invalid Oracle Config"},{"code":6049,"name":"CouldNotDeserializeScope","msg":"Could not deserialize scope"},{"code":6050,"name":"RewardAtaOwnerNotAdmin","msg":"Reward ata owner is different than farm admin"},{"code":6051,"name":"WithdrawRewardZeroAvailable","msg":"Cannot withdraw reward as available amount is zero"},{"code":6052,"name":"RewardScheduleCurveSet","msg":"Cannot withdraw reward as reward schedule is set"},{"code":6053,"name":"UnsupportedTokenExtension","msg":"Cannot initialize farm while having a mint with token22 and requested extensions"},{"code":6054,"name":"InvalidFarmConfigUpdateAuthority","msg":"Invalid authority for updating farm config"},{"code":6055,"name":"InvalidTransferOwnershipOldOwner","msg":"Invalid authority for transfer ownersip new user state initialization"},{"code":6056,"name":"InvalidTransferOwnershipFarmState","msg":"Invalid farm state for transfer ownership new user state initialization"},{"code":6057,"name":"InvalidTransferOwnershipUserStateOwnerDelegatee","msg":"Invalid user state for transfer ownership, owner must match delegatee"},{"code":6058,"name":"InvalidTransferOwnershipFarmStateLockingMode","msg":"Invalid farm state locking mode for transfer ownership, must be 0"},{"code":6059,"name":"InvalidTransferOwnershipFarmStateWithdrawCooldownPeriod","msg":"Invalid farm state withdrawal cooldown period for transfer ownership, must be 0"},{"code":6060,"name":"InvalidTransferOwnershipStakeAmount","msg":"Invalid transfer ownership stake amount, must be equal to unstaked deposits"},{"code":6061,"name":"InvalidTransferOwnershipNewOwner","msg":"Invalid authority for transfer ownersip new user state initialization"},{"code":6062,"name":"InvalidTransferOwnershipFarmStateDepositWarmupPeriod","msg":"Invalid farm state deposit warmup period for transfer ownership, must be 0 if old user has stake"},{"code":6063,"name":"RewardUserOnceFeatureDisabled","msg":"Reward User Once feature is disabled"},{"code":6064,"name":"InvalidDelegatedAuthorityUpdate","msg":"Can not set delegate_authority to default pubkey - farm is delegated"},{"code":6065,"name":"UserTokenAccountOwnerMismatch","msg":"User token account owner does not match user state owner"},{"code":6066,"name":"HarvestingNotPermissionlessPayerMismatch","msg":"Harvesting is not permissionless, payer does not match user state owner"},{"code":6067,"name":"CurrentRewardIssuedUnclaimedMismatch","msg":"Current reward issued unclaimed does not match expected value"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/kamino_lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.json b/olddocs/archivekbot2/idls/kamino_lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.json new file mode 100644 index 0000000..566e666 --- /dev/null +++ b/olddocs/archivekbot2/idls/kamino_lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.json @@ -0,0 +1 @@ +{"version":"1.23.0","name":"kamino_lending","instructions":[{"name":"initLendingMarket","accounts":[{"name":"lendingMarketOwner","isMut":true,"isSigner":true},{"name":"lendingMarket","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"quoteCurrency","type":{"array":["u8",32]}}]},{"name":"updateLendingMarket","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"lendingMarket","isMut":true,"isSigner":false}],"args":[{"name":"mode","type":"u64"},{"name":"value","type":{"array":["u8",72]}}]},{"name":"updateLendingMarketOwner","accounts":[{"name":"lendingMarketOwnerCached","isMut":false,"isSigner":true},{"name":"lendingMarket","isMut":true,"isSigner":false}],"args":[]},{"name":"initReserve","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"feeReceiver","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveCollateralSupply","isMut":true,"isSigner":false},{"name":"initialLiquiditySource","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"cloneReserveConfig","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"targetLendingMarket","isMut":false,"isSigner":false,"docs":["The lending market of the [Self::target_reserve].","","The [Self::source_reserve] can come from a different market."]},{"name":"sourceReserve","isMut":false,"isSigner":false,"docs":["The reserve to be used as source for the configuration clone."]},{"name":"targetReserve","isMut":true,"isSigner":false,"docs":["The reserve to have its configuration replaced by a clone."]}],"args":[{"name":"customizations","type":{"defined":"ReserveConfigCustomizationArgs"}}]},{"name":"initFarmsForReserve","accounts":[{"name":"lendingMarketOwner","isMut":true,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"farmsProgram","isMut":false,"isSigner":false},{"name":"farmsGlobalConfig","isMut":false,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"farmsVaultAuthority","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"mode","type":"u8"}]},{"name":"updateReserveConfig","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false}],"args":[{"name":"mode","type":{"defined":"UpdateConfigMode"}},{"name":"value","type":"bytes"},{"name":"skipConfigIntegrityValidation","type":"bool"}]},{"name":"redeemFees","accounts":[{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"reserveSupplyLiquidity","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawProtocolFee","accounts":[{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"feeVault","isMut":true,"isSigner":false},{"name":"feeCollectorAta","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"seedDepositOnInitReserve","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"initialLiquiditySource","isMut":true,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"topupReserveRewards","docs":["Sponsor a reserve's rewards distribution by topping up its `rewards_amount_available` budget."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"sourceLiquidity","isMut":true,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"socializeLoss","accounts":[{"name":"lendingMarketOwner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"socializeLossV2","accounts":[{"name":"socializeLossAccounts","accounts":[{"name":"lendingMarketOwner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"markObligationForDeleveraging","accounts":[{"name":"lendingMarketOwner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false}],"args":[{"name":"autodeleverageTargetLtvPct","type":"u8"}]},{"name":"refreshReserve","accounts":[{"name":"reserve","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"pythOracle","isMut":false,"isSigner":false,"isOptional":true},{"name":"switchboardPriceOracle","isMut":false,"isSigner":false,"isOptional":true},{"name":"switchboardTwapOracle","isMut":false,"isSigner":false,"isOptional":true},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"refreshReservesBatch","accounts":[],"args":[{"name":"skipPriceUpdates","type":"bool"}]},{"name":"depositReserveLiquidity","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"reserve","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"userDestinationCollateral","isMut":true,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"redeemReserveCollateral","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"userSourceCollateral","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"initObligation","accounts":[{"name":"obligationOwner","isMut":false,"isSigner":true},{"name":"feePayer","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"seed1Account","isMut":false,"isSigner":false},{"name":"seed2Account","isMut":false,"isSigner":false},{"name":"ownerUserMetadata","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitObligationArgs"}}]},{"name":"initObligationFarmsForReserve","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveFarmState","isMut":true,"isSigner":false},{"name":"obligationFarm","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"farmsProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"mode","type":"u8"}]},{"name":"refreshObligationFarmsForReserve","accounts":[{"name":"crank","isMut":false,"isSigner":true},{"name":"baseAccounts","accounts":[{"name":"obligation","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"reserveFarmState","isMut":true,"isSigner":false,"docs":["`obligation_farm_user_state`'s own `farm_state` field, in the handler.","(Cannot live as an Anchor constraint because the handler is also reached","via `cpi_refresh_farms` from v2 host instructions, which bypass Anchor.)"]},{"name":"obligationFarmUserState","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false}]},{"name":"farmsProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"mode","type":"u8"}]},{"name":"refreshObligation","accounts":[{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false}],"args":[]},{"name":"depositObligationCollateral","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"depositReserve","isMut":true,"isSigner":false},{"name":"reserveDestinationCollateral","isMut":true,"isSigner":false},{"name":"userSourceCollateral","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"depositObligationCollateralV2","accounts":[{"name":"depositAccounts","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"depositReserve","isMut":true,"isSigner":false},{"name":"reserveDestinationCollateral","isMut":true,"isSigner":false},{"name":"userSourceCollateral","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"withdrawObligationCollateral","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"userDestinationCollateral","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"withdrawObligationCollateralV2","accounts":[{"name":"withdrawAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"userDestinationCollateral","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"borrowObligationLiquidity","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"borrowReserve","isMut":true,"isSigner":false},{"name":"borrowReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceLiquidity","isMut":true,"isSigner":false},{"name":"borrowReserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"referrerTokenState","isMut":true,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"borrowObligationLiquidityV2","accounts":[{"name":"borrowAccounts","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"borrowReserve","isMut":true,"isSigner":false},{"name":"borrowReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceLiquidity","isMut":true,"isSigner":false},{"name":"borrowReserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"referrerTokenState","isMut":true,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"repayObligationLiquidity","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"repayReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveDestinationLiquidity","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"repayObligationLiquidityV2","accounts":[{"name":"repayAccounts","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"repayReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveDestinationLiquidity","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"repayAndWithdrawAndRedeem","accounts":[{"name":"repayAccounts","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"repayReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveDestinationLiquidity","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"withdrawAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"collateralFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"debtFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"repayAmount","type":"u64"},{"name":"withdrawCollateralAmount","type":"u64"}]},{"name":"depositAndWithdraw","accounts":[{"name":"depositAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"withdrawAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"depositFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"withdrawFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"},{"name":"withdrawCollateralAmount","type":"u64"}]},{"name":"depositReserveLiquidityAndObligationCollateral","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"depositReserveLiquidityAndObligationCollateralV2","accounts":[{"name":"depositAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"withdrawObligationCollateralAndRedeemReserveCollateral","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"withdrawObligationCollateralAndRedeemReserveCollateralV2","accounts":[{"name":"withdrawAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"liquidateObligationAndRedeemReserveCollateral","accounts":[{"name":"liquidator","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"repayReserve","isMut":true,"isSigner":false},{"name":"repayReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"repayReserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"withdrawReserveCollateralMint","isMut":true,"isSigner":false},{"name":"withdrawReserveCollateralSupply","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"userDestinationCollateral","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"repayLiquidityTokenProgram","isMut":false,"isSigner":false},{"name":"withdrawLiquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"},{"name":"minAcceptableReceivedLiquidityAmount","type":"u64"},{"name":"maxAllowedLtvOverridePercent","type":"u64"}]},{"name":"liquidateObligationAndRedeemReserveCollateralV2","accounts":[{"name":"liquidationAccounts","accounts":[{"name":"liquidator","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"repayReserve","isMut":true,"isSigner":false},{"name":"repayReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"repayReserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"withdrawReserveCollateralMint","isMut":true,"isSigner":false},{"name":"withdrawReserveCollateralSupply","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"userDestinationCollateral","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"repayLiquidityTokenProgram","isMut":false,"isSigner":false},{"name":"withdrawLiquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"collateralFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"debtFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"},{"name":"minAcceptableReceivedLiquidityAmount","type":"u64"},{"name":"maxAllowedLtvOverridePercent","type":"u64"}]},{"name":"flashRepayReserveLiquidity","accounts":[{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveDestinationLiquidity","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"reserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"referrerTokenState","isMut":true,"isSigner":false,"isOptional":true},{"name":"referrerAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"sysvarInfo","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"},{"name":"borrowInstructionIndex","type":"u8"}]},{"name":"flashBorrowReserveLiquidity","accounts":[{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceLiquidity","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"reserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"referrerTokenState","isMut":true,"isSigner":false,"isOptional":true},{"name":"referrerAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"sysvarInfo","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"requestElevationGroup","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false}],"args":[{"name":"elevationGroup","type":"u8"}]},{"name":"initReferrerTokenState","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"referrer","isMut":false,"isSigner":false},{"name":"referrerTokenState","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initUserMetadata","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"feePayer","isMut":true,"isSigner":true},{"name":"userMetadata","isMut":true,"isSigner":false},{"name":"referrerUserMetadata","isMut":false,"isSigner":false,"isOptional":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"userLookupTable","type":"publicKey"}]},{"name":"withdrawReferrerFees","accounts":[{"name":"referrer","isMut":true,"isSigner":true},{"name":"referrerTokenState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSupplyLiquidity","isMut":true,"isSigner":false},{"name":"referrerTokenAccount","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initReferrerStateAndShortUrl","accounts":[{"name":"referrer","isMut":true,"isSigner":true},{"name":"referrerState","isMut":true,"isSigner":false},{"name":"referrerShortUrl","isMut":true,"isSigner":false},{"name":"referrerUserMetadata","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"shortUrl","type":"string"}]},{"name":"deleteReferrerStateAndShortUrl","accounts":[{"name":"referrer","isMut":true,"isSigner":true},{"name":"referrerState","isMut":true,"isSigner":false},{"name":"shortUrl","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"setObligationOrder","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false}],"args":[{"name":"index","type":"u8"},{"name":"order","type":{"defined":"ObligationOrder"}}]},{"name":"setBorrowOrder","accounts":[{"name":"owner","isMut":false,"isSigner":true,"docs":["The [Self::obligation]'s owner."]},{"name":"obligation","isMut":true,"isSigner":false,"docs":["The obligation to set the [BorrowOrder] on."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The [Self::obligation]'s market - needed to validate feature flags and minimum order value."]},{"name":"reserve","isMut":false,"isSigner":false,"docs":["The reserve matching the [Self::debt_liquidity_mint] - needed for the minimum order value","check. On cancellation, this account is ignored (but still must belong to the same market)."]},{"name":"filledDebtDestination","isMut":false,"isSigner":false,"docs":["The [BorrowOrder::filled_debt_destination] to set on order creation. Not editable on order","updates.","Ignored when cancelling the order."]},{"name":"debtLiquidityMint","isMut":false,"isSigner":false,"docs":["The [BorrowOrder::debt_liquidity_mint] to set on order creation. Not editable on order","updates.","Ignored when cancelling the order."]},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"orderConfig","type":{"defined":"BorrowOrderConfigArgs"}},{"name":"minExpectedCurrentRemainingDebtAmount","type":"u64"}]},{"name":"updateObligationConfig","accounts":[{"name":"owner","isMut":false,"isSigner":true,"docs":["Obligation's owner (signer - only the owner can modify the obligation's configuration)."]},{"name":"obligation","isMut":true,"isSigner":false,"docs":["The obligation to update."]},{"name":"borrowReserve","isMut":false,"isSigner":false,"isOptional":true,"docs":["The reserve of a selected one among the [Obligation::borrows].","","Required only if the config update affects a single borrow (for validating its new config)."]},{"name":"depositReserve","isMut":false,"isSigner":false,"isOptional":true,"docs":["The reserve of a selected one among the [Obligation::deposits].","","Required only if the config update affects a single deposit (for validating its new config)."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The lending market (for validating the obligation's new config)."]}],"args":[{"name":"mode","type":{"defined":"UpdateObligationConfigMode"}},{"name":"value","type":"bytes"}]},{"name":"rolloverFixedTermBorrow","accounts":[{"name":"rolloverAccounts","accounts":[{"name":"payer","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false,"docs":["The obligation with a borrow to be rolled over (or migrated)."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The [Self::obligation]'s market, needed for validations against the market-wide","configuration."]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The [Self::lending_market]'s authority, needed to transfer the newly-borrowed funds out of","the [Self::reserve_source_liquidity]."]},{"name":"sourceBorrowReserve","isMut":true,"isSigner":false,"docs":["The reserve used by the existing [Self::obligation]'s borrow that needs to rollover from."]},{"name":"targetBorrowReserve","isMut":true,"isSigner":false,"docs":["The reserve to rollover the borrow into - possibly (but not necessarily) the same as","[Self::source_borrow_reserve]'s (but definitely of the same liquidity mint)."]},{"name":"liquidityMint","isMut":false,"isSigner":false,"docs":["The mint of [Self::source_borrow_reserve] and [Self::target_borrow_reserve], needed to","transfer funds between them."]},{"name":"sourceBorrowReserveLiquidity","isMut":true,"isSigner":false,"docs":["The vault of [Self::source_borrow_reserve], from which the funds are transferred."]},{"name":"targetBorrowReserveLiquidity","isMut":true,"isSigner":false,"docs":["The vault of [Self::target_borrow_reserve], from which the funds are transferred."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["The token program of [Self::liquidity_mint] - needed to execute the transfer."]}]},{"name":"sourceFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"targetFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"fillBorrowOrder","accounts":[{"name":"borrowAccounts","accounts":[{"name":"payer","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false,"docs":["The obligation with a [BorrowOrder]."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The [Self::obligation]'s market - needed for borrowing-related configuration."]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The [Self::lending_market]'s authority, needed to transfer the newly-borrowed funds out of","the [Self::reserve_source_liquidity]."]},{"name":"borrowReserve","isMut":true,"isSigner":false,"docs":["The reserve to borrow from.","","Its mint must match the asset requested by the [BorrowOrder::debt_liquidity_mint]."]},{"name":"borrowReserveLiquidityMint","isMut":false,"isSigner":false,"docs":["The mint of [Self::borrow_reserve] - needed to execute the transfer."]},{"name":"reserveSourceLiquidity","isMut":true,"isSigner":false,"docs":["The vault of [Self::borrow_reserve], from which the funds are transferred."]},{"name":"borrowReserveLiquidityFeeReceiver","isMut":true,"isSigner":false,"docs":["The fee vault of [Self::borrow_reserve], to which the fees are transferred."]},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false,"docs":["The destination token account that should receive the newly borrowed funds.","","It must match [BorrowOrder::filled_debt_destination], owner and mint.","","**Warning:** An altered destination account will prevent an order from being filled."]},{"name":"referrerTokenState","isMut":true,"isSigner":false,"isOptional":true,"docs":["The referrer's account, for accumulating fees - needed if the [Obligation::has_referrer]."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["The token program of [Self::borrow_reserve] - needed to execute the transfer."]},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"initiateObligationOwnershipTransfer","accounts":[{"name":"owner","isMut":false,"isSigner":true,"docs":["Current owner must sign this transaction"]},{"name":"obligation","isMut":true,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"newOwner","type":"publicKey"}]},{"name":"approveObligationOwnershipTransfer","accounts":[{"name":"globalAdmin","isMut":false,"isSigner":true,"docs":["Global admin must sign this transaction"]},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"pendingOwner","isMut":false,"isSigner":false,"docs":["The pending owner that will receive ownership after acceptance.","Must match the pending_owner stored in the obligation."]}],"args":[]},{"name":"acceptObligationOwnership","accounts":[{"name":"pendingOwner","isMut":false,"isSigner":true,"docs":["Pending owner must sign this transaction"]},{"name":"obligation","isMut":true,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"abortObligationOwnershipTransfer","accounts":[{"name":"owner","isMut":false,"isSigner":true,"docs":["Current owner must sign this transaction"]},{"name":"obligation","isMut":true,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"enqueueToWithdraw","accounts":[{"name":"owner","isMut":true,"isSigner":true,"docs":["The depositor holding ctokens."]},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The market's authority, needed to initialize the [Self::owner_queued_collateral_vault]."]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"userSourceCollateralTa","isMut":true,"isSigner":false,"docs":["The source of collateral to be enqueued."]},{"name":"userDestinationLiquidityTa","isMut":false,"isSigner":false,"docs":["The account to which the liquidity should be finally transferred later (to be recorded in","the ticket)."]},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveCollateralMint","isMut":false,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false,"docs":["The collateral's program - needed for invoking the transfer to the vault *and* (implicitly)","for handling the `init_if_needed`."]},{"name":"withdrawTicket","isMut":true,"isSigner":false,"docs":["The new account to be initialized with the issued ticket's data."]},{"name":"ownerQueuedCollateralVault","isMut":true,"isSigner":false,"docs":["The per-owner \"this reserve's queued collateral\" vault (in which the collateral will be","locked)."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The System program - needed only for `init` / `init_if_needed` of the accounts above."]},{"name":"progressCallbackCustomAccount0","isMut":false,"isSigner":false,"isOptional":true,"docs":["The first one out of maximum 2 custom accounts that may be required if the optional \"ticket","progress callback\" is configured for this ticket.","","The expected custom accounts are validated based on the `progress_callback_type` instruction","argument. The currently supported ones are:","- for [ProgressCallbackType::None] no custom accounts are expected (this is the default","behavior, when the instruction data is zeroed or absent).","- for [ProgressCallbackType::KlendQueueAccountingHandlerOnKvault], only the `_0` custom","account is required:","- the `_0` custom account must represent the `VaultState` which disinvests from the","reserve (readonly; needed to be later passed as an input to the Kvault's handler);","- the `_1` custom account is ignored;","- the `owner` account (i.e. the signer) must be a Kvault-owned PDA base authority","associated with the vault indicated by `_0` (needed to prove that Kvault is CPI'ing this","handler)."]},{"name":"progressCallbackCustomAccount1","isMut":false,"isSigner":false,"isOptional":true,"docs":["The second possible account (see the `progress_callback_custom_account_0` above)."]},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"},{"name":"progressCallbackType","type":{"defined":"ProgressCallbackType"}}]},{"name":"withdrawQueuedLiquidity","accounts":[{"name":"payer","isMut":true,"isSigner":true,"docs":["The executor of the permissionless tx (not necessarily the ticket owner)."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The lending market."]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The market's authority, needed for burning the collateral (from","[Self::owner_queued_collateral_vault]) and transferring the liquidity (from","[Self::reserve_liquidity_supply])."]},{"name":"reserve","isMut":true,"isSigner":false,"docs":["The reserve."]},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false,"docs":["The liquidity mint, needed to invoke the transfer."]},{"name":"reserveCollateralMint","isMut":true,"isSigner":false,"docs":["The collateral mint, needed to burn (`mut`!) the queued collateral."]},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false,"docs":["The liquidity supply vault (to withdraw the liquidity from)."]},{"name":"ownerQueuedCollateralVault","isMut":true,"isSigner":false,"docs":["The per-owner \"this reserve's queued collateral\" vault (from which the collateral will be","burnt)."]},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false,"docs":["The token account to which the liquidity should be transferred (the one recorded in the","ticket)."]},{"name":"collateralTokenProgram","isMut":false,"isSigner":false,"docs":["The program of [Self::reserve_collateral_mint], needed for transfer."]},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false,"docs":["The program of [Self::reserve_liquidity_mint], needed for transfer."]},{"name":"withdrawTicket","isMut":true,"isSigner":false,"docs":["The ticket's data itself.","","Note: in case of complete withdrawal, this account will be closed. In case of partial","withdrawal, its [WithdrawTicket::queued_collateral_amount] will simply be reduced, and the","ticket will maintain its position in the queue."]},{"name":"withdrawTicketOwner","isMut":true,"isSigner":false,"docs":["The owner of the [Self::withdraw_ticket]; needed only to return the rent of the","[WithdrawTicket] account (if it is getting fully-consumed and closed here)."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["The ATA program - needed for potential destination ATA creation."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The System program - needed for potential destination ATA creation."]},{"name":"progressCallbackProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["The progress callback program (if configured by the withdraw ticket)."]},{"name":"progressCallbackCustomAccount0","isMut":false,"isSigner":false,"isOptional":true,"docs":["The first one out of maximum 2 custom accounts that may be required if the withdraw ticket","defines a callback.","Please note that the constraints defined here do not mention `mut`, but a specific","[WithdrawTicket::progress_callback_type] may require it."]},{"name":"progressCallbackCustomAccount1","isMut":false,"isSigner":false,"isOptional":true,"docs":["The second possibly-required account (see the `progress_callback_custom_account_0` above)."]},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[],"returns":"bool"},{"name":"recoverInvalidTicketCollateral","accounts":[{"name":"payer","isMut":false,"isSigner":true,"docs":["The transaction executor.","","This instruction is, in principle, permissionless. However, only the ticket owner can use","arbitrary token account as destination for recovered collateral. Other signers can only","transfer the collateral to the ticket owner's ATA (see [Self::user_source_collateral])."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The lending market."]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The market's authority, needed for transferring the collateral (from","[Self::owner_queued_collateral_vault])."]},{"name":"reserve","isMut":false,"isSigner":false,"docs":["The reserve, needed only to validate the other accounts."]},{"name":"reserveCollateralMint","isMut":false,"isSigner":false,"docs":["The collateral mint, needed to invoke the transfer."]},{"name":"ownerQueuedCollateralVault","isMut":true,"isSigner":false,"docs":["The per-owner \"this reserve's queued collateral\" vault (from which the collateral will be","recovered)."]},{"name":"userSourceCollateral","isMut":true,"isSigner":false,"docs":["The ticket's owner token account to which the ticket-locked collateral should be returned.","","Only the ticket's owner can indicate an arbitrary token account here. Permissionless","executors must indicate the ticket's owner ATA."]},{"name":"collateralTokenProgram","isMut":false,"isSigner":false,"docs":["The program of [Self::reserve_collateral_mint], needed for transfer."]},{"name":"withdrawTicket","isMut":true,"isSigner":false,"docs":["The ticket's account, necessarily marked as [WithdrawTicket::invalid] first (by the","`handler_withdraw_queued_liquidity`)."]},{"name":"withdrawTicketOwner","isMut":true,"isSigner":false,"docs":["The owner of the [Self::withdraw_ticket]; needed only to return the rent of the","[WithdrawTicket] account."]},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"ticketSequenceNumber","type":"u64"}]},{"name":"cancelWithdrawTicket","accounts":[{"name":"owner","isMut":false,"isSigner":true,"docs":["The ticket owner (i.e. the only allowed to cancel their ticket)."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The lending market."]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The market's authority, needed for transferring the collateral (from","[Self::owner_queued_collateral_vault])."]},{"name":"reserve","isMut":true,"isSigner":false,"docs":["The reserve."]},{"name":"reserveCollateralMint","isMut":false,"isSigner":false,"docs":["The collateral mint, needed to invoke the transfer."]},{"name":"ownerQueuedCollateralVault","isMut":true,"isSigner":false,"docs":["The per-owner \"this reserve's queued collateral\" vault (from which the collateral will be","transferred back to the owner)."]},{"name":"userDestinationCollateral","isMut":true,"isSigner":false,"docs":["Destination for returned ctokens (owner's token account)."]},{"name":"collateralTokenProgram","isMut":false,"isSigner":false,"docs":["The program of [Self::reserve_collateral_mint], needed for transfer."]},{"name":"withdrawTicket","isMut":true,"isSigner":false,"docs":["Ticket to cancel - remains as tombstone until queue processes it."]}],"args":[{"name":"ticketSequenceNumber","type":"u64"},{"name":"collateralAmountToCancel","type":"u64"}]},{"name":"initGlobalConfig","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"programData","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"updateGlobalConfig","accounts":[{"name":"globalAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[{"name":"mode","type":{"defined":"UpdateGlobalConfigMode"}},{"name":"value","type":"bytes"}]},{"name":"updateGlobalConfigAdmin","accounts":[{"name":"pendingAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[]},{"name":"idlMissingTypes","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false}],"args":[{"name":"reserveFarmKind","type":{"defined":"ReserveFarmKind"}},{"name":"feeCalculation","type":{"defined":"FeeCalculation"}},{"name":"reserveStatus","type":{"defined":"ReserveStatus"}},{"name":"updateConfigMode","type":{"defined":"UpdateConfigMode"}},{"name":"updateLendingMarketConfigValue","type":{"defined":"UpdateLendingMarketConfigValue"}},{"name":"updateLendingMarketConfigMode","type":{"defined":"UpdateLendingMarketMode"}}]}],"accounts":[{"name":"UserState","type":{"kind":"struct","fields":[{"name":"userId","type":"u64"},{"name":"farmState","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"isFarmDelegated","type":"u8"},{"name":"padding0","type":{"array":["u8",7]}},{"name":"rewardsTallyScaled","type":{"array":["u128",10]}},{"name":"rewardsIssuedUnclaimed","type":{"array":["u64",10]}},{"name":"lastClaimTs","type":{"array":["u64",10]}},{"name":"activeStakeScaled","type":"u128"},{"name":"pendingDepositStakeScaled","type":"u128"},{"name":"pendingDepositStakeTs","type":"u64"},{"name":"pendingWithdrawalUnstakeScaled","type":"u128"},{"name":"pendingWithdrawalUnstakeTs","type":"u64"},{"name":"bump","type":"u64"},{"name":"delegatee","type":"publicKey"},{"name":"lastStakeTs","type":"u64"},{"name":"padding1","type":{"array":["u64",50]}}]}},{"name":"GlobalConfig","type":{"kind":"struct","fields":[{"name":"globalAdmin","docs":["Global admin of the program"],"type":"publicKey"},{"name":"pendingAdmin","docs":["Pending admin must sign a specific transaction to become the global admin"],"type":"publicKey"},{"name":"feeCollector","docs":["Fee collector is the only allowed owner of token accounts receiving protocol fees"],"type":"publicKey"},{"name":"padding","docs":["Padding to make the struct size 1024 bytes"],"type":{"array":["u8",928]}}]}},{"name":"LendingMarket","type":{"kind":"struct","fields":[{"name":"version","docs":["Version of lending market"],"type":"u64"},{"name":"bumpSeed","docs":["Bump seed for derived authority address"],"type":"u64"},{"name":"lendingMarketOwner","docs":["Owner authority which can add new reserves"],"type":"publicKey"},{"name":"lendingMarketOwnerCached","docs":["Temporary cache of the lending market owner, used in update_lending_market_owner"],"type":"publicKey"},{"name":"quoteCurrency","docs":["Currency market prices are quoted in","e.g. \"USD\" null padded (`*b\"USD\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\"`) or a SPL token mint pubkey"],"type":{"array":["u8",32]}},{"name":"referralFeeBps","docs":["Referral fee for the lending market, as bps out of the total protocol fee"],"type":"u16"},{"name":"emergencyMode","type":"u8"},{"name":"autodeleverageEnabled","docs":["Whether the obligations on this market should be subject to auto-deleveraging after deposit","or borrow limit is crossed.","Besides this flag, the particular reserve's flag also needs to be enabled (logical `AND`).","**NOTE:** this also affects the individual \"target LTV\" deleveraging."],"type":"u8"},{"name":"borrowDisabled","type":"u8"},{"name":"priceRefreshTriggerToMaxAgePct","docs":["Refresh price from oracle only if it's older than this percentage of the price max age.","e.g. if the max age is set to 100s and this is set to 80%, the price will be refreshed if it's older than 80s.","Price is always refreshed if this set to 0."],"type":"u8"},{"name":"liquidationMaxDebtCloseFactorPct","docs":["Percentage of the total borrowed value in an obligation available for liquidation"],"type":"u8"},{"name":"insolvencyRiskUnhealthyLtvPct","docs":["Minimum acceptable unhealthy LTV before max_debt_close_factor_pct becomes 100%"],"type":"u8"},{"name":"minFullLiquidationValueThreshold","docs":["Minimum liquidation value threshold triggering full liquidation for an obligation, in full","units of the quote currency (e.g. `2` means \"$2\", not \"2 lamports of USDC\")."],"type":"u64"},{"name":"maxLiquidatableDebtMarketValueAtOnce","docs":["Max allowed liquidation value in one ix call"],"type":"u64"},{"name":"reserved0","docs":["[DEPRECATED] Global maximum unhealthy borrow value allowed for any obligation"],"type":{"array":["u8",8]}},{"name":"globalAllowedBorrowValue","docs":["Global maximum allowed borrow value allowed for any obligation"],"type":"u64"},{"name":"emergencyCouncil","docs":["The address of the emergency council, in charge of taking emergency actions on the market (e.g., enabling emergency mode)"],"type":"publicKey"},{"name":"reserved1","docs":["[DEPRECATED] Reward points multiplier per obligation type"],"type":{"array":["u8",8]}},{"name":"elevationGroups","docs":["Elevation groups are used to group together reserves that have the same risk parameters and can bump the ltv and liquidation threshold"],"type":{"array":[{"defined":"ElevationGroup"},32]}},{"name":"elevationGroupPadding","type":{"array":["u64",90]}},{"name":"minNetValueInObligationSf","docs":["Min net value accepted to be found in a position after any lending action in an obligation (scaled by quote currency decimals)"],"type":"u128"},{"name":"minValueSkipLiquidationLtvChecks","docs":["Minimum value to enforce smallest ltv priority checks on the collateral reserves on liquidation"],"type":"u64"},{"name":"name","docs":["Market name, zero-padded."],"type":{"array":["u8",32]}},{"name":"minValueSkipLiquidationBfChecks","docs":["Minimum value to enforce highest borrow factor priority checks on the debt reserves on liquidation"],"type":"u64"},{"name":"individualAutodeleverageMarginCallPeriodSecs","docs":["Time (in seconds) that must pass before liquidation is allowed on an obligation that has","been individually marked for auto-deleveraging."],"type":"u64"},{"name":"minInitialDepositAmount","docs":["Minimum amount of deposit at creation of a reserve to prevent artificial inflation","Note: this amount cannot be recovered, the ctoken associated are never minted"],"type":"u64"},{"name":"obligationOrderExecutionEnabled","docs":["Whether the obligation orders should be evaluated during liquidations."],"type":"u8"},{"name":"immutable","docs":["Whether the lending market is set as immutable."],"type":"u8"},{"name":"obligationOrderCreationEnabled","docs":["Whether new obligation orders can be created.","Note: updating or cancelling existing orders is *not* affected by this flag."],"type":"u8"},{"name":"priceTriggeredLiquidationDisabled","docs":["Whether the liquidation operations that are triggered by price changes should be disabled.","This includes regular liquidation (i.e. LTV exceeding the unhealthy threshold) and some","obligation orders' execution.","","*Caution:* this flag is *disabling* the liquidations when `1` - contrary to all the other","liquidation-driving flags (see e.g. [Self::autodeleverage_enabled])."],"type":"u8"},{"name":"matureReserveDebtLiquidationEnabled","docs":["Whether the debts that reached their reserve's [ReserveConfig::debt_maturity_timestamp] can","be liquidated."],"type":"u8"},{"name":"obligationBorrowDebtTermLiquidationEnabled","docs":["Whether the [Obligation::borrows] that reached their [ReserveConfig::debt_term_seconds] can","be liquidated."],"type":"u8"},{"name":"borrowOrderCreationEnabled","docs":["Whether new borrow orders can be created.","Note: updating or cancelling existing orders is *not* affected by this flag."],"type":"u8"},{"name":"borrowOrderExecutionEnabled","docs":["Whether the existing borrow orders can be filled."],"type":"u8"},{"name":"proposerAuthority","docs":["Authority that can propose creating of new reserves but cannot enable them."],"type":"publicKey"},{"name":"minBorrowOrderFillValue","docs":["Minimum value that can be filled in a single `fill_borrow_order()` call, in full units of","the quote currency (e.g. `2` means \"$2\", not \"2 lamports of USDC\")."],"type":"u64"},{"name":"withdrawTicketIssuanceEnabled","docs":["Whether any new withdraw tickets can be issued (i.e. whether new requests can enter the","withdraw queue)."],"type":"u8"},{"name":"withdrawTicketRedemptionEnabled","docs":["Whether the existing withdraw tickets can be redeemed (i.e. whether the tickets can be used","to transfer accumulated pending liquidity to destination accounts)."],"type":"u8"},{"name":"obligationBorrowRolloverConfigurationEnabled","docs":["Whether the owners can enable the borrow rollover/migration on their obligations.","","*Note 1:* the actual execution of (different kinds of) rollovers are enabled/disabled by:","- [Self::fixed_term_rollover_window_duration_seconds],","- [Self::open_term_rollover_window_duration_seconds],","- [Self::obligation_borrow_migration_to_fixed_execution_enabled].","","*Note 2:* when this configuration is disabled, the obligation owners can still disable their","rollover (i.e. set the obligation's flags to zeroes)."],"type":"u8"},{"name":"obligationBorrowMigrationToFixedExecutionEnabled","docs":["Whether the actual execution of a \"migration to fixed\" rollover flavor is allowed.","","See [FixedTermBorrowRolloverConfig::migration_to_fixed_enabled]."],"type":"u8"},{"name":"withdrawTicketCancellationEnabled","docs":["Whether the ticket owners can cancel their withdraw tickets (i.e. recover ctokens from the","queued collateral vault back to their wallet)."],"type":"u8"},{"name":"padding2","type":{"array":["u8",1]}},{"name":"reserveRewardsMaxAprBps","docs":["Maximum APR (in basis points; `FULL_BPS = 10_000` = 100%) at which reserves on this market","may distribute their `rewards_amount_per_slot`. `0` disables rewards on this market","entirely (`topup_reserve_rewards` is rejected). Bounded by `FULL_BPS` (100% APR) when set.","See [ReserveConfig::rewards_amount_per_slot] for the depositor-cap interaction."],"type":"u16"},{"name":"minWithdrawQueuedLiquidityValue","docs":["Minimum value that can be withdrawn in a single `withdraw_queued_liquidity()` call, in full","units of the quote currency (e.g. `2` means \"$2\", not \"2 lamports of USDC\")."],"type":"u64"},{"name":"fixedTermRolloverWindowDurationSeconds","docs":["A configurable time window (right before the end of a fixed debt term) during which an","auto-rollover into another *fixed* rate/term can happen.","","When zeroed, this rollover mode is effectively disabled.","Can only be enabled when [Self::min_partial_rollover_value] is configured.","","See [FixedTermBorrowRolloverConfig]."],"type":"u64"},{"name":"openTermRolloverWindowDurationSeconds","docs":["A configurable time window (right before the end of a fixed debt term) during which an","auto-rollover into a *variable* (indefinite) rate/term can happen.","","When zeroed, this rollover mode is effectively disabled.","Can only be enabled when [Self::min_partial_rollover_value] is configured.","","This will typically be shorter than [Self::fixed_term_rollover_window_duration_seconds],","acting as a fallback if a fixed reserve liquidity remains unavailable for considerable time."],"type":"u64"},{"name":"minPartialRolloverValue","docs":["Minimum dollar value for a partial rollover into a different reserve.","When the achievable rollover amount is below this threshold (and it's not a full rollover),","the rollover is rejected.","","In full units of the quote currency (e.g. `2` means \"$2\")."],"type":"u64"},{"name":"termBasedFullLiquidationDurationSecs","docs":["The time that must pass before an entire expired debt becomes liquidatable.","","For example:","Let's assume this duration is configured as 100 seconds; then:","- right after fixed-term debt expiration, effectively no debt can be liquidated.","- 30 seconds after expiration, we allow to 30% of the expired debt to be liquidated","- to be specific: at this point in time, we \"protect\" from liquidation 70% of the","[ObligationLiquidity::borrowed_amount_at_expiration] (regardless of how much interest","was accrued or how much debt was repaid while expired).","- 100 seconds after expiration we allow the entire debt to be liquidated.","","Only effective when [Self::obligation_borrow_debt_term_liquidation_enabled].","","Motivation note: this throttling feature gives an opportunity to execute a configured","auto-rollover (after a partial liquidation brings the debt size down so that there is enough","available liquidity in some compatible reserve).","","When zeroed, an entire expired debt can be liquidated right after expiration (i.e. no","throttling)."],"type":"u64"},{"name":"permissioningAuthority","docs":["If not NULL, operations encoded in permissioned_ops require a signature from this authority"],"type":"publicKey"},{"name":"permissionedOps","docs":["Bitmap of operations that require permissioning authority signature"],"type":"u64"},{"name":"padding1","type":{"array":["u64",153]}}]}},{"name":"Obligation","docs":["Lending market obligation state"],"type":{"kind":"struct","fields":[{"name":"tag","docs":["Version of the struct"],"type":"u64"},{"name":"lastUpdate","docs":["Last update to collateral, liquidity, or their market values"],"type":{"defined":"LastUpdate"}},{"name":"lendingMarket","docs":["Lending market address"],"type":"publicKey"},{"name":"owner","docs":["Owner authority which can borrow liquidity"],"type":"publicKey"},{"name":"deposits","docs":["Deposited collateral for the obligation, unique by deposit reserve address"],"type":{"array":[{"defined":"ObligationCollateral"},8]}},{"name":"lowestReserveDepositLiquidationLtv","docs":["Worst LTV for the collaterals backing the loan, represented as a percentage"],"type":"u64"},{"name":"depositedValueSf","docs":["Market value of deposits (scaled fraction)"],"type":"u128"},{"name":"borrows","docs":["Borrowed liquidity for the obligation, unique by borrow reserve address"],"type":{"array":[{"defined":"ObligationLiquidity"},5]}},{"name":"borrowFactorAdjustedDebtValueSf","docs":["Risk adjusted market value of borrows/debt (sum of price * borrowed_amount * borrow_factor) (scaled fraction)"],"type":"u128"},{"name":"borrowedAssetsMarketValueSf","docs":["Market value of borrows - used for max_liquidatable_borrowed_amount (scaled fraction)"],"type":"u128"},{"name":"allowedBorrowValueSf","docs":["The maximum borrow value at the weighted average loan to value ratio (scaled fraction)"],"type":"u128"},{"name":"unhealthyBorrowValueSf","docs":["The dangerous borrow value at the weighted average liquidation threshold (scaled fraction)"],"type":"u128"},{"name":"paddingDeprecatedAssetTiers","docs":["The asset tier of the deposits"],"type":{"array":["u8",13]}},{"name":"elevationGroup","docs":["The elevation group id the obligation opted into."],"type":"u8"},{"name":"numOfObsoleteDepositReserves","docs":["The number of obsolete reserves the obligation has a deposit in"],"type":"u8"},{"name":"hasDebt","docs":["Marked = 1 if borrows array is not empty, 0 = borrows empty"],"type":"u8"},{"name":"referrer","docs":["Wallet address of the referrer"],"type":"publicKey"},{"name":"borrowingDisabled","docs":["Marked = 1 if borrowing disabled, 0 = borrowing enabled"],"type":"u8"},{"name":"autodeleverageTargetLtvPct","docs":["A target LTV set by the market owner when marking this obligation for deleveraging.","Only effective when `deleveraging_margin_call_started_slot != 0`."],"type":"u8"},{"name":"lowestReserveDepositMaxLtvPct","docs":["The lowest max LTV found amongst the collateral deposits"],"type":"u8"},{"name":"numOfObsoleteBorrowReserves","docs":["The number of obsolete reserves the obligation has a borrow in"],"type":"u8"},{"name":"ownershipTransferState","docs":["State of ownership transfer, see [OwnershipTransferState]"],"type":"u8"},{"name":"reserved","type":{"array":["u8",3]}},{"name":"highestBorrowFactorPct","type":"u64"},{"name":"autodeleverageMarginCallStartedTimestamp","docs":["A timestamp at which the market owner most-recently marked this obligation for deleveraging.","Zero if not currently subject to deleveraging."],"type":"u64"},{"name":"obligationOrders","docs":["Owner-defined, permissionlessly-executed repay orders.","Typical use-cases would be a stop-loss and a take-profit (possibly co-existing)."],"type":{"array":[{"defined":"ObligationOrder"},2]}},{"name":"borrowOrder","docs":["Owner-defined, permissionlessly-executed borrow order applicable to this obligation.","Non-zeroed only on a newly-initialized fixed-rate, fixed-term obligation."],"type":{"defined":"BorrowOrder"}},{"name":"pendingOwner","docs":["Pending owner during ownership transfer process.","Pubkey::default() means no pending owner (similar to Option::None)"],"type":"publicKey"},{"name":"padding3","type":{"array":["u64",69]}}]}},{"name":"ReferrerState","type":{"kind":"struct","fields":[{"name":"shortUrl","type":"publicKey"},{"name":"owner","type":"publicKey"}]}},{"name":"ReferrerTokenState","docs":["Referrer account -> each owner can have multiple accounts for specific reserves"],"type":{"kind":"struct","fields":[{"name":"referrer","docs":["Pubkey of the referrer/owner"],"type":"publicKey"},{"name":"mint","docs":["Token mint for the account"],"type":"publicKey"},{"name":"amountUnclaimedSf","docs":["Amount that has been accumulated and not claimed yet -> available to claim (scaled fraction)"],"type":"u128"},{"name":"amountCumulativeSf","docs":["Amount that has been accumulated in total -> both already claimed and unclaimed (scaled fraction)"],"type":"u128"},{"name":"bump","docs":["Referrer token state bump, used for address validation"],"type":"u64"},{"name":"padding","type":{"array":["u64",31]}}]}},{"name":"ShortUrl","type":{"kind":"struct","fields":[{"name":"referrer","type":"publicKey"},{"name":"shortUrl","type":"string"}]}},{"name":"UserMetadata","docs":["Referrer account -> each owner can have multiple accounts for specific reserves"],"type":{"kind":"struct","fields":[{"name":"referrer","docs":["Pubkey of the referrer/owner - pubkey::default if no referrer"],"type":"publicKey"},{"name":"bump","docs":["Bump used for validation of account address"],"type":"u64"},{"name":"userLookupTable","docs":["User lookup table - used to store all user accounts - atas for each reserve mint, each obligation PDA, UserMetadata itself and all referrer_token_states if there is a referrer"],"type":"publicKey"},{"name":"owner","docs":["User metadata account owner"],"type":"publicKey"},{"name":"padding1","type":{"array":["u64",51]}},{"name":"padding2","type":{"array":["u64",64]}}]}},{"name":"Reserve","type":{"kind":"struct","fields":[{"name":"version","docs":["Version of the reserve"],"type":"u64"},{"name":"lastUpdate","docs":["Last slot when supply and rates updated"],"type":{"defined":"LastUpdate"}},{"name":"lendingMarket","docs":["Lending market address"],"type":"publicKey"},{"name":"farmCollateral","type":"publicKey"},{"name":"farmDebt","type":"publicKey"},{"name":"liquidity","docs":["Reserve liquidity"],"type":{"defined":"ReserveLiquidity"}},{"name":"reserveLiquidityPadding","type":{"array":["u64",150]}},{"name":"collateral","docs":["Reserve collateral"],"type":{"defined":"ReserveCollateral"}},{"name":"reserveCollateralPadding","type":{"array":["u64",150]}},{"name":"config","docs":["Reserve configuration values"],"type":{"defined":"ReserveConfig"}},{"name":"configPadding","type":{"array":["u64",112]}},{"name":"borrowedAmountOutsideElevationGroup","type":"u64"},{"name":"borrowedAmountsAgainstThisReserveInElevationGroups","docs":["Amount of token borrowed in lamport of debt asset in the given","elevation group when this reserve is part of the collaterals."],"type":{"array":["u64",32]}},{"name":"withdrawQueue","docs":["The tracker of ticket-based withdrawals."],"type":{"defined":"WithdrawQueue"}},{"name":"padding","type":{"array":["u64",204]}}]}},{"name":"WithdrawTicket","docs":["A finite-lifecycle account representing a specific depositor's place in the withdraw queue of","a specific reserve.","","The lifecycle:","1. The depositor holding ctokens wants to withdraw funds from the reserve, and finds out that","the required amount is not available (due to high utilization).","2. The depositor calls the `enqueue_to_withdraw` handler.","3. The handler transfers the depositor's ctokens to the reserve's internal \"pending\" vault.","4. The handler initializes a new [WithdrawTicket] account, with the next available sequence","number.","5. The depositor waits until his ticket is the next expected one for actual withdraw, and until","the reserve has enough liquidity.","6. Anyone (the depositor or a bot) calls the permissionless `withdraw_queued_liquidity`","handler. If the ticket became invalid (e.g. destination account no longer exists), then the","depositor can call the `recover_invalid_ticket_collateral` handler instead.","7. The handler transfers the liquidity amount according to the current exchange rate.","8. The handler closes the ticket account."],"type":{"kind":"struct","fields":[{"name":"sequenceNumber","docs":["This ticket's place in the queue; the same as used for PDA derivation."],"type":"u64"},{"name":"owner","docs":["The funds' owner (the user who called the `enqueue_to_withdraw` handler)."],"type":"publicKey"},{"name":"reserve","docs":["The reserve to withdraw from."],"type":"publicKey"},{"name":"userDestinationLiquidityTa","docs":["The token account to which the finally-available liquidity should be transferred (by the","`withdraw_queued_liquidity` handler)."],"type":"publicKey"},{"name":"queuedCollateralAmount","docs":["The amount of collateral still waiting to be withdrawn using this ticket."],"type":"u64"},{"name":"createdAtTimestamp","docs":["The timestamp at which the queue was entered.","","This is currently only a piece of metadata, not used by the logic."],"type":"u64"},{"name":"invalid","docs":["Whether the ticket has been found to be invalid (e.g. the [Self::user_destination_liquidity]","has been repurposed) by the `withdraw_queued_liquidity` handler.","To be specific: valid = `0`, invalid = `1`.","","An invalid ticket cannot be made valid again, and can only be passed to the","`recover_invalid_ticket_collateral` handler."],"type":"u8"},{"name":"progressCallbackType","docs":["One of the valid [ProgressCallbackType] representations."],"type":"u8"},{"name":"alignmentPadding","docs":["Inner padding, for alignment."],"type":{"array":["u8",6]}},{"name":"progressCallbackCustomAccounts","docs":["The (optional) accounts to be used by [Self::progress_callback_type]s."],"type":{"array":["publicKey",2]}},{"name":"endPadding","docs":["Trailing padding, for future developments."],"type":{"array":["u64",40]}}]}}],"types":[{"name":"ReserveConfigCustomizationArgs","docs":["A definition of optional customizations that should be applied after cloning the config."],"type":{"kind":"struct","fields":[{"name":"overrideFixedRateBps","docs":["A gate for [Self::fixed_borrow_rate_bps]."],"type":"u8"},{"name":"fixedBorrowRateBps","docs":["If [Self::override_fixed_rate_bps] is non-zero, this borrow rate will be used to override","the [ReserveConfig::borrow_rate_curve] with a fixed one."],"type":"u32"},{"name":"overrideDebtTermSeconds","docs":["A gate for [Self::debt_term_seconds]."],"type":"u8"},{"name":"debtTermSeconds","docs":["If [Self::override_debt_term_seconds] is non-zero, this value will be used to override the","[ReserveConfig::debt_term_seconds]."],"type":"u64"},{"name":"clearElevationGroups","docs":["Whether the target reserve should have zeroed [ReserveConfig::elevation_groups] (i.e. not","cloned from source).","","This customization is mandatory when cloning a reserve (with some elevation groups) into a","different market (where those elevation group indices would have different meaning)."],"type":"u8"}]}},{"name":"BorrowOrderConfigArgs","docs":["A subset of [BorrowOrderConfig] excluding the accounts passed via [SetBorrowOrder]."],"type":{"kind":"struct","fields":[{"name":"remainingDebtAmount","type":"u64"},{"name":"maxBorrowRateBps","type":"u32"},{"name":"minDebtTermSeconds","type":"u64"},{"name":"fillableUntilTimestamp","type":"u64"},{"name":"enableAutoRolloverOnFilledBorrows","type":"bool"}]}},{"name":"UpdateConfigMode","type":{"kind":"enum","variants":[{"name":"UpdateLoanToValuePct"},{"name":"UpdateMaxLiquidationBonusBps"},{"name":"UpdateLiquidationThresholdPct"},{"name":"UpdateProtocolLiquidationFee"},{"name":"UpdateProtocolTakeRate"},{"name":"UpdateFeesOriginationFee"},{"name":"UpdateFeesFlashLoanFee"},{"name":"DeprecatedUpdateFeesReferralFeeBps"},{"name":"UpdateDepositLimit"},{"name":"UpdateBorrowLimit"},{"name":"UpdateTokenInfoLowerHeuristic"},{"name":"UpdateTokenInfoUpperHeuristic"},{"name":"UpdateTokenInfoExpHeuristic"},{"name":"UpdateTokenInfoTwapDivergence"},{"name":"UpdateTokenInfoScopeTwap"},{"name":"UpdateTokenInfoScopeChain"},{"name":"UpdateTokenInfoName"},{"name":"UpdateTokenInfoPriceMaxAge"},{"name":"UpdateTokenInfoTwapMaxAge"},{"name":"UpdateScopePriceFeed"},{"name":"UpdatePythPrice"},{"name":"UpdateSwitchboardFeed"},{"name":"UpdateSwitchboardTwapFeed"},{"name":"UpdateBorrowRateCurve"},{"name":"DeprecatedUpdateEntireReserveConfig"},{"name":"UpdateDebtWithdrawalCap"},{"name":"UpdateDepositWithdrawalCap"},{"name":"DeprecatedUpdateDebtWithdrawalCapCurrentTotal"},{"name":"DeprecatedUpdateDepositWithdrawalCapCurrentTotal"},{"name":"UpdateBadDebtLiquidationBonusBps"},{"name":"UpdateMinLiquidationBonusBps"},{"name":"UpdateDeleveragingMarginCallPeriod"},{"name":"UpdateBorrowFactor"},{"name":"DeprecatedUpdateAssetTier"},{"name":"UpdateElevationGroup"},{"name":"UpdateDeleveragingThresholdDecreaseBpsPerDay"},{"name":"DeprecatedUpdateMultiplierSideBoost"},{"name":"DeprecatedUpdateMultiplierTagBoost"},{"name":"UpdateReserveStatus"},{"name":"UpdateFarmCollateral"},{"name":"UpdateFarmDebt"},{"name":"UpdateDisableUsageAsCollateralOutsideEmode"},{"name":"UpdateBlockBorrowingAboveUtilizationPct"},{"name":"UpdateBlockPriceUsage"},{"name":"UpdateBorrowLimitOutsideElevationGroup"},{"name":"UpdateBorrowLimitsInElevationGroupAgainstThisReserve"},{"name":"UpdateHostFixedInterestRateBps"},{"name":"UpdateAutodeleverageEnabled"},{"name":"UpdateDeleveragingBonusIncreaseBpsPerDay"},{"name":"UpdateProtocolOrderExecutionFee"},{"name":"UpdateProposerAuthorityLock"},{"name":"UpdateMinDeleveragingBonusBps"},{"name":"UpdateBlockCTokenUsage"},{"name":"UpdateDebtMaturityTimestamp"},{"name":"UpdateDebtTermSeconds"},{"name":"UpdateEarlyRepayRemainingInterestPct"},{"name":"UpdateReserveEmergencyMode"},{"name":"UpdateRewardsAmountPerSlot"},{"name":"UpdateReservePermissionedOps"}]}},{"name":"UpdateLendingMarketConfigValue","type":{"kind":"enum","variants":[{"name":"Bool","fields":["bool"]},{"name":"U8","fields":["u8"]},{"name":"U8Array","fields":[{"array":["u8",8]}]},{"name":"U16","fields":["u16"]},{"name":"U64","fields":["u64"]},{"name":"U128","fields":["u128"]},{"name":"Pubkey","fields":["publicKey"]},{"name":"ElevationGroup","fields":[{"defined":"ElevationGroup"}]},{"name":"Name","fields":[{"array":["u8",32]}]}]}},{"name":"UpdateLendingMarketMode","type":{"kind":"enum","variants":[{"name":"UpdateOwner"},{"name":"UpdateEmergencyMode"},{"name":"UpdateLiquidationCloseFactor"},{"name":"UpdateLiquidationMaxValue"},{"name":"DeprecatedUpdateGlobalUnhealthyBorrow"},{"name":"UpdateGlobalAllowedBorrow"},{"name":"UpdateEmergencyCouncil"},{"name":"UpdateMinFullLiquidationThreshold"},{"name":"UpdateInsolvencyRiskLtv"},{"name":"UpdateElevationGroup"},{"name":"UpdateReferralFeeBps"},{"name":"DeprecatedUpdateMultiplierPoints"},{"name":"UpdatePriceRefreshTriggerToMaxAgePct"},{"name":"UpdateAutodeleverageEnabled"},{"name":"UpdateBorrowingDisabled"},{"name":"UpdateMinNetValueObligationPostAction"},{"name":"UpdateMinValueLtvSkipPriorityLiqCheck"},{"name":"UpdateMinValueBfSkipPriorityLiqCheck"},{"name":"UpdatePaddingFields"},{"name":"UpdateName"},{"name":"UpdateIndividualAutodeleverageMarginCallPeriodSecs"},{"name":"UpdateInitialDepositAmount"},{"name":"UpdateObligationOrderExecutionEnabled"},{"name":"UpdateImmutableFlag"},{"name":"UpdateObligationOrderCreationEnabled"},{"name":"UpdateProposerAuthority"},{"name":"UpdatePriceTriggeredLiquidationDisabled"},{"name":"UpdateMatureReserveDebtLiquidationEnabled"},{"name":"UpdateObligationBorrowDebtTermLiquidationEnabled"},{"name":"UpdateBorrowOrderCreationEnabled"},{"name":"UpdateBorrowOrderExecutionEnabled"},{"name":"UpdateMinBorrowOrderFillValue"},{"name":"UpdateWithdrawTicketIssuanceEnabled"},{"name":"UpdateWithdrawTicketRedemptionEnabled"},{"name":"UpdateMinWithdrawQueuedLiquidityValue"},{"name":"UpdateFixedTermRolloverWindowDurationSeconds"},{"name":"UpdateOpenTermRolloverWindowDurationSeconds"},{"name":"UpdateObligationBorrowRolloverConfigurationEnabled"},{"name":"UpdateTermBasedFullLiquidationDurationSecs"},{"name":"UpdateObligationBorrowMigrationToFixedExecutionEnabled"},{"name":"UpdateMinPartialRolloverValue"},{"name":"UpdateWithdrawTicketCancellationEnabled"},{"name":"UpdatePermissioningAuthority"},{"name":"UpdatePermissionedOps"},{"name":"DeprecatedUpdateReserveRewardsMaxAprPct"},{"name":"UpdateReserveRewardsMaxAprBps"}]}},{"name":"UpdateGlobalConfigMode","type":{"kind":"enum","variants":[{"name":"PendingAdmin"},{"name":"FeeCollector"}]}},{"name":"LastUpdate","docs":["Last update state"],"type":{"kind":"struct","fields":[{"name":"slot","docs":["Last slot when updated"],"type":"u64"},{"name":"stale","docs":["True when marked stale, false when slot updated"],"type":"u8"},{"name":"priceStatus","docs":["Status of the prices used to calculate the last update"],"type":"u8"},{"name":"placeholder","type":{"array":["u8",6]}}]}},{"name":"ElevationGroup","type":{"kind":"struct","fields":[{"name":"maxLiquidationBonusBps","type":"u16"},{"name":"id","type":"u8"},{"name":"ltvPct","type":"u8"},{"name":"liquidationThresholdPct","type":"u8"},{"name":"allowNewLoans","type":"u8"},{"name":"maxReservesAsCollateral","type":"u8"},{"name":"padding0","type":"u8"},{"name":"debtReserve","docs":["Mandatory debt reserve for this elevation group"],"type":"publicKey"},{"name":"padding1","type":{"array":["u64",4]}}]}},{"name":"BorrowOrder","docs":["A borrow order.","","When the [Obligation::borrow_order] is populated (i.e. non-zeroed) on an Obligation, then the","permissionless \"fill\" operations may borrow liquidity to the owner according to this","specification."],"type":{"kind":"struct","fields":[{"name":"debtLiquidityMint","docs":["The asset to be borrowed.","The reserves used for [Obligation::borrows] *must* all provide exactly this asset."],"type":"publicKey"},{"name":"remainingDebtAmount","docs":["The amount of debt that still needs to be filled, in lamports."],"type":"u64"},{"name":"filledDebtDestination","docs":["The token account owned by the [Obligation::owner] and holding [Self::debt_liquidity_mint],","where the filled funds should be transferred to."],"type":"publicKey"},{"name":"minDebtTermSeconds","docs":["The minimum allowed debt term that the obligation owner agrees to.","The reserves used to fill this order *cannot* define their debt term *lower* than this.","","If zeroed, then only open-term reserves may be used."],"type":"u64"},{"name":"fillableUntilTimestamp","docs":["The time until which the borrow order can still be filled."],"type":"u64"},{"name":"placedAtTimestamp","docs":["The time at which this order was placed.","Currently, this is only a piece of metadata."],"type":"u64"},{"name":"lastUpdatedAtTimestamp","docs":["The time at which this order was most-recently updated (including: created).","Currently, this is only a piece of metadata."],"type":"u64"},{"name":"requestedDebtAmount","docs":["The amount of debt that was originally requested when this order was most-recently updated.","In other words: this field holds a value of [Self::remaining_debt_amount] captured at","[Self::last_updated_at_timestamp].","Currently, this is only a piece of metadata."],"type":"u64"},{"name":"maxBorrowRateBps","docs":["The maximum borrow rate that the obligation owner agrees to.","The reserves used for [Obligation::borrows] *cannot* define their maximum borrow rate","*higher* than this."],"type":"u32"},{"name":"active","docs":["Whether the [Self::remaining_debt_amount] is non-zero.","","This field is *not* used by smart contract logic (which prefers to treat the above","[Self::remaining_debt_amount]-based definition as the single source of truth). However, it","is useful for off-chain bots (order-searchers) to efficiently list (i.e. `memcmp` filter)","just the obligations that have active borrow orders."],"type":"u8"},{"name":"enableAutoRolloverOnFilledBorrows","docs":["When `1`, all [Obligation::borrows] that get filled by this order will have their","[FixedTermBorrowRolloverConfig::auto_rollover_enabled] flag set.","","Additionally, their rollover customizations:","- will exactly match this order's constraints regarding [Self::min_debt_term_seconds] and","[Self::max_borrow_rate_bps];","- will use the [FixedTermBorrowRolloverConfig::open_term_allowed] fallback.","","See [BorrowOrder::get_rollover_config_for_filled_borrow()].","","Clarification note: when `0`, this setting has no effect on any borrow (i.e. if an existing","borrow was independently marked for auto-rollover, it will *not* be unmarked when filled by","this order).","","Feature flag note: when [LendingMarket::obligation_borrow_rollover_configuration_enabled] is","disabled, this setting has no effect on any borrow (i.e. the fill will be successful, but","the borrow will not be marked for auto-rollover."],"type":"u8"},{"name":"padding1","docs":["Alignment padding."],"type":{"array":["u8",2]}},{"name":"endPadding","docs":["End padding."],"type":{"array":["u64",5]}}]}},{"name":"FixedTermBorrowRolloverConfig","docs":["Settings driving the auto-rollover (or migration) of an [ObligationLiquidity]'s borrow.","","This covers three flavors:","- *fixed-to-fixed*: a fixed-term borrow rolling into another fixed-term reserve,","- *fixed-to-open*: a fixed-term borrow rolling into an open-term reserve,","- *open-to-fixed*: an open-term borrow migrating into a fixed-term reserve.","","By its nature (not a special case), the zeroed struct means \"no auto-rollover/migration\"."],"type":{"kind":"struct","fields":[{"name":"autoRolloverEnabled","docs":["Whether this *fixed-term* borrow can be permissionlessly prolonged. The funds used to roll","over can come:","- either from a *fixed-term* reserve (same or a different one):","- This can only happen within [LendingMarket::fixed_term_rollover_window_duration_seconds].","- The target reserve must meet all the criteria defined in this config (see","[Self::max_borrow_rate_bps] and [Self::min_debt_term_seconds]).","- Note: not possible when [Self::min_debt_term_seconds] is `0` (open-term only).","- or from an *open-term* reserve:","- This can only happen within [LendingMarket::open_term_rollover_window_duration_seconds].","- The user must explicitly set [Self::open_term_allowed] here.","","This setting is not effective when the borrow is currently using an *open-term* reserve."],"type":"u8"},{"name":"openTermAllowed","docs":["When `1`, then [Self::auto_rollover_enabled] is allowed to roll this borrow over into any","open-term reserve.","","Please note that if such rollover actually happens, then [Self::max_borrow_rate_bps]","condition does not apply - technically, it could be evaluated, but open-term reserves","typically use float-rate (utilization-driven borrow rate curve) which has very high maximum","(when at 100% utilization) that would not meet any practical criteria here."],"type":"u8"},{"name":"migrationToFixedEnabled","docs":["Whether this *open-term* borrow can be permissionlessly migrated into a fixed-term reserve:","- This can happen at any moment (as soon as liquidity becomes available).","- The target fixed-term reserve must meet all the criteria defined in this config (see","[Self::max_borrow_rate_bps] and [Self::min_debt_term_seconds]).","","This setting is not effective when the borrow is currently using a *fixed-term* reserve.","","Cannot be enabled when [Self::min_debt_term_seconds] is `0` (open-term only), because","migrating into a fixed-term reserve contradicts the open-term-only intent."],"type":"u8"},{"name":"alignmentPadding","docs":["Internal alignment padding (free to reuse)."],"type":{"array":["u8",1]}},{"name":"maxBorrowRateBps","docs":["A maximum allowed borrow rate of a reserve that can be used for a rollover/migration.","","Note: this must be set (i.e. non-zero) when enabling any rollover/migration flavor, but is","of course not effective when rollover/migration is not enabled."],"type":"u32"},{"name":"minDebtTermSeconds","docs":["A minimum debt term (in seconds) of a fixed-term reserve that can be used for a","rollover/migration.","","When `0`, the owner only accepts open-term reserves as rollover targets — i.e. rolling over","(or migrating) into a fixed-term reserve is not allowed. This is consistent with the","semantics of [BorrowOrder::min_debt_term_seconds].","","This means that `0` is incompatible with [Self::migration_to_fixed_enabled] (which requires","a fixed-term target) — this combination is rejected at configuration time."],"type":"u64"}]}},{"name":"InitObligationArgs","type":{"kind":"struct","fields":[{"name":"tag","type":"u8"},{"name":"id","type":"u8"}]}},{"name":"ObligationCollateral","docs":["Obligation collateral state"],"type":{"kind":"struct","fields":[{"name":"depositReserve","docs":["Reserve collateral is deposited to"],"type":"publicKey"},{"name":"depositedAmount","docs":["Amount of collateral deposited"],"type":"u64"},{"name":"marketValueSf","docs":["Collateral market value in quote currency (scaled fraction)"],"type":"u128"},{"name":"borrowedAmountAgainstThisCollateralInElevationGroup","docs":["Debt amount (lamport) taken against this collateral.","(only meaningful if this obligation is part of an elevation group, otherwise 0)","This is only indicative of the debt computed on the last refresh obligation.","If the obligation have multiple collateral this value is the same for all of them."],"type":"u64"},{"name":"padding","type":{"array":["u64",9]}}]}},{"name":"ObligationLiquidity","docs":["Obligation liquidity state"],"type":{"kind":"struct","fields":[{"name":"borrowReserve","docs":["Reserve liquidity is borrowed from"],"type":"publicKey"},{"name":"cumulativeBorrowRateBsf","docs":["Borrow rate used for calculating interest (big scaled fraction)"],"type":{"defined":"BigFractionBytes"}},{"name":"lastBorrowedAtTimestamp","docs":["The timestamp at which this debt was taken.","","Conceptually, every borrow can be interpreted as \"closing the previous loan and starting a","new one\" (which would make a plain ` borrowed_at ` an even better name). But in terms of","implementation, this fields records when the *last* borrow operation from this reserve","happened (i.e. adding debt of the same reserve *does* move this timestamp).","","Note: this field is *not* only metadata: it is used in the logic, e.g. for enforcing the","fixed-term borrows (i.e. those induced by [ReserveConfig::debt_term_seconds])."],"type":"u64"},{"name":"borrowedAmountSf","docs":["Amount of liquidity borrowed plus interest (scaled fraction)"],"type":"u128"},{"name":"marketValueSf","docs":["Liquidity market value in quote currency (scaled fraction)"],"type":"u128"},{"name":"borrowFactorAdjustedMarketValueSf","docs":["Risk adjusted liquidity market value in quote currency - DEBUG ONLY - use market_value instead"],"type":"u128"},{"name":"borrowedAmountOutsideElevationGroups","docs":["Amount of liquidity borrowed outside of an elevation group"],"type":"u64"},{"name":"fixedTermBorrowRolloverConfig","docs":["The user's auto-rollover/migration opt-ins. Some settings are effective only for fixed-term","borrows, while others only for open-term borrows - see individual field docs."],"type":{"defined":"FixedTermBorrowRolloverConfig"}},{"name":"borrowedAmountAtExpiration","docs":["An amount of liquidity that was borrowed when this fixed-term borrow expired (i.e. zeroed if","this borrow is not fixed-term, or if it did not yet expire).","","Needed to honor the [LendingMarket::term_based_full_liquidation_duration_secs].","","This value is captured by [Self::capture_borrowed_amount_at_expiration] during obligation's","refresh - please see the method's docs for gotchas.","","Note on precision: we use a `u64` field, since the remaining space within this struct is","rather scarce, and we do not need sub-lamport precision for the liquidation throttling rate."],"type":"u64"},{"name":"padding2","type":{"array":["u64",4]}}]}},{"name":"ObligationOrder","docs":["A single obligation order.","See [Obligation::obligation_orders]."],"type":{"kind":"struct","fields":[{"name":"conditionThresholdSf","docs":["A threshold value used by the condition (scaled [Fraction]).","The exact meaning depends on the specific [Self::condition_type].","","Examples:","- when `condition_type == 2 (UserLtvBelow)`:","then a value of `0.455` here means that the order is active only when the obligation's","user LTV is less than `0.455` (i.e. < 45.5%).","- when `condition_type == 3 (DebtCollPriceRatioAbove)`:","assuming the obligation uses BTC collateral for SOL debt, then a value of `491.3` here","means that the order is active only when the BTC-SOL price is greater than `491.3` (i.e.","> 491.3 SOL per BTC)."],"type":"u128"},{"name":"opportunityParameterSf","docs":["A configuration parameter used by the opportunity (scaled [Fraction]).","The exact meaning depends on the specific [Self::opportunity_type].","","Examples:","- when `opportunity_type == 0 (DeleverageSingleDebtAmount)`:","Assuming the obligation uses BTC collateral for SOL debt, then a value of `1_234_000_000`","here means that a liquidator may repay up to 1234000000 lamports (i.e. 1.234 SOL) on this","obligation.","Note: the special value of [Fraction::MAX] is *not* allowed in this case.","- when `opportunity_type == 1 (DeleverageAllDebtAmount)`:","The only allowed value in this case is [Fraction::MAX] (to emphasize that *all* debt","should be repaid)."],"type":"u128"},{"name":"minExecutionBonusBps","docs":["A *minimum* additional fraction of collateral transferred to the liquidator, in bps.","","The minimum bonus is applied exactly when the [Self::condition_threshold_sf] is met, and","grows linearly towards the [Self::max_execution_bonus_bps].","","Example: a value of `50` here means 50bps == 0.5% bonus for an \"LTV > 65%\" order, when","executed precisely at the moment LTV exceeds 65%."],"type":"u16"},{"name":"maxExecutionBonusBps","docs":["A *maximum* additional fraction of collateral transferred to the liquidator, in bps.","","The maximum bonus is applied at the relevant \"extreme\" state of the obligation, i.e.:","- for a stop-loss condition, it is a point at which the obligation becomes liquidatable;","- for a take-profit condition, it is a point at which obligation has 0% LTV.","","In non-extreme states, the actual bonus value is interpolated linearly, starting from","[Self::min_execution_bonus_bps] (at the point specified by the order's condition).","","Example: a value of `300` here means 300bps == 3.0% bonus for a \"debt/coll price > 140\"","order, when executed at a higher price = 200, at which the obligation's LTV happens to","be equal to its liquidation LTV."],"type":"u16"},{"name":"conditionType","docs":["Serialized [ConditionType].","The entire order is void when this is zeroed (i.e. representing [ConditionType::Never]).","","Example: a value of `2` here denotes `UserLtvBelow` condition type. Of course, to","interpret this condition, we also need to take the [Self::condition_threshold_sf] into","account."],"type":"u8"},{"name":"opportunityType","docs":["Serialized [OpportunityType].","","Example: a value of `0` here denotes `DeleverageSingleDebtAmount` opportunity. Of course, to","interpret this opportunity, we also need to take the [Self::opportunity_parameter_sf] into","account."],"type":"u8"},{"name":"padding1","docs":["Alignment padding.","The fields above take up 2+2+1+1 bytes = 48 bits, which means we need 80 bits = 10 bytes to","align with `u128`s."],"type":{"array":["u8",10]}},{"name":"padding2","docs":["End padding.","The total size of a single instance is 8*u128 = 128 bytes."],"type":{"array":["u128",5]}}]}},{"name":"UpdateObligationConfigMode","docs":["A discriminator of a user-configurable piece of [Obligation].","","Implementation note: due to TS-side codegen quirks (and a \"convention\" currently seen e.g.","within reserve and market update operations), this is not a true Rust enum. The new value of","a config item is provided in a separate handler argument (borsh-serialized), and its expected","type is defined by each discriminator here. Additionally, each update mode acts on a specific","[ObligationConfigUpdateSubject] (e.g. the auto-rollover of fixed-term borrows is configured on","a per-borrow basis), which is also specified by separate handler arguments."],"type":{"kind":"enum","variants":[{"name":"FixedTermRolloverEnabled"},{"name":"FixedTermRolloverMaxBorrowRateBps"},{"name":"FixedTermRolloverMinDebtTermSeconds"},{"name":"FixedTermRolloverOpenTermAllowed"},{"name":"MigrationToFixedEnabled"}]}},{"name":"BigFractionBytes","type":{"kind":"struct","fields":[{"name":"value","type":{"array":["u64",4]}},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"FeeCalculation","docs":["Calculate fees exlusive or inclusive of an amount"],"type":{"kind":"enum","variants":[{"name":"Exclusive"},{"name":"Inclusive"}]}},{"name":"ReserveCollateral","docs":["Reserve collateral"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve collateral mint address"],"type":"publicKey"},{"name":"mintTotalSupply","docs":["Reserve collateral mint supply, used for exchange rate"],"type":"u64"},{"name":"supplyVault","docs":["Reserve collateral supply address"],"type":"publicKey"},{"name":"padding1","type":{"array":["u128",32]}},{"name":"padding2","type":{"array":["u128",32]}}]}},{"name":"ReserveConfig","docs":["Reserve configuration values"],"type":{"kind":"struct","fields":[{"name":"status","docs":["Status of the reserve Active/Obsolete/Hidden"],"type":"u8"},{"name":"paddingDeprecatedAssetTier","docs":["Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt"],"type":"u8"},{"name":"hostFixedInterestRateBps","docs":["Flat rate that goes to the host"],"type":"u16"},{"name":"minDeleveragingBonusBps","docs":["Starting bonus for deleveraging-related liquidations, in bps."],"type":"u16"},{"name":"blockCtokenUsage","docs":["Boolean flag to block minting/redeeming of ctokens","Blocks usage of ctokens (minting or withdrawing from obligation)","Effectively blocks deposit_reserve_liquidity and withdraw_obligation_collateral"],"type":"u8"},{"name":"earlyRepayRemainingInterestPct","docs":["The percentage of remaining interest over the debt term that is charged as early repay penalty.","Only meaningful when `debt_term_seconds > 0`."],"type":"u8"},{"name":"emergencyMode","docs":["Whether the reserve is in emergency mode.","Blocks most user operations involving this reserve, similar to [LendingMarket::emergency_mode]","but scoped to a single reserve. Also cascades to obligations using this reserve as","collateral or debt, blocking borrows and withdrawals on other reserves but still","allowing repays and deposits."],"type":"u8"},{"name":"reserved1","docs":["Past reserved space - feel free to reuse."],"type":{"array":["u8",4]}},{"name":"protocolOrderExecutionFeePct","docs":["Cut of the order execution bonus that the protocol receives, as a percentage"],"type":"u8"},{"name":"protocolTakeRatePct","docs":["Protocol take rate is the amount borrowed interest protocol receives, as a percentage"],"type":"u8"},{"name":"protocolLiquidationFeePct","docs":["Cut of the liquidation bonus that the protocol receives, as a percentage"],"type":"u8"},{"name":"loanToValuePct","docs":["Target ratio of the value of borrows to deposits, as a percentage","0 if use as collateral is disabled"],"type":"u8"},{"name":"liquidationThresholdPct","docs":["Loan to value ratio at which an obligation can be liquidated, as percentage"],"type":"u8"},{"name":"minLiquidationBonusBps","docs":["Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"maxLiquidationBonusBps","docs":["Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"badDebtLiquidationBonusBps","docs":["Bad debt liquidation bonus for an undercollateralized obligation, as bps"],"type":"u16"},{"name":"deleveragingMarginCallPeriodSecs","docs":["Time in seconds that must pass before redemptions are enabled after the deposit limit is","crossed.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"deleveragingThresholdDecreaseBpsPerDay","docs":["The rate at which the deleveraging threshold decreases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"fees","docs":["Program owner fees assessed, separate from gains due to interest accrual"],"type":{"defined":"ReserveFees"}},{"name":"borrowRateCurve","docs":["Borrow rate curve based on utilization"],"type":{"defined":"BorrowRateCurve"}},{"name":"borrowFactorPct","docs":["Borrow factor in percentage - used for risk adjustment"],"type":"u64"},{"name":"depositLimit","docs":["Maximum deposit limit of liquidity in native units, u64::MAX for inf"],"type":"u64"},{"name":"borrowLimit","docs":["Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits)"],"type":"u64"},{"name":"tokenInfo","docs":["Token id from TokenInfos struct"],"type":{"defined":"TokenInfo"}},{"name":"depositWithdrawalCap","docs":["Deposit withdrawal caps - deposit & redeem"],"type":{"defined":"WithdrawalCaps"}},{"name":"debtWithdrawalCap","docs":["Debt withdrawal caps - borrow & repay"],"type":{"defined":"WithdrawalCaps"}},{"name":"elevationGroups","type":{"array":["u8",20]}},{"name":"disableUsageAsCollOutsideEmode","type":"u8"},{"name":"utilizationLimitBlockBorrowingAbovePct","docs":["Utilization (in percentage) above which borrowing is blocked. 0 to disable."],"type":"u8"},{"name":"autodeleverageEnabled","docs":["Whether this reserve should be subject to auto-deleveraging after deposit or borrow limit is","crossed.","Besides this flag, the lending market's flag also needs to be enabled (logical `AND`).","**NOTE:** the manual \"target LTV\" deleveraging is NOT affected by this flag."],"type":"u8"},{"name":"proposerAuthorityLocked","docs":["Boolean flag indicating whether the reserve is locked for the proposer authority.","","Once the proposer have finished preparing the reserve, it must be locked to prevent","further changes to the reserve configuration allowing review and voting on the proposal","without alteration during the voting period."],"type":"u8"},{"name":"borrowLimitOutsideElevationGroup","docs":["Maximum amount liquidity of this reserve borrowed outside all elevation groups","- u64::MAX for inf","- 0 to disable borrows outside elevation groups"],"type":"u64"},{"name":"borrowLimitAgainstThisCollateralInElevationGroup","docs":["Defines the maximum amount (in lamports of elevation group debt asset)","that can be borrowed when this reserve is used as collateral.","- u64::MAX for inf","- 0 to disable borrows in this elevation group (expected value for the debt asset)"],"type":{"array":["u64",32]}},{"name":"deleveragingBonusIncreaseBpsPerDay","docs":["The rate at which the deleveraging-related liquidation bonus increases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"debtMaturityTimestamp","docs":["The timestamp at which all [Obligation::borrows] using this reserve become liquidatable","(on the same terms as reserve-wide deleveraging).","Inactive when zeroed (i.e. debt never matures).","","Note: this feature is independent of [Self::debt_term_seconds] - the liquidation mechanism","is based directly on the timestamp defined here, on Reserve's level."],"type":"u64"},{"name":"debtTermSeconds","docs":["The duration after which any debt coming from this Reserve must be repaid.","Inactive when zeroed (i.e. funds can be borrowed indefinitely).","","Note: this feature is independent of [Self::debt_maturity_timestamp] - the liquidation","mechanism is based on the [ObligationLiquidity::last_borrowed_at_timestamp]."],"type":"u64"},{"name":"rewardsAmountPerSlot","docs":["Rewards distributed per slot to depositors. Drained from","[ReserveLiquidity::rewards_amount_available] into","[ReserveLiquidity::total_available_amount] at each refresh, capped by the","market-level [LendingMarket::reserve_rewards_max_apr_bps]. `0` disables.","","**Note:** because rewards inflate `total_available_amount`, a non-zero RPS on a","reserve with [Self::autodeleverage_enabled] and a finite [Self::deposit_limit]","will eventually cross the cap and arm the autodeleverage countdown. Size","`deposit_limit` and RPS together."],"type":"u64"},{"name":"permissionedOps","docs":["Bitmask of [PermissionedOp]s gated by the parent market's `permissioning_authority`","when this reserve is the operation's target. `0` = no operation is restricted at the","reserve level. Use [Reserve::get_permissioned_ops] for a typed view."],"type":"u64"}]}},{"name":"ReserveFarmKind","type":{"kind":"enum","variants":[{"name":"Collateral"},{"name":"Debt"}]}},{"name":"ReserveFees","docs":["Additional fee information on a reserve","","These exist separately from interest accrual fees, and are specifically for the program owner","and referral fee. The fees are paid out as a percentage of liquidity token amounts during","repayments and liquidations."],"type":{"kind":"struct","fields":[{"name":"originationFeeSf","docs":["Fee assessed on `BorrowObligationLiquidity`, as scaled fraction (60 bits fractional part)","Must be between `0` and `2^60`, such that `2^60 = 1`. A few examples for","clarity:","1% = (1 << 60) / 100 = 11529215046068470","0.01% (1 basis point) = 115292150460685","0.00001% (Aave origination fee) = 115292150461"],"type":"u64"},{"name":"flashLoanFeeSf","docs":["Fee for flash loan, expressed as scaled fraction.","0.3% (Aave flash loan fee) = 0.003 * 2^60 = 3458764513820541"],"type":"u64"},{"name":"padding","docs":["Used for allignment"],"type":{"array":["u8",8]}}]}},{"name":"ReserveLiquidity","docs":["Reserve liquidity"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve liquidity mint address"],"type":"publicKey"},{"name":"supplyVault","docs":["Reserve liquidity supply address"],"type":"publicKey"},{"name":"feeVault","docs":["Reserve liquidity fee collection address"],"type":"publicKey"},{"name":"totalAvailableAmount","docs":["Total reserve liquidity available.","","Note: not all of this liquidity can be freely used for any purpose. Production code should","use the specialized getters - see e.g. [Reserve::total_available_liquidity_amount()],","[Reserve::freely_available_liquidity_amount()]."],"type":"u64"},{"name":"borrowedAmountSf","docs":["Reserve liquidity borrowed (scaled fraction)"],"type":"u128"},{"name":"marketPriceSf","docs":["Reserve liquidity market price in quote currency (scaled fraction)"],"type":"u128"},{"name":"marketPriceLastUpdatedTs","docs":["Unix timestamp of the market price (from the oracle)"],"type":"u64"},{"name":"mintDecimals","docs":["Reserve liquidity mint decimals"],"type":"u64"},{"name":"depositLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the liquidity amount is above the deposit cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"borrowLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the borrowed amount is above the borrow cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"cumulativeBorrowRateBsf","docs":["Reserve liquidity cumulative borrow rate (scaled fraction)"],"type":{"defined":"BigFractionBytes"}},{"name":"accumulatedProtocolFeesSf","docs":["Reserve cumulative protocol fees (scaled fraction)"],"type":"u128"},{"name":"accumulatedReferrerFeesSf","docs":["Reserve cumulative referrer fees (scaled fraction)"],"type":"u128"},{"name":"pendingReferrerFeesSf","docs":["Reserve pending referrer fees, to be claimed in refresh_obligation by referrer or protocol (scaled fraction)"],"type":"u128"},{"name":"absoluteReferralRateSf","docs":["Reserve referrer fee absolute rate calculated at each refresh_reserve operation (scaled fraction)"],"type":"u128"},{"name":"tokenProgram","docs":["Token program of the liquidity mint"],"type":"publicKey"},{"name":"rewardsAmountAvailable","docs":["Reserve rewards budget remaining for distribution.","","Tokens are deposited via `topup_reserve_rewards` and increase this counter (without","touching [Self::total_available_amount]). On every `refresh_reserve`, up to","`rewards_amount_per_slot * slots_elapsed` tokens are moved from this counter into","[Self::total_available_amount], inflating the cToken exchange rate, capped by the","market-level `reserve_rewards_max_apr_bps` cap."],"type":"u64"},{"name":"padding2","type":{"array":["u64",50]}},{"name":"padding3","type":{"array":["u128",32]}}]}},{"name":"ReserveStatus","type":{"kind":"enum","variants":[{"name":"Active"},{"name":"Obsolete"},{"name":"Hidden"}]}},{"name":"WithdrawQueue","docs":["A tracker of ticket-based withdrawals."],"type":{"kind":"struct","fields":[{"name":"queuedCollateralAmount","docs":["The part of [ReserveLiquidity::total_available_amount] locked for ticketed withdrawals."],"type":"u64"},{"name":"nextIssuedTicketSequenceNumber","docs":["The sequence number of the next ticket to be issued when enqueueing to withdraw.","Note: it is also a number of tickets issued so far."],"type":"u64"},{"name":"nextWithdrawableTicketSequenceNumber","docs":["The sequence number of the next ticket to be used for actually transferring the withdrawn","liquidity (assuming it is available in the reserve).","Note: it is also a number of fully-consumed tickets so far."],"type":"u64"}]}},{"name":"WithdrawalCaps","docs":["Reserve Withdrawal Caps State"],"type":{"kind":"struct","fields":[{"name":"configCapacity","type":"i64"},{"name":"currentTotal","type":"i64"},{"name":"lastIntervalStartTimestamp","type":"u64"},{"name":"configIntervalLengthSeconds","type":"u64"}]}},{"name":"PriceHeuristic","type":{"kind":"struct","fields":[{"name":"lower","docs":["Lower value of acceptable price"],"type":"u64"},{"name":"upper","docs":["Upper value of acceptable price"],"type":"u64"},{"name":"exp","docs":["Number of decimals of the previously defined values"],"type":"u64"}]}},{"name":"PythConfiguration","type":{"kind":"struct","fields":[{"name":"price","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"}]}},{"name":"ScopeConfiguration","type":{"kind":"struct","fields":[{"name":"priceFeed","docs":["Pubkey of the scope price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"priceChain","docs":["This is the scope_id price chain that results in a price for the token"],"type":{"array":["u16",4]}},{"name":"twapChain","docs":["This is the scope_id price chain for the twap"],"type":{"array":["u16",4]}}]}},{"name":"SwitchboardConfiguration","type":{"kind":"struct","fields":[{"name":"priceAggregator","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"twapAggregator","type":"publicKey"}]}},{"name":"TokenInfo","type":{"kind":"struct","fields":[{"name":"name","docs":["UTF-8 encoded name of the token (null-terminated)"],"type":{"array":["u8",32]}},{"name":"heuristic","docs":["Heuristics limits of acceptable price"],"type":{"defined":"PriceHeuristic"}},{"name":"maxTwapDivergenceBps","docs":["Max divergence between twap and price in bps"],"type":"u64"},{"name":"maxAgePriceSeconds","type":"u64"},{"name":"maxAgeTwapSeconds","type":"u64"},{"name":"scopeConfiguration","docs":["Scope price configuration"],"type":{"defined":"ScopeConfiguration"}},{"name":"switchboardConfiguration","docs":["Switchboard configuration"],"type":{"defined":"SwitchboardConfiguration"}},{"name":"pythConfiguration","docs":["Pyth configuration"],"type":{"defined":"PythConfiguration"}},{"name":"blockPriceUsage","type":"u8"},{"name":"reserved","type":{"array":["u8",7]}},{"name":"padding","type":{"array":["u64",19]}}]}},{"name":"ProgressCallbackType","docs":["A callback to be notified when the ticket is being processed.","","## Why an enum?","","Only reliable programs may be used for callbacks (since any error or panic returned from a CPI","aborts an entire transaction, which would stall the queue progress). Hence, we need a whitelist,","and the simplest initial implementation is a hardcoded enum. If we want to be able to add new","whitelist items without SC updates, we can implement such support using a special enum value","(e.g. `SPECIFIED_BY_PDA = 255`)."],"type":{"kind":"enum","variants":[{"name":"None"},{"name":"KlendQueueAccountingHandlerOnKvault"}]}},{"name":"BorrowRateCurve","type":{"kind":"struct","fields":[{"name":"points","type":{"array":[{"defined":"CurvePoint"},11]}}]}},{"name":"CurvePoint","type":{"kind":"struct","fields":[{"name":"utilizationRateBps","type":"u32"},{"name":"borrowRateBps","type":"u32"}]}}],"events":[{"name":"BorrowOrderCancelEvent","fields":[{"name":"before","type":{"defined":"BorrowOrder"},"index":false}]},{"name":"BorrowOrderFullFillEvent","fields":[{"name":"before","type":{"defined":"BorrowOrder"},"index":false}]},{"name":"BorrowOrderPartialFillEvent","fields":[{"name":"before","type":{"defined":"BorrowOrder"},"index":false},{"name":"after","type":{"defined":"BorrowOrder"},"index":false}]},{"name":"BorrowOrderPlaceEvent","fields":[{"name":"after","type":{"defined":"BorrowOrder"},"index":false}]},{"name":"BorrowOrderUpdateEvent","fields":[{"name":"before","type":{"defined":"BorrowOrder"},"index":false},{"name":"after","type":{"defined":"BorrowOrder"},"index":false}]}],"errors":[{"code":6000,"name":"InvalidMarketAuthority","msg":"Market authority is invalid"},{"code":6001,"name":"InvalidMarketOwner","msg":"Market owner is invalid"},{"code":6002,"name":"InvalidAccountOwner","msg":"Input account owner is not the program address"},{"code":6003,"name":"InvalidAmount","msg":"Input amount is invalid"},{"code":6004,"name":"InvalidConfig","msg":"Input config value is invalid"},{"code":6005,"name":"InvalidSigner","msg":"Signer is not allowed to perform this action"},{"code":6006,"name":"InvalidAccountInput","msg":"Invalid account input"},{"code":6007,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6008,"name":"InsufficientLiquidity","msg":"Insufficient liquidity available"},{"code":6009,"name":"ReserveStale","msg":"Reserve state needs to be refreshed"},{"code":6010,"name":"WithdrawTooSmall","msg":"Withdraw amount too small"},{"code":6011,"name":"WithdrawTooLarge","msg":"Withdraw amount too large"},{"code":6012,"name":"BorrowTooSmall","msg":"Borrow amount too small to receive liquidity after fees"},{"code":6013,"name":"BorrowTooLarge","msg":"Borrow amount too large for deposited collateral"},{"code":6014,"name":"RepayTooSmall","msg":"Repay amount too small to transfer liquidity"},{"code":6015,"name":"LiquidationTooSmall","msg":"Liquidation amount too small to receive collateral"},{"code":6016,"name":"ObligationHealthy","msg":"Cannot liquidate healthy obligations"},{"code":6017,"name":"ObligationStale","msg":"Obligation state needs to be refreshed"},{"code":6018,"name":"ObligationReserveLimit","msg":"Obligation reserve limit exceeded"},{"code":6019,"name":"InvalidObligationOwner","msg":"Obligation owner is invalid"},{"code":6020,"name":"ObligationDepositsEmpty","msg":"Obligation deposits are empty"},{"code":6021,"name":"ObligationBorrowsEmpty","msg":"Obligation borrows are empty"},{"code":6022,"name":"ObligationDepositsZero","msg":"Obligation deposits have zero value"},{"code":6023,"name":"ObligationBorrowsZero","msg":"Obligation borrows have zero value"},{"code":6024,"name":"InvalidObligationCollateral","msg":"Invalid obligation collateral"},{"code":6025,"name":"InvalidObligationLiquidity","msg":"Invalid obligation liquidity"},{"code":6026,"name":"ObligationCollateralEmpty","msg":"Obligation collateral is empty"},{"code":6027,"name":"ObligationLiquidityEmpty","msg":"Obligation liquidity is empty"},{"code":6028,"name":"NegativeInterestRate","msg":"Interest rate is negative"},{"code":6029,"name":"InvalidOracleConfig","msg":"Input oracle config is invalid"},{"code":6030,"name":"InsufficientProtocolFeesToRedeem","msg":"Insufficient protocol fees to claim or no liquidity available"},{"code":6031,"name":"FlashBorrowCpi","msg":"No cpi flash borrows allowed"},{"code":6032,"name":"NoFlashRepayFound","msg":"No corresponding repay found for flash borrow"},{"code":6033,"name":"InvalidFlashRepay","msg":"Invalid repay found"},{"code":6034,"name":"FlashRepayCpi","msg":"No cpi flash repays allowed"},{"code":6035,"name":"MultipleFlashBorrows","msg":"Multiple flash borrows not allowed in the same transaction"},{"code":6036,"name":"FlashLoansDisabled","msg":"Flash loans are disabled for this reserve"},{"code":6037,"name":"SwitchboardV2Error","msg":"Switchboard error"},{"code":6038,"name":"CouldNotDeserializeScope","msg":"Cannot deserialize the scope price account"},{"code":6039,"name":"PriceTooOld","msg":"Price too old"},{"code":6040,"name":"PriceTooDivergentFromTwap","msg":"Price too divergent from twap"},{"code":6041,"name":"InvalidTwapPrice","msg":"Invalid twap price"},{"code":6042,"name":"GlobalEmergencyMode","msg":"Emergency mode is enabled"},{"code":6043,"name":"InvalidFlag","msg":"Invalid lending market config"},{"code":6044,"name":"PriceNotValid","msg":"Price is not valid"},{"code":6045,"name":"PriceIsBiggerThanHeuristic","msg":"Price is bigger than allowed by heuristic"},{"code":6046,"name":"PriceIsLowerThanHeuristic","msg":"Price lower than allowed by heuristic"},{"code":6047,"name":"PriceIsZero","msg":"Price is zero"},{"code":6048,"name":"PriceConfidenceTooWide","msg":"Price confidence too wide"},{"code":6049,"name":"IntegerOverflow","msg":"Conversion between integers failed"},{"code":6050,"name":"NoFarmForReserve","msg":"This reserve does not have a farm"},{"code":6051,"name":"IncorrectInstructionInPosition","msg":"Wrong instruction at expected position"},{"code":6052,"name":"NoPriceFound","msg":"No price found"},{"code":6053,"name":"InvalidTwapConfig","msg":"Invalid Twap configuration: Twap is enabled but one of the enabled price doesn't have a twap"},{"code":6054,"name":"InvalidPythPriceAccount","msg":"Pyth price account does not match configuration"},{"code":6055,"name":"InvalidSwitchboardAccount","msg":"Switchboard account(s) do not match configuration"},{"code":6056,"name":"InvalidScopePriceAccount","msg":"Scope price account does not match configuration"},{"code":6057,"name":"ObligationCollateralLtvZero","msg":"The obligation has one collateral with an LTV set to 0. Withdraw it before withdrawing other collaterals"},{"code":6058,"name":"InvalidObligationSeedsValue","msg":"Seeds must be default pubkeys for tag 0, and mint addresses for tag 1 or 2"},{"code":6059,"name":"DeprecatedInvalidObligationId","msg":"[DEPRECATED] Obligation id must be 0"},{"code":6060,"name":"InvalidBorrowRateCurvePoint","msg":"Invalid borrow rate curve point"},{"code":6061,"name":"InvalidUtilizationRate","msg":"Invalid utilization rate"},{"code":6062,"name":"CannotSocializeObligationWithCollateral","msg":"Obligation hasn't been fully liquidated and debt cannot be socialized."},{"code":6063,"name":"ObligationEmpty","msg":"Obligation has no borrows or deposits."},{"code":6064,"name":"WithdrawalCapReached","msg":"Withdrawal cap is reached"},{"code":6065,"name":"LastTimestampGreaterThanCurrent","msg":"The last interval start timestamp is greater than the current timestamp"},{"code":6066,"name":"LiquidationRewardTooSmall","msg":"The reward amount is less than the minimum acceptable received liquidity"},{"code":6067,"name":"IsolatedAssetTierViolation","msg":"Isolated Asset Tier Violation"},{"code":6068,"name":"InconsistentElevationGroup","msg":"The obligation's elevation group and the reserve's are not the same"},{"code":6069,"name":"InvalidElevationGroup","msg":"The elevation group chosen for the reserve does not exist in the lending market"},{"code":6070,"name":"InvalidElevationGroupConfig","msg":"The elevation group updated has wrong parameters set"},{"code":6071,"name":"UnhealthyElevationGroupLtv","msg":"The current obligation must have most or all its debt repaid before changing the elevation group"},{"code":6072,"name":"ElevationGroupNewLoansDisabled","msg":"Elevation group does not accept any new loans or any new borrows/withdrawals"},{"code":6073,"name":"ReserveDeprecated","msg":"Reserve was deprecated, no longer usable"},{"code":6074,"name":"ReferrerAccountNotInitialized","msg":"Referrer account not initialized"},{"code":6075,"name":"ReferrerAccountMintMissmatch","msg":"Referrer account mint does not match the operation reserve mint"},{"code":6076,"name":"ReferrerAccountWrongAddress","msg":"Referrer account address is not a valid program address"},{"code":6077,"name":"ReferrerAccountReferrerMissmatch","msg":"Referrer account referrer does not match the owner referrer"},{"code":6078,"name":"ReferrerAccountMissing","msg":"Referrer account missing for obligation with referrer"},{"code":6079,"name":"InsufficientReferralFeesToRedeem","msg":"Insufficient referral fees to claim or no liquidity available"},{"code":6080,"name":"CpiDisabled","msg":"CPI disabled for this instruction"},{"code":6081,"name":"ShortUrlNotAsciiAlphanumeric","msg":"Referrer short_url is not ascii alphanumeric"},{"code":6082,"name":"ReserveObsolete","msg":"Reserve is marked as obsolete"},{"code":6083,"name":"ElevationGroupAlreadyActivated","msg":"Obligation already part of the same elevation group"},{"code":6084,"name":"ObligationInObsoleteReserve","msg":"Obligation has a deposit or borrow in an obsolete reserve"},{"code":6085,"name":"ReferrerStateOwnerMismatch","msg":"Referrer state owner does not match the given signer"},{"code":6086,"name":"UserMetadataOwnerAlreadySet","msg":"User metadata owner is already set"},{"code":6087,"name":"CollateralNonLiquidatable","msg":"This collateral cannot be liquidated (LTV set to 0)"},{"code":6088,"name":"BorrowingDisabled","msg":"Borrowing is disabled"},{"code":6089,"name":"BorrowLimitExceeded","msg":"Cannot borrow above borrow limit"},{"code":6090,"name":"DepositLimitExceeded","msg":"Cannot deposit above deposit limit"},{"code":6091,"name":"BorrowingDisabledOutsideElevationGroup","msg":"Reserve does not accept any new borrows outside elevation group"},{"code":6092,"name":"NetValueRemainingTooSmall","msg":"Net value remaining too small"},{"code":6093,"name":"WorseLtvBlocked","msg":"Cannot get the obligation in a worse position"},{"code":6094,"name":"LiabilitiesBiggerThanAssets","msg":"Cannot have more liabilities than assets in a position"},{"code":6095,"name":"ReserveTokenBalanceMismatch","msg":"Reserve state and token account cannot drift"},{"code":6096,"name":"ReserveVaultBalanceMismatch","msg":"Reserve token account has been unexpectedly modified"},{"code":6097,"name":"ReserveAccountingMismatch","msg":"Reserve internal state accounting has been unexpectedly modified"},{"code":6098,"name":"BorrowingAboveUtilizationRateDisabled","msg":"Borrowing above set utilization rate is disabled"},{"code":6099,"name":"LiquidationBorrowFactorPriority","msg":"Liquidation must prioritize the debt with the highest borrow factor"},{"code":6100,"name":"LiquidationLowestLiquidationLtvPriority","msg":"Liquidation must prioritize the collateral with the lowest liquidation LTV"},{"code":6101,"name":"ElevationGroupBorrowLimitExceeded","msg":"Elevation group borrow limit exceeded"},{"code":6102,"name":"ElevationGroupWithoutDebtReserve","msg":"The elevation group does not have a debt reserve defined"},{"code":6103,"name":"ElevationGroupMaxCollateralReserveZero","msg":"The elevation group does not allow any collateral reserves"},{"code":6104,"name":"ElevationGroupHasAnotherDebtReserve","msg":"In elevation group attempt to borrow from a reserve that is not the debt reserve"},{"code":6105,"name":"ElevationGroupDebtReserveAsCollateral","msg":"The elevation group's debt reserve cannot be used as a collateral reserve"},{"code":6106,"name":"ObligationCollateralExceedsElevationGroupLimit","msg":"Obligation have more collateral than the maximum allowed by the elevation group"},{"code":6107,"name":"ObligationElevationGroupMultipleDebtReserve","msg":"Obligation is an elevation group but have more than one debt reserve"},{"code":6108,"name":"UnsupportedTokenExtension","msg":"Mint has a token (2022) extension that is not supported"},{"code":6109,"name":"InvalidTokenAccount","msg":"Can't have an spl token mint with a t22 account"},{"code":6110,"name":"DepositDisabledOutsideElevationGroup","msg":"Can't deposit into this reserve outside elevation group"},{"code":6111,"name":"CannotCalculateReferralAmountDueToSlotsMismatch","msg":"Cannot calculate referral amount due to slots mismatch"},{"code":6112,"name":"ObligationOwnersMustMatch","msg":"Obligation owners must match"},{"code":6113,"name":"ObligationsMustMatch","msg":"Obligations must match"},{"code":6114,"name":"LendingMarketsMustMatch","msg":"Lending markets must match"},{"code":6115,"name":"ObligationCurrentlyMarkedForDeleveraging","msg":"Obligation is already marked for deleveraging"},{"code":6116,"name":"MaximumWithdrawValueZero","msg":"Maximum withdrawable value of this collateral is zero, LTV needs improved"},{"code":6117,"name":"ZeroMaxLtvAssetsInDeposits","msg":"No max LTV 0 assets allowed in deposits for repay and withdraw"},{"code":6118,"name":"LowestLtvAssetsPriority","msg":"Withdrawing must prioritize the collateral with the lowest reserve max-LTV"},{"code":6119,"name":"WorseLtvThanUnhealthyLtv","msg":"Cannot get the obligation liquidatable"},{"code":6120,"name":"FarmAccountsMissing","msg":"Farm accounts to refresh are missing"},{"code":6121,"name":"RepayTooSmallForFullLiquidation","msg":"Repay amount is too small to satisfy the mandatory full liquidation"},{"code":6122,"name":"InsufficientRepayAmount","msg":"Liquidator provided repay amount lower than required by liquidation rules"},{"code":6123,"name":"OrderIndexOutOfBounds","msg":"Obligation order of the given index cannot exist"},{"code":6124,"name":"InvalidOrderConfiguration","msg":"Given order configuration has wrong parameters"},{"code":6125,"name":"OrderConfigurationNotSupportedByObligation","msg":"Given order configuration cannot be used with the current state of the obligation"},{"code":6126,"name":"OperationNotPermittedWithCurrentObligationOrders","msg":"Single debt, single collateral obligation orders have to be cancelled before changing the deposit/borrow count"},{"code":6127,"name":"OperationNotPermittedMarketImmutable","msg":"Cannot update lending market because it is set as immutable"},{"code":6128,"name":"OrderCreationDisabled","msg":"Creation of new orders is disabled"},{"code":6129,"name":"NoUpgradeAuthority","msg":"Cannot initialize global config because there is no upgrade authority to the program"},{"code":6130,"name":"InitialAdminDepositExecuted","msg":"Initial admin deposit in reserve already executed"},{"code":6131,"name":"ReserveHasNotReceivedInitialDeposit","msg":"Reserve has not received the initial deposit, cannot update config"},{"code":6132,"name":"CTokenUsageBlocked","msg":"CToken minting/redeeming is blocked for this reserve"},{"code":6133,"name":"CannotUseSameReserve","msg":"Cannot call ix with same reserve"},{"code":6134,"name":"TransactionIncludesRestrictedPrograms","msg":"Transaction includes restricted programs"},{"code":6135,"name":"BorrowOrderDebtLiquidityMintMismatch","msg":"There is no borrow order requesting debt in the given asset"},{"code":6136,"name":"BorrowOrderMaxBorrowRateExceeded","msg":"Reserve used for fill exceeds the maximum borrow rate specified by the order"},{"code":6137,"name":"BorrowOrderMinDebtTermInsufficient","msg":"Reserve used for fill defines a debt term shorter than specified by the order"},{"code":6138,"name":"BorrowOrderFillTimeLimitExceeded","msg":"Borrow order can no longer be filled"},{"code":6139,"name":"ReserveDebtMaturityReached","msg":"Cannot borrow from a reserve that reached its debt maturity timestamp"},{"code":6140,"name":"NonUpdatableOrderConfiguration","msg":"Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)"},{"code":6141,"name":"BorrowOrderExecutionDisabled","msg":"Execution of borrow orders is disabled"},{"code":6142,"name":"DebtReachedReserveDebtTerm","msg":"Cannot increase the debt that has reached its end of term configured by the reserve"},{"code":6143,"name":"ExpectationNotMet","msg":"The on-chain state does not meet expectation specified by the caller, so the operation must be aborted (to avoid race conditions)"},{"code":6144,"name":"BorrowOrderFillValueTooSmall","msg":"Available liquidity could not satisfy the minimum required borrow order fill value"},{"code":6145,"name":"WithdrawTicketIssuanceDisabled","msg":"Issuing new withdraw tickets is disabled by the market"},{"code":6146,"name":"WithdrawTicketRedemptionDisabled","msg":"Redeeming withdraw tickets is disabled by the market"},{"code":6147,"name":"WithdrawTicketStillValid","msg":"Recovering collateral is only available after the withdraw ticket has been marked invalid"},{"code":6148,"name":"WithdrawTicketRequiresFullRedemption","msg":"The withdraw ticket's current state requires that it is fully redeemed (e.g. due to owner ATA creation), but there is not enough liquidity"},{"code":6149,"name":"UserTokenBalanceMismatch","msg":"The user's token account has changed its balance in an unexpected way"},{"code":6150,"name":"WithdrawQueuedLiquidityValueTooSmall","msg":"Available liquidity could not satisfy the minimum required ticketed withdrawal value"},{"code":6151,"name":"InvalidTokenAccountState","msg":"Token account is in a state preventing the handler's operation (e.g. frozen or delegate)"},{"code":6152,"name":"WithdrawTicketInvalid","msg":"Cannot use ticket that was already marked invalid"},{"code":6153,"name":"BorrowOrderValueTooSmall","msg":"Borrow order's value would be below the market-configured minimum"},{"code":6154,"name":"WithdrawTicketValueTooSmall","msg":"Withdraw ticket's value would be below the market-configured minimum"},{"code":6155,"name":"InvalidWithdrawTicketProgressCallbackConfig","msg":"Invalid configuration or required custom accounts for the requested withdraw ticket callback type"},{"code":6156,"name":"WithdrawTicketProgressCallbackAccountsMissing","msg":"One or more accounts required by the ticket's configured progress callback are missing"},{"code":6157,"name":"BorrowRolloverConfigurationDisabled","msg":"Configuring auto-rollover on loans is disabled by market owner"},{"code":6158,"name":"InvalidObligationConfigUpdateSubject","msg":"Invalid specification of the Obligation's part to be configured"},{"code":6159,"name":"BorrowRolloverLiquidityMintMismatch","msg":"Auto-rollover must use a target reserve of the same token"},{"code":6160,"name":"ObligationBorrowRolloverNotApplicable","msg":"The given borrow is not fixed-term and does not require rolling over"},{"code":6161,"name":"ObligationBorrowOutsideRolloverWindow","msg":"The given borrow is outside the corresponding market-configured rollover window"},{"code":6162,"name":"ObligationBorrowRolloverNotEnabledByOwner","msg":"Obligation's owner did not opt-in for auto-rollover of the given borrow"},{"code":6163,"name":"ObligationBorrowRolloverTargetReserveMismatch","msg":"Obligation's owner did not allow to roll over into terms offered by the given reserve"},{"code":6164,"name":"BorrowRolloverExecutionDisabled","msg":"Executing auto-rollover is disabled by market owner"},{"code":6165,"name":"ObligationAccountingMismatch","msg":"Obligation internal state accounting has been unexpectedly modified"},{"code":6166,"name":"PartialRolloverValueTooSmall","msg":"Partial rollover amount is below the market-configured minimum value"},{"code":6167,"name":"ObligationBorrowRolloverConfigMismatch","msg":"Pre-existing rollover configuration of the loan cannot be overwritten by the operation"},{"code":6168,"name":"ObligationBorrowRolloverMustProlongDebtTerm","msg":"Rollover into existing borrow must prolong the remaining debt term"},{"code":6169,"name":"RolloverNotSupportedInElevationGroup","msg":"Rollover is not supported for obligations in an elevation group"},{"code":6170,"name":"WithdrawTicketCancellationDisabled","msg":"Cancelling withdraw tickets is disabled by the market"},{"code":6171,"name":"WithdrawTicketFullyCancelled","msg":"Cannot use ticket that was already fully-cancelled"},{"code":6172,"name":"CloneSourceReserveDisabled","msg":"Cannot clone config from a reserve that is disabled"},{"code":6173,"name":"CloneTargetReserveAlreadyInUse","msg":"Cannot clone config into a reserve that has been in use"},{"code":6174,"name":"ClonedReserveLiquidityMintMismatch","msg":"Cannot clone config between reserves of different mints"},{"code":6175,"name":"ReserveEmergencyMode","msg":"Reserve emergency mode is enabled"},{"code":6176,"name":"ObligationOwnershipTransferInProgress","msg":"Obligation ownership transfer is in progress"},{"code":6177,"name":"ObligationOwnershipTransferNotInInitiatedState","msg":"Obligation ownership transfer is not in initiated state"},{"code":6178,"name":"ObligationPendingOwnerNotSet","msg":"Obligation pending owner not set"},{"code":6179,"name":"ObligationInvalidPendingOwner","msg":"Invalid pending owner address"},{"code":6180,"name":"ObligationOwnershipTransferNotApproved","msg":"Obligation ownership transfer not approved by admin"},{"code":6181,"name":"ObligationHasActiveBorrowOrders","msg":"Obligation has active borrow orders"},{"code":6182,"name":"OnlyComputeBudgetCompanionIxsAllowed","msg":"Only ComputeBudget instructions may accompany this instruction"},{"code":6183,"name":"MissingPermissioner","msg":"Required permissioning account is missing"},{"code":6184,"name":"ReserveRewardsDisabled","msg":"Reserve rewards are disabled on this market (reserve_rewards_max_apr_bps is 0)"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/kamino_vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.json b/olddocs/archivekbot2/idls/kamino_vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.json new file mode 100644 index 0000000..231f87f --- /dev/null +++ b/olddocs/archivekbot2/idls/kamino_vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"kamino_vault","instructions":[{"name":"initVault","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseTokenMint","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"adminTokenAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateReserveAllocation","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"weight","type":"u64"},{"name":"cap","type":"u64"}]},{"name":"deposit","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"withdrawFromAvailable","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}]},{"name":"withdrawFromReserveAccounts","accounts":[{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]}],"args":[{"name":"sharesAmount","type":"u64"}]},{"name":"invest","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"payerTokenAccount","isMut":true,"isSigner":false},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false,"docs":["CPI accounts"]},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"updateVaultConfig","accounts":[{"name":"vaultAdminAuthority","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}],"args":[{"name":"entry","type":{"defined":"VaultConfigField"}},{"name":"data","type":"bytes"}]},{"name":"withdrawPendingFees","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["CPI accounts"]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"updateAdmin","accounts":[{"name":"pendingAdmin","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false}],"args":[]},{"name":"giveUpPendingFees","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxAmountToGiveUp","type":"u64"}]},{"name":"initializeSharesMetadata","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"updateSharesMetadata","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"withdrawFromAvailable","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}],"args":[{"name":"sharesAmount","type":"u64"}]}],"accounts":[{"name":"Reserve","type":{"kind":"struct","fields":[{"name":"version","docs":["Version of the reserve"],"type":"u64"},{"name":"lastUpdate","docs":["Last slot when supply and rates updated"],"type":{"defined":"LastUpdate"}},{"name":"lendingMarket","docs":["Lending market address"],"type":"publicKey"},{"name":"farmCollateral","type":"publicKey"},{"name":"farmDebt","type":"publicKey"},{"name":"liquidity","docs":["Reserve liquidity"],"type":{"defined":"ReserveLiquidity"}},{"name":"reserveLiquidityPadding","type":{"array":["u64",150]}},{"name":"collateral","docs":["Reserve collateral"],"type":{"defined":"ReserveCollateral"}},{"name":"reserveCollateralPadding","type":{"array":["u64",150]}},{"name":"config","docs":["Reserve configuration values"],"type":{"defined":"ReserveConfig"}},{"name":"configPadding","type":{"array":["u64",116]}},{"name":"borrowedAmountOutsideElevationGroup","type":"u64"},{"name":"borrowedAmountsAgainstThisReserveInElevationGroups","docs":["Amount of token borrowed in lamport of debt asset in the given","elevation group when this reserve is part of the collaterals."],"type":{"array":["u64",32]}},{"name":"padding","type":{"array":["u64",207]}}]}},{"name":"VaultState","type":{"kind":"struct","fields":[{"name":"vaultAdminAuthority","type":"publicKey"},{"name":"baseVaultAuthority","type":"publicKey"},{"name":"baseVaultAuthorityBump","type":"u64"},{"name":"tokenMint","type":"publicKey"},{"name":"tokenMintDecimals","type":"u64"},{"name":"tokenVault","type":"publicKey"},{"name":"tokenProgram","type":"publicKey"},{"name":"sharesMint","type":"publicKey"},{"name":"sharesMintDecimals","type":"u64"},{"name":"tokenAvailable","type":"u64"},{"name":"sharesIssued","type":"u64"},{"name":"availableCrankFunds","type":"u64"},{"name":"padding0","type":"u64"},{"name":"performanceFeeBps","type":"u64"},{"name":"managementFeeBps","type":"u64"},{"name":"lastFeeChargeTimestamp","type":"u64"},{"name":"prevAumSf","type":"u128"},{"name":"pendingFeesSf","type":"u128"},{"name":"vaultAllocationStrategy","type":{"array":[{"defined":"VaultAllocation"},10]}},{"name":"minDepositAmount","type":"u64"},{"name":"minWithdrawAmount","type":"u64"},{"name":"minInvestAmount","type":"u64"},{"name":"minInvestDelaySlots","type":"u64"},{"name":"crankFundFeePerReserve","type":"u64"},{"name":"pendingAdmin","type":"publicKey"},{"name":"cumulativeEarnedInterestSf","type":"u128"},{"name":"cumulativeMgmtFeesSf","type":"u128"},{"name":"cumulativePerfFeesSf","type":"u128"},{"name":"name","type":{"array":["u8",40]}},{"name":"vaultLookupTable","type":"publicKey"},{"name":"vaultFarm","type":"publicKey"},{"name":"creationTimestamp","type":"u64"},{"name":"padding1","type":"u64"},{"name":"allocationAdmin","type":"publicKey"},{"name":"padding2","type":{"array":["u128",242]}}]}}],"types":[{"name":"LastUpdate","docs":["Last update state"],"type":{"kind":"struct","fields":[{"name":"slot","docs":["Last slot when updated"],"type":"u64"},{"name":"stale","docs":["True when marked stale, false when slot updated"],"type":"u8"},{"name":"priceStatus","docs":["Status of the prices used to calculate the last update"],"type":"u8"},{"name":"placeholder","type":{"array":["u8",6]}}]}},{"name":"BigFractionBytes","type":{"kind":"struct","fields":[{"name":"value","type":{"array":["u64",4]}},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"ReserveCollateral","docs":["Reserve collateral"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve collateral mint address"],"type":"publicKey"},{"name":"mintTotalSupply","docs":["Reserve collateral mint supply, used for exchange rate"],"type":"u64"},{"name":"supplyVault","docs":["Reserve collateral supply address"],"type":"publicKey"},{"name":"padding1","type":{"array":["u128",32]}},{"name":"padding2","type":{"array":["u128",32]}}]}},{"name":"ReserveConfig","docs":["Reserve configuration values"],"type":{"kind":"struct","fields":[{"name":"status","docs":["Status of the reserve Active/Obsolete/Hidden"],"type":"u8"},{"name":"assetTier","docs":["Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt"],"type":"u8"},{"name":"hostFixedInterestRateBps","docs":["Flat rate that goes to the host"],"type":"u16"},{"name":"reserved2","docs":["[DEPRECATED] Boost for side (debt or collateral)"],"type":{"array":["u8",2]}},{"name":"reserved3","docs":["[DEPRECATED] Reward points multiplier per obligation type"],"type":{"array":["u8",8]}},{"name":"protocolTakeRatePct","docs":["Protocol take rate is the amount borrowed interest protocol receives, as a percentage"],"type":"u8"},{"name":"protocolLiquidationFeePct","docs":["Cut of the liquidation bonus that the protocol receives, as a percentage"],"type":"u8"},{"name":"loanToValuePct","docs":["Target ratio of the value of borrows to deposits, as a percentage","0 if use as collateral is disabled"],"type":"u8"},{"name":"liquidationThresholdPct","docs":["Loan to value ratio at which an obligation can be liquidated, as percentage"],"type":"u8"},{"name":"minLiquidationBonusBps","docs":["Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"maxLiquidationBonusBps","docs":["Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"badDebtLiquidationBonusBps","docs":["Bad debt liquidation bonus for an undercollateralized obligation, as bps"],"type":"u16"},{"name":"deleveragingMarginCallPeriodSecs","docs":["Time in seconds that must pass before redemptions are enabled after the deposit limit is","crossed.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"deleveragingThresholdDecreaseBpsPerDay","docs":["The rate at which the deleveraging threshold decreases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"fees","docs":["Program owner fees assessed, separate from gains due to interest accrual"],"type":{"defined":"ReserveFees"}},{"name":"borrowRateCurve","docs":["Borrow rate curve based on utilization"],"type":{"defined":"BorrowRateCurve"}},{"name":"borrowFactorPct","docs":["Borrow factor in percentage - used for risk adjustment"],"type":"u64"},{"name":"depositLimit","docs":["Maximum deposit limit of liquidity in native units, u64::MAX for inf"],"type":"u64"},{"name":"borrowLimit","docs":["Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits)"],"type":"u64"},{"name":"tokenInfo","docs":["Token id from TokenInfos struct"],"type":{"defined":"TokenInfo"}},{"name":"depositWithdrawalCap","docs":["Deposit withdrawal caps - deposit & redeem"],"type":{"defined":"WithdrawalCaps"}},{"name":"debtWithdrawalCap","docs":["Debt withdrawal caps - borrow & repay"],"type":{"defined":"WithdrawalCaps"}},{"name":"elevationGroups","type":{"array":["u8",20]}},{"name":"disableUsageAsCollOutsideEmode","type":"u8"},{"name":"utilizationLimitBlockBorrowingAbovePct","docs":["Utilization (in percentage) above which borrowing is blocked. 0 to disable."],"type":"u8"},{"name":"autodeleverageEnabled","docs":["Whether this reserve should be subject to auto-deleveraging after deposit or borrow limit is","crossed.","Besides this flag, the lending market's flag also needs to be enabled (logical `AND`).","**NOTE:** the manual \"target LTV\" deleveraging (enabled by the risk council for individual","obligations) is NOT affected by this flag."],"type":"u8"},{"name":"reserved1","type":{"array":["u8",1]}},{"name":"borrowLimitOutsideElevationGroup","docs":["Maximum amount liquidity of this reserve borrowed outside all elevation groups","- u64::MAX for inf","- 0 to disable borrows outside elevation groups"],"type":"u64"},{"name":"borrowLimitAgainstThisCollateralInElevationGroup","docs":["Defines the maximum amount (in lamports of elevation group debt asset)","that can be borrowed when this reserve is used as collateral.","- u64::MAX for inf","- 0 to disable borrows in this elevation group (expected value for the debt asset)"],"type":{"array":["u64",32]}},{"name":"deleveragingBonusIncreaseBpsPerDay","docs":["The rate at which the deleveraging-related liquidation bonus increases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"}]}},{"name":"ReserveFees","docs":["Additional fee information on a reserve","","These exist separately from interest accrual fees, and are specifically for the program owner","and referral fee. The fees are paid out as a percentage of liquidity token amounts during","repayments and liquidations."],"type":{"kind":"struct","fields":[{"name":"borrowFeeSf","docs":["Fee assessed on `BorrowObligationLiquidity`, as scaled fraction (60 bits fractional part)","Must be between `0` and `2^60`, such that `2^60 = 1`. A few examples for","clarity:","1% = (1 << 60) / 100 = 11529215046068470","0.01% (1 basis point) = 115292150460685","0.00001% (Aave borrow fee) = 115292150461"],"type":"u64"},{"name":"flashLoanFeeSf","docs":["Fee for flash loan, expressed as scaled fraction.","0.3% (Aave flash loan fee) = 0.003 * 2^60 = 3458764513820541"],"type":"u64"},{"name":"padding","docs":["Used for allignment"],"type":{"array":["u8",8]}}]}},{"name":"ReserveLiquidity","docs":["Reserve liquidity"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve liquidity mint address"],"type":"publicKey"},{"name":"supplyVault","docs":["Reserve liquidity supply address"],"type":"publicKey"},{"name":"feeVault","docs":["Reserve liquidity fee collection address"],"type":"publicKey"},{"name":"availableAmount","docs":["Reserve liquidity available"],"type":"u64"},{"name":"borrowedAmountSf","docs":["Reserve liquidity borrowed (scaled fraction)"],"type":"u128"},{"name":"marketPriceSf","docs":["Reserve liquidity market price in quote currency (scaled fraction)"],"type":"u128"},{"name":"marketPriceLastUpdatedTs","docs":["Unix timestamp of the market price (from the oracle)"],"type":"u64"},{"name":"mintDecimals","docs":["Reserve liquidity mint decimals"],"type":"u64"},{"name":"depositLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the liquidity amount is above the deposit cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"borrowLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the borrowed amount is above the borrow cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"cumulativeBorrowRateBsf","docs":["Reserve liquidity cumulative borrow rate (scaled fraction)"],"type":{"defined":"BigFractionBytes"}},{"name":"accumulatedProtocolFeesSf","docs":["Reserve cumulative protocol fees (scaled fraction)"],"type":"u128"},{"name":"accumulatedReferrerFeesSf","docs":["Reserve cumulative referrer fees (scaled fraction)"],"type":"u128"},{"name":"pendingReferrerFeesSf","docs":["Reserve pending referrer fees, to be claimed in refresh_obligation by referrer or protocol (scaled fraction)"],"type":"u128"},{"name":"absoluteReferralRateSf","docs":["Reserve referrer fee absolute rate calculated at each refresh_reserve operation (scaled fraction)"],"type":"u128"},{"name":"tokenProgram","docs":["Token program of the liquidity mint"],"type":"publicKey"},{"name":"padding2","type":{"array":["u64",51]}},{"name":"padding3","type":{"array":["u128",32]}}]}},{"name":"WithdrawalCaps","docs":["Reserve Withdrawal Caps State"],"type":{"kind":"struct","fields":[{"name":"configCapacity","type":"i64"},{"name":"currentTotal","type":"i64"},{"name":"lastIntervalStartTimestamp","type":"u64"},{"name":"configIntervalLengthSeconds","type":"u64"}]}},{"name":"PriceHeuristic","type":{"kind":"struct","fields":[{"name":"lower","docs":["Lower value of acceptable price"],"type":"u64"},{"name":"upper","docs":["Upper value of acceptable price"],"type":"u64"},{"name":"exp","docs":["Number of decimals of the previously defined values"],"type":"u64"}]}},{"name":"PythConfiguration","type":{"kind":"struct","fields":[{"name":"price","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"}]}},{"name":"ScopeConfiguration","type":{"kind":"struct","fields":[{"name":"priceFeed","docs":["Pubkey of the scope price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"priceChain","docs":["This is the scope_id price chain that results in a price for the token"],"type":{"array":["u16",4]}},{"name":"twapChain","docs":["This is the scope_id price chain for the twap"],"type":{"array":["u16",4]}}]}},{"name":"SwitchboardConfiguration","type":{"kind":"struct","fields":[{"name":"priceAggregator","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"twapAggregator","type":"publicKey"}]}},{"name":"TokenInfo","type":{"kind":"struct","fields":[{"name":"name","docs":["UTF-8 encoded name of the token (null-terminated)"],"type":{"array":["u8",32]}},{"name":"heuristic","docs":["Heuristics limits of acceptable price"],"type":{"defined":"PriceHeuristic"}},{"name":"maxTwapDivergenceBps","docs":["Max divergence between twap and price in bps"],"type":"u64"},{"name":"maxAgePriceSeconds","type":"u64"},{"name":"maxAgeTwapSeconds","type":"u64"},{"name":"scopeConfiguration","docs":["Scope price configuration"],"type":{"defined":"ScopeConfiguration"}},{"name":"switchboardConfiguration","docs":["Switchboard configuration"],"type":{"defined":"SwitchboardConfiguration"}},{"name":"pythConfiguration","docs":["Pyth configuration"],"type":{"defined":"PythConfiguration"}},{"name":"blockPriceUsage","type":"u8"},{"name":"reserved","type":{"array":["u8",7]}},{"name":"padding","type":{"array":["u64",19]}}]}},{"name":"BorrowRateCurve","type":{"kind":"struct","fields":[{"name":"points","type":{"array":[{"defined":"CurvePoint"},11]}}]}},{"name":"CurvePoint","type":{"kind":"struct","fields":[{"name":"utilizationRateBps","type":"u32"},{"name":"borrowRateBps","type":"u32"}]}},{"name":"VaultConfigField","type":{"kind":"enum","variants":[{"name":"PerformanceFeeBps"},{"name":"ManagementFeeBps"},{"name":"MinDepositAmount"},{"name":"MinWithdrawAmount"},{"name":"MinInvestAmount"},{"name":"MinInvestDelaySlots"},{"name":"CrankFundFeePerReserve"},{"name":"PendingVaultAdmin"},{"name":"Name"},{"name":"LookupTable"},{"name":"Farm"},{"name":"AllocationAdmin"}]}},{"name":"VaultAllocation","type":{"kind":"struct","fields":[{"name":"reserve","type":"publicKey"},{"name":"ctokenVault","type":"publicKey"},{"name":"targetAllocationWeight","type":"u64"},{"name":"tokenAllocationCap","docs":["Maximum token invested in this reserve"],"type":"u64"},{"name":"ctokenVaultBump","type":"u64"},{"name":"configPadding","type":{"array":["u64",127]}},{"name":"ctokenAllocation","type":"u64"},{"name":"lastInvestSlot","type":"u64"},{"name":"tokenTargetAllocationSf","type":"u128"},{"name":"statePadding","type":{"array":["u64",128]}}]}}],"errors":[{"code":7000,"name":"DepositAmountsZero","msg":"DepositAmountsZero"},{"code":7001,"name":"SharesIssuedAmountDoesNotMatch","msg":"SharesIssuedAmountDoesNotMatch"},{"code":7002,"name":"MathOverflow","msg":"MathOverflow"},{"code":7003,"name":"IntegerOverflow","msg":"IntegerOverflow"},{"code":7004,"name":"WithdrawAmountBelowMinimum","msg":"Withdrawn amount is below minimum"},{"code":7005,"name":"TooMuchLiquidityToWithdraw","msg":"TooMuchLiquidityToWithdraw"},{"code":7006,"name":"ReserveAlreadyExists","msg":"ReserveAlreadyExists"},{"code":7007,"name":"ReserveNotPartOfAllocations","msg":"ReserveNotPartOfAllocations"},{"code":7008,"name":"CouldNotDeserializeAccountAsReserve","msg":"CouldNotDeserializeAccountAsReserve"},{"code":7009,"name":"ReserveNotProvidedInTheAccounts","msg":"ReserveNotProvidedInTheAccounts"},{"code":7010,"name":"ReserveAccountAndKeyMismatch","msg":"ReserveAccountAndKeyMismatch"},{"code":7011,"name":"OutOfRangeOfReserveIndex","msg":"OutOfRangeOfReserveIndex"},{"code":7012,"name":"CannotFindReserveInAllocations","msg":"OutOfRangeOfReserveIndex"},{"code":7013,"name":"InvestAmountBelowMinimum","msg":"Invested amount is below minimum"},{"code":7014,"name":"AdminAuthorityIncorrect","msg":"AdminAuthorityIncorrect"},{"code":7015,"name":"BaseVaultAuthorityIncorrect","msg":"BaseVaultAuthorityIncorrect"},{"code":7016,"name":"BaseVaultAuthorityBumpIncorrect","msg":"BaseVaultAuthorityBumpIncorrect"},{"code":7017,"name":"TokenMintIncorrect","msg":"TokenMintIncorrect"},{"code":7018,"name":"TokenMintDecimalsIncorrect","msg":"TokenMintDecimalsIncorrect"},{"code":7019,"name":"TokenVaultIncorrect","msg":"TokenVaultIncorrect"},{"code":7020,"name":"SharesMintDecimalsIncorrect","msg":"SharesMintDecimalsIncorrect"},{"code":7021,"name":"SharesMintIncorrect","msg":"SharesMintIncorrect"},{"code":7022,"name":"InitialAccountingIncorrect","msg":"InitialAccountingIncorrect"},{"code":7023,"name":"ReserveIsStale","msg":"Reserve is stale and must be refreshed before any operation"},{"code":7024,"name":"NotEnoughLiquidityDisinvestedToSendToUser","msg":"Not enough liquidity disinvested to send to user"},{"code":7025,"name":"BPSValueTooBig","msg":"BPS value is greater than 10000"},{"code":7026,"name":"DepositAmountBelowMinimum","msg":"Deposited amount is below minimum"},{"code":7027,"name":"ReserveSpaceExhausted","msg":"Vault have no space for new reserves"},{"code":7028,"name":"CannotWithdrawFromEmptyVault","msg":"Cannot withdraw from empty vault"},{"code":7029,"name":"TokensDepositedAmountDoesNotMatch","msg":"TokensDepositedAmountDoesNotMatch"},{"code":7030,"name":"AmountToWithdrawDoesNotMatch","msg":"Amount to withdraw does not match"},{"code":7031,"name":"LiquidityToWithdrawDoesNotMatch","msg":"Liquidity to withdraw does not match"},{"code":7032,"name":"UserReceivedAmountDoesNotMatch","msg":"User received amount does not match"},{"code":7033,"name":"SharesBurnedAmountDoesNotMatch","msg":"Shares burned amount does not match"},{"code":7034,"name":"DisinvestedLiquidityAmountDoesNotMatch","msg":"Disinvested liquidity amount does not match"},{"code":7035,"name":"SharesMintedAmountDoesNotMatch","msg":"SharesMintedAmountDoesNotMatch"},{"code":7036,"name":"AUMDecreasedAfterInvest","msg":"AUM decreased after invest"},{"code":7037,"name":"AUMBelowPendingFees","msg":"AUM is below pending fees"},{"code":7038,"name":"DepositAmountsZeroShares","msg":"Deposit amount results in 0 shares"},{"code":7039,"name":"WithdrawResultsInZeroShares","msg":"Withdraw amount results in 0 shares"},{"code":7040,"name":"CannotWithdrawZeroShares","msg":"Cannot withdraw zero shares"},{"code":7041,"name":"ManagementFeeGreaterThanMaxAllowed","msg":"Management fee is greater than maximum allowed"},{"code":7042,"name":"VaultAUMZero","msg":"Vault assets under management are empty"},{"code":7043,"name":"MissingReserveForBatchRefresh","msg":"Missing reserve for batch refresh"},{"code":7044,"name":"MinWithdrawAmountTooBig","msg":"Min withdraw amount is too big"},{"code":7045,"name":"InvestTooSoon","msg":"Invest is called too soon after last invest"},{"code":7046,"name":"WrongAdminOrAllocationAdmin","msg":"Wrong admin or allocation admin"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/kamino_vault_v2.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.json b/olddocs/archivekbot2/idls/kamino_vault_v2.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.json new file mode 100644 index 0000000..b4bf03e --- /dev/null +++ b/olddocs/archivekbot2/idls/kamino_vault_v2.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.json @@ -0,0 +1 @@ +{"version":"2.1.1","name":"kamino_vault","instructions":[{"name":"initVault","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseTokenMint","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"adminTokenAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateReserveAllocation","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"reserveWhitelistEntry","isMut":false,"isSigner":false,"isOptional":true},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"weight","type":"u64"},{"name":"cap","type":"u64"}]},{"name":"deposit","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"buy","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"withdrawFromAvailable","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}]},{"name":"withdrawFromReserveAccounts","accounts":[{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"sharesAmount","type":"u64"}]},{"name":"sell","accounts":[{"name":"withdrawFromAvailable","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}]},{"name":"withdrawFromReserveAccounts","accounts":[{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"sharesAmount","type":"u64"}]},{"name":"invest","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"payerTokenAccount","isMut":true,"isSigner":false},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false,"docs":["CPI accounts"]},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveWhitelistEntry","isMut":false,"isSigner":false,"isOptional":true},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"updateVaultConfig","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}],"args":[{"name":"entry","type":{"defined":"VaultConfigField"}},{"name":"data","type":"bytes"}]},{"name":"withdrawPendingFees","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["CPI accounts"]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"updateAdmin","accounts":[{"name":"pendingAdmin","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false}],"args":[]},{"name":"giveUpPendingFees","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxAmountToGiveUp","type":"u64"}]},{"name":"initializeSharesMetadata","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"updateSharesMetadata","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"withdrawFromAvailable","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"sharesAmount","type":"u64"}]},{"name":"removeAllocation","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false}],"args":[]},{"name":"initGlobalConfig","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"programData","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"updateGlobalConfig","accounts":[{"name":"globalAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[{"name":"update","type":{"defined":"UpdateGlobalConfigMode"}}]},{"name":"updateGlobalConfigAdmin","accounts":[{"name":"pendingAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[]},{"name":"addUpdateWhitelistedReserve","accounts":[{"name":"globalAdmin","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"reserveWhitelistEntry","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"update","type":{"defined":"UpdateReserveWhitelistMode"}}]},{"name":"topupRewards","accounts":[{"name":"payer","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"payerTokenTa","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawRewards","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"withdrawTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"redeemInKind","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"userCtokenTa","isMut":true,"isSigner":false},{"name":"ctokenMint","isMut":true,"isSigner":false},{"name":"userSharesTa","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"sharesAmount","type":"u64"}]}],"accounts":[{"name":"Reserve","type":{"kind":"struct","fields":[{"name":"version","docs":["Version of the reserve"],"type":"u64"},{"name":"lastUpdate","docs":["Last slot when supply and rates updated"],"type":{"defined":"LastUpdate"}},{"name":"lendingMarket","docs":["Lending market address"],"type":"publicKey"},{"name":"farmCollateral","type":"publicKey"},{"name":"farmDebt","type":"publicKey"},{"name":"liquidity","docs":["Reserve liquidity"],"type":{"defined":"ReserveLiquidity"}},{"name":"reserveLiquidityPadding","type":{"array":["u64",150]}},{"name":"collateral","docs":["Reserve collateral"],"type":{"defined":"ReserveCollateral"}},{"name":"reserveCollateralPadding","type":{"array":["u64",150]}},{"name":"config","docs":["Reserve configuration values"],"type":{"defined":"ReserveConfig"}},{"name":"configPadding","type":{"array":["u64",116]}},{"name":"borrowedAmountOutsideElevationGroup","type":"u64"},{"name":"borrowedAmountsAgainstThisReserveInElevationGroups","docs":["Amount of token borrowed in lamport of debt asset in the given","elevation group when this reserve is part of the collaterals."],"type":{"array":["u64",32]}},{"name":"padding","type":{"array":["u64",207]}}]}},{"name":"GlobalConfig","type":{"kind":"struct","fields":[{"name":"globalAdmin","type":"publicKey"},{"name":"pendingAdmin","type":"publicKey"},{"name":"withdrawalPenaltyLamports","type":"u64"},{"name":"withdrawalPenaltyBps","type":"u64"},{"name":"padding","type":{"array":["u8",944]}}]}},{"name":"ReserveWhitelistEntry","type":{"kind":"struct","fields":[{"name":"tokenMint","docs":["The token mint is stored to solve the problem of finding all the whitelisted reserves for a particular token mint:","when storing the token mint inside the PDA, finding all the whitelisted reserves becomes a `getProgramAccounts` with","a filter on discriminator + the mint field","The reserve pubkey, as seed of the reserve whitelist PDA account, it stored so you can link back the PDA to its seeds","(for instance, in the operation above we easily find the reserve corresponding to the PDA)"],"type":"publicKey"},{"name":"reserve","type":"publicKey"},{"name":"whitelistAddAllocation","type":"u8"},{"name":"whitelistInvest","type":"u8"},{"name":"padding","type":{"array":["u8",62]}}]}},{"name":"VaultState","type":{"kind":"struct","fields":[{"name":"vaultAdminAuthority","type":"publicKey"},{"name":"baseVaultAuthority","type":"publicKey"},{"name":"baseVaultAuthorityBump","type":"u64"},{"name":"tokenMint","type":"publicKey"},{"name":"tokenMintDecimals","type":"u64"},{"name":"tokenVault","type":"publicKey"},{"name":"tokenProgram","type":"publicKey"},{"name":"sharesMint","type":"publicKey"},{"name":"sharesMintDecimals","type":"u64"},{"name":"tokenAvailable","type":"u64"},{"name":"sharesIssued","type":"u64"},{"name":"availableCrankFunds","type":"u64"},{"name":"unallocatedWeight","type":"u64"},{"name":"performanceFeeBps","type":"u64"},{"name":"managementFeeBps","type":"u64"},{"name":"lastFeeChargeTimestamp","type":"u64"},{"name":"prevAumSf","type":"u128"},{"name":"pendingFeesSf","type":"u128"},{"name":"vaultAllocationStrategy","type":{"array":[{"defined":"VaultAllocation"},25]}},{"name":"padding1","type":{"array":["u128",256]}},{"name":"minDepositAmount","type":"u64"},{"name":"minWithdrawAmount","type":"u64"},{"name":"minInvestAmount","type":"u64"},{"name":"minInvestDelaySlots","type":"u64"},{"name":"crankFundFeePerReserve","type":"u64"},{"name":"pendingAdmin","type":"publicKey"},{"name":"cumulativeEarnedInterestSf","type":"u128"},{"name":"cumulativeMgmtFeesSf","type":"u128"},{"name":"cumulativePerfFeesSf","type":"u128"},{"name":"name","type":{"array":["u8",40]}},{"name":"vaultLookupTable","type":"publicKey"},{"name":"vaultFarm","type":"publicKey"},{"name":"creationTimestamp","type":"u64"},{"name":"unallocatedTokensCap","type":"u64"},{"name":"allocationAdmin","type":"publicKey"},{"name":"withdrawalPenaltyLamports","type":"u64"},{"name":"withdrawalPenaltyBps","type":"u64"},{"name":"firstLossCapitalFarm","type":"publicKey"},{"name":"allowAllocationsInWhitelistedReservesOnly","type":"u8"},{"name":"allowInvestInWhitelistedReservesOnly","type":"u8"},{"name":"padding2","type":{"array":["u8",14]}},{"name":"rewardInfo","type":{"defined":"VaultRewardInfo"}},{"name":"padding3","type":{"array":["u128",232]}}]}}],"types":[{"name":"LastUpdate","docs":["Last update state"],"type":{"kind":"struct","fields":[{"name":"slot","docs":["Last slot when updated"],"type":"u64"},{"name":"stale","docs":["True when marked stale, false when slot updated"],"type":"u8"},{"name":"priceStatus","docs":["Status of the prices used to calculate the last update"],"type":"u8"},{"name":"placeholder","type":{"array":["u8",6]}}]}},{"name":"BigFractionBytes","type":{"kind":"struct","fields":[{"name":"value","type":{"array":["u64",4]}},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"ReserveCollateral","docs":["Reserve collateral"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve collateral mint address"],"type":"publicKey"},{"name":"mintTotalSupply","docs":["Reserve collateral mint supply, used for exchange rate"],"type":"u64"},{"name":"supplyVault","docs":["Reserve collateral supply address"],"type":"publicKey"},{"name":"padding1","type":{"array":["u128",32]}},{"name":"padding2","type":{"array":["u128",32]}}]}},{"name":"ReserveConfig","docs":["Reserve configuration values"],"type":{"kind":"struct","fields":[{"name":"status","docs":["Status of the reserve Active/Obsolete/Hidden"],"type":"u8"},{"name":"assetTier","docs":["Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt"],"type":"u8"},{"name":"hostFixedInterestRateBps","docs":["Flat rate that goes to the host"],"type":"u16"},{"name":"minDeleveragingBonusBps","docs":["Starting bonus for deleveraging-related liquidations, in bps."],"type":"u16"},{"name":"blockCtokenUsage","docs":["Boolean flag to block minting/redeeming of ctokens","Blocks usage of ctokens (minting or withdrawing from obligation)","Effectively blocks deposit_reserve_liquidity and withdraw_obligation_collateral"],"type":"u8"},{"name":"reserved1","docs":["Past reserved space - feel free to reuse."],"type":{"array":["u8",6]}},{"name":"protocolOrderExecutionFeePct","docs":["Cut of the order execution bonus that the protocol receives, as a percentage"],"type":"u8"},{"name":"protocolTakeRatePct","docs":["Protocol take rate is the amount borrowed interest protocol receives, as a percentage"],"type":"u8"},{"name":"protocolLiquidationFeePct","docs":["Cut of the liquidation bonus that the protocol receives, as a percentage"],"type":"u8"},{"name":"loanToValuePct","docs":["Target ratio of the value of borrows to deposits, as a percentage","0 if use as collateral is disabled"],"type":"u8"},{"name":"liquidationThresholdPct","docs":["Loan to value ratio at which an obligation can be liquidated, as percentage"],"type":"u8"},{"name":"minLiquidationBonusBps","docs":["Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"maxLiquidationBonusBps","docs":["Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"badDebtLiquidationBonusBps","docs":["Bad debt liquidation bonus for an undercollateralized obligation, as bps"],"type":"u16"},{"name":"deleveragingMarginCallPeriodSecs","docs":["Time in seconds that must pass before redemptions are enabled after the deposit limit is","crossed.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"deleveragingThresholdDecreaseBpsPerDay","docs":["The rate at which the deleveraging threshold decreases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"fees","docs":["Program owner fees assessed, separate from gains due to interest accrual"],"type":{"defined":"ReserveFees"}},{"name":"borrowRateCurve","docs":["Borrow rate curve based on utilization"],"type":{"defined":"BorrowRateCurve"}},{"name":"borrowFactorPct","docs":["Borrow factor in percentage - used for risk adjustment"],"type":"u64"},{"name":"depositLimit","docs":["Maximum deposit limit of liquidity in native units, u64::MAX for inf"],"type":"u64"},{"name":"borrowLimit","docs":["Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits)"],"type":"u64"},{"name":"tokenInfo","docs":["Token id from TokenInfos struct"],"type":{"defined":"TokenInfo"}},{"name":"depositWithdrawalCap","docs":["Deposit withdrawal caps - deposit & redeem"],"type":{"defined":"WithdrawalCaps"}},{"name":"debtWithdrawalCap","docs":["Debt withdrawal caps - borrow & repay"],"type":{"defined":"WithdrawalCaps"}},{"name":"elevationGroups","type":{"array":["u8",20]}},{"name":"disableUsageAsCollOutsideEmode","type":"u8"},{"name":"utilizationLimitBlockBorrowingAbovePct","docs":["Utilization (in percentage) above which borrowing is blocked. 0 to disable."],"type":"u8"},{"name":"autodeleverageEnabled","docs":["Whether this reserve should be subject to auto-deleveraging after deposit or borrow limit is","crossed.","Besides this flag, the lending market's flag also needs to be enabled (logical `AND`).","**NOTE:** the manual \"target LTV\" deleveraging (enabled by the risk council for individual","obligations) is NOT affected by this flag."],"type":"u8"},{"name":"proposerAuthorityLocked","docs":["Boolean flag indicating whether the reserve is locked for the proposer authority.","","Once the proposer have finished preparing the reserve, it must be locked to prevent","further changes to the reserve configuration allowing review and voting on the proposal","without alteration during the voting period."],"type":"u8"},{"name":"borrowLimitOutsideElevationGroup","docs":["Maximum amount liquidity of this reserve borrowed outside all elevation groups","- u64::MAX for inf","- 0 to disable borrows outside elevation groups"],"type":"u64"},{"name":"borrowLimitAgainstThisCollateralInElevationGroup","docs":["Defines the maximum amount (in lamports of elevation group debt asset)","that can be borrowed when this reserve is used as collateral.","- u64::MAX for inf","- 0 to disable borrows in this elevation group (expected value for the debt asset)"],"type":{"array":["u64",32]}},{"name":"deleveragingBonusIncreaseBpsPerDay","docs":["The rate at which the deleveraging-related liquidation bonus increases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"}]}},{"name":"ReserveFees","docs":["Additional fee information on a reserve","","These exist separately from interest accrual fees, and are specifically for the program owner","and referral fee. The fees are paid out as a percentage of liquidity token amounts during","repayments and liquidations."],"type":{"kind":"struct","fields":[{"name":"originationFeeSf","docs":["Fee assessed on `BorrowObligationLiquidity`, as scaled fraction (60 bits fractional part)","Must be between `0` and `2^60`, such that `2^60 = 1`. A few examples for","clarity:","1% = (1 << 60) / 100 = 11529215046068470","0.01% (1 basis point) = 115292150460685","0.00001% (Aave origination fee) = 115292150461"],"type":"u64"},{"name":"flashLoanFeeSf","docs":["Fee for flash loan, expressed as scaled fraction.","0.3% (Aave flash loan fee) = 0.003 * 2^60 = 3458764513820541"],"type":"u64"},{"name":"padding","docs":["Used for allignment"],"type":{"array":["u8",8]}}]}},{"name":"ReserveLiquidity","docs":["Reserve liquidity"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve liquidity mint address"],"type":"publicKey"},{"name":"supplyVault","docs":["Reserve liquidity supply address"],"type":"publicKey"},{"name":"feeVault","docs":["Reserve liquidity fee collection address"],"type":"publicKey"},{"name":"availableAmount","docs":["Reserve liquidity available"],"type":"u64"},{"name":"borrowedAmountSf","docs":["Reserve liquidity borrowed (scaled fraction)"],"type":"u128"},{"name":"marketPriceSf","docs":["Reserve liquidity market price in quote currency (scaled fraction)"],"type":"u128"},{"name":"marketPriceLastUpdatedTs","docs":["Unix timestamp of the market price (from the oracle)"],"type":"u64"},{"name":"mintDecimals","docs":["Reserve liquidity mint decimals"],"type":"u64"},{"name":"depositLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the liquidity amount is above the deposit cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"borrowLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the borrowed amount is above the borrow cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"cumulativeBorrowRateBsf","docs":["Reserve liquidity cumulative borrow rate (scaled fraction)"],"type":{"defined":"BigFractionBytes"}},{"name":"accumulatedProtocolFeesSf","docs":["Reserve cumulative protocol fees (scaled fraction)"],"type":"u128"},{"name":"accumulatedReferrerFeesSf","docs":["Reserve cumulative referrer fees (scaled fraction)"],"type":"u128"},{"name":"pendingReferrerFeesSf","docs":["Reserve pending referrer fees, to be claimed in refresh_obligation by referrer or protocol (scaled fraction)"],"type":"u128"},{"name":"absoluteReferralRateSf","docs":["Reserve referrer fee absolute rate calculated at each refresh_reserve operation (scaled fraction)"],"type":"u128"},{"name":"tokenProgram","docs":["Token program of the liquidity mint"],"type":"publicKey"},{"name":"padding2","type":{"array":["u64",51]}},{"name":"padding3","type":{"array":["u128",32]}}]}},{"name":"WithdrawalCaps","docs":["Reserve Withdrawal Caps State"],"type":{"kind":"struct","fields":[{"name":"configCapacity","type":"i64"},{"name":"currentTotal","type":"i64"},{"name":"lastIntervalStartTimestamp","type":"u64"},{"name":"configIntervalLengthSeconds","type":"u64"}]}},{"name":"PriceHeuristic","type":{"kind":"struct","fields":[{"name":"lower","docs":["Lower value of acceptable price"],"type":"u64"},{"name":"upper","docs":["Upper value of acceptable price"],"type":"u64"},{"name":"exp","docs":["Number of decimals of the previously defined values"],"type":"u64"}]}},{"name":"PythConfiguration","type":{"kind":"struct","fields":[{"name":"price","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"}]}},{"name":"ScopeConfiguration","type":{"kind":"struct","fields":[{"name":"priceFeed","docs":["Pubkey of the scope price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"priceChain","docs":["This is the scope_id price chain that results in a price for the token"],"type":{"array":["u16",4]}},{"name":"twapChain","docs":["This is the scope_id price chain for the twap"],"type":{"array":["u16",4]}}]}},{"name":"SwitchboardConfiguration","type":{"kind":"struct","fields":[{"name":"priceAggregator","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"twapAggregator","type":"publicKey"}]}},{"name":"TokenInfo","type":{"kind":"struct","fields":[{"name":"name","docs":["UTF-8 encoded name of the token (null-terminated)"],"type":{"array":["u8",32]}},{"name":"heuristic","docs":["Heuristics limits of acceptable price"],"type":{"defined":"PriceHeuristic"}},{"name":"maxTwapDivergenceBps","docs":["Max divergence between twap and price in bps"],"type":"u64"},{"name":"maxAgePriceSeconds","type":"u64"},{"name":"maxAgeTwapSeconds","type":"u64"},{"name":"scopeConfiguration","docs":["Scope price configuration"],"type":{"defined":"ScopeConfiguration"}},{"name":"switchboardConfiguration","docs":["Switchboard configuration"],"type":{"defined":"SwitchboardConfiguration"}},{"name":"pythConfiguration","docs":["Pyth configuration"],"type":{"defined":"PythConfiguration"}},{"name":"blockPriceUsage","type":"u8"},{"name":"reserved","type":{"array":["u8",7]}},{"name":"padding","type":{"array":["u64",19]}}]}},{"name":"BorrowRateCurve","type":{"kind":"struct","fields":[{"name":"points","type":{"array":[{"defined":"CurvePoint"},11]}}]}},{"name":"CurvePoint","type":{"kind":"struct","fields":[{"name":"utilizationRateBps","type":"u32"},{"name":"borrowRateBps","type":"u32"}]}},{"name":"UpdateReserveWhitelistMode","type":{"kind":"enum","variants":[{"name":"Invest","fields":["u8"]},{"name":"AddAllocation","fields":["u8"]}]}},{"name":"VaultConfigField","type":{"kind":"enum","variants":[{"name":"PerformanceFeeBps"},{"name":"ManagementFeeBps"},{"name":"MinDepositAmount"},{"name":"MinWithdrawAmount"},{"name":"MinInvestAmount"},{"name":"MinInvestDelaySlots"},{"name":"CrankFundFeePerReserve"},{"name":"PendingVaultAdmin"},{"name":"Name"},{"name":"LookupTable"},{"name":"Farm"},{"name":"AllocationAdmin"},{"name":"UnallocatedWeight"},{"name":"UnallocatedTokensCap"},{"name":"WithdrawalPenaltyLamports"},{"name":"WithdrawalPenaltyBps"},{"name":"FirstLossCapitalFarm"},{"name":"AllowAllocationsInWhitelistedReservesOnly"},{"name":"AllowInvestInWhitelistedReservesOnly"},{"name":"RewardPerSecond"}]}},{"name":"VaultAllocation","type":{"kind":"struct","fields":[{"name":"reserve","type":"publicKey"},{"name":"ctokenVault","type":"publicKey"},{"name":"targetAllocationWeight","type":"u64"},{"name":"tokenAllocationCap","docs":["Maximum token invested in this reserve"],"type":"u64"},{"name":"ctokenVaultBump","type":"u64"},{"name":"configPadding","type":{"array":["u64",127]}},{"name":"ctokenAllocation","type":"u64"},{"name":"lastInvestSlot","type":"u64"},{"name":"tokenTargetAllocationSf","type":"u128"},{"name":"statePadding","type":{"array":["u64",128]}}]}},{"name":"VaultRewardInfo","type":{"kind":"struct","fields":[{"name":"rewardPerSecond","type":"u64"},{"name":"lastIssuanceTs","type":"u64"},{"name":"rewardsAvailable","docs":["Rewards available to distribute (topped up but not yet moved to vault.token_available)"],"type":"u64"},{"name":"cumulativeRewardsDistributedAnalytics","type":"u64"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"UpdateGlobalConfigMode","type":{"kind":"enum","variants":[{"name":"PendingAdmin","fields":["publicKey"]},{"name":"MinWithdrawalPenaltyLamports","fields":["u64"]},{"name":"MinWithdrawalPenaltyBPS","fields":["u64"]}]}}],"events":[{"name":"DepositResultEvent","fields":[{"name":"sharesToMint","type":"u64","index":false},{"name":"tokenToDeposit","type":"u64","index":false},{"name":"crankFundsToDeposit","type":"u64","index":false}]},{"name":"DepositUserAtaBalanceEvent","fields":[{"name":"userAtaBalance","type":"u64","index":false}]},{"name":"RedeemInKindResultEvent","fields":[{"name":"sharesToBurn","type":"u64","index":false},{"name":"ctokensToSendToUser","type":"u64","index":false}]},{"name":"SharesToWithdrawEvent","fields":[{"name":"sharesAmount","type":"u64","index":false},{"name":"userSharesBefore","type":"u64","index":false}]},{"name":"WithdrawResultEvent","fields":[{"name":"sharesToBurn","type":"u64","index":false},{"name":"availableToSendToUser","type":"u64","index":false},{"name":"investedToDisinvestCtokens","type":"u64","index":false},{"name":"investedLiquidityToSendToUser","type":"u64","index":false}]}],"errors":[{"code":7000,"name":"DepositAmountsZero","msg":"Cannot deposit zero tokens"},{"code":7001,"name":"SharesIssuedAmountDoesNotMatch","msg":"Post check failed on share issued"},{"code":7002,"name":"MathOverflow","msg":"Math operation overflowed"},{"code":7003,"name":"IntegerOverflow","msg":"Integer conversion overflowed"},{"code":7004,"name":"WithdrawAmountBelowMinimum","msg":"Withdrawn amount is below minimum"},{"code":7005,"name":"TooMuchLiquidityToWithdraw","msg":"TooMuchLiquidityToWithdraw"},{"code":7006,"name":"ReserveAlreadyExists","msg":"ReserveAlreadyExists"},{"code":7007,"name":"ReserveNotPartOfAllocations","msg":"ReserveNotPartOfAllocations"},{"code":7008,"name":"CouldNotDeserializeAccountAsReserve","msg":"CouldNotDeserializeAccountAsReserve"},{"code":7009,"name":"ReserveNotProvidedInTheAccounts","msg":"ReserveNotProvidedInTheAccounts"},{"code":7010,"name":"ReserveAccountAndKeyMismatch","msg":"ReserveAccountAndKeyMismatch"},{"code":7011,"name":"OutOfRangeOfReserveIndex","msg":"OutOfRangeOfReserveIndex"},{"code":7012,"name":"CannotFindReserveInAllocations","msg":"OutOfRangeOfReserveIndex"},{"code":7013,"name":"InvestAmountBelowMinimum","msg":"Invested amount is below minimum"},{"code":7014,"name":"AdminAuthorityIncorrect","msg":"AdminAuthorityIncorrect"},{"code":7015,"name":"BaseVaultAuthorityIncorrect","msg":"BaseVaultAuthorityIncorrect"},{"code":7016,"name":"BaseVaultAuthorityBumpIncorrect","msg":"BaseVaultAuthorityBumpIncorrect"},{"code":7017,"name":"TokenMintIncorrect","msg":"TokenMintIncorrect"},{"code":7018,"name":"TokenMintDecimalsIncorrect","msg":"TokenMintDecimalsIncorrect"},{"code":7019,"name":"TokenVaultIncorrect","msg":"TokenVaultIncorrect"},{"code":7020,"name":"SharesMintDecimalsIncorrect","msg":"SharesMintDecimalsIncorrect"},{"code":7021,"name":"SharesMintIncorrect","msg":"SharesMintIncorrect"},{"code":7022,"name":"InitialAccountingIncorrect","msg":"InitialAccountingIncorrect"},{"code":7023,"name":"ReserveIsStale","msg":"Reserve is stale and must be refreshed before any operation"},{"code":7024,"name":"NotEnoughLiquidityDisinvestedToSendToUser","msg":"Not enough liquidity disinvested to send to user"},{"code":7025,"name":"BPSValueTooBig","msg":"BPS value is greater than 10000"},{"code":7026,"name":"DepositAmountBelowMinimum","msg":"Deposited amount is below minimum"},{"code":7027,"name":"ReserveSpaceExhausted","msg":"Vault have no space for new reserves"},{"code":7028,"name":"CannotWithdrawFromEmptyVault","msg":"Cannot withdraw from empty vault"},{"code":7029,"name":"TokensDepositedAmountDoesNotMatch","msg":"TokensDepositedAmountDoesNotMatch"},{"code":7030,"name":"AmountToWithdrawDoesNotMatch","msg":"Amount to withdraw does not match"},{"code":7031,"name":"LiquidityToWithdrawDoesNotMatch","msg":"Liquidity to withdraw does not match"},{"code":7032,"name":"UserReceivedAmountDoesNotMatch","msg":"User received amount does not match"},{"code":7033,"name":"SharesBurnedAmountDoesNotMatch","msg":"Shares burned amount does not match"},{"code":7034,"name":"DisinvestedLiquidityAmountDoesNotMatch","msg":"Disinvested liquidity amount does not match"},{"code":7035,"name":"SharesMintedAmountDoesNotMatch","msg":"SharesMintedAmountDoesNotMatch"},{"code":7036,"name":"AUMDecreasedAfterInvest","msg":"AUM decreased after invest"},{"code":7037,"name":"AUMBelowPendingFees","msg":"AUM is below pending fees"},{"code":7038,"name":"DepositAmountsZeroShares","msg":"Deposit amount results in 0 shares"},{"code":7039,"name":"WithdrawResultsInZeroShares","msg":"Withdraw amount results in 0 shares"},{"code":7040,"name":"CannotWithdrawZeroShares","msg":"Cannot withdraw zero shares"},{"code":7041,"name":"ManagementFeeGreaterThanMaxAllowed","msg":"Management fee is greater than maximum allowed"},{"code":7042,"name":"VaultAUMZero","msg":"Vault assets under management are empty"},{"code":7043,"name":"MissingReserveForBatchRefresh","msg":"Missing reserve for batch refresh"},{"code":7044,"name":"MinWithdrawAmountTooBig","msg":"Min withdraw amount is too big"},{"code":7045,"name":"InvestTooSoon","msg":"Invest is called too soon after last invest"},{"code":7046,"name":"WrongAdminOrAllocationAdmin","msg":"Wrong admin or allocation admin"},{"code":7047,"name":"ReserveHasNonZeroAllocationOrCTokens","msg":"Reserve has non-zero allocation or ctokens so cannot be removed"},{"code":7048,"name":"DepositAmountGreaterThanRequestedAmount","msg":"Deposit amount is greater than requested amount"},{"code":7049,"name":"WithdrawAmountLessThanWithdrawalPenalty","msg":"Withdraw amount is less than withdrawal penalty"},{"code":7050,"name":"CannotWithdrawZeroLamports","msg":"Cannot withdraw 0 lamports"},{"code":7051,"name":"NoUpgradeAuthority","msg":"Cannot initialize global config because there is no upgrade authority to the program"},{"code":7052,"name":"WithdrawalFeeBPSGreaterThanMaxAllowed","msg":"Withdrawal fee BPS is greater than maximum allowed"},{"code":7053,"name":"WithdrawalFeeLamportsGreaterThanMaxAllowed","msg":"Withdrawal fee lamports is greater than maximum allowed"},{"code":7054,"name":"ReserveNotWhitelisted","msg":"Reserve is not whitelisted"},{"code":7055,"name":"InvalidBoolLikeValue","msg":"Invalid bool-like value passed in (should be 0 or 1)"},{"code":7056,"name":"AUMDecreasedMoreThanExpected","msg":"AUM decreased more than expected during redeem in kind"},{"code":7057,"name":"RewardTopupAmountZero","msg":"Reward topup amount is zero"},{"code":7058,"name":"RewardTopupAmountNotExpected","msg":"Reward topup is not as expected after transfer"},{"code":7059,"name":"RewardWithdrawAmountZero","msg":"Reward withdraw amount is zero"},{"code":7060,"name":"RewardWithdrawAmountNotExpected","msg":"Reward withdraw is not as expected after transfer"},{"code":7061,"name":"RewardsStaleForFeeUpdate","msg":"Rewards are stale - must be refreshed before updating fees"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/layerzero_endpoint.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.json b/olddocs/archivekbot2/idls/layerzero_endpoint.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.json new file mode 100644 index 0000000..acbb23a --- /dev/null +++ b/olddocs/archivekbot2/idls/layerzero_endpoint.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"endpoint","instructions":[{"name":"initEndpoint","docs":["--------------------------- Admin Instructions ---------------------------"],"accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitEndpointParams"}}]},{"name":"transferAdmin","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"TransferAdminParams"}}]},{"name":"setLzToken","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetLzTokenParams"}}]},{"name":"registerLibrary","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"messageLibInfo","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RegisterLibraryParams"}}]},{"name":"initDefaultSendLibrary","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"defaultSendLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitDefaultSendLibraryParams"}}]},{"name":"setDefaultSendLibrary","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"defaultSendLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetDefaultSendLibraryParams"}}]},{"name":"initDefaultReceiveLibrary","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"defaultReceiveLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitDefaultReceiveLibraryParams"}}]},{"name":"setDefaultReceiveLibrary","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"defaultReceiveLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetDefaultReceiveLibraryParams"}}]},{"name":"setDefaultReceiveLibraryTimeout","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"defaultReceiveLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetDefaultReceiveLibraryTimeoutParams"}}]},{"name":"withdrawRent","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"receiver","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"WithdrawRentParams"}}]},{"name":"registerOapp","docs":["--------------------------- OApp Instructions ---------------------------"],"accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"oapp","isMut":false,"isSigner":true,"docs":["The PDA of the OApp"]},{"name":"oappRegistry","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RegisterOAppParams"}}]},{"name":"initNonce","accounts":[{"name":"delegate","isMut":true,"isSigner":true,"docs":["only the delegate can initialize the nonce accounts"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"nonce","isMut":true,"isSigner":false},{"name":"pendingInboundNonce","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitNonceParams"}}]},{"name":"initSendLibrary","accounts":[{"name":"delegate","isMut":true,"isSigner":true,"docs":["only the delegate can initialize the send_library_config"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"sendLibraryConfig","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitSendLibraryParams"}}]},{"name":"setSendLibrary","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"sendLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false,"isOptional":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetSendLibraryParams"}}]},{"name":"initReceiveLibrary","accounts":[{"name":"delegate","isMut":true,"isSigner":true,"docs":["only the delegate can initialize the send_library_config"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"receiveLibraryConfig","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitReceiveLibraryParams"}}]},{"name":"setReceiveLibrary","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"receiveLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false,"isOptional":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetReceiveLibraryParams"}}]},{"name":"setReceiveLibraryTimeout","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"receiveLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetReceiveLibraryTimeoutParams"}}]},{"name":"initConfig","accounts":[{"name":"delegate","isMut":false,"isSigner":true,"docs":["only the delegate can initialize the config accounts"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false,"docs":["The PDA signer to the message lib when the endpoint calls the message lib program."]},{"name":"messageLib","isMut":false,"isSigner":false,"docs":["the pda of the message_lib_program"]},{"name":"messageLibProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitConfigParams"}}]},{"name":"setConfig","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false,"docs":["The PDA signer to the message lib when the endpoint calls the message lib program"]},{"name":"messageLib","isMut":false,"isSigner":false,"docs":["the pda of the message_lib_program"]},{"name":"messageLibProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetConfigParams"}}]},{"name":"quote","accounts":[{"name":"sendLibraryProgram","isMut":false,"isSigner":false},{"name":"sendLibraryConfig","isMut":false,"isSigner":false},{"name":"defaultSendLibraryConfig","isMut":false,"isSigner":false},{"name":"sendLibraryInfo","isMut":false,"isSigner":false,"docs":["The PDA signer to the send library when the endpoint calls the send library."]},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"nonce","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"QuoteParams"}}],"returns":{"defined":"MessagingFee"}},{"name":"send","accounts":[{"name":"sender","isMut":false,"isSigner":true},{"name":"sendLibraryProgram","isMut":false,"isSigner":false},{"name":"sendLibraryConfig","isMut":false,"isSigner":false},{"name":"defaultSendLibraryConfig","isMut":false,"isSigner":false},{"name":"sendLibraryInfo","isMut":false,"isSigner":false,"docs":["The PDA signer to the send library when the endpoint calls the send library."]},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"nonce","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SendParams"}}],"returns":{"defined":"MessagingReceipt"}},{"name":"initVerify","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"nonce","isMut":false,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitVerifyParams"}}]},{"name":"verify","accounts":[{"name":"receiveLibrary","isMut":false,"isSigner":true,"docs":["The PDA of the receive library."]},{"name":"receiveLibraryConfig","isMut":false,"isSigner":false},{"name":"defaultReceiveLibraryConfig","isMut":false,"isSigner":false},{"name":"nonce","isMut":true,"isSigner":false},{"name":"pendingInboundNonce","isMut":true,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"VerifyParams"}}]},{"name":"skip","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"nonce","isMut":true,"isSigner":false},{"name":"pendingInboundNonce","isMut":true,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false,"docs":["the payload hash needs to be initialized before it can be skipped and closed, in order to prevent someone","from skipping a payload hash that has been initialized and can be re-verified and executed after skipping"]},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SkipParams"}}]},{"name":"burn","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"nonce","isMut":false,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false,"docs":["close the account and return the lamports to endpoint settings account"]},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"BurnParams"}}]},{"name":"nilify","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"nonce","isMut":true,"isSigner":false},{"name":"pendingInboundNonce","isMut":true,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"NilifyParams"}}]},{"name":"clear","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"nonce","isMut":false,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false,"docs":["close the account and return the lamports to endpoint settings account"]},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ClearParams"}}],"returns":{"array":["u8",32]}},{"name":"sendCompose","accounts":[{"name":"from","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"composeMessage","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SendComposeParams"}}]},{"name":"clearCompose","accounts":[{"name":"to","isMut":false,"isSigner":true},{"name":"composeMessage","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ClearComposeParams"}}]},{"name":"setDelegate","accounts":[{"name":"oapp","isMut":false,"isSigner":true,"docs":["The PDA of the OApp"]},{"name":"oappRegistry","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetDelegateParams"}}]},{"name":"lzReceiveAlert","accounts":[{"name":"executor","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"LzReceiveAlertParams"}}]},{"name":"lzComposeAlert","accounts":[{"name":"executor","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"LzComposeAlertParams"}}]}],"accounts":[{"name":"ComposeMessageState","type":{"kind":"struct","fields":[{"name":"received","type":"bool"},{"name":"bump","type":"u8"}]}},{"name":"EndpointSettings","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"bump","type":"u8"},{"name":"admin","type":"publicKey"},{"name":"lzTokenMint","type":{"option":"publicKey"}}]}},{"name":"OAppRegistry","type":{"kind":"struct","fields":[{"name":"delegate","type":"publicKey"},{"name":"bump","type":"u8"}]}},{"name":"MessageLibInfo","type":{"kind":"struct","fields":[{"name":"messageLibType","type":{"defined":"MessageLibType"}},{"name":"bump","type":"u8"},{"name":"messageLibBump","type":"u8"}]}},{"name":"ReceiveLibraryConfig","type":{"kind":"struct","fields":[{"name":"messageLib","type":"publicKey"},{"name":"timeout","type":{"option":{"defined":"ReceiveLibraryTimeout"}}},{"name":"bump","type":"u8"}]}},{"name":"SendLibraryConfig","docs":["the reason for not using Option::None to indicate default is to respect the spec on evm"],"type":{"kind":"struct","fields":[{"name":"messageLib","type":"publicKey"},{"name":"bump","type":"u8"}]}},{"name":"Nonce","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"outboundNonce","type":"u64"},{"name":"inboundNonce","type":"u64"}]}},{"name":"PayloadHash","type":{"kind":"struct","fields":[{"name":"hash","type":{"array":["u8",32]}},{"name":"bump","type":"u8"}]}},{"name":"PendingInboundNonce","type":{"kind":"struct","fields":[{"name":"nonces","type":{"vec":"u64"}},{"name":"bump","type":"u8"}]}}],"types":[{"name":"InitDefaultReceiveLibraryParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"InitDefaultSendLibraryParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"InitEndpointParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"admin","type":"publicKey"}]}},{"name":"RegisterLibraryParams","type":{"kind":"struct","fields":[{"name":"libProgram","type":"publicKey"},{"name":"libType","type":{"defined":"MessageLibType"}}]}},{"name":"SetDefaultReceiveLibraryParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"},{"name":"gracePeriod","type":"u64"}]}},{"name":"SetDefaultReceiveLibraryTimeoutParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"lib","type":"publicKey"},{"name":"expiry","type":"u64"}]}},{"name":"SetDefaultSendLibraryParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"SetLzTokenParams","type":{"kind":"struct","fields":[{"name":"lzToken","type":{"option":"publicKey"}}]}},{"name":"TransferAdminParams","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"}]}},{"name":"WithdrawRentParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"InitVerifyParams","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"}]}},{"name":"LzComposeAlertParams","type":{"kind":"struct","fields":[{"name":"from","type":"publicKey"},{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"computeUnits","type":"u64"},{"name":"value","type":"u64"},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"},{"name":"reason","type":"bytes"}]}},{"name":"LzReceiveAlertParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"guid","type":{"array":["u8",32]}},{"name":"computeUnits","type":"u64"},{"name":"value","type":"u64"},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"},{"name":"reason","type":"bytes"}]}},{"name":"BurnParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"ClearParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"guid","type":{"array":["u8",32]}},{"name":"message","type":"bytes"}]}},{"name":"ClearComposeParams","type":{"kind":"struct","fields":[{"name":"from","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"message","type":"bytes"}]}},{"name":"InitNonceParams","type":{"kind":"struct","fields":[{"name":"localOapp","type":"publicKey"},{"name":"remoteEid","type":"u32"},{"name":"remoteOapp","type":{"array":["u8",32]}}]}},{"name":"InitReceiveLibraryParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"eid","type":"u32"}]}},{"name":"InitSendLibraryParams","type":{"kind":"struct","fields":[{"name":"sender","type":"publicKey"},{"name":"eid","type":"u32"}]}},{"name":"NilifyParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"QuoteParams","type":{"kind":"struct","fields":[{"name":"sender","type":"publicKey"},{"name":"dstEid","type":"u32"},{"name":"receiver","type":{"array":["u8",32]}},{"name":"message","type":"bytes"},{"name":"options","type":"bytes"},{"name":"payInLzToken","type":"bool"}]}},{"name":"RegisterOAppParams","type":{"kind":"struct","fields":[{"name":"delegate","type":"publicKey"}]}},{"name":"SendParams","type":{"kind":"struct","fields":[{"name":"dstEid","type":"u32"},{"name":"receiver","type":{"array":["u8",32]}},{"name":"message","type":"bytes"},{"name":"options","type":"bytes"},{"name":"nativeFee","type":"u64"},{"name":"lzTokenFee","type":"u64"}]}},{"name":"SendComposeParams","type":{"kind":"struct","fields":[{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"message","type":"bytes"}]}},{"name":"SetDelegateParams","type":{"kind":"struct","fields":[{"name":"delegate","type":"publicKey"}]}},{"name":"SetReceiveLibraryParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"},{"name":"gracePeriod","type":"u64"}]}},{"name":"SetReceiveLibraryTimeoutParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"lib","type":"publicKey"},{"name":"expiry","type":"u64"}]}},{"name":"SetSendLibraryParams","type":{"kind":"struct","fields":[{"name":"sender","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"SkipParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"}]}},{"name":"VerifyParams","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"ReceiveLibraryTimeout","type":{"kind":"struct","fields":[{"name":"messageLib","type":"publicKey"},{"name":"expiry","type":"u64"}]}},{"name":"InitConfigParams","type":{"kind":"struct","fields":[{"name":"oapp","type":"publicKey"},{"name":"eid","type":"u32"}]}},{"name":"MessageLibType","type":{"kind":"enum","variants":[{"name":"Send"},{"name":"Receive"},{"name":"SendAndReceive"}]}},{"name":"MessagingFee","type":{"kind":"struct","fields":[{"name":"nativeFee","type":"u64"},{"name":"lzTokenFee","type":"u64"}]}},{"name":"MessagingReceipt","type":{"kind":"struct","fields":[{"name":"guid","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"fee","type":{"defined":"MessagingFee"}}]}},{"name":"SetConfigParams","type":{"kind":"struct","fields":[{"name":"oapp","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"configType","type":"u32"},{"name":"config","type":"bytes"}]}},{"name":"AdminTransferredEvent","type":{"kind":"struct","fields":[{"name":"newAdmin","type":"publicKey"}]}},{"name":"ComposeDeliveredEvent","type":{"kind":"struct","fields":[{"name":"from","type":"publicKey"},{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"}]}},{"name":"ComposeSentEvent","type":{"kind":"struct","fields":[{"name":"from","type":"publicKey"},{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"message","type":"bytes"}]}},{"name":"DefaultReceiveLibrarySetEvent","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"DefaultReceiveLibraryTimeoutSetEvent","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"timeout","type":{"option":{"defined":"ReceiveLibraryTimeout"}}}]}},{"name":"DefaultSendLibrarySetEvent","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"DelegateSetEvent","type":{"kind":"struct","fields":[{"name":"newDelegate","type":"publicKey"}]}},{"name":"InboundNonceSkippedEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"}]}},{"name":"LibraryRegisteredEvent","type":{"kind":"struct","fields":[{"name":"newLib","type":"publicKey"},{"name":"newLibProgram","type":"publicKey"}]}},{"name":"LzComposeAlertEvent","type":{"kind":"struct","fields":[{"name":"executor","type":"publicKey"},{"name":"from","type":"publicKey"},{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"computeUnits","type":"u64"},{"name":"value","type":"u64"},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"},{"name":"reason","type":"bytes"}]}},{"name":"LzReceiveAlertEvent","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"executor","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"guid","type":{"array":["u8",32]}},{"name":"computeUnits","type":"u64"},{"name":"value","type":"u64"},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"},{"name":"reason","type":"bytes"}]}},{"name":"LzTokenSetEvent","type":{"kind":"struct","fields":[{"name":"token","type":{"option":"publicKey"}}]}},{"name":"OAppRegisteredEvent","type":{"kind":"struct","fields":[{"name":"oapp","type":"publicKey"},{"name":"delegate","type":"publicKey"}]}},{"name":"PacketBurntEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"PacketDeliveredEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"}]}},{"name":"PacketNilifiedEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"PacketSentEvent","type":{"kind":"struct","fields":[{"name":"encodedPacket","type":"bytes"},{"name":"options","type":"bytes"},{"name":"sendLibrary","type":"publicKey"}]}},{"name":"PacketVerifiedEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"ReceiveLibrarySetEvent","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"ReceiveLibraryTimeoutSetEvent","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"timeout","type":{"option":{"defined":"ReceiveLibraryTimeout"}}}]}},{"name":"RentWithdrawnEvent","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"amount","type":"u64"}]}},{"name":"SendLibrarySetEvent","type":{"kind":"struct","fields":[{"name":"sender","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}}],"events":[{"name":"AdminTransferredEvent","fields":[{"name":"newAdmin","type":"publicKey","index":false}]},{"name":"ComposeDeliveredEvent","fields":[{"name":"from","type":"publicKey","index":false},{"name":"to","type":"publicKey","index":false},{"name":"guid","type":{"array":["u8",32]},"index":false},{"name":"index","type":"u16","index":false}]},{"name":"ComposeSentEvent","fields":[{"name":"from","type":"publicKey","index":false},{"name":"to","type":"publicKey","index":false},{"name":"guid","type":{"array":["u8",32]},"index":false},{"name":"index","type":"u16","index":false},{"name":"message","type":"bytes","index":false}]},{"name":"DefaultReceiveLibrarySetEvent","fields":[{"name":"eid","type":"u32","index":false},{"name":"newLib","type":"publicKey","index":false}]},{"name":"DefaultReceiveLibraryTimeoutSetEvent","fields":[{"name":"eid","type":"u32","index":false},{"name":"timeout","type":{"option":{"defined":"ReceiveLibraryTimeout"}},"index":false}]},{"name":"DefaultSendLibrarySetEvent","fields":[{"name":"eid","type":"u32","index":false},{"name":"newLib","type":"publicKey","index":false}]},{"name":"DelegateSetEvent","fields":[{"name":"newDelegate","type":"publicKey","index":false}]},{"name":"InboundNonceSkippedEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"receiver","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false}]},{"name":"LibraryRegisteredEvent","fields":[{"name":"newLib","type":"publicKey","index":false},{"name":"newLibProgram","type":"publicKey","index":false}]},{"name":"LzComposeAlertEvent","fields":[{"name":"executor","type":"publicKey","index":false},{"name":"from","type":"publicKey","index":false},{"name":"to","type":"publicKey","index":false},{"name":"guid","type":{"array":["u8",32]},"index":false},{"name":"index","type":"u16","index":false},{"name":"computeUnits","type":"u64","index":false},{"name":"value","type":"u64","index":false},{"name":"message","type":"bytes","index":false},{"name":"extraData","type":"bytes","index":false},{"name":"reason","type":"bytes","index":false}]},{"name":"LzReceiveAlertEvent","fields":[{"name":"receiver","type":"publicKey","index":false},{"name":"executor","type":"publicKey","index":false},{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"nonce","type":"u64","index":false},{"name":"guid","type":{"array":["u8",32]},"index":false},{"name":"computeUnits","type":"u64","index":false},{"name":"value","type":"u64","index":false},{"name":"message","type":"bytes","index":false},{"name":"extraData","type":"bytes","index":false},{"name":"reason","type":"bytes","index":false}]},{"name":"LzTokenSetEvent","fields":[{"name":"token","type":{"option":"publicKey"},"index":false}]},{"name":"OAppRegisteredEvent","fields":[{"name":"oapp","type":"publicKey","index":false},{"name":"delegate","type":"publicKey","index":false}]},{"name":"PacketBurntEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"receiver","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false},{"name":"payloadHash","type":{"array":["u8",32]},"index":false}]},{"name":"PacketDeliveredEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"receiver","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false}]},{"name":"PacketNilifiedEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"receiver","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false},{"name":"payloadHash","type":{"array":["u8",32]},"index":false}]},{"name":"PacketSentEvent","fields":[{"name":"encodedPacket","type":"bytes","index":false},{"name":"options","type":"bytes","index":false},{"name":"sendLibrary","type":"publicKey","index":false}]},{"name":"PacketVerifiedEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"receiver","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false},{"name":"payloadHash","type":{"array":["u8",32]},"index":false}]},{"name":"ReceiveLibrarySetEvent","fields":[{"name":"receiver","type":"publicKey","index":false},{"name":"eid","type":"u32","index":false},{"name":"newLib","type":"publicKey","index":false}]},{"name":"ReceiveLibraryTimeoutSetEvent","fields":[{"name":"receiver","type":"publicKey","index":false},{"name":"eid","type":"u32","index":false},{"name":"timeout","type":{"option":{"defined":"ReceiveLibraryTimeout"}},"index":false}]},{"name":"RentWithdrawnEvent","fields":[{"name":"receiver","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"SendLibrarySetEvent","fields":[{"name":"sender","type":"publicKey","index":false},{"name":"eid","type":"u32","index":false},{"name":"newLib","type":"publicKey","index":false}]}],"errors":[{"code":6000,"name":"InvalidSendLibrary"},{"code":6001,"name":"InvalidReceiveLibrary"},{"code":6002,"name":"SameValue"},{"code":6003,"name":"AccountNotFound"},{"code":6004,"name":"OnlySendLib"},{"code":6005,"name":"OnlyReceiveLib"},{"code":6006,"name":"InvalidExpiry"},{"code":6007,"name":"OnlyNonDefaultLib"},{"code":6008,"name":"InvalidAmount"},{"code":6009,"name":"InvalidNonce"},{"code":6010,"name":"Unauthorized"},{"code":6011,"name":"PayloadHashNotFound"},{"code":6012,"name":"ComposeNotFound"},{"code":6013,"name":"InvalidPayloadHash"},{"code":6014,"name":"LzTokenUnavailable"},{"code":6015,"name":"ReadOnlyAccount"},{"code":6016,"name":"InvalidMessageLib"},{"code":6017,"name":"WritableAccountNotAllowed"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/layerzero_executor.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.json b/olddocs/archivekbot2/idls/layerzero_executor.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.json new file mode 100644 index 0000000..02f889a --- /dev/null +++ b/olddocs/archivekbot2/idls/layerzero_executor.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"executor","instructions":[{"name":"initExecutor","docs":["--------------------------- Owner Instructions ---------------------------"],"accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitExecutorParams"}}]},{"name":"ownerSetConfig","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"config","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"OwnerSetConfigParams"}}]},{"name":"adminSetConfig","docs":["--------------------------- Admin Instructions ---------------------------"],"accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"config","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AdminSetConfigParams"}}]},{"name":"nativeDrop","accounts":[{"name":"executor","isMut":true,"isSigner":true},{"name":"config","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["For native drop transfer"]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"NativeDropParams"}}]},{"name":"execute","accounts":[{"name":"executor","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"endpointProgram","isMut":false,"isSigner":false},{"name":"endpointEventAuthority","isMut":false,"isSigner":false,"docs":["The authority for the endpoint program to emit events"]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ExecuteParams"}}]},{"name":"compose","accounts":[{"name":"executor","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"endpointProgram","isMut":false,"isSigner":false},{"name":"endpointEventAuthority","isMut":false,"isSigner":false,"docs":["The authority for the endpoint program to emit events"]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ComposeParams"}}]},{"name":"quoteExecutor","docs":["--------------------------- MsgLib Instructions ---------------------------"],"accounts":[{"name":"executorConfig","isMut":false,"isSigner":false},{"name":"priceFeedProgram","isMut":false,"isSigner":false},{"name":"priceFeedConfig","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"QuoteExecutorParams"}}],"returns":"u64"},{"name":"executable","accounts":[{"name":"nonce","isMut":false,"isSigner":false},{"name":"payloadHash","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ExecutableParams"}}],"returns":{"defined":"ExecutionState"}}],"accounts":[{"name":"Nonce","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"outboundNonce","type":"u64"},{"name":"inboundNonce","type":"u64"}]}},{"name":"ExecutorConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"owner","type":"publicKey"},{"name":"acl","type":{"defined":"Acl"}},{"name":"admins","type":{"vec":"publicKey"}},{"name":"executors","type":{"vec":"publicKey"}},{"name":"msglibs","type":{"vec":"publicKey"}},{"name":"paused","type":"bool"},{"name":"defaultMultiplierBps","type":"u16"},{"name":"priceFeed","type":"publicKey"},{"name":"dstConfigs","type":{"vec":{"defined":"DstConfig"}}}]}}],"types":[{"name":"AdminSetConfigParams","type":{"kind":"enum","variants":[{"name":"PriceFeed","fields":["publicKey"]},{"name":"DefaultMultiplierBps","fields":["u16"]},{"name":"DstConfigs","fields":[{"vec":{"defined":"DstConfig"}}]}]}},{"name":"ComposeParams","type":{"kind":"struct","fields":[{"name":"lzCompose","type":{"defined":"LzComposeParams"}},{"name":"computeUnits","type":"u64"},{"name":"value","type":"u64"}]}},{"name":"ExecutableParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"}]}},{"name":"ExecutionState","type":{"kind":"enum","variants":[{"name":"NotExecutable"},{"name":"VerifiedButNotExecutable"},{"name":"Executable"},{"name":"Executed"}]}},{"name":"ExecuteParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"lzReceive","type":{"defined":"LzReceiveParams"}},{"name":"value","type":"u64"},{"name":"computeUnits","type":"u64"}]}},{"name":"InitExecutorParams","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"admins","type":{"vec":"publicKey"}},{"name":"executors","type":{"vec":"publicKey"}},{"name":"msglibs","type":{"vec":"publicKey"}},{"name":"priceFeed","type":"publicKey"}]}},{"name":"NativeDropParams","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"dstEid","type":"u32"},{"name":"oapp","type":"publicKey"},{"name":"nativeDropRequests","type":{"vec":{"defined":"NativeDropRequest"}}}]}},{"name":"NativeDropRequest","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"amount","type":"u64"}]}},{"name":"OwnerSetConfigParams","type":{"kind":"enum","variants":[{"name":"Admins","fields":[{"vec":"publicKey"}]},{"name":"Executors","fields":[{"vec":"publicKey"}]},{"name":"Msglibs","fields":[{"vec":"publicKey"}]},{"name":"Owner","fields":["publicKey"]},{"name":"Paused","fields":["bool"]},{"name":"Allowlist","fields":[{"vec":"publicKey"}]},{"name":"Denylist","fields":[{"vec":"publicKey"}]}]}},{"name":"DstConfig","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"lzReceiveBaseGas","type":"u32"},{"name":"lzComposeBaseGas","type":"u32"},{"name":"multiplierBps","type":{"option":"u16"}},{"name":"floorMarginUsd","type":{"option":"u128"}},{"name":"nativeDropCap","type":"u128"}]}},{"name":"LzComposeParams","type":{"kind":"struct","fields":[{"name":"from","type":"publicKey"},{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"}]}},{"name":"LzReceiveParams","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"guid","type":{"array":["u8",32]}},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"}]}},{"name":"LzOption","type":{"kind":"struct","fields":[{"name":"optionType","type":"u8"},{"name":"params","type":"bytes"}]}},{"name":"QuoteExecutorParams","type":{"kind":"struct","fields":[{"name":"msglib","type":"publicKey"},{"name":"dstEid","type":"u32"},{"name":"sender","type":"publicKey"},{"name":"calldataSize","type":"u64"},{"name":"options","type":{"vec":{"defined":"LzOption"}}}]}},{"name":"Acl","type":{"kind":"struct","fields":[{"name":"allowList","type":{"vec":"publicKey"}},{"name":"denyList","type":{"vec":"publicKey"}}]}},{"name":"NativeDropAppliedEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"dstEid","type":"u32"},{"name":"oapp","type":"publicKey"},{"name":"nativeDropRequests","type":{"vec":{"defined":"NativeDropRequest"}}},{"name":"successes","type":{"vec":"bool"}}]}}],"events":[{"name":"NativeDropAppliedEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"nonce","type":"u64","index":false},{"name":"dstEid","type":"u32","index":false},{"name":"oapp","type":"publicKey","index":false},{"name":"nativeDropRequests","type":{"vec":{"defined":"NativeDropRequest"}},"index":false},{"name":"successes","type":{"vec":"bool"},"index":false}]}],"errors":[{"code":6000,"name":"InvalidSize"},{"code":6001,"name":"Paused"},{"code":6002,"name":"UnsupportedOptionType"},{"code":6003,"name":"ZeroLzComposeGasProvided"},{"code":6004,"name":"ZeroLzReceiveGasProvided"},{"code":6005,"name":"NativeAmountExceedsCap"},{"code":6006,"name":"NotAdmin"},{"code":6007,"name":"NotExecutor"},{"code":6008,"name":"MsgLibNotAllowed"},{"code":6009,"name":"TooManyAdmins"},{"code":6010,"name":"TooManyExecutors"},{"code":6011,"name":"TooManyOptionTypes"},{"code":6012,"name":"InvalidNativeDropRequestsLength"},{"code":6013,"name":"InvalidNativeDropReceiver"},{"code":6014,"name":"InsufficientBalance"},{"code":6015,"name":"EidNotSupported"},{"code":6016,"name":"ExecutorIsAdmin"},{"code":6017,"name":"InvalidOwner"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/lifinity_amm_v2.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.json b/olddocs/archivekbot2/idls/lifinity_amm_v2.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.json new file mode 100644 index 0000000..9d181e7 --- /dev/null +++ b/olddocs/archivekbot2/idls/lifinity_amm_v2.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.json @@ -0,0 +1 @@ +{"version":"0.1.1","name":"lifinity_amm_v2","instructions":[{"name":"swap","accounts":[{"name":"authority","isMut":false,"isSigner":false},{"name":"amm","isMut":true,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"sourceInfo","isMut":true,"isSigner":false},{"name":"destinationInfo","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"feeAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"oracleMainAccount","isMut":false,"isSigner":false},{"name":"oracleSubAccount","isMut":false,"isSigner":false},{"name":"oraclePcAccount","isMut":false,"isSigner":false}],"args":[{"name":"amountIn","type":"u64"},{"name":"minimumAmountOut","type":"u64"}]},{"name":"depositAllTokenTypes","accounts":[{"name":"amm","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userTransferAuthorityInfo","isMut":false,"isSigner":true},{"name":"sourceAInfo","isMut":true,"isSigner":false},{"name":"sourceBInfo","isMut":true,"isSigner":false},{"name":"tokenA","isMut":true,"isSigner":false},{"name":"tokenB","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"destination","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"poolTokenAmount","type":"u64"},{"name":"maximumTokenAAmount","type":"u64"},{"name":"maximumTokenBAmount","type":"u64"}]},{"name":"withdrawAllTokenTypes","accounts":[{"name":"amm","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userTransferAuthorityInfo","isMut":false,"isSigner":true},{"name":"sourceInfo","isMut":true,"isSigner":false},{"name":"tokenA","isMut":true,"isSigner":false},{"name":"tokenB","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"destTokenAInfo","isMut":true,"isSigner":false},{"name":"destTokenBInfo","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"poolTokenAmount","type":"u64"},{"name":"minimumTokenAAmount","type":"u64"},{"name":"minimumTokenBAmount","type":"u64"}]}],"accounts":[{"name":"Amm","type":{"kind":"struct","fields":[{"name":"initializerKey","type":"publicKey"},{"name":"initializerDepositTokenAccount","type":"publicKey"},{"name":"initializerReceiveTokenAccount","type":"publicKey"},{"name":"initializerAmount","type":"u64"},{"name":"takerAmount","type":"u64"},{"name":"isInitialized","docs":["Is the swap initialized, with data written to it"],"type":"bool"},{"name":"bumpSeed","docs":["Bump seed used to generate the program address / authority"],"type":"u8"},{"name":"freezeTrade","docs":["Freeze swap"],"type":"u8"},{"name":"freezeDeposit","docs":["Freeze deposit"],"type":"u8"},{"name":"freezeWithdraw","docs":["Freeze withdraw"],"type":"u8"},{"name":"baseDecimals","docs":["Base decimals account"],"type":"u8"},{"name":"tokenProgramId","docs":["Token program ID associated with the swap"],"type":"publicKey"},{"name":"tokenAAccount","docs":["Address of token A liquidity account"],"type":"publicKey"},{"name":"tokenBAccount","docs":["Address of token B liquidity account"],"type":"publicKey"},{"name":"poolMint","docs":["Address of pool token mint"],"type":"publicKey"},{"name":"tokenAMint","docs":["Address of token A mint"],"type":"publicKey"},{"name":"tokenBMint","docs":["Address of token B mint"],"type":"publicKey"},{"name":"feeAccount","docs":["Address of pool fee account"],"type":"publicKey"},{"name":"oracleMainAccount","docs":["Oracle Main account"],"type":"publicKey"},{"name":"oracleSubAccount","docs":["Oracle Sub account"],"type":"publicKey"},{"name":"oraclePcAccount","docs":["oracle Pc account"],"type":"publicKey"},{"name":"fees","docs":["Fees associated with swap"],"type":{"defined":"AmmFees"}},{"name":"curve","docs":["Curve associated with swap"],"type":{"defined":"AmmCurve"}},{"name":"config","docs":["Curve associated with swap"],"type":{"defined":"AmmConfig"}},{"name":"ammPTemp1","docs":["Temp area"],"type":"publicKey"},{"name":"ammPTemp2","docs":["Temp area"],"type":"publicKey"},{"name":"ammPTemp3","docs":["Temp area"],"type":"publicKey"},{"name":"ammPTemp4","docs":["Temp area"],"type":"publicKey"},{"name":"ammPTemp5","docs":["Temp area"],"type":"publicKey"}]}}],"types":[{"name":"AmmFees","docs":["Encapsulates all fee information and calculations for swap operations"],"type":{"kind":"struct","fields":[{"name":"tradeFeeNumerator","type":"u64"},{"name":"tradeFeeDenominator","type":"u64"},{"name":"ownerTradeFeeNumerator","type":"u64"},{"name":"ownerTradeFeeDenominator","type":"u64"},{"name":"ownerWithdrawFeeNumerator","type":"u64"},{"name":"ownerWithdrawFeeDenominator","type":"u64"},{"name":"hostFeeNumerator","type":"u64"},{"name":"hostFeeDenominator","type":"u64"}]}},{"name":"AmmCurve","type":{"kind":"struct","fields":[{"name":"curveType","type":"u8"},{"name":"curveParameters","type":"u64"}]}},{"name":"AmmConfig","type":{"kind":"struct","fields":[{"name":"lastPrice","type":"u64"},{"name":"lastBalancedPrice","type":"u64"},{"name":"configDenominator","type":"u64"},{"name":"volumeX","type":"u64"},{"name":"volumeY","type":"u64"},{"name":"volumeXInY","type":"u64"},{"name":"depositCap","type":"u64"},{"name":"regressionTarget","type":"u64"},{"name":"oracleType","type":"u64"},{"name":"oracleStatus","type":"u64"},{"name":"oracleMainSlotLimit","type":"u64"},{"name":"oracleSubConfidenceLimit","type":"u64"},{"name":"oracleSubSlotLimit","type":"u64"},{"name":"oraclePcConfidenceLimit","type":"u64"},{"name":"oraclePcSlotLimit","type":"u64"},{"name":"stdSpread","type":"u64"},{"name":"stdSpreadBuffer","type":"u64"},{"name":"spreadCoefficient","type":"u64"},{"name":"priceBufferCoin","type":"i64"},{"name":"priceBufferPc","type":"i64"},{"name":"rebalanceRatio","type":"u64"},{"name":"feeTrade","type":"u64"},{"name":"feePlatform","type":"u64"},{"name":"oracleMainSlotBuffer","type":"u64"},{"name":"configTemp4","type":"u64"},{"name":"configTemp5","type":"u64"},{"name":"configTemp6","type":"u64"},{"name":"configTemp7","type":"u64"},{"name":"configTemp8","type":"u64"}]}},{"name":"CurveType","docs":["Curve types supported by the token-swap program."],"type":{"kind":"enum","variants":[{"name":"Standard"},{"name":"ConstantProduct"}]}}],"errors":[{"code":6000,"name":"AlreadyInUse","msg":"Swap account already in use"},{"code":6001,"name":"InvalidProgramAddress","msg":"Invalid program address generated from bump seed and key"},{"code":6002,"name":"InvalidOwner","msg":"Input account owner is not the program address"},{"code":6003,"name":"InvalidOutputOwner","msg":"Output pool account owner cannot be the program address"},{"code":6004,"name":"ExpectedMint","msg":"Deserialized account is not an SPL Token mint"},{"code":6005,"name":"ExpectedAccount","msg":"Deserialized account is not an SPL Token account"},{"code":6006,"name":"EmptySupply","msg":"Input token account empty"},{"code":6007,"name":"InvalidSupply","msg":"Pool token mint has a non-zero supply"},{"code":6008,"name":"InvalidDelegate","msg":"Token account has a delegate"},{"code":6009,"name":"InvalidInput","msg":"InvalidInput"},{"code":6010,"name":"IncorrectSwapAccount","msg":"Address of the provided swap token account is incorrect"},{"code":6011,"name":"IncorrectPoolMint","msg":"Address of the provided pool token mint is incorrect"},{"code":6012,"name":"InvalidOutput","msg":"InvalidOutput"},{"code":6013,"name":"CalculationFailure","msg":"General calculation failure due to overflow or underflow"},{"code":6014,"name":"InvalidInstruction","msg":"Invalid instruction"},{"code":6015,"name":"RepeatedMint","msg":"Swap input token accounts have the same mint"},{"code":6016,"name":"ExceededSlippage","msg":"Swap instruction exceeds desired slippage limit"},{"code":6017,"name":"InvalidCloseAuthority","msg":"Token account has a close authority"},{"code":6018,"name":"InvalidFreezeAuthority","msg":"Pool token mint has a freeze authority"},{"code":6019,"name":"IncorrectFeeAccount","msg":"Pool fee token account incorrect"},{"code":6020,"name":"ZeroTradingTokens","msg":"Given pool token amount results in zero trading tokens"},{"code":6021,"name":"FeeCalculationFailure","msg":"Fee calculation failed due to overflow, underflow, or unexpected 0"},{"code":6022,"name":"ConversionFailure","msg":"Conversion to u64 failed with an overflow or underflow"},{"code":6023,"name":"InvalidFee","msg":"The provided fee does not match the program owner's constraints"},{"code":6024,"name":"IncorrectTokenProgramId","msg":"The provided token program does not match the token program expected by the swap"},{"code":6025,"name":"IncorrectOracleAccount","msg":"Address of the provided oracle account is incorrect"},{"code":6026,"name":"IncorrectConfigAccount","msg":"Address of the provided config account is incorrect"},{"code":6027,"name":"UnsupportedCurveType","msg":"The provided curve type is not supported by the program owner"},{"code":6028,"name":"InvalidCurve","msg":"The provided curve parameters are invalid"},{"code":6029,"name":"UnsupportedCurveOperation","msg":"The operation cannot be performed on the given curve"},{"code":6030,"name":"InvalidPythStatus","msg":"Pyth oracle status is not 'trading'"},{"code":6031,"name":"InvalidPythPrice","msg":"Could not retrieve updated price feed from the Pyth oracle"},{"code":6032,"name":"IncorrectSigner","msg":"Address of the provided signer account is incorrect"},{"code":6033,"name":"ExceedPoolBalance","msg":"Swap amount exceeds pool balance"},{"code":6034,"name":"ProgramIsFrozen","msg":"Program is frozen"},{"code":6035,"name":"OracleConfidence","msg":"Oracle confidence is too high"},{"code":6036,"name":"OverCapAmount","msg":"Over Pool Cap Amount"},{"code":6037,"name":"InvalidUpdateAccount","msg":"Invalid update wallet address"},{"code":6038,"name":"InvalidUpdateParam","msg":"Invalid update param"},{"code":6039,"name":"InvalidInnerSwapAccount","msg":"Invalid inner swap account"},{"code":6040,"name":"ExceptionErr","msg":"Exception err"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/marginfi_v2.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.json b/olddocs/archivekbot2/idls/marginfi_v2.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.json new file mode 100644 index 0000000..c829799 --- /dev/null +++ b/olddocs/archivekbot2/idls/marginfi_v2.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.json @@ -0,0 +1 @@ +{"address":"MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA","metadata":{"name":"marginfi","version":"0.1.8","spec":"0.1.0","description":"Borrow Lending Prime Broker"},"instructions":[{"name":"config_group_fee","docs":["(global fee admin only) Enable or disable program fees for any group. Does not require the","group admin to sign: the global fee state admin can turn program fees on or off for any","group"],"discriminator":[231,205,66,242,220,87,145,38],"accounts":[{"name":"marginfi_group","writable":true},{"name":"global_fee_admin","docs":["`global_fee_admin` of the FeeState"],"signer":true,"relations":["fee_state"]},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[{"name":"enable_program_fee","type":"bool"}]},{"name":"configure_bank_rate_limits","docs":["(admin or delegate_limit_admin) Configure bank-level rate limits for withdraw/borrow.","Rate limits track net outflow in native tokens. Deposits offset withdraws.","Set to 0 to disable. Hourly and daily windows are independent."],"discriminator":[175,84,85,221,206,220,110,174],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true},{"name":"bank","writable":true}],"args":[{"name":"hourly_max_outflow","type":{"option":"u64"}},{"name":"daily_max_outflow","type":{"option":"u64"}}]},{"name":"configure_deleverage_withdrawal_limit","docs":["(admin or delegate_limit_admin) Set the daily withdrawal limit for deleverages per group."],"discriminator":[28,132,205,158,67,77,177,63],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","signer":true}],"args":[{"name":"limit","type":"u32"}]},{"name":"configure_group_rate_limits","docs":["(admin or delegate_limit_admin) Configure group-level rate limits for withdraw/borrow.","Rate limits track aggregate net outflow in USD.","Example: $10M = 10_000_000. Set to 0 to disable."],"discriminator":[111,47,213,142,158,51,226,102],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","signer":true}],"args":[{"name":"hourly_max_outflow_usd","type":{"option":"u64"}},{"name":"daily_max_outflow_usd","type":{"option":"u64"}}]},{"name":"drift_deposit","docs":["(user) Deposit into a Drift spot market through a marginfi account","* amount - in the underlying token (e.g., USDC), in native decimals"],"discriminator":[252,63,250,201,98,55,130,12],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"drift_oracle","docs":["The oracle account for the asset (not needed if using oracle type QuoteAsset)"],"optional":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority, which owns the Drift user account"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit tokens into Drift"],"writable":true,"relations":["bank"]},{"name":"signer_token_account","docs":["Owned by authority, the source account for the token deposit"],"writable":true},{"name":"drift_state","docs":["The Drift state account"]},{"name":"integration_acc_2","docs":["The Drift user account owned by liquidity_vault_authority"],"writable":true,"relations":["bank"]},{"name":"integration_acc_3","docs":["The Drift user stats account owned by liquidity_vault_authority"],"writable":true,"relations":["bank"]},{"name":"integration_acc_1","docs":["The Drift spot market for this asset"],"writable":true,"relations":["bank"]},{"name":"drift_spot_market_vault","docs":["The Drift spot market vault that will receive tokens"],"writable":true},{"name":"mint","docs":["Bank's liquidity token mint"],"relations":["bank"]},{"name":"drift_program","address":"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"drift_harvest_reward","docs":["(permissionless) Harvest rewards from admin deposits in Drift spot markets.","Rewards are always sent to the global fee wallet's canonical ATA.","The harvest spot market must be different from the bank's main drift spot market."],"discriminator":[167,161,240,194,138,54,87,189],"accounts":[{"name":"bank"},{"name":"fee_state","docs":["Global fee state that contains the global_fee_wallet"],"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"intermediary_token_account","docs":["To create this manually just send some of the reward token","to the liquidity vault authority address before claiming"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"liquidity_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"reward_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":"destination_token_account","docs":["Destination token account must be owned by the global fee wallet"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"reward_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":"drift_state","docs":["Drift accounts"]},{"name":"integration_acc_2","writable":true,"relations":["bank"]},{"name":"integration_acc_3","writable":true,"relations":["bank"]},{"name":"harvest_drift_spot_market","docs":["The harvest spot market - MUST be different from bank's Drift spot market (integration_acc_1)","This is the market that contains admin deposits to harvest"],"writable":true},{"name":"harvest_drift_spot_market_vault","docs":["The harvest spot market vault - derived from harvest_drift_spot_market"],"writable":true},{"name":"drift_signer","docs":["The Drift signer PDA"]},{"name":"reward_mint"},{"name":"drift_program","address":"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"},{"name":"token_program"}],"args":[]},{"name":"drift_init_user","docs":["(permissionless) Initialize a Drift user and user stats for a marginfi bank","Creates user with sub_account_id = 0 and empty name","Requires a minimum deposit to ensure the account remains active","* amount - minimum deposit amount (at least 10 units) in native decimals"],"discriminator":[29,18,236,190,29,254,114,169],"accounts":[{"name":"fee_payer","docs":["Pays to init the drift user and user stats accounts and provides initial deposit"],"writable":true,"signer":true},{"name":"signer_token_account","docs":["The fee payer must provide a nominal amount of bank tokens so the account is not empty.","This amount is irrecoverable and will prevent the account from being closed."],"writable":true},{"name":"bank"},{"name":"liquidity_vault_authority","docs":["The liquidity vault authority (PDA that will own the Drift user)"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit a nominal amount of token into Drift."],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC)"],"writable":true,"relations":["bank"]},{"name":"integration_acc_3","docs":["The user stats account to be created"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,115,116,97,116,115]},{"kind":"account","path":"liquidity_vault_authority"}],"program":{"kind":"const","value":[9,84,219,190,158,201,96,201,138,122,41,63,226,19,54,150,111,225,128,209,81,174,75,129,121,86,31,137,133,74,83,246]}},"relations":["bank"]},{"name":"integration_acc_2","docs":["The user account to be created (sub_account_id = 0)"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114]},{"kind":"account","path":"liquidity_vault_authority"},{"kind":"const","value":[0,0]}],"program":{"kind":"const","value":[9,84,219,190,158,201,96,201,138,122,41,63,226,19,54,150,111,225,128,209,81,174,75,129,121,86,31,137,133,74,83,246]}},"relations":["bank"]},{"name":"drift_state","writable":true},{"name":"integration_acc_1","writable":true,"relations":["bank"]},{"name":"drift_spot_market_vault","docs":["The Drift spot market vault where tokens will be deposited"],"writable":true},{"name":"drift_oracle","docs":["Oracle for the asset (can be null for USDC/market 0)"],"optional":true},{"name":"drift_program","address":"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"},{"name":"token_program"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"drift_withdraw","docs":["(user) Withdraw from a Drift spot market through a marginfi account","* amount - in the underlying token (e.g., USDC), in native decimals","* withdraw_all - if true, withdraws entire position"],"discriminator":[86,59,186,123,183,181,234,137],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"drift_oracle","docs":["The oracle account for the asset (not needed if using oracle type QuoteAsset)"],"optional":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority, which owns the Drift user account"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Receives tokens from Drift withdrawal"],"writable":true,"relations":["bank"]},{"name":"destination_token_account","docs":["Token account that will receive the withdrawn tokens"],"writable":true},{"name":"drift_state","docs":["The Drift state account"]},{"name":"integration_acc_2","docs":["The Drift user account owned by liquidity_vault_authority"],"writable":true,"relations":["bank"]},{"name":"integration_acc_3","docs":["The Drift user stats account owned by liquidity_vault_authority"],"writable":true,"relations":["bank"]},{"name":"integration_acc_1","docs":["The Drift spot market for this asset"],"writable":true,"relations":["bank"]},{"name":"drift_spot_market_vault","docs":["The Drift spot market vault that holds tokens"],"writable":true},{"name":"drift_reward_oracle","docs":["Optional: Oracle for first reward asset (only needed if rewards exist)"],"optional":true},{"name":"drift_reward_spot_market","docs":["Optional: Spot market for first reward asset (only needed if rewards exist)"],"optional":true},{"name":"drift_reward_mint","docs":["Optional: Mint for first reward asset (only needed if rewards exist)"],"optional":true},{"name":"drift_reward_oracle_2","docs":["Optional: Oracle for second reward asset (backup in case multiple rewards)"],"optional":true},{"name":"drift_reward_spot_market_2","docs":["Optional: Spot market for second reward asset (backup in case multiple rewards)"],"optional":true},{"name":"drift_reward_mint_2","docs":["Optional: Mint for second reward asset (backup in case multiple rewards)"],"optional":true},{"name":"drift_signer","docs":["The Drift signer PDA"]},{"name":"mint","docs":["Bank's liquidity token mint"],"relations":["bank"]},{"name":"drift_program","address":"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"},{"name":"withdraw_all","type":{"option":"bool"}}]},{"name":"edit_global_fee_state","docs":["(global fee admin only) Adjust fees, admin, or the destination wallet"],"discriminator":[52,62,35,129,93,69,165,202],"accounts":[{"name":"global_fee_admin","docs":["Admin of the global FeeState"],"signer":true,"relations":["fee_state"]},{"name":"fee_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[{"name":"admin","type":"pubkey"},{"name":"fee_wallet","type":"pubkey"},{"name":"bank_init_flat_sol_fee","type":"u32"},{"name":"liquidation_flat_sol_fee","type":"u32"},{"name":"order_init_flat_sol_fee","type":"u32"},{"name":"program_fee_fixed","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"program_fee_rate","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidation_max_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"order_execution_max_fee","type":{"defined":{"name":"WrappedI80F48"}}}]},{"name":"edit_staked_settings","docs":["(admin only) Edit the staked collateral settings for the group."],"discriminator":[11,108,215,87,240,9,66,241],"accounts":[{"name":"marginfi_group","relations":["staked_settings"]},{"name":"admin","signer":true,"relations":["marginfi_group"]},{"name":"staked_settings","writable":true}],"args":[{"name":"settings","type":{"defined":{"name":"StakedSettingsEditConfig"}}}]},{"name":"end_deleverage","docs":["(risk_admin only) End forced deleverage. Validates health did not worsen."],"discriminator":[114,14,250,143,252,104,214,209],"accounts":[{"name":"marginfi_account","writable":true},{"name":"liquidation_record","writable":true,"relations":["marginfi_account"]},{"name":"group","relations":["marginfi_account"]},{"name":"risk_admin","signer":true,"relations":["group"]}],"args":[]},{"name":"end_liquidation","docs":["(liquidation_receiver, set in start_liquidation) End receivership liquidation. Validates","health improved and seized assets are within fee limits. Charges a flat SOL fee."],"discriminator":[110,11,244,54,229,181,22,184],"accounts":[{"name":"marginfi_account","docs":["Account under liquidation"],"writable":true},{"name":"liquidation_record","docs":["The associated liquidation record PDA for the given `marginfi_account`"],"writable":true,"relations":["marginfi_account"]},{"name":"liquidation_receiver","writable":true,"signer":true,"relations":["liquidation_record"]},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"global_fee_wallet","writable":true,"relations":["fee_state"]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"init_bank_metadata","docs":["(permissionless) pay the rent to open a bank's metadata."],"discriminator":[94,239,50,136,137,204,254,213],"accounts":[{"name":"bank"},{"name":"fee_payer","docs":["Pays the init fee"],"writable":true,"signer":true},{"name":"metadata","docs":["Note: unique per-bank."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"account","path":"bank"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"init_global_fee_state","docs":["(Runs once per program) Configures the fee state account, where the global admin sets fees","that are assessed to the protocol"],"discriminator":[82,48,247,59,220,109,231,44],"accounts":[{"name":"payer","docs":["Pays the init fee"],"writable":true,"signer":true},{"name":"fee_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"admin","type":"pubkey"},{"name":"fee_wallet","type":"pubkey"},{"name":"bank_init_flat_sol_fee","type":"u32"},{"name":"liquidation_flat_sol_fee","type":"u32"},{"name":"order_init_flat_sol_fee","type":"u32"},{"name":"program_fee_fixed","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"program_fee_rate","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidation_max_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"order_execution_max_fee","type":{"defined":{"name":"WrappedI80F48"}}}]},{"name":"init_staked_settings","docs":["(group admin only) Init the Staked Settings account, which is used to create staked","collateral banks, and must run before any staked collateral bank can be created with","`add_pool_permissionless`. Running this ix effectively opts the group into the staked","collateral feature."],"discriminator":[52,35,149,44,69,86,69,80],"accounts":[{"name":"marginfi_group"},{"name":"admin","signer":true,"relations":["marginfi_group"]},{"name":"fee_payer","docs":["Pays the init fee"],"writable":true,"signer":true},{"name":"staked_settings","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,100,95,115,101,116,116,105,110,103,115]},{"kind":"account","path":"marginfi_group"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"settings","type":{"defined":{"name":"StakedSettingsConfig"}}}]},{"name":"juplend_deposit","docs":["(user) Deposit into a JupLend lending pool through a marginfi account.","* amount - in the underlying token (e.g., USDC), in native decimals"],"discriminator":[114,11,218,81,183,165,143,255],"accounts":[{"name":"group","writable":true,"relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"signer_token_account","docs":["Owned by authority, the source account for the token deposit."],"writable":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority PDA (acts as signer for JupLend CPIs).","NOTE: JupLend marks the signer as writable in their deposit instruction."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Bank liquidity vault (holds underlying mint and is used as depositor_token_account)."],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Underlying mint."],"relations":["bank"]},{"name":"integration_acc_1","docs":["JupLend lending state account."],"writable":true,"relations":["bank"]},{"name":"f_token_mint","docs":["JupLend fToken mint."],"writable":true,"relations":["integration_acc_1"]},{"name":"integration_acc_2","docs":["Bank's fToken vault (validated via has_one on bank)."],"writable":true,"relations":["bank"]},{"name":"lending_admin"},{"name":"supply_token_reserves_liquidity","writable":true},{"name":"lending_supply_position_on_liquidity","writable":true},{"name":"rate_model"},{"name":"vault","writable":true},{"name":"liquidity","writable":true},{"name":"liquidity_program"},{"name":"rewards_rate_model"},{"name":"juplend_program","address":"jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"juplend_init_position","docs":["(permissionless) Initialize the bank-level JupLend position.","","This creates the bank's fToken ATA (owned by the bank liquidity vault authority) and","performs a nominal seed deposit into JupLend, then flips the bank from `Paused` to","`Operational`."],"discriminator":[176,255,151,106,5,207,74,215],"accounts":[{"name":"fee_payer","docs":["Provides a nominal deposit amount."],"writable":true,"signer":true},{"name":"signer_token_account","docs":["Token account owned by the fee payer holding the underlying mint."],"writable":true},{"name":"bank","writable":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority PDA (acts as signer for JupLend CPIs)."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Bank liquidity vault (holds underlying mint and is used as depositor_token_account)."],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Underlying mint (must match bank mint and JupLend lending state mint)."],"relations":["bank"]},{"name":"integration_acc_1","docs":["JupLend lending state account."],"writable":true,"relations":["bank"]},{"name":"f_token_mint","docs":["JupLend fToken mint."],"writable":true,"relations":["integration_acc_1"]},{"name":"integration_acc_2","docs":["Bank's fToken vault (validated via has_one on bank)."],"writable":true,"relations":["bank"]},{"name":"lending_admin"},{"name":"supply_token_reserves_liquidity","writable":true},{"name":"lending_supply_position_on_liquidity","writable":true},{"name":"rate_model"},{"name":"vault","writable":true},{"name":"liquidity","writable":true},{"name":"liquidity_program"},{"name":"rewards_rate_model"},{"name":"juplend_program","address":"jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"juplend_withdraw","docs":["(user) Withdraw from a JupLend lending pool through a marginfi account.","* amount - in the underlying token (e.g., USDC), in native decimals"],"discriminator":[245,164,253,202,53,77,251,221],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"destination_token_account","docs":["Token account that will receive the underlying withdrawal.","WARN: Completely unchecked!"],"writable":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority PDA (acts as signer for JupLend CPIs).","NOTE: JupLend marks the signer as writable in their withdraw instruction."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"mint","docs":["Underlying mint."],"relations":["bank"]},{"name":"integration_acc_1","docs":["JupLend lending state account."],"writable":true,"relations":["bank"]},{"name":"f_token_mint","docs":["JupLend fToken mint."],"writable":true,"relations":["integration_acc_1"]},{"name":"integration_acc_2","docs":["Bank's fToken vault (validated via has_one on bank)."],"writable":true,"relations":["bank"]},{"name":"integration_acc_3","docs":["Withdraw intermediary ATA (authority = liquidity_vault_authority).","This must be an ATA to satisfy JupLend's withdraw constraints."],"writable":true,"relations":["bank"]},{"name":"lending_admin"},{"name":"supply_token_reserves_liquidity","writable":true},{"name":"lending_supply_position_on_liquidity","writable":true},{"name":"rate_model"},{"name":"vault","writable":true},{"name":"claim_account","docs":["JupLend claim account for liquidity_vault_authority.","TEMPORARY: Mainnet currently requires this account (passing None causes ConstraintMut errors),","but an upcoming upgrade is expected to make it truly optional. The account is never actually","validated or used - you can pass any mutable account. We create the canonical PDA for consistency.","Seeds: [\"user_claim\", liquidity_vault_authority, mint] on Liquidity program."],"writable":true},{"name":"liquidity","writable":true},{"name":"liquidity_program"},{"name":"rewards_rate_model"},{"name":"juplend_program","address":"jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"},{"name":"withdraw_all","type":{"option":"bool"}}]},{"name":"kamino_deposit","docs":["(user) Deposit into a Kamino pool through a marginfi account","* amount - in the liquidity token (e.g. if there is a Kamino USDC bank, pass the amount of","USDC desired), in native decimals."],"discriminator":[237,8,188,187,115,99,49,85],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"signer_token_account","docs":["Owned by authority, the source account for the token deposit."],"writable":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority, which owns the Kamino obligation. Note: Kamino needs","this to be mut because `deposit` might return the rent here"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit token into Kamino"],"writable":true,"relations":["bank"]},{"name":"integration_acc_2","writable":true,"relations":["bank"]},{"name":"lending_market"},{"name":"lending_market_authority"},{"name":"integration_acc_1","docs":["The Kamino reserve that holds liquidity"],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC). Kamino calls this the `reserve_liquidity_mint`"],"relations":["bank"]},{"name":"reserve_liquidity_supply","writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's mint for tokenized representations of Kamino deposits."],"writable":true},{"name":"reserve_destination_deposit_collateral","docs":["The reserve's destination for tokenized representations of deposits. Note: the","`reserve_collateral_mint` will mint tokens directly to this account."],"writable":true},{"name":"obligation_farm_user_state","docs":["Required if the Kamino reserve has an active farm."],"writable":true,"optional":true},{"name":"reserve_farm_state","docs":["Required if the Kamino reserve has an active farm."],"writable":true,"optional":true},{"name":"kamino_program","address":"KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"},{"name":"farms_program","docs":["Farms program for Kamino staking functionality"],"address":"FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr"},{"name":"collateral_token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"liquidity_token_program"},{"name":"instruction_sysvar_account","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"kamino_harvest_reward","docs":["(permissionless) Harvest the specified reward index from the Kamino Farm attached to this","bank. Rewards are always sent to the global fee wallet's canonical ATA.","","* `reward_index` — index of the reward token in the Kamino Farm's reward list"],"discriminator":[163,202,248,141,106,20,116,5],"accounts":[{"name":"bank"},{"name":"fee_state","docs":["Global fee state that contains the global_fee_admin"],"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"destination_token_account","docs":["Destination token account must be owned by the global fee admin"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"reward_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":"liquidity_vault_authority","docs":["The bank's liquidity vault authority, which owns the Kamino obligation."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"user_state","writable":true},{"name":"farm_state","writable":true},{"name":"global_config"},{"name":"reward_mint"},{"name":"user_reward_ata","docs":["An initialized ATA of type reward mint owned by liquidity vault"],"writable":true},{"name":"rewards_vault","writable":true},{"name":"rewards_treasury_vault","writable":true},{"name":"farm_vaults_authority"},{"name":"scope_prices","optional":true},{"name":"farms_program","address":"FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr"},{"name":"token_program"}],"args":[{"name":"reward_index","type":"u64"}]},{"name":"kamino_init_obligation","docs":["(permissionless) Initialize a Kamino obligation for a marginfi bank","* amount - In token, in native decimals. Must be >10 (i.e. 10 lamports, not 10 tokens). Lost","forever. Generally, try to make this the equivalent of around $1, in case Kamino ever","rounds small balances down to zero."],"discriminator":[253,177,160,225,70,156,217,109],"accounts":[{"name":"fee_payer","docs":["Pays to init the obligation and pays a nominal amount to ensure the obligation has a","non-zero balance."],"writable":true,"signer":true},{"name":"bank"},{"name":"signer_token_account","docs":["The fee payer must provide a nominal amount of bank tokens so the obligation is not empty.","This amount is irrecoverable and and will prevent the obligation from ever being closed,","even if the bank is otherwise empty (Kamino normally closes empty obligations automatically)"],"writable":true},{"name":"liquidity_vault_authority","docs":["The liquidity vault authority (PDA that will own the Kamino obligation). Note: Kamino needs","this to be mut because `deposit` might return the rent here"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit a nominal amount of token into the obligation."],"writable":true,"relations":["bank"]},{"name":"integration_acc_2","docs":["The obligation account to be created. Note that the key was already derived when","initializing the bank, and this must match the obligation recorded at that time."],"writable":true,"relations":["bank"]},{"name":"user_metadata","writable":true},{"name":"lending_market"},{"name":"lending_market_authority"},{"name":"integration_acc_1","writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC). Kamino calls this the `reserve_liquidity_mint`"],"writable":true,"relations":["bank"]},{"name":"reserve_liquidity_supply","writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's mint for tokenized representations of Kamino deposits."],"writable":true},{"name":"reserve_destination_deposit_collateral","docs":["The reserve's destination for tokenized representations of deposits. Note: the","`reserve_collateral_mint` will mint tokens directly to this account."],"writable":true},{"name":"pyth_oracle","optional":true},{"name":"switchboard_price_oracle","optional":true},{"name":"switchboard_twap_oracle","optional":true},{"name":"scope_prices","optional":true},{"name":"obligation_farm_user_state","docs":["Required if the Kamino reserve has an active farm."],"writable":true,"optional":true},{"name":"reserve_farm_state","docs":["Required if the Kamino reserve has an active farm."],"writable":true,"optional":true},{"name":"kamino_program","address":"KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"},{"name":"farms_program","docs":["Farms program for Kamino staking functionality"],"address":"FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr"},{"name":"collateral_token_program","docs":["Note: the collateral token always uses Token classic, never Token22."],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"liquidity_token_program","docs":["Note: Kamino does not have full Token22 support, certain Token22 features are disallowed.","Expect this to update over time. Check with the Kamino source."]},{"name":"instruction_sysvar_account","address":"Sysvar1nstructions1111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"kamino_withdraw","docs":["(user) Withdraw from a Kamino pool through a marginfi account","* amount - in the collateral token (NOT liquidity token), in native decimals. Must convert","from collateral to liquidity token amounts using the current exchange rate.","* withdraw_all - if true, withdraw the entire mrgn balance (Note: due to rounding down, a","deposit and withdraw back to back may result in several lamports less)"],"discriminator":[199,101,41,45,213,98,224,200],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"destination_token_account","docs":["Token account that will receive the withdrawn tokens. Mint/owner are validated by the","SPL transfer; the caller controls the destination."],"writable":true},{"name":"liquidity_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]},"relations":["bank"]},{"name":"integration_acc_2","writable":true,"relations":["bank"]},{"name":"lending_market","docs":["The Kamino lending market"]},{"name":"lending_market_authority","docs":["The Kamino lending market authority"]},{"name":"integration_acc_1","docs":["The Kamino reserve that holds liquidity"],"writable":true,"relations":["bank"]},{"name":"mint","docs":["The liquidity token mint (e.g., USDC)","Needs serde to get the mint decimals for transfer checked","TODO: rename to just 'mint' to make use of has_one and to be consistent with deposit"],"writable":true,"relations":["bank"]},{"name":"reserve_liquidity_supply","docs":["The reserve's liquidity supply account"],"writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's collateral mint"],"writable":true},{"name":"reserve_source_collateral","docs":["The reserve's source for collateral tokens"],"writable":true},{"name":"obligation_farm_user_state","docs":["Optional farms accounts for Kamino staking functionality"],"writable":true,"optional":true},{"name":"reserve_farm_state","writable":true,"optional":true},{"name":"kamino_program","address":"KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"},{"name":"farms_program","docs":["Farms program for Kamino staking functionality"],"address":"FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr"},{"name":"collateral_token_program","docs":["The token program for the collateral token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"liquidity_token_program","docs":["The token program for the liquidity token"]},{"name":"instruction_sysvar_account","docs":["Used by kamino validate CPI calls"],"address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"amount","type":"u64"},{"name":"withdraw_all","type":{"option":"bool"}}]},{"name":"lending_account_borrow","docs":["(account authority) Borrow assets from a bank. Accrues interest, records liability, applies","origination fee, transfers tokens, and runs a health check."],"discriminator":[4,126,116,53,48,5,212,31],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"destination_token_account","writable":true},{"name":"bank_liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"lending_account_clear_emissions","docs":["(permissionless) Zero out `emissions_outstanding` on a balance after emissions are disabled","on the bank."],"discriminator":[239,4,221,98,45,167,201,244],"accounts":[{"name":"marginfi_account","writable":true},{"name":"bank"}],"args":[]},{"name":"lending_account_close_balance","docs":["(account authority) Close a balance position with dust-level amounts."],"discriminator":[245,54,41,4,243,202,31,17],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true}],"args":[]},{"name":"lending_account_deposit","docs":["(account authority) Deposit assets into a bank. Accrues interest, records deposit, and","transfers tokens from the signer's token account to the bank's liquidity vault."],"discriminator":[171,94,235,103,82,64,212,140],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"signer_token_account","writable":true},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"},{"name":"deposit_up_to_limit","type":{"option":"bool"}}]},{"name":"lending_account_end_flashloan","docs":["(account authority) End a flash loan and run the health check."],"discriminator":[105,124,201,106,153,2,8,156],"accounts":[{"name":"marginfi_account","writable":true},{"name":"authority","signer":true,"relations":["marginfi_account"]}],"args":[]},{"name":"lending_account_liquidate","docs":["(permissionless) Liquidate a lending account balance of an unhealthy marginfi account.","The liquidator takes on the liability and receives discounted collateral (2.5% liquidator","fee + 2.5% insurance fee).","* `asset_amount` - amount of collateral to liquidate","* `liquidatee_accounts` - number of remaining accounts for the liquidatee","* `liquidator_accounts` - number of remaining accounts for the liquidator"],"discriminator":[214,169,151,213,251,167,86,219],"accounts":[{"name":"group","relations":["asset_bank","liab_bank","liquidator_marginfi_account","liquidatee_marginfi_account"]},{"name":"asset_bank","writable":true},{"name":"liab_bank","writable":true},{"name":"liquidator_marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"liquidatee_marginfi_account","writable":true},{"name":"bank_liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"liab_bank"}]}},{"name":"bank_liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"liab_bank"}]}},{"name":"bank_insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"liab_bank"}]}},{"name":"token_program"}],"args":[{"name":"asset_amount","type":"u64"},{"name":"liquidatee_accounts","type":"u8"},{"name":"liquidator_accounts","type":"u8"}]},{"name":"lending_account_pulse_health","docs":["(Permissionless) Refresh the internal risk engine health cache. Useful for liquidators and","other consumers that want to see the internal risk state of a user account. This cache is","read-only and serves no purpose except being populated by this ix.","* remaining accounts expected in the same order as borrow, etc. I.e., for each balance the","user has, pass bank and oracle: "],"discriminator":[186,52,117,97,34,74,39,253],"accounts":[{"name":"marginfi_account","writable":true}],"args":[]},{"name":"lending_account_repay","docs":["(account authority, or any signer during receivership) Repay borrowed assets. Accrues","interest, records repayment, and transfers tokens to the bank's liquidity vault."],"discriminator":[79,209,172,177,222,51,173,151],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","docs":["Must be marginfi_account's authority, unless in liquidation/deleverage receivership or order execution","","Note: during receivership and order execution, there are no signer checks whatsoever: any key can repay as","long as the invariants checked at the end of execution are met."],"signer":true},{"name":"bank","writable":true},{"name":"signer_token_account","writable":true},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"},{"name":"repay_all","type":{"option":"bool"}}]},{"name":"lending_account_start_flashloan","docs":["(account authority) Start a flash loan. Must have a corresponding `end_flashloan` ix in the","same tx. Health checks are skipped until the flash loan ends."],"discriminator":[14,131,33,220,81,186,180,107],"accounts":[{"name":"marginfi_account","writable":true},{"name":"authority","signer":true,"relations":["marginfi_account"]},{"name":"ixs_sysvar","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"end_index","type":"u64"}]},{"name":"lending_account_withdraw","docs":["(account authority, or any signer during receivership) Withdraw assets from a bank. Accrues","interest, records withdrawal, transfers tokens, and runs a health check (skipped during","receivership)."],"discriminator":[36,72,74,19,210,210,192,192],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","docs":["Must be marginfi_account's authority, unless in liquidation/deleverage receivership or order execution","","Note: during receivership and order execution, there are no signer checks whatsoever: any key can repay as","long as the invariants checked at the end of execution are met."],"signer":true},{"name":"bank","writable":true},{"name":"destination_token_account","writable":true},{"name":"bank_liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"},{"name":"withdraw_all","type":{"option":"bool"}}]},{"name":"lending_pool_accrue_bank_interest","docs":["(permissionless) Accrue interest on a bank, updating share values and collecting fees."],"discriminator":[108,201,30,87,47,65,97,188],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","writable":true}],"args":[]},{"name":"lending_pool_add_bank","docs":["(admin only) Add a new bank to the lending pool"],"discriminator":[215,68,72,78,208,218,103,182],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","signer":true,"relations":["marginfi_group"]},{"name":"fee_payer","docs":["Pays to init accounts and pays `fee_state.bank_init_flat_sol_fee` lamports to the protocol"],"writable":true,"signer":true},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"global_fee_wallet","writable":true,"relations":["fee_state"]},{"name":"bank_mint"},{"name":"bank","writable":true,"signer":true},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"BankConfigCompact"}}}]},{"name":"lending_pool_add_bank_drift","docs":["(group admin only) Add a Drift bank to the group."],"discriminator":[62,63,49,48,76,55,108,155],"accounts":[{"name":"group","writable":true},{"name":"admin","signer":true,"relations":["group"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint","docs":["Must match the mint used by `integration_acc_1`"]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"integration_acc_1","docs":["Drift spot market account that must match the bank mint"]},{"name":"integration_acc_2","docs":["Drift user account for the marginfi program (derived from liquidity_vault_authority)"],"pda":{"seeds":[{"kind":"const","value":[117,115,101,114]},{"kind":"account","path":"liquidity_vault_authority"},{"kind":"const","value":[0,0]}],"program":{"kind":"const","value":[9,84,219,190,158,201,96,201,138,122,41,63,226,19,54,150,111,225,128,209,81,174,75,129,121,86,31,137,133,74,83,246]}}},{"name":"integration_acc_3","docs":["Drift user stats account for the marginfi program (derived from liquidity_vault_authority)"],"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,115,116,97,116,115]},{"kind":"account","path":"liquidity_vault_authority"}],"program":{"kind":"const","value":[9,84,219,190,158,201,96,201,138,122,41,63,226,19,54,150,111,225,128,209,81,174,75,129,121,86,31,137,133,74,83,246]}}},{"name":"liquidity_vault_authority","docs":["Will be authority of the bank's liquidity vault. Used as intermediary for deposits/withdraws"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["For Drift banks, the `liquidity_vault` never holds assets, but is instead used as an","intermediary when depositing/withdrawing, e.g., withdrawn funds move from Drift -> here ->","the user's token account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"DriftConfigCompact"}}},{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_add_bank_juplend","docs":["(admin) Add a JupLend bank to the marginfi group.","","Remaining accounts (for oracle validation):","0. underlying oracle feed (pyth push or switchboard pull)","1. JupLend `Lending` state"],"discriminator":[18,208,117,90,53,111,195,41],"accounts":[{"name":"group","writable":true},{"name":"admin","signer":true,"relations":["group"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint","docs":["Must match the mint used by the JupLend lending state."]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"integration_acc_1","docs":["JupLend lending state account that must match the bank mint."]},{"name":"liquidity_vault_authority","docs":["Will be authority of the bank's liquidity vault. Used as intermediary for deposits/withdraws."],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["For JupLend banks, the `liquidity_vault` is used as an intermediary when depositing/","withdrawing, e.g., withdrawn funds move from JupLend -> here -> the user's token account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"f_token_mint","relations":["integration_acc_1"]},{"name":"integration_acc_2","docs":["The bank's fToken vault holds the fTokens received when depositing into JupLend.",""],"writable":true,"pda":{"seeds":[{"kind":"const","value":[102,95,116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program","docs":["Token program for both underlying mint and fToken mint (SPL Token or Token-2022).","JupLend creates fToken mints using the same token program as the underlying."]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"JuplendConfigCompact"}}},{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_add_bank_kamino","docs":["(group admin only) Add a Kamino bank to the group. Pass the oracle and reserve in remaining","accounts 0 and 1 respectively."],"discriminator":[118,53,16,243,255,245,149,241],"accounts":[{"name":"group","writable":true},{"name":"admin","signer":true,"relations":["group"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint","docs":["Must match the mint used by the Kamino reserve (integration_acc_1), Kamino calls this the","`reserve_liquidity_mint` aka `liquidity.mint_pubkey`"]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"integration_acc_1"},{"name":"integration_acc_2","docs":["Note: not yet initialized in this instruction, run `init_obligation` after."]},{"name":"liquidity_vault_authority","docs":["Will be authority of the bank's Kamino obligation (integration_acc_2). Note: When","depositing/withdrawing Kamino assets, the source/destination must also be owned by the","obligation authority.","Kamino assets, the source/destination must also be owned by the obligation authority. This","account owns the `liquidity_vault`, and thus acts as intermediary for deposits/withdraws"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["For Kamino banks, the `liquidity_vault` never holds assets, but is instead used as an","intermediary when depositing/withdrawing, e.g., withdrawn funds move from Kamino -> here ->","the user's token account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"KaminoConfigCompact"}}},{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_add_bank_permissionless","docs":["(permissionless) Add a staked collateral bank. Requires a valid SPL single-pool LST mint."],"discriminator":[127,187,121,34,187,167,238,102],"accounts":[{"name":"marginfi_group","writable":true,"relations":["staked_settings"]},{"name":"staked_settings"},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint","docs":["Mint of the spl-single-pool LST (a PDA derived from `stake_pool`)","","because the sol_pool and stake_pool will not derive to a valid PDA which is also owned by","the staking program and spl-single-pool program."]},{"name":"sol_pool"},{"name":"stake_pool","docs":["this key.","","If derives the same `bank_mint`, then this must be the correct stake pool for that mint, and","we can subsequently use it to validate the `sol_pool`"]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"marginfi_group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_add_bank_solend","docs":["(admin) Add a Solend bank to the marginfi group"],"discriminator":[81,233,203,199,47,226,0,68],"accounts":[{"name":"group","writable":true},{"name":"admin","signer":true,"relations":["group"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint","docs":["Must match the mint used by `integration_acc_1`, Solend calls this the `liquidity.mint_pubkey`"]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"integration_acc_1","docs":["Solend reserve account that must match the bank mint"]},{"name":"integration_acc_2","docs":["Obligation PDA for this bank in Solend","Will be initialized and transferred to Solend in init_obligation instruction"],"pda":{"seeds":[{"kind":"const","value":[115,111,108,101,110,100,95,111,98,108,105,103,97,116,105,111,110]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault_authority","docs":["Will be authority of the bank's liquidity vault. Used as intermediary for deposits/withdraws"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["For Solend banks, the `liquidity_vault` never holds assets, but is instead used as an","intermediary when depositing/withdrawing, e.g., withdrawn funds move from Solend -> here ->","the user's token account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"SolendConfigCompact"}}},{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_add_bank_with_seed","docs":["(admin only) A copy of lending_pool_add_bank with an additional bank seed.","This seed is used to create a PDA for the bank's signature.","lending_pool_add_bank is preserved for backwards compatibility."],"discriminator":[76,211,213,171,117,78,158,76],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","signer":true,"relations":["marginfi_group"]},{"name":"fee_payer","docs":["Pays to init accounts and pays `fee_state.bank_init_flat_sol_fee` lamports to the protocol"],"writable":true,"signer":true},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"global_fee_wallet","writable":true,"relations":["fee_state"]},{"name":"bank_mint"},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"marginfi_group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"BankConfigCompact"}}},{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_clone_bank","docs":["(admin only) Staging or localnet only, panics on mainnet","This instruction is used to clone a bank to a new PDA."],"discriminator":[214,93,17,236,177,228,78,17],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","writable":true,"signer":true,"relations":["marginfi_group"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint"},{"name":"source_bank","docs":["Source bank to clone from mainnet program",""]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"marginfi_group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_clone_emode","docs":["(admin or emode_admin) Copies emode settings from one bank to another. Useful when applying","emode settings from e.g. one LST to another."],"discriminator":[146,167,94,106,184,202,15,10],"accounts":[{"name":"group","relations":["copy_from_bank","copy_to_bank"]},{"name":"signer","signer":true},{"name":"copy_from_bank"},{"name":"copy_to_bank","writable":true}],"args":[]},{"name":"lending_pool_close_bank","docs":["(admin only) Close a bank. Requires CLOSE_ENABLED_FLAG and zero positions/shares."],"discriminator":[22,115,7,130,227,85,0,47],"accounts":[{"name":"group","writable":true,"relations":["bank"]},{"name":"bank","writable":true},{"name":"admin","writable":true,"signer":true,"relations":["group"]}],"args":[]},{"name":"lending_pool_collect_bank_fees","docs":["(permissionless) Transfer accrued fees from the liquidity vault to insurance/fee/program","vaults."],"discriminator":[201,5,215,116,230,92,75,150],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","writable":true},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"fee_ata","docs":["(validated in handler). Must already exist, may require initializing the ATA if it does not","already exist prior to this ix."],"writable":true},{"name":"token_program"}],"args":[]},{"name":"lending_pool_configure_bank","docs":["(admin only) Configure bank parameters. If the bank has `FREEZE_SETTINGS`, only","deposit/borrow limits are updated and all other config changes are silently ignored."],"discriminator":[121,173,156,40,93,148,56,237],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"bank_config_opt","type":{"defined":{"name":"BankConfigOpt"}}}]},{"name":"lending_pool_configure_bank_emode","docs":["(emode_admin only)"],"discriminator":[17,175,91,57,239,86,49,71],"accounts":[{"name":"group","relations":["bank"]},{"name":"emode_admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"emode_tag","type":"u16"},{"name":"entries","type":{"array":[{"defined":{"name":"EmodeEntry"}},10]}}]},{"name":"lending_pool_configure_bank_interest_only","docs":["(delegate_curve_admin only) Update interest rate config. Does nothing if bank has","`FREEZE_SETTINGS`."],"discriminator":[245,107,83,38,103,219,163,241],"accounts":[{"name":"group","relations":["bank"]},{"name":"delegate_curve_admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"interest_rate_config","type":{"defined":{"name":"InterestRateConfigOpt"}}}]},{"name":"lending_pool_configure_bank_limits_only","docs":["(delegate_limit_admin only) Update deposit/borrow/init limits only."],"discriminator":[157,196,221,200,202,62,84,21],"accounts":[{"name":"group","relations":["bank"]},{"name":"delegate_limit_admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"deposit_limit","type":{"option":"u64"}},{"name":"borrow_limit","type":{"option":"u64"}},{"name":"total_asset_value_init_limit","type":{"option":"u64"}}]},{"name":"lending_pool_configure_bank_oracle","docs":["(admin only)"],"discriminator":[209,82,255,171,124,21,71,81],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"setup","type":"u8"},{"name":"oracle","type":"pubkey"}]},{"name":"lending_pool_force_tokenless_repay_complete","docs":["(risk_admin only) - Signals all of a bank's liability have been deleveraged. Used if a bank","still has liability dust after the risk admin has completed deleveraging all debts. The","risk admin is trusted not to execute this until all non-dust debts have been deleveraged."],"discriminator":[15,203,147,232,199,14,231,37],"accounts":[{"name":"group","relations":["bank"]},{"name":"risk_admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[]},{"name":"lending_pool_handle_bankruptcy","docs":["(risk_admin or admin, unless `PERMISSIONLESS_BAD_DEBT_SETTLEMENT_FLAG` is set on the bank)","Handle bad debt of a bankrupt marginfi account for a given bank. Covers bad debt from the","insurance fund and socializes any remainder among depositors."],"discriminator":[162,11,56,139,90,128,70,173],"accounts":[{"name":"group","relations":["bank","marginfi_account"]},{"name":"signer","docs":["Must be risk_admin or admin, unless the bank has PERMISSIONLESS_BAD_DEBT_SETTLEMENT_FLAG","set, in which case any signer is accepted."],"signer":true},{"name":"bank","writable":true},{"name":"marginfi_account","writable":true},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"token_program"}],"args":[]},{"name":"lending_pool_pulse_bank_price_cache","docs":["(Permissionless) Refresh the cached oracle price for a bank."],"discriminator":[192,19,201,135,105,203,32,222],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","writable":true}],"args":[]},{"name":"lending_pool_reclaim_emissions_vault","docs":["(permissionless) Reclaim all remaining tokens from the emissions vault","to the global fee wallet ATA, and disable emissions on the bank."],"discriminator":[206,67,186,225,41,30,95,216],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","writable":true},{"name":"emissions_mint"},{"name":"emissions_auth","pda":{"seeds":[{"kind":"const","value":[101,109,105,115,115,105,111,110,115,95,97,117,116,104,95,115,101,101,100]},{"kind":"account","path":"bank"},{"kind":"account","path":"emissions_mint"}]}},{"name":"emissions_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[101,109,105,115,115,105,111,110,115,95,116,111,107,101,110,95,97,99,99,111,117,110,116,95,115,101,101,100]},{"kind":"account","path":"bank"},{"kind":"account","path":"emissions_mint"}]}},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"destination_account","docs":["emissions mint (validated in handler)."],"writable":true},{"name":"token_program"}],"args":[]},{"name":"lending_pool_set_fixed_oracle_price","docs":["(admin only)"],"discriminator":[28,126,127,127,60,37,211,125],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"price","type":{"defined":{"name":"WrappedI80F48"}}}]},{"name":"lending_pool_update_fees_destination_account","docs":["(admin only) Set the destination wallet for permissionless fee withdrawals."],"discriminator":[102,4,121,243,237,110,95,13],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","writable":true},{"name":"admin","signer":true,"relations":["group"]},{"name":"destination_account","docs":["Bank fees will be sent to this account which must be an ATA of the bank's mint."]}],"args":[]},{"name":"lending_pool_withdraw_fees","docs":["(admin only) Withdraw collected group fees from the fee vault."],"discriminator":[92,140,215,254,170,0,83,174],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank"},{"name":"admin","signer":true,"relations":["group"]},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"dst_token_account","writable":true},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"lending_pool_withdraw_fees_permissionless","docs":["(permissionless) Withdraw group fees to the pre-configured `fees_destination_account`."],"discriminator":[57,245,1,208,130,18,145,113],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank"},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fees_destination_account","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"lending_pool_withdraw_insurance","docs":["(admin only) Withdraw from the insurance vault."],"discriminator":[108,60,60,246,104,79,159,243],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank"},{"name":"admin","signer":true,"relations":["group"]},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"dst_token_account","writable":true},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"marginfi_account_close","docs":["(account authority) Close a marginfi account. Requires all balances to be empty and no","active flags (disabled, flashloan, receivership)."],"discriminator":[186,221,93,34,50,97,194,241],"accounts":[{"name":"marginfi_account","writable":true},{"name":"authority","signer":true,"relations":["marginfi_account"]},{"name":"fee_payer","writable":true,"signer":true}],"args":[]},{"name":"marginfi_account_close_order","docs":["(user) Close an existing Order, returning rent to the user"],"discriminator":[212,223,79,182,172,183,205,237],"accounts":[{"name":"marginfi_account","writable":true,"relations":["order"]},{"name":"authority","signer":true,"relations":["marginfi_account"]},{"name":"order","writable":true},{"name":"fee_recipient","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"marginfi_account_end_execute_order","docs":["(permissionless keeper) End Order execution","* Closes the Order (keeper keeps the rent)","* Closes the borrow position involved in the Order, the lending position remains open","* User health must be \"unchanged\" (within Order requirements i.e. minus slippage). Keeper","may keep any slippage in excess of what was needed to complete the Order as profit.","* `StartExecuteOrder` must appear earlier in the tx","* Must appear last in the tx","* CPI is forbidden","* Returns rent for ephemeral accounts created during `StartExecuteOrder`"],"discriminator":[115,42,20,93,121,84,178,83],"accounts":[{"name":"group","relations":["marginfi_account"]},{"name":"marginfi_account","docs":["The account owning the order"],"writable":true,"relations":["order"]},{"name":"executor","docs":["The executioner ☠️"],"signer":true,"relations":["execute_record"]},{"name":"fee_recipient","writable":true},{"name":"order","writable":true,"relations":["execute_record"]},{"name":"execute_record","docs":["This keeps track of the relevant state to be checked at the end of execution."],"writable":true},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[]},{"name":"marginfi_account_init_liq_record","docs":["(permissionless) Initialize a liquidation record PDA for a marginfi account. The fee_payer","pays rent; the record is required for receivership liquidation."],"discriminator":[236,213,238,126,147,251,164,8],"accounts":[{"name":"marginfi_account","writable":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"liquidation_record","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,95,114,101,99,111,114,100]},{"kind":"account","path":"marginfi_account"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"marginfi_account_initialize","docs":["Initialize a marginfi account for a given group. The account is a fresh keypair, and must","sign. If you are a CPI caller, consider using `marginfi_account_initialize_pda` instead, or","create the account manually and use `transfer_to_new_account` to gift it to the owner you","wish."],"discriminator":[43,78,61,255,148,52,249,154],"accounts":[{"name":"marginfi_group"},{"name":"marginfi_account","writable":true,"signer":true},{"name":"authority","signer":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"marginfi_account_initialize_pda","docs":["The same as `marginfi_account_initialize`, except the created marginfi account uses a PDA","(Program Derived Address)","","seeds:","- marginfi_group","- authority: The account authority (owner)","- account_index: A u16 value to allow multiple accounts per authority","- third_party_id: Optional u16 for third-party tagging. Seeds < PDA_FREE_THRESHOLD can be","used freely. For a dedicated seed used by just your program (via CPI), contact us."],"discriminator":[87,177,91,80,218,119,245,31],"accounts":[{"name":"marginfi_group"},{"name":"marginfi_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,103,105,110,102,105,95,97,99,99,111,117,110,116]},{"kind":"account","path":"marginfi_group"},{"kind":"account","path":"authority"},{"kind":"arg","path":"account_index"},{"kind":"arg","path":"third_party_id.unwrap_or(0)"}]}},{"name":"authority","signer":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"instructions_sysvar","docs":["Instructions sysvar for CPI validation",""],"address":"Sysvar1nstructions1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"account_index","type":"u16"},{"name":"third_party_id","type":{"option":"u16"}}]},{"name":"marginfi_account_keeper_close_order","docs":["(permissionless keeper) Close an existing Order after the user account was closed, or it no","longer has the associated positions, or the user has executed","`marginfi_account_set_keeper_close_flags`. Keeper keeps the rent."],"discriminator":[128,114,71,46,194,71,186,106],"accounts":[{"name":"marginfi_account","docs":["marginfi account was closed.","The ownership check is checked in the handler or/and type checks are made in the handler."],"relations":["order"]},{"name":"fee_recipient","writable":true},{"name":"order","writable":true}],"args":[]},{"name":"marginfi_account_place_order","docs":["(user) Create a new Order.","* bank_keys - Currently only two keys: the lending position and borrowing position in the","users's Balances for which the order is being placed","* trigger - the type of order (stop loss, take profit, or both), and the threshold at which","to trigger the order, in dollars"],"discriminator":[244,112,75,138,143,108,7,186],"accounts":[{"name":"group","relations":["marginfi_account"]},{"name":"marginfi_account","writable":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"authority","signer":true,"relations":["marginfi_account"]},{"name":"order","writable":true},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"global_fee_wallet","writable":true,"relations":["fee_state"]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_keys","type":{"vec":"pubkey"}},{"name":"trigger","type":{"defined":{"name":"OrderTrigger"}}}]},{"name":"marginfi_account_set_freeze","docs":["(admin only) Freeze or unfreeze a marginfi account. Frozen accounts can only be operated on","by the group admin."],"discriminator":[199,179,231,30,138,247,110,227],"accounts":[{"name":"group","relations":["marginfi_account"]},{"name":"marginfi_account","writable":true},{"name":"admin","signer":true}],"args":[{"name":"frozen","type":"bool"}]},{"name":"marginfi_account_set_keeper_close_flags","docs":["(user) Purge flags from some balances, enabling a Keeper to call","`marginfi_account_keeper_close_order` on associated Orders. Typically, use","`marginfi_account_close_order` instead if trying to close an Order."],"discriminator":[82,163,165,222,212,255,33,210],"accounts":[{"name":"marginfi_account","writable":true},{"name":"authority","signer":true,"relations":["marginfi_account"]}],"args":[{"name":"bank_keys_opt","type":{"option":{"vec":"pubkey"}}}]},{"name":"marginfi_account_start_execute_order","docs":["(permissionless keeper) Begin Order execution","* Enables the Keeper to withdraw/repay associated positions until the end of the tx","* Only one `StartExecuteOrder` is allowed per tx","* Must appear before `EndExecuteOrder` in the tx, and before any instructions except certain","allowed ones (compute budget, kamino refresh, etc)","* `EndExecuteOrder` must also appear in the tx","* CPI is forbidden","* Costs a small amount of rent, which is returned at the end of the tx, make sure you have","enough SOL to start the tx."],"discriminator":[1,70,140,134,183,29,208,224],"accounts":[{"name":"group","relations":["marginfi_account"]},{"name":"marginfi_account","docs":["The account owning the order"],"writable":true,"relations":["order"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"executor","docs":["This account will have the authority to withdraw/repay as if they are the user authority","until the end of the tx.",""]},{"name":"order","writable":true},{"name":"execute_record","docs":["This keeps track of the relevant state to be checked at the end of execution."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[101,120,101,99,117,116,101,95,111,114,100,101,114]},{"kind":"account","path":"order"}]}},{"name":"instruction_sysvar","address":"Sysvar1nstructions1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"marginfi_account_update_emissions_destination_account","docs":["(account authority) Set the wallet whose canonical ATA will receive off-chain emissions."],"discriminator":[73,185,162,201,111,24,116,185],"accounts":[{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"destination_account","docs":["the canonical ATA for each emissions mint."]}],"args":[]},{"name":"marginfi_group_configure","docs":["(admin only) Configure group admin keys and emode leverage caps. All admin keys must be","provided on every call. Emode leverage caps are set if provided, otherwise the existing","(non-zero) values are kept. Pass `Some(value)` to update, `None` to leave unchanged."],"discriminator":[62,199,81,78,33,13,236,61],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","signer":true,"relations":["marginfi_group"]}],"args":[{"name":"new_admin","type":{"option":"pubkey"}},{"name":"new_emode_admin","type":{"option":"pubkey"}},{"name":"new_curve_admin","type":{"option":"pubkey"}},{"name":"new_limit_admin","type":{"option":"pubkey"}},{"name":"new_flow_admin","type":{"option":"pubkey"}},{"name":"new_emissions_admin","type":{"option":"pubkey"}},{"name":"new_metadata_admin","type":{"option":"pubkey"}},{"name":"new_risk_admin","type":{"option":"pubkey"}},{"name":"emode_max_init_leverage","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"emode_max_maint_leverage","type":{"option":{"defined":{"name":"WrappedI80F48"}}}}]},{"name":"marginfi_group_initialize","docs":["(admin only) Initialize a new marginfi group. The signer becomes the group admin."],"discriminator":[255,67,67,26,94,31,34,20],"accounts":[{"name":"marginfi_group","writable":true,"signer":true},{"name":"admin","writable":true,"signer":true},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"migrate_curve","docs":["(Permissionless) Convert a bank from the legacy curve setup to the new setup, with no effect","on how interest accrues."],"discriminator":[151,254,50,13,112,235,152,72],"accounts":[{"name":"bank","writable":true}],"args":[]},{"name":"panic_pause","docs":["(global_fee_admin only) Pause the protocol. Auto-expires after 30 minutes. Limited to 3","pauses per day and 2 consecutive pauses."],"discriminator":[76,164,123,25,4,43,79,165],"accounts":[{"name":"global_fee_admin","docs":["Admin of the global FeeState (can trigger panic pause)"],"signer":true,"relations":["fee_state"]},{"name":"fee_state","docs":["Global fee state account containing the panic state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[]},{"name":"panic_unpause","docs":["(global_fee_admin only) Unpause the protocol before the auto-expiry."],"discriminator":[236,107,194,242,99,51,121,128],"accounts":[{"name":"global_fee_admin","docs":["Admin of the global FeeState (can manually unpause)"],"writable":true,"signer":true,"relations":["fee_state"]},{"name":"fee_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[]},{"name":"panic_unpause_permissionless","docs":["(permissionless) Unpause the protocol when pause time has expired"],"discriminator":[245,139,50,159,213,62,91,248],"accounts":[{"name":"fee_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[]},{"name":"propagate_fee_state","docs":["(Permissionless) Force any group to adopt the current FeeState settings"],"discriminator":[64,3,166,194,129,21,101,155],"accounts":[{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"marginfi_group","docs":["Any group, this ix is permisionless and can propagate the fee to any group"],"writable":true}],"args":[]},{"name":"propagate_staked_settings","docs":["(permissionless) Propagate updated staked settings to a staked collateral bank."],"discriminator":[210,30,152,69,130,99,222,170],"accounts":[{"name":"marginfi_group","relations":["staked_settings"]},{"name":"staked_settings"},{"name":"bank","writable":true}],"args":[]},{"name":"purge_deleverage_balance","docs":["(risk admin only) Purge a user's lending balance without withdrawing anything. Only usable","after all the debt has been settled on a bank in deleveraging mode, e.g. when","`TOKENLESS_REPAYMENTS_ALLOWED` and `TOKENLESS_REPAYMENTS_COMPLETE`. used to purge remaining","lending assets in a now-worthless bank before it is fully sunset."],"discriminator":[132,187,25,149,181,59,253,136],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"risk_admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[]},{"name":"solend_deposit","docs":["(user) Deposit into a Solend reserve through a marginfi account","* amount - in the underlying token (e.g., USDC), in native decimals"],"discriminator":[56,127,176,148,12,25,3,24],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"signer_token_account","docs":["Owned by authority, the source account for the token deposit."],"writable":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority, which owns the Solend obligation"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit tokens into Solend"],"writable":true,"relations":["bank"]},{"name":"integration_acc_2","docs":["The Solend obligation account"],"writable":true,"relations":["bank"]},{"name":"lending_market"},{"name":"lending_market_authority","docs":["Derived from the lending market"]},{"name":"integration_acc_1","docs":["The Solend reserve that holds liquidity"],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC)"],"relations":["bank"]},{"name":"reserve_liquidity_supply","docs":["Reserve's liquidity supply SPL Token account"],"writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's mint for cTokens"],"writable":true},{"name":"reserve_collateral_supply","docs":["The reserve's collateral supply account (where cTokens are stored)"],"writable":true},{"name":"user_collateral","docs":["The user's destination for cTokens (collateral). This is a temporary account owned by","liquidity_vault_authority that will hold cTokens between deposit and obligation update."],"writable":true},{"name":"pyth_price","docs":["Oracle accounts - required by Solend even if not actively used"]},{"name":"switchboard_feed"},{"name":"solend_program","address":"So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo"},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"solend_init_obligation","docs":["(permissionless) Initialize a Solend obligation for a marginfi bank","Requires a minimum deposit to ensure the obligation remains active","* amount - minimum deposit amount (at least 10 units) in native decimals"],"discriminator":[81,96,123,149,218,116,235,196],"accounts":[{"name":"fee_payer","docs":["Pays to init the obligation and pays a nominal amount to ensure the obligation has a","non-zero balance."],"writable":true,"signer":true},{"name":"bank"},{"name":"signer_token_account","docs":["The fee payer must provide a nominal amount of bank tokens so the obligation is not empty.","This amount is irrecoverable and will prevent the obligation from ever being closed."],"writable":true},{"name":"liquidity_vault_authority","docs":["The liquidity vault authority (PDA that will own the Solend obligation)"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit a nominal amount of token into the obligation."],"writable":true,"relations":["bank"]},{"name":"integration_acc_2","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,111,108,101,110,100,95,111,98,108,105,103,97,116,105,111,110]},{"kind":"account","path":"bank"}]},"relations":["bank"]},{"name":"lending_market"},{"name":"lending_market_authority","docs":["Derived from the lending market"]},{"name":"integration_acc_1","writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC)"],"writable":true,"relations":["bank"]},{"name":"reserve_liquidity_supply","writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's mint for cTokens"],"writable":true},{"name":"reserve_collateral_supply","docs":["The reserve's collateral supply account (where cTokens are stored)"],"writable":true},{"name":"user_collateral","docs":["The user's destination for cTokens (collateral). This is a temporary account owned by","liquidity_vault_authority that will hold cTokens between deposit and obligation update."],"writable":true},{"name":"pyth_price","docs":["Oracle accounts - required by Solend even if not actively used"]},{"name":"switchboard_feed"},{"name":"solend_program","address":"So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo"},{"name":"token_program"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"solend_withdraw","docs":["(user) Withdraw from a Solend reserve through a marginfi account","* amount - in collateral tokens (cTokens), in native decimals","* withdraw_all - withdraw entire position if true"],"discriminator":[238,144,170,199,21,72,155,36],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"destination_token_account","docs":["Token account that will receive the withdrawn tokens. Mint/owner are validated by the","SPL transfer; the caller controls the destination."],"writable":true},{"name":"liquidity_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"integration_acc_2","docs":["The Solend obligation account"],"writable":true,"relations":["bank"]},{"name":"lending_market","writable":true},{"name":"lending_market_authority","docs":["Derived from the lending market"]},{"name":"integration_acc_1","docs":["The Solend reserve that holds liquidity"],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC)"],"relations":["bank"]},{"name":"reserve_liquidity_supply","docs":["Reserve's liquidity supply SPL Token account"],"writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's mint for cTokens"],"writable":true},{"name":"reserve_collateral_supply","docs":["The reserve's collateral supply account (where cTokens are stored)"],"writable":true},{"name":"user_collateral","docs":["The user's destination for cTokens (collateral). This is a temporary account owned by","liquidity_vault_authority that holds cTokens."],"writable":true},{"name":"solend_program","address":"So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo"},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"},{"name":"withdraw_all","type":{"option":"bool"}}]},{"name":"start_deleverage","docs":["(risk_admin only) Begin forced deleverage on an account. Similar to start_liquidation but","does not require the account to be unhealthy."],"discriminator":[10,138,10,57,40,232,182,193],"accounts":[{"name":"marginfi_account","docs":["Account to deleverage"],"writable":true},{"name":"liquidation_record","docs":["The associated liquidation record PDA for the given `marginfi_account`"],"writable":true,"relations":["marginfi_account"]},{"name":"group","relations":["marginfi_account"]},{"name":"risk_admin","docs":["The risk admin will have the authority to withdraw/repay as if they are the user authority","until the end of the tx."],"signer":true,"relations":["group"]},{"name":"instruction_sysvar","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[]},{"name":"start_liquidation","docs":["(permissionless) Begin receivership liquidation on an unhealthy account. Snapshots health","and marks the account in receivership. Must have `end_liquidation` as the last ix in the tx."],"discriminator":[244,93,90,214,192,166,191,21],"accounts":[{"name":"marginfi_account","docs":["Account under liquidation"],"writable":true},{"name":"liquidation_record","docs":["The associated liquidation record PDA for the given `marginfi_account`"],"writable":true,"relations":["marginfi_account"]},{"name":"liquidation_receiver","docs":["This account will have the authority to withdraw/repay as if they are the user authority","until the end of the tx.",""]},{"name":"instruction_sysvar","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[]},{"name":"super_admin_deposit","docs":["(primary admin only) Deposit directly into a bank liquidity vault and raise","`asset_share_value` proportionally. No marginfi account is involved."],"discriminator":[241,189,199,17,207,225,64,75],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true,"relations":["group"]},{"name":"bank","writable":true},{"name":"admin_token_account","writable":true},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"super_admin_withdraw","docs":["(primary admin only) Withdraw directly from a bank liquidity vault and lower","`asset_share_value` proportionally. No marginfi account is involved."],"discriminator":[202,67,85,126,104,138,79,197],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true,"relations":["group"]},{"name":"bank","writable":true},{"name":"destination_token_account","writable":true},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"transfer_to_new_account","docs":["(account authority) Transfer all positions to a new account under a new authority. The old","account is disabled. Pays a flat SOL fee to the protocol."],"discriminator":[28,79,129,231,169,69,69,65],"accounts":[{"name":"group","relations":["old_marginfi_account"]},{"name":"old_marginfi_account","writable":true},{"name":"new_marginfi_account","writable":true,"signer":true},{"name":"authority","signer":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"new_authority"},{"name":"global_fee_wallet","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"transfer_to_new_account_pda","docs":["(account authority) Same as `transfer_to_new_account` except the resulting account is a PDA","","seeds:","- marginfi_group","- authority: The account authority (owner)","- account_index: A u16 value to allow multiple accounts per authority","- third_party_id: Optional u16 for third-party tagging. Seeds < PDA_FREE_THRESHOLD can be","used freely. For a dedicated seed used by just your program (via CPI), contact us."],"discriminator":[172,210,224,220,146,212,253,49],"accounts":[{"name":"group","relations":["old_marginfi_account"]},{"name":"old_marginfi_account","writable":true},{"name":"new_marginfi_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,103,105,110,102,105,95,97,99,99,111,117,110,116]},{"kind":"account","path":"group"},{"kind":"account","path":"new_authority"},{"kind":"arg","path":"account_index"},{"kind":"arg","path":"third_party_id.unwrap_or(0)"}]}},{"name":"authority","signer":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"new_authority"},{"name":"global_fee_wallet","writable":true},{"name":"instructions_sysvar","docs":["Instructions sysvar for CPI validation"],"address":"Sysvar1nstructions1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"account_index","type":"u16"},{"name":"third_party_id","type":{"option":"u16"}}]},{"name":"update_deleverage_withdrawals","docs":["(delegate_flow_admin only) Update the deleverage daily withdraw outflow with","aggregated data. The delegate flow admin aggregates","`DeleverageWithdrawFlowEvent` events off-chain and calls this instruction at intervals."],"discriminator":[56,3,181,118,27,247,207,227],"accounts":[{"name":"marginfi_group","writable":true},{"name":"delegate_flow_admin","signer":true,"relations":["marginfi_group"]}],"args":[{"name":"outflow_usd","type":"u32"},{"name":"update_seq","type":"u64"},{"name":"event_start_slot","type":"u64"},{"name":"event_end_slot","type":"u64"}]},{"name":"update_group_rate_limiter","docs":["(delegate_flow_admin only) Update the group rate limiter with aggregated","inflow/outflow. The delegate flow admin aggregates","`RateLimitFlowEvent` events off-chain, converts to USD, and calls this instruction at","intervals to update group rate limiter state."],"discriminator":[23,78,60,139,187,44,129,37],"accounts":[{"name":"marginfi_group","writable":true},{"name":"delegate_flow_admin","signer":true,"relations":["marginfi_group"]}],"args":[{"name":"outflow_usd","type":{"option":"u64"}},{"name":"inflow_usd","type":{"option":"u64"}},{"name":"update_seq","type":"u64"},{"name":"event_start_slot","type":"u64"},{"name":"event_end_slot","type":"u64"}]},{"name":"write_bank_metadata","docs":["(metadata admin only) Write ticker/description information for a bank on-chain. Optional, not","all Banks are guaranteed to have metadata."],"discriminator":[147,78,81,133,129,138,233,59],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","relations":["metadata"]},{"name":"metadata_admin","writable":true,"signer":true,"relations":["group"]},{"name":"metadata","writable":true}],"args":[{"name":"ticker","type":{"option":"bytes"}},{"name":"description","type":{"option":"bytes"}}]}],"accounts":[{"name":"Bank","discriminator":[142,49,166,242,50,66,97,188]},{"name":"BankMetadata","discriminator":[49,207,31,34,67,225,169,186]},{"name":"ExecuteOrderRecord","discriminator":[6,100,107,60,164,226,56,97]},{"name":"FeeState","discriminator":[63,224,16,85,193,36,235,220]},{"name":"Lending","discriminator":[135,199,82,16,249,131,182,241]},{"name":"LiquidationRecord","discriminator":[95,116,23,132,89,210,245,162]},{"name":"MarginfiAccount","discriminator":[67,178,130,109,126,114,28,42]},{"name":"MarginfiGroup","discriminator":[182,23,173,240,151,206,182,67]},{"name":"MinimalObligation","discriminator":[168,206,141,106,88,76,172,167]},{"name":"MinimalReserve","discriminator":[43,242,204,202,26,247,59,127]},{"name":"MinimalSpotMarket","discriminator":[100,177,8,107,168,65,65,39]},{"name":"MinimalUser","discriminator":[159,117,95,227,239,151,58,236]},{"name":"Order","discriminator":[134,173,223,185,77,86,28,51]},{"name":"SolendMinimalReserve","discriminator":[1]},{"name":"StakedSettings","discriminator":[157,140,6,77,89,173,173,125]}],"events":[{"name":"DeleverageEvent","discriminator":[161,8,108,204,209,198,12,30]},{"name":"DeleverageWithdrawFlowEvent","discriminator":[109,90,139,200,10,204,84,176]},{"name":"EditStakedSettingsEvent","discriminator":[29,58,155,191,75,220,145,206]},{"name":"HealthPulseEvent","discriminator":[183,159,218,110,61,220,65,1]},{"name":"KeeperCloseOrderEvent","discriminator":[46,152,11,174,92,157,77,64]},{"name":"LendingAccountBorrowEvent","discriminator":[223,96,81,10,156,99,26,59]},{"name":"LendingAccountDepositEvent","discriminator":[161,54,237,217,105,248,122,151]},{"name":"LendingAccountLiquidateEvent","discriminator":[166,160,249,154,183,39,23,242]},{"name":"LendingAccountRepayEvent","discriminator":[16,220,55,111,7,80,16,25]},{"name":"LendingAccountWithdrawEvent","discriminator":[3,220,148,243,33,249,54,88]},{"name":"LendingPoolBankAccrueInterestEvent","discriminator":[104,117,187,156,111,154,106,186]},{"name":"LendingPoolBankCollectFeesEvent","discriminator":[101,119,97,250,169,175,156,253]},{"name":"LendingPoolBankConfigureEvent","discriminator":[246,35,233,110,93,152,235,40]},{"name":"LendingPoolBankConfigureFrozenEvent","discriminator":[24,10,55,18,49,150,157,179]},{"name":"LendingPoolBankConfigureOracleEvent","discriminator":[119,140,110,253,150,64,210,62]},{"name":"LendingPoolBankCreateEvent","discriminator":[236,220,201,63,239,126,136,249]},{"name":"LendingPoolBankHandleBankruptcyEvent","discriminator":[166,77,41,140,36,94,10,57]},{"name":"LendingPoolBankSetFixedOraclePriceEvent","discriminator":[65,72,8,85,229,20,90,26]},{"name":"LendingPoolSuperAdminDepositEvent","discriminator":[99,152,211,30,58,165,210,71]},{"name":"LendingPoolSuperAdminWithdrawEvent","discriminator":[107,168,232,181,144,161,252,37]},{"name":"LiquidationReceiverEvent","discriminator":[40,131,224,220,151,83,24,230]},{"name":"MarginfiAccountCloseOrderEvent","discriminator":[158,34,122,98,23,146,229,212]},{"name":"MarginfiAccountCreateEvent","discriminator":[183,5,117,104,122,199,68,51]},{"name":"MarginfiAccountFreezeEvent","discriminator":[219,219,57,178,75,86,146,122]},{"name":"MarginfiAccountPlaceOrderEvent","discriminator":[1,105,79,28,142,242,99,145]},{"name":"MarginfiAccountTransferToNewAccount","discriminator":[59,105,171,110,223,136,80,89]},{"name":"MarginfiGroupConfigureEvent","discriminator":[241,104,172,167,41,195,199,170]},{"name":"MarginfiGroupCreateEvent","discriminator":[233,125,61,14,98,240,136,253]},{"name":"RateLimitFlowEvent","discriminator":[229,5,73,200,0,107,105,109]},{"name":"SetKeeperCloseFlagsEvent","discriminator":[193,230,93,128,117,87,96,21]}],"errors":[{"code":6000,"name":"InternalLogicError","msg":"Internal Marginfi logic error"},{"code":6001,"name":"BankNotFound","msg":"Invalid bank index"},{"code":6002,"name":"LendingAccountBalanceNotFound","msg":"Lending account balance not found"},{"code":6003,"name":"BankAssetCapacityExceeded","msg":"Bank deposit capacity exceeded"},{"code":6004,"name":"InvalidTransfer","msg":"Invalid transfer"},{"code":6005,"name":"MissingPythOrBankAccount","msg":"Missing Oracle, Bank, LST mint, or Sol Pool"},{"code":6006,"name":"MissingPythAccount","msg":"Missing Pyth account"},{"code":6007,"name":"MissingBankAccount","msg":"Missing Bank account"},{"code":6008,"name":"InvalidBankAccount","msg":"Invalid Bank account"},{"code":6009,"name":"RiskEngineInitRejected","msg":"RiskEngine rejected due to either bad health or stale oracles"},{"code":6010,"name":"LendingAccountBalanceSlotsFull","msg":"Lending account balance slots are full"},{"code":6011,"name":"BankAlreadyExists","msg":"Bank already exists"},{"code":6012,"name":"ZeroLiquidationAmount","msg":"Amount to liquidate must be positive"},{"code":6013,"name":"AccountNotBankrupt","msg":"Account is not bankrupt"},{"code":6014,"name":"BalanceNotBadDebt","msg":"Account balance is not bad debt"},{"code":6015,"name":"InvalidConfig","msg":"Invalid group config"},{"code":6016,"name":"BankPaused","msg":"Bank paused"},{"code":6017,"name":"BankReduceOnly","msg":"Bank is ReduceOnly mode"},{"code":6018,"name":"BankAccountNotFound","msg":"Bank is missing"},{"code":6019,"name":"OperationDepositOnly","msg":"Operation is deposit-only"},{"code":6020,"name":"OperationWithdrawOnly","msg":"Operation is withdraw-only"},{"code":6021,"name":"OperationBorrowOnly","msg":"Operation is borrow-only"},{"code":6022,"name":"OperationRepayOnly","msg":"Operation is repay-only"},{"code":6023,"name":"NoAssetFound","msg":"No asset found"},{"code":6024,"name":"NoLiabilityFound","msg":"No liability found"},{"code":6025,"name":"InvalidOracleSetup","msg":"Invalid oracle setup"},{"code":6026,"name":"IllegalUtilizationRatio","msg":"Invalid bank utilization ratio"},{"code":6027,"name":"BankLiabilityCapacityExceeded","msg":"Bank borrow cap exceeded"},{"code":6028,"name":"InvalidPrice","msg":"Invalid Price"},{"code":6029,"name":"IsolatedAccountIllegalState","msg":"Account can have only one liability when account is under isolated risk"},{"code":6030,"name":"EmissionsAlreadySetup","msg":"Emissions already setup"},{"code":6031,"name":"OracleNotSetup","msg":"Oracle is not set"},{"code":6032,"name":"InvalidSwitchboardDecimalConversion","msg":"Invalid switchboard decimal conversion"},{"code":6033,"name":"CannotCloseOutstandingEmissions","msg":"Cannot close balance because of outstanding emissions"},{"code":6034,"name":"EmissionsUpdateError","msg":"Update emissions error"},{"code":6035,"name":"AccountDisabled","msg":"Account disabled"},{"code":6036,"name":"AccountTempActiveBalanceLimitExceeded","msg":"Account can't temporarily open 3 balances, please close a balance first"},{"code":6037,"name":"AccountInFlashloan","msg":"Illegal action during flashloan"},{"code":6038,"name":"IllegalFlashloan","msg":"Illegal flashloan"},{"code":6039,"name":"IllegalFlag","msg":"Illegal flag"},{"code":6040,"name":"IllegalBalanceState","msg":"Illegal balance state"},{"code":6041,"name":"IllegalAccountAuthorityTransfer","msg":"Illegal account authority transfer"},{"code":6042,"name":"Unauthorized","msg":"Unauthorized"},{"code":6043,"name":"IllegalAction","msg":"Invalid account authority"},{"code":6044,"name":"T22MintRequired","msg":"Token22 Banks require mint account as first remaining account"},{"code":6045,"name":"InvalidFeeAta","msg":"Invalid ATA for global fee account"},{"code":6046,"name":"AddedStakedPoolManually","msg":"Use add pool permissionless instead"},{"code":6047,"name":"AssetTagMismatch","msg":"Staked SOL accounts can only deposit staked assets and borrow SOL"},{"code":6048,"name":"StakePoolValidationFailed","msg":"Stake pool validation failed: check the stake pool, mint, or sol pool"},{"code":6049,"name":"SwitchboardStalePrice","msg":"Switchboard oracle: stale price"},{"code":6050,"name":"PythPushStalePrice","msg":"Pyth Push oracle: stale price"},{"code":6051,"name":"WrongNumberOfOracleAccounts","msg":"Oracle error: wrong number of accounts"},{"code":6052,"name":"WrongOracleAccountKeys","msg":"Oracle error: wrong account keys"},{"code":6053,"name":"Vacated2","msg":"Vacated2"},{"code":6054,"name":"Vacated3","msg":"Vacated3"},{"code":6055,"name":"OracleMaxConfidenceExceeded","msg":"Oracle max confidence exceeded: try again later"},{"code":6056,"name":"PythPushInsufficientVerificationLevel","msg":"Pyth Push oracle: insufficient verification level"},{"code":6057,"name":"ZeroAssetPrice","msg":"Zero asset price"},{"code":6058,"name":"ZeroLiabilityPrice","msg":"Zero liability price"},{"code":6059,"name":"SwitchboardWrongAccountOwner","msg":"Switchboard oracle: wrong account owner"},{"code":6060,"name":"PythPushInvalidAccount","msg":"Pyth Push oracle: invalid account"},{"code":6061,"name":"SwitchboardInvalidAccount","msg":"Switchboard oracle: invalid account"},{"code":6062,"name":"MathError","msg":"Math error"},{"code":6063,"name":"InvalidEmissionsDestinationAccount","msg":"Invalid emissions destination account"},{"code":6064,"name":"SameAssetAndLiabilityBanks","msg":"Asset and liability bank cannot be the same"},{"code":6065,"name":"OverliquidationAttempt","msg":"Trying to withdraw more assets than available"},{"code":6066,"name":"NoLiabilitiesInLiabilityBank","msg":"Liability bank has no liabilities"},{"code":6067,"name":"AssetsInLiabilityBank","msg":"Liability bank has assets"},{"code":6068,"name":"HealthyAccount","msg":"Account is healthy and cannot be liquidated"},{"code":6069,"name":"ExhaustedLiability","msg":"Liability payoff too severe, exhausted liability"},{"code":6070,"name":"TooSeverePayoff","msg":"Liability payoff too severe, liability balance has assets"},{"code":6071,"name":"TooSevereLiquidation","msg":"Liquidation too severe, account above maintenance requirement"},{"code":6072,"name":"WorseHealthPostLiquidation","msg":"Liquidation would worsen account health"},{"code":6073,"name":"IntegrationPositionLimitExceeded","msg":"Exceeded the maximum allowed integration positions"},{"code":6074,"name":"MaxInitLeverageExceeded","msg":"Maximum initial leverage exceeded"},{"code":6075,"name":"BadEmodeConfig","msg":"The Emode config was invalid"},{"code":6076,"name":"PythPushInvalidWindowSize","msg":"TWAP window size does not match expected duration"},{"code":6077,"name":"InvalidFeesDestinationAccount","msg":"Invalid fees destination account"},{"code":6078,"name":"BankCannotClose","msg":"Banks cannot close when they have open positions or emissions outstanding"},{"code":6079,"name":"AccountAlreadyMigrated","msg":"Account already migrated"},{"code":6080,"name":"ProtocolPaused","msg":"Protocol is paused"},{"code":6081,"name":"MetadataTooLong","msg":"Metadata is too long"},{"code":6082,"name":"PauseLimitExceeded","msg":"Pause limit exceeded"},{"code":6083,"name":"ProtocolNotPaused","msg":"Protocol is not paused"},{"code":6084,"name":"BankKilledByBankruptcy","msg":"Bank killed by bankruptcy: bank shutdown and value of all holdings is zero"},{"code":6085,"name":"UnexpectedLiquidationState","msg":"Liquidation state issue. Check start before end, end last, and both unique"},{"code":6086,"name":"StartNotFirst","msg":"Liquidation start must be first instruction (other than compute program ixes)"},{"code":6087,"name":"StartRepeats","msg":"Only one liquidation event allowed per tx"},{"code":6088,"name":"EndNotLast","msg":"The end instruction must be the last ix in the tx"},{"code":6089,"name":"ForbiddenIx","msg":"Tried to call an instruction that is forbidden during liquidation"},{"code":6090,"name":"LiquidationPremiumTooHigh","msg":"Seized too much of the asset relative to liability repaid"},{"code":6091,"name":"NotAllowedInCPI","msg":"Start and end liquidation and flashloan must be top-level instructions"},{"code":6092,"name":"ZeroSupplyInStakePool","msg":"Stake pool supply is zero: cannot compute price"},{"code":6093,"name":"InvalidGroup","msg":"Invalid group: account constraint violated"},{"code":6094,"name":"InvalidLiquidityVault","msg":"Invalid liquidity vault: account constraint violated"},{"code":6095,"name":"InvalidLiquidationRecord","msg":"Invalid liquidation record: account constraint violated"},{"code":6096,"name":"InvalidLiquidationReceiver","msg":"Invalid liquidation receiver: account constraint violated"},{"code":6097,"name":"InvalidEmissionsMint","msg":"Invalid emissions mint: account constraint violated"},{"code":6098,"name":"InvalidMint","msg":"Invalid mint: account constraint violated"},{"code":6099,"name":"InvalidFeeWallet","msg":"Invalid fee wallet: account constraint violated"},{"code":6100,"name":"FixedOraclePriceNegative","msg":"Fixed oracle price must be zero or greater"},{"code":6101,"name":"DailyWithdrawalLimitExceeded","msg":"Daily withdrawal limit exceeded: try again later"},{"code":6102,"name":"ZeroWithdrawalLimit","msg":"Cannot set daily withdrawal limit to zero"},{"code":6103,"name":"AccountFrozen","msg":"Account is frozen by the group admin"},{"code":6104,"name":"DuplicateBalance","msg":"Cannot reference duplicate balances"},{"code":6105,"name":"InvalidBalanceCount","msg":"Invalid amount of balances referenced"},{"code":6106,"name":"LiquidatorOrderCloseNotAllowed","msg":"Liquidator not allowed to close order"},{"code":6107,"name":"OrderTriggerNotMet","msg":"Order trigger is yet to be met"},{"code":6108,"name":"UnexpectedOrderExecutionState","msg":"Order execution state issue. Check the necessary invariants i.e not in flashloan or disabled e.t.c"},{"code":6109,"name":"OrderLiabilityNotClosed","msg":"Order liability not closed"},{"code":6110,"name":"InvalidAssetOrLiabilitiesCount","msg":"Invalid asset or liabilities count"},{"code":6111,"name":"WorseHealthPostExecution","msg":"Account health can only worsen if account is healthy"},{"code":6112,"name":"InvalidOrderTakeProfitOrStopLoss","msg":"TP must be > 0, SL must be > 0 and TP > SL if both are set"},{"code":6113,"name":"InvalidSlippage","msg":"Max slippage must be less than 100%"},{"code":6114,"name":"OrderExecutionOverWithdrawal","msg":"Executor withdrew too much: slippage or max fee constraint violated"},{"code":6115,"name":"BankHourlyRateLimitExceeded","msg":"Bank hourly rate limit exceeded: try again later"},{"code":6116,"name":"BankDailyRateLimitExceeded","msg":"Bank daily rate limit exceeded: try again later"},{"code":6117,"name":"GroupHourlyRateLimitExceeded","msg":"Group hourly rate limit exceeded: try again later"},{"code":6118,"name":"GroupDailyRateLimitExceeded","msg":"Group daily rate limit exceeded: try again later"},{"code":6119,"name":"InvalidRateLimitPrice","msg":"Invalid rate limit price: pass oracle or pre-crank cache"},{"code":6120,"name":"GroupRateLimiterUpdateEmpty","msg":"Group rate limiter admin update must include inflow and/or outflow"},{"code":6121,"name":"GroupRateLimiterUpdateInvalidSlotRange","msg":"Group rate limiter admin update slot range is invalid"},{"code":6122,"name":"GroupRateLimiterUpdateFutureSlot","msg":"Group rate limiter admin update cannot reference future slots"},{"code":6123,"name":"GroupRateLimiterUpdateStale","msg":"Group rate limiter admin update is too stale"},{"code":6124,"name":"GroupRateLimiterUpdateOutOfOrderSlot","msg":"Group rate limiter admin update slot progression is out of order"},{"code":6125,"name":"GroupRateLimiterUpdateOutOfOrderSeq","msg":"Group rate limiter admin update sequence is out of order"},{"code":6126,"name":"DeleverageWithdrawalUpdateEmpty","msg":"Deleverage withdrawal admin update must include outflow"},{"code":6127,"name":"DeleverageWithdrawalUpdateInvalidSlotRange","msg":"Deleverage withdrawal admin update slot range is invalid"},{"code":6128,"name":"DeleverageWithdrawalUpdateFutureSlot","msg":"Deleverage withdrawal admin update cannot reference future slots"},{"code":6129,"name":"DeleverageWithdrawalUpdateStale","msg":"Deleverage withdrawal admin update is too stale"},{"code":6130,"name":"DeleverageWithdrawalUpdateOutOfOrderSlot","msg":"Deleverage withdrawal admin update slot progression is out of order"},{"code":6131,"name":"DeleverageWithdrawalUpdateOutOfOrderSeq","msg":"Deleverage withdrawal admin update sequence is out of order"},{"code":6200,"name":"WrongAssetTagForStandardInstructions","msg":"Wrong asset tag for standard instructions, expected DEFAULT, SOL, or STAKED asset tag"},{"code":6201,"name":"WrongAssetTagForKaminoInstructions","msg":"Wrong asset tag for Kamino instructions, expected KAMINO asset tag"},{"code":6202,"name":"CantAddPool","msg":"Cannot create a kamino bank with this instruction, use add_bank_kamino"},{"code":6203,"name":"KaminoReserveMintAddressMismatch","msg":"Kamino reserve mint address doesn't match the bank mint address"},{"code":6204,"name":"KaminoDepositFailed","msg":"Deposit failed: obligation deposit amount increase did not match the expected increase, left - actual, right - expected"},{"code":6205,"name":"KaminoWithdrawFailed","msg":"Withdraw failed: token vault increase did not match the expected increase, left - actual, right - expected"},{"code":6206,"name":"ReserveStale","msg":"Kamino Reserve data is stale - run refresh_reserve on kamino program first"},{"code":6207,"name":"InvalidObligationDepositCount","msg":"Kamino obligation must have exactly one active deposit, at index 0"},{"code":6208,"name":"ObligationDepositReserveMismatch","msg":"Kamino obligation deposit doesn't match the expected reserve"},{"code":6209,"name":"ObligationInitDepositInsufficient","msg":"Failed to meet minimum deposit amount requirement for init obligation"},{"code":6210,"name":"KaminoReserveValidationFailed","msg":"Kamino reserve validation failed"},{"code":6211,"name":"KaminoInvalidOracleSetup","msg":"Invalid oracle setup: only KaminoPythPush and KaminoSwitchboardPull are supported"},{"code":6212,"name":"MaxMaintLeverageExceeded","msg":"Maximum Maintenance leverage exceeded"},{"code":6213,"name":"InvalidKaminoReserve","msg":"Invalid Kamino reserve: account constraint violated"},{"code":6214,"name":"InvalidKaminoObligation","msg":"Invalid Kamino obligation: account constraint violated"},{"code":6300,"name":"DriftInvalidOracleSetup","msg":"Invalid oracle setup: only DriftPythPull and DriftSwitchboardPull are supported"},{"code":6301,"name":"DriftSpotMarketMintMismatch","msg":"Drift spot market mint does not match bank mint"},{"code":6302,"name":"WrongBankAssetTagForDriftOperation","msg":"Wrong bank asset tag for Drift operation"},{"code":6303,"name":"CantUseStandardOperationsOnDriftAssets","msg":"Cannot use standard operations on Drift assets"},{"code":6304,"name":"DriftSpotMarketValidationFailed","msg":"Drift spot market validation failed"},{"code":6305,"name":"DriftInvalidSpotPositions","msg":"Drift user has invalid spot positions (only first position can have balance)"},{"code":6306,"name":"DriftSpotPositionMarketMismatch","msg":"Drift spot position market does not match bank's configured market"},{"code":6307,"name":"DriftInvalidPositionType","msg":"Drift position has invalid balance type (must be deposit)"},{"code":6308,"name":"DriftScaledBalanceMismatch","msg":"Drift scaled balance change does not match expected amount"},{"code":6309,"name":"DriftWithdrawFailed","msg":"Drift withdrawal failed - token amount mismatch"},{"code":6310,"name":"DriftUserInitDepositInsufficient","msg":"Drift user initial deposit insufficient (minimum 10 units required)"},{"code":6311,"name":"InvalidDriftAccount","msg":"Invalid drift account"},{"code":6312,"name":"DriftAuthorityMismatch","msg":"Drift authority mismatch"},{"code":6313,"name":"DriftInvalidHarvestPositionIndex","msg":"Invalid harvest position index - must be between 2 and 7"},{"code":6314,"name":"DriftPositionEmpty","msg":"Drift position is empty"},{"code":6315,"name":"DriftInvalidBalanceType","msg":"Drift position has invalid balance type"},{"code":6316,"name":"DriftNoAdminDeposit","msg":"No admin deposits found in Drift positions 2-7 for this market"},{"code":6317,"name":"DriftHarvestSameMarket","msg":"Cannot harvest from the same market as the bank's main drift spot market"},{"code":6318,"name":"DriftBrickedAccount","msg":"Drift account bricked: too many active deposits from admin operations"},{"code":6319,"name":"DriftMissingRewardOracle","msg":"Drift reward oracle required when 2+ active deposits exist"},{"code":6320,"name":"DriftMissingRewardSpotMarket","msg":"Drift reward spot market required when 2+ active deposits exist"},{"code":6321,"name":"DriftMissingRewardAccounts","msg":"Drift account has admin deposits that require reward accounts to be provided"},{"code":6322,"name":"DriftSpotMarketStale","msg":"Drift spot market is stale, interest needs to be updated"},{"code":6323,"name":"InvalidDriftSpotMarket","msg":"Invalid Drift spot market: account constraint violated"},{"code":6324,"name":"InvalidDriftUser","msg":"Invalid Drift user: account constraint violated"},{"code":6325,"name":"InvalidDriftUserStats","msg":"Invalid Drift user stats: account constraint violated"},{"code":6326,"name":"DriftUnsupportedTokenDecimals","msg":"Drift cannot support tokens with more than 19 decimals"},{"code":6400,"name":"SolendInvalidOracleSetup","msg":"Invalid oracle setup: only SolendPythPull and SolendSwitchboardPull are supported"},{"code":6401,"name":"SolendReserveValidationFailed","msg":"Solend reserve validation failed"},{"code":6402,"name":"SolendObligationOwnerMismatch","msg":"Solend obligation owner mismatch"},{"code":6403,"name":"WrongBankAssetTagForSolendOperation","msg":"Wrong bank asset tag for Solend operation"},{"code":6404,"name":"CantUseStandardOperationsOnSolendAssets","msg":"Cannot use standard operations on Solend assets"},{"code":6405,"name":"SolendReserveMismatch","msg":"Solend reserve mismatch"},{"code":6406,"name":"SolendReserveMintMismatch","msg":"Solend reserve mint mismatch"},{"code":6407,"name":"SolendInvalidDepositPositions","msg":"Solend obligation has invalid deposits (only first position can have balance)"},{"code":6408,"name":"SolendDepositPositionReserveMismatch","msg":"Solend deposit position reserve does not match bank's configured reserve"},{"code":6409,"name":"SolendCTokenBalanceMismatch","msg":"Solend cToken balance change does not match expected amount"},{"code":6410,"name":"SolendWithdrawFailed","msg":"Solend withdrawal failed - token amount mismatch"},{"code":6411,"name":"SolendReserveStale","msg":"Solend reserve is stale"},{"code":6412,"name":"SolendDepositFailed","msg":"Solend deposit failed - collateral amount mismatch"},{"code":6413,"name":"InvalidSolendAccount","msg":"Invalid Solend account owner"},{"code":6414,"name":"InvalidSolendAccountVersion","msg":"Invalid Solend account version"},{"code":6415,"name":"InvalidSolendReserve","msg":"Invalid Solend reserve: account constraint violated"},{"code":6416,"name":"InvalidSolendObligation","msg":"Invalid Solend obligation: account constraint violated"},{"code":6500,"name":"JuplendInvalidOracleSetup","msg":"Invalid oracle setup: only JuplendPythPull and JuplendSwitchboardPull are supported"},{"code":6501,"name":"JuplendLendingValidationFailed","msg":"Juplend lending state validation failed"},{"code":6502,"name":"WrongBankAssetTagForJuplendOperation","msg":"Wrong bank asset tag for Juplend operation"},{"code":6503,"name":"CantUseStandardOperationsOnJuplendAssets","msg":"Cannot use standard operations on Juplend assets"},{"code":6504,"name":"JuplendLendingStale","msg":"Juplend lending state is stale"},{"code":6505,"name":"InvalidJuplendLending","msg":"Invalid Juplend lending: account constraint violated"},{"code":6506,"name":"JuplendLendingMintMismatch","msg":"Juplend lending mint mismatch"},{"code":6507,"name":"JuplendBankAlreadyActivated","msg":"Juplend bank is already activated"},{"code":6508,"name":"InvalidJuplendFTokenVault","msg":"Invalid Juplend fToken vault"},{"code":6509,"name":"JuplendDepositFailed","msg":"Juplend deposit failed"},{"code":6510,"name":"JuplendWithdrawFailed","msg":"Juplend withdraw failed"},{"code":6511,"name":"JuplendInitPositionDepositInsufficient","msg":"Juplend init position deposit insufficient"},{"code":6512,"name":"InvalidJuplendWithdrawIntermediaryAta","msg":"Invalid Juplend withdraw intermediary ATA"}],"types":[{"name":"AccountEventHeader","type":{"kind":"struct","fields":[{"name":"signer","type":{"option":"pubkey"}},{"name":"marginfi_account","type":"pubkey"},{"name":"marginfi_account_authority","type":"pubkey"},{"name":"marginfi_group","type":"pubkey"}]}},{"name":"Balance","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"active","docs":["Whether this balance slot is in use (nonzero = active)"],"type":"u8"},{"name":"bank_pk","docs":["The bank this balance corresponds to"],"type":"pubkey"},{"name":"bank_asset_tag","docs":["Inherited from the bank when the position is first created and CANNOT BE CHANGED after that.","Note that all balances created before the addition of this feature use `ASSET_TAG_DEFAULT`"],"type":"u8"},{"name":"tag","docs":["Tag used by orders to reference this balance (0 means unused/unassigned).","A tag may also have a non-zero value while having no orders."],"type":"u16"},{"name":"_pad0","type":{"array":["u8",4]}},{"name":"asset_shares","docs":["The user's asset (deposit) shares in the bank. Multiply by `bank.asset_share_value` for","the token amount."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_shares","docs":["The user's liability (borrow) shares in the bank. Multiply by `bank.liability_share_value`","for the token amount."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"emissions_outstanding","docs":["Unclaimed emissions rewards for this position"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"last_update","docs":["Unix timestamp (u64) of the last emissions calculation for this position"],"type":"u64"},{"name":"_padding","docs":["Reserved for future use"],"type":{"array":["u64",1]}}]}},{"name":"Bank","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"mint","docs":["The SPL token mint this bank manages"],"type":"pubkey"},{"name":"mint_decimals","docs":["Number of decimals of the `mint`. Must be < 24."],"type":"u8"},{"name":"group","docs":["The `MarginfiGroup` this bank belongs to"],"type":"pubkey"},{"name":"_pad0","type":{"array":["u8",7]}},{"name":"asset_share_value","docs":["Monotonically increases as interest rate accumulates. For typical banks, a user's asset","value in token = (number of shares the user has * asset_share_value).","* A float (arbitrary decimals)","* Initially 1"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_share_value","docs":["Monotonically increases as interest rate accumulates. For typical banks, a user's liabilty","value in token = (number of shares the user has * liability_share_value)","* A float (arbitrary decimals)","* Initially 1"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidity_vault","docs":["The SPL token account holding deposited liquidity"],"type":"pubkey"},{"name":"liquidity_vault_bump","docs":["PDA bump for the liquidity vault"],"type":"u8"},{"name":"liquidity_vault_authority_bump","docs":["PDA bump for the liquidity vault authority"],"type":"u8"},{"name":"insurance_vault","docs":["The SPL token account holding insurance fund tokens"],"type":"pubkey"},{"name":"insurance_vault_bump","docs":["PDA bump for the insurance vault"],"type":"u8"},{"name":"insurance_vault_authority_bump","docs":["PDA bump for the insurance vault authority"],"type":"u8"},{"name":"_pad1","type":{"array":["u8",4]}},{"name":"collected_insurance_fees_outstanding","docs":["Fees collected and pending withdraw for the `insurance_vault`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"fee_vault","docs":["The SPL token account holding collected group fees"],"type":"pubkey"},{"name":"fee_vault_bump","docs":["PDA bump for the fee vault"],"type":"u8"},{"name":"fee_vault_authority_bump","docs":["PDA bump for the fee vault authority"],"type":"u8"},{"name":"_pad2","type":{"array":["u8",6]}},{"name":"collected_group_fees_outstanding","docs":["Fees collected and pending withdraw for the `fee_vault`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"total_liability_shares","docs":["Sum of all liability shares held by all borrowers in this bank.","Multiply by `liability_share_value` to get the total liability amount in native token units."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"total_asset_shares","docs":["Sum of all asset shares held by all depositors in this bank.","Multiply by `asset_share_value` to get the total asset amount in native token units.","* For Kamino banks, this is the quantity of collateral tokens (NOT liquidity tokens) in the","bank, and also uses `mint_decimals`, though the mint itself will always show (6) decimals","exactly (i.e Kamino ignores this and treats it as if it was using `mint_decimals`)"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"last_update","docs":["Unix timestamp (i64) of the last interest accrual"],"type":"i64"},{"name":"config","docs":["The bank's configuration parameters (weights, limits, oracle setup, interest rate config)"],"type":{"defined":{"name":"BankConfig"}}},{"name":"flags","docs":["Bank flags bitfield (u64).","","- Bit 0 (1): `EMISSIONS_FLAG_BORROW_ACTIVE` — borrow-side emissions are active","- Bit 1 (2): `EMISSIONS_FLAG_LENDING_ACTIVE` — lending-side emissions are active","- Bit 2 (4): `PERMISSIONLESS_BAD_DEBT_SETTLEMENT_FLAG` — anyone can settle bad debt","- Bit 3 (8): `FREEZE_SETTINGS` — bank configuration is frozen (only limits can change)","- Bit 4 (16): `CLOSE_ENABLED_FLAG` — bank can be closed (set at creation for banks >= 0.1.4)","- Bit 5 (32): `TOKENLESS_REPAYMENTS_ALLOWED` — risk admin can repay debt without tokens","- Bit 6 (64): `TOKENLESS_REPAYMENTS_COMPLETE` — all debt cleared, lender purge enabled"],"type":"u64"},{"name":"emissions_rate","docs":["Emissions APR. Number of emitted tokens (emissions_mint) per 1e(bank.mint_decimal) tokens","(bank mint) (native amount) per 1 YEAR."],"type":"u64"},{"name":"emissions_remaining","docs":["Remaining emissions tokens available for distribution"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"emissions_mint","docs":["The SPL token mint used for emissions rewards"],"type":"pubkey"},{"name":"collected_program_fees_outstanding","docs":["Fees collected and pending withdraw for the `FeeState.global_fee_wallet`'s canonical ATA for `mint`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"emode","docs":["Controls this bank's emode configuration, which enables some banks to treat the assets of","certain other banks more preferentially as collateral."],"type":{"defined":{"name":"EmodeSettings"}}},{"name":"fees_destination_account","docs":["Set with `update_fees_destination_account`. Fees can be withdrawn to the canonical ATA of","this wallet without the admin's input (withdraw_fees_permissionless). If pubkey default, the","bank doesn't support this feature, and the fees must be collected manually (withdraw_fees)."],"type":"pubkey"},{"name":"cache","docs":["Cached bank metrics (interest rates, oracle price, etc.)"],"type":{"defined":{"name":"BankCache"}}},{"name":"lending_position_count","docs":["Number of user lending positions currently open in this bank","* For banks created prior to 0.1.4, this is the number of positions opened/closed after","0.1.4 goes live, and may be negative.","* For banks created in 0.1.4 or later, this is the number of positions open in total, and","the bank may safely be closed if this is zero. Will never go negative."],"type":"i32"},{"name":"borrowing_position_count","docs":["Number of user borrowing positions currently open in this bank","* For banks created prior to 0.1.4, this is the number of positions opened/closed after","0.1.4 goes live, and may be negative.","* For banks created in 0.1.4 or later, this is the number of positions open in total, and","the bank may safely be closed if this is zero. Will never go negative."],"type":"i32"},{"name":"_padding_0","docs":["Reserved for future use"],"type":{"array":["u8",16]}},{"name":"integration_acc_1","docs":["Integration account slot 1 (default Pubkey for non-integrations).","- Kamino: reserve","- Drift: spot market","- Solend: reserve","- JupLend: lending state"],"type":"pubkey"},{"name":"integration_acc_2","docs":["Integration account slot 2 (default Pubkey for non-integrations).","- Kamino: obligation","- Drift: user","- Solend: obligation","- JupLend: fToken vault"],"type":"pubkey"},{"name":"integration_acc_3","docs":["Integration account slot 3 (default Pubkey for non-integrations).","- Drift: user stats","- JupLend: withdraw intermediary ATA (ATA of liquidity_vault_authority for bank mint)"],"type":"pubkey"},{"name":"rate_limiter","docs":["Rate limiter for controlling withdraw/borrow outflow.","Tracks net outflow (outflows - inflows) in native tokens."],"type":{"defined":{"name":"BankRateLimiter"}}},{"name":"_pad_0","type":{"array":["u8",16]}},{"name":"_padding_1","type":{"array":[{"array":["u64",2]},7]}}]}},{"name":"BankCache","docs":["A read-only cache of the bank's key metrics, e.g. spot interest/fee rates."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_rate","docs":["Actual (spot) interest/fee rates of the bank, based on utilization","* APR (annual percentage rate) values","* From 0-1000%, as u32, e.g. u32::MAX = 1000%, u32::MAX/2 = 500%, etc"],"type":"u32"},{"name":"lending_rate","docs":["Equivalent to `base_rate` * utilization","* From 0-1000%, as u32, e.g. u32::MAX = 1000%, u32::MAX/2 = 500%, etc"],"type":"u32"},{"name":"borrowing_rate","docs":["Equivalent to `base_rate` * (1 + ir_fees) + fixed_fees","* From 0-1000%, as u32, e.g. u32::MAX = 1000%, u32::MAX/2 = 500%, etc"],"type":"u32"},{"name":"interest_accumulated_for","docs":["* in seconds"],"type":"u32"},{"name":"accumulated_since_last_update","docs":["equivalent to (share value increase in the last `interest_accumulated_for` seconds *","shares), i.e. the delta in `asset_share_value`, in token.","* Note: if the tx that triggered this cache update increased or decreased the net shares,","this value still reports using the PRE-CHANGE share amount, since interest is always","earned on that amount.","* in token, in native decimals, as I80F48"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"last_oracle_price","docs":["Oracle price used in the last instruction that consumed an oracle price","* Only updated when instruction uses an oracle price, not updated for operations that don't","require prices (e.g., deposit, repay)","* Price in USD, with no price bias","* Zero if never updated"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"last_oracle_price_timestamp","docs":["Unix timestamp (seconds) when last_oracle_price was last updated","* Used to determine staleness of cached price","* Zero if never updated"],"type":"i64"},{"name":"last_oracle_price_confidence","docs":["Confidence interval reported by the oracle when last_oracle_price was fetched","* Always non-negative","* Zero if never updated","* Note: this value is the confidence reported by oracles, multiplied by `STD_DEV_MULTIPLE`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liq_cache_flags","docs":["Liquidation cache flags, set during receivership flow.","* 1 (LIQ_CACHE_LOCKED_FLAG) - We \"lock\" the liquidation cache when writing to it in Start","Liquidate as an additional safeguard, if the liquidation prices stored here were to be","edited between start and end, it would completely break the risk engine. End validates that","the lock is set, panics if not, and removes it - which prevents footguns if the cache was","e.g. accidently set to default. The lock is also removed when a Balance is closed via","withdraw_all, repay_all, or close_balance, but only when the account has","ACCOUNT_IN_RECEIVERSHIP set, so that operations on unrelated accounts sharing the same","bank do not interfere with an in-progress liquidation."],"type":"u8"},{"name":"_padding","type":{"array":["u8",23]}},{"name":"liquidation_price_rt","docs":["Cached real-time price for receivership liquidation."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidation_price_rt_confidence","docs":["Cached real-time price confidence for receivership liquidation."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidation_price_twap","docs":["Cached TWAP price for receivership liquidation."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidation_price_twap_confidence","docs":["Cached TWAP price confidence for receivership liquidation."],"type":{"defined":{"name":"WrappedI80F48"}}}]}},{"name":"BankConfig","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"asset_weight_init","docs":["Discount factor for asset values in initial margin calculation (0 to 1).","E.g., 0.8 means assets count as 80% of their value for borrowing purposes."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","docs":["Discount factor for asset values in maintenance margin calculation (0 to 2).","Used for liquidation eligibility. Generally >= asset_weight_init."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_weight_init","docs":["Premium factor for liability values in initial margin calculation (>= 1).","E.g., 1.2 means liabilities count as 120% of their value for borrowing purposes."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_weight_maint","docs":["Premium factor for liability values in maintenance margin calculation (>= 1).","Used for liquidation eligibility. Generally <= liability_weight_init."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","docs":["Maximum total deposits allowed in this bank, in native token units (0 = no limit)"],"type":"u64"},{"name":"interest_rate_config","docs":["Interest rate model configuration"],"type":{"defined":{"name":"InterestRateConfig"}}},{"name":"operational_state","docs":["Current operational state of the bank (Paused, Operational, ReduceOnly, KilledByBankruptcy)"],"type":{"defined":{"name":"BankOperationalState"}}},{"name":"oracle_setup","docs":["Oracle type used for price feeds"],"type":{"defined":{"name":"OracleSetup"}}},{"name":"oracle_keys","docs":["Oracle account keys (usage depends on oracle_setup type)"],"type":{"array":["pubkey",5]}},{"name":"_pad0","type":{"array":["u8",6]}},{"name":"borrow_limit","docs":["Maximum total borrows allowed in this bank, in native token units (0 = no limit)"],"type":"u64"},{"name":"risk_tier","docs":["Risk tier for this bank (Collateral or Isolated)"],"type":{"defined":{"name":"RiskTier"}}},{"name":"asset_tag","docs":["Determines what kinds of assets users of this bank can interact with. Options:","* `ASSET_TAG_DEFAULT` (0) - A regular asset that can be comingled with any other regular","asset or with `ASSET_TAG_SOL`","* `ASSET_TAG_SOL` (1) - Accounts with a SOL position can comingle with **either**","`ASSET_TAG_DEFAULT` or `ASSET_TAG_STAKED` positions, but not both","* `ASSET_TAG_STAKED` (2) - Staked SOL assets. Accounts with a STAKED position can only","deposit other STAKED assets or SOL (`ASSET_TAG_SOL`) and can only borrow SOL","* `ASSET_TAG_KAMINO` (3) - Treated the same as `ASSET_TAG_DEFAULT`","* `ASSET_TAG_DRIFT` (4) - Treated the same as `ASSET_TAG_DEFAULT`","* `ASSET_TAG_SOLEND` (5) - Treated the same as `ASSET_TAG_DEFAULT`"],"type":"u8"},{"name":"config_flags","docs":["Flags for various config options","* 1 - Always set if bank created in 0.1.4 or later, or if migrated to the new pyth oracle","setup from a prior version. Not set in 0.1.3 or earlier banks using pyth that have not yet","migrated. Does nothing for banks that use switchboard.","* 2, 4, 8, 16, etc - reserved for future use."],"type":"u8"},{"name":"_pad1","type":{"array":["u8",5]}},{"name":"total_asset_value_init_limit","docs":["USD denominated limit for calculating asset value for initialization margin requirements.","Example, if total SOL deposits are equal to $1M and the limit it set to $500K, then SOL","assets will be discounted by 50%.","","In other words the max value of liabilities that can be backed by the asset is $500K. This","is useful for limiting the damage of oracle attacks.","","Value is UI USD value, for example value 100 -> $100"],"type":"u64"},{"name":"oracle_max_age","docs":["Time window in seconds for the oracle price feed to be considered live."],"type":"u16"},{"name":"_padding0","type":{"array":["u8",2]}},{"name":"oracle_max_confidence","docs":["From 0-100%, if the confidence exceeds this value, the oracle is considered invalid. Note:","the confidence adjustment is capped at 5% regardless of this value.","* 0 falls back to using the default 10% instead, i.e., U32_MAX_DIV_10","* A %, as u32, e.g. 100% = u32::MAX, 50% = u32::MAX/2, etc."],"type":"u32"},{"name":"fixed_price","docs":["Stored oracle price for `OracleSetup::Fixed`, otherwise does nothing"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"_padding1","type":{"array":["u8",16]}}]}},{"name":"BankConfigCompact","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"interest_rate_config","type":{"defined":{"name":"InterestRateConfigCompact"}}},{"name":"operational_state","type":{"defined":{"name":"BankOperationalState"}}},{"name":"borrow_limit","type":"u64"},{"name":"risk_tier","type":{"defined":{"name":"RiskTier"}}},{"name":"asset_tag","docs":["Determines what kinds of assets users of this bank can interact with. Options:","* `ASSET_TAG_DEFAULT` (0) - A regular asset that can be comingled with any other regular","asset or with `ASSET_TAG_SOL`","* `ASSET_TAG_SOL` (1) - Accounts with a SOL position can comingle with **either**","`ASSET_TAG_DEFAULT` or `ASSET_TAG_STAKED` positions, but not both","* `ASSET_TAG_STAKED` (2) - Staked SOL assets. Accounts with a STAKED position can only","deposit other STAKED assets or SOL (`ASSET_TAG_SOL`) and can only borrow SOL","* `ASSET_TAG_KAMINO` (3) - Treated the same as `ASSET_TAG_DEFAULT`","* `ASSET_TAG_DRIFT` (4) - Treated the same as `ASSET_TAG_DEFAULT`","* `ASSET_TAG_SOLEND` (5) - Treated the same as `ASSET_TAG_DEFAULT`"],"type":"u8"},{"name":"config_flags","docs":["Flags for various config options","* 1 - Always set if bank created in 0.1.4 or later, or if migrated to the new oracle setup","from a prior version. Not set in 0.1.3 or earlier banks that have not yet migrated.","* 2, 4, 8, 16, etc - reserved for future use."],"type":"u8"},{"name":"_pad0","type":{"array":["u8",5]}},{"name":"total_asset_value_init_limit","docs":["USD denominated limit for calculating asset value for initialization margin requirements.","Example, if total SOL deposits are equal to $1M and the limit it set to $500K, then SOL","assets will be discounted by 50%.","","In other words the max value of liabilities that can be backed by the asset is $500K. This","is useful for limiting the damage of oracle attacks.","","Value is UI USD value, for example value 100 -> $100"],"type":"u64"},{"name":"oracle_max_age","docs":["Time window in seconds for the oracle price feed to be considered live."],"type":"u16"},{"name":"oracle_max_confidence","docs":["From 0-100%, if the confidence exceeds this value, the oracle is considered invalid. Note:","the confidence adjustment is capped at 5% regardless of this value.","* 0% = use the default (10%)","* A %, as u32, e.g. 100% = u32::MAX, 50% = u32::MAX/2, etc."],"type":"u32"}]}},{"name":"BankConfigOpt","type":{"kind":"struct","fields":[{"name":"asset_weight_init","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"asset_weight_maint","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"liability_weight_init","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"liability_weight_maint","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"deposit_limit","type":{"option":"u64"}},{"name":"borrow_limit","type":{"option":"u64"}},{"name":"operational_state","type":{"option":{"defined":{"name":"BankOperationalState"}}}},{"name":"interest_rate_config","type":{"option":{"defined":{"name":"InterestRateConfigOpt"}}}},{"name":"risk_tier","type":{"option":{"defined":{"name":"RiskTier"}}}},{"name":"asset_tag","type":{"option":"u8"}},{"name":"total_asset_value_init_limit","type":{"option":"u64"}},{"name":"oracle_max_confidence","type":{"option":"u32"}},{"name":"oracle_max_age","type":{"option":"u16"}},{"name":"permissionless_bad_debt_settlement","type":{"option":"bool"}},{"name":"freeze_settings","type":{"option":"bool"}},{"name":"tokenless_repayments_allowed","type":{"option":"bool"}}]}},{"name":"BankMetadata","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"bank","docs":["Bank this metadata corresponds to"],"type":"pubkey"},{"name":"placeholder","type":"u64"},{"name":"ticker","docs":["The token's ticker name, e.g. USDC","* utf-8"],"type":{"array":["u8",64]}},{"name":"description","docs":["The token's plain english description, e.g US Dollar Coin","* utf-8"],"type":{"array":["u8",128]}},{"name":"data_blob","docs":["Reserved for future use. Room for a very small icon or something else cool"],"type":{"array":["u8",256]}},{"name":"end_description_byte","docs":["The last data byte in description (padding follows)"],"type":"u16"},{"name":"end_data_blob","docs":["The last data byte in data_blob (padding follows)"],"type":"u16"},{"name":"end_ticker_byte","docs":["The last data byte in ticker (padding follows)"],"type":"u8"},{"name":"bump","type":"u8"},{"name":"_pad0","type":{"array":["u8",2]}}]}},{"name":"BankOperationalState","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Paused"},{"name":"Operational"},{"name":"ReduceOnly"},{"name":"KilledByBankruptcy"}]}},{"name":"BankRateLimiter","docs":["Per-bank rate limiting configuration and state.","Tracks net outflow in native tokens."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"hourly","docs":["Hourly window rate limiter (native tokens)."],"type":{"defined":{"name":"RateLimitWindow"}}},{"name":"daily","docs":["Daily window rate limiter (native tokens)."],"type":{"defined":{"name":"RateLimitWindow"}}}]}},{"name":"DeleverageEvent","type":{"kind":"struct","fields":[{"name":"marginfi_account","type":"pubkey"},{"name":"risk_admin","type":"pubkey"},{"name":"deleveragee_assets_seized","type":"f64"},{"name":"deleveragee_liability_repaid","type":"f64"}]}},{"name":"DeleverageWithdrawFlowEvent","docs":["Emitted for deleverage-only withdraw outflows.","The delegate flow admin aggregates these off-chain and","updates the deleverage daily withdraws via `update_deleverage_withdrawals`."],"type":{"kind":"struct","fields":[{"name":"group","type":"pubkey"},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"outflow_usd","docs":["Equity-denominated outflow value in USD, rounded to integer."],"type":"u32"},{"name":"current_timestamp","docs":["Unix timestamp when the flow was recorded"],"type":"i64"}]}},{"name":"DriftConfigCompact","docs":["Used to configure Drift banks. A simplified version of `BankConfigCompact` which omits most","values related to interest since Drift banks cannot earn interest or be borrowed against."],"type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"oracle_setup","docs":["Either `DriftPythPull` or `DriftSwitchboardPull`"],"type":{"defined":{"name":"OracleSetup"}}},{"name":"operational_state","docs":["Bank operational state - allows starting banks in paused state"],"type":{"defined":{"name":"BankOperationalState"}}},{"name":"risk_tier","docs":["Risk tier - determines if assets can be borrowed in isolation"],"type":{"defined":{"name":"RiskTier"}}},{"name":"config_flags","docs":["Config flags for future-proofing"],"type":"u8"},{"name":"total_asset_value_init_limit","type":"u64"},{"name":"oracle_max_age","type":"u16"},{"name":"oracle_max_confidence","docs":["Oracle confidence threshold (0 = use default 10%)"],"type":"u32"}]}},{"name":"EditStakedSettingsEvent","type":{"kind":"struct","fields":[{"name":"group","type":"pubkey"},{"name":"settings","type":{"defined":{"name":"StakedSettingsEditConfig"}}}]}},{"name":"EmodeConfig","docs":["An emode configuration. Each bank has one such configuration, but this may also be the","intersection of many configurations (see `reconcile_emode_configs`). For example, the risk","engine creates such an intersection from all the emode config of all banks the user is borrowing","from."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"entries","type":{"array":[{"defined":{"name":"EmodeEntry"}},10]}}]}},{"name":"EmodeEntry","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"collateral_bank_emode_tag","docs":["emode_tag of the bank(s) whose collateral you wish to treat preferentially."],"type":"u16"},{"name":"flags","docs":["* APPLIES_TO_ISOLATED (1) - (NOT YET IMPLEMENTED) if set, isolated banks with this tag","also benefit. If not set, isolated banks continue to offer zero collateral, even if they","use this tag.","* 2, 4, 8, 16, 32, etc - reserved for future use"],"type":"u8"},{"name":"pad0","type":{"array":["u8",5]}},{"name":"asset_weight_init","docs":["Note: If set below the collateral bank's weight, does nothing."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","docs":["Note: If set below the collateral bank's weight, does nothing."],"type":{"defined":{"name":"WrappedI80F48"}}}]}},{"name":"EmodeSettings","docs":["Controls the bank's e-mode configuration, allowing certain collateral sources to be treated more","favorably as collateral when used to borrow from this bank."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"emode_tag","docs":["This bank's NON-unique id that other banks will use to determine what emode rate to use when","this bank is offered as collateral.","","For example, all stablecoin banks might share the same emode_tag, and in their entries, each","such stablecoin bank will recognize that collateral sources with this \"stable\" tag get","preferential weights. When a new stablecoin is added that is considered riskier, it may get","a new, less favorable emode tag, and eventually get upgraded to the same one as the other","stables","","* 0 is in an invalid tag and will do nothing."],"type":"u16"},{"name":"pad0","type":{"array":["u8",6]}},{"name":"timestamp","docs":["Unix timestamp from the system clock when emode state was last updated"],"type":"i64"},{"name":"flags","docs":["EMODE_ON (1) - If set, at least one entry is configured","2, 4, 8, etc, Reserved for future use"],"type":"u64"},{"name":"emode_config","type":{"defined":{"name":"EmodeConfig"}}}]}},{"name":"ExecuteOrderBalanceRecord","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"bank","type":"pubkey"},{"name":"is_asset","type":"u8"},{"name":"_pad0","type":{"array":["u8",5]}},{"name":"tag","type":"u16"},{"name":"shares","type":{"defined":{"name":"WrappedI80F48"}}}]}},{"name":"ExecuteOrderRecord","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"order","type":"pubkey"},{"name":"executor","type":"pubkey"},{"name":"balance_states","type":{"array":[{"defined":{"name":"ExecuteOrderBalanceRecord"}},14]}},{"name":"active_balance_count","type":"u8"},{"name":"inactive_balance_count","type":"u8"},{"name":"_reserved0","type":{"array":["u8",6]}},{"name":"order_start_health","type":{"defined":{"name":"WrappedI80F48"}}}]}},{"name":"FeeState","docs":["Unique per-program. The Program Owner uses this account to administrate fees collected by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"key","docs":["The fee state's own key. A PDA derived from just `b\"feestate\"`"],"type":"pubkey"},{"name":"global_fee_admin","docs":["Can modify fees"],"type":"pubkey"},{"name":"global_fee_wallet","docs":["The base wallet for all protocol fees. All SOL fees go to this wallet. All non-SOL fees go","to the cannonical ATA of this wallet for that asset."],"type":"pubkey"},{"name":"placeholder0","type":"u64"},{"name":"bank_init_flat_sol_fee","docs":["Flat fee assessed when a new bank is initialized, in lamports.","* In SOL, in native decimals."],"type":"u32"},{"name":"bump_seed","type":"u8"},{"name":"_padding0","type":{"array":["u8",3]}},{"name":"liquidation_max_fee","docs":["Liquidators can claim at this premium, when liquidating an asset in receivership","liquidation, e.g. (1 + this) * amount repaid >= asset seized","* A percentage"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"program_fee_fixed","docs":["Fee collected by the program owner from all groups","* A percentage"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"program_fee_rate","docs":["Fee collected by the program owner from all groups","* A percentage"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"panic_state","docs":["When the global admin pauses the protocol in the event of an emergency, information about","the pause duration will be stored here and propagated to groups."],"type":{"defined":{"name":"PanicState"}}},{"name":"placeholder1","type":"u64"},{"name":"liquidation_flat_sol_fee","docs":["Flat fee assessed for insurance/program use when a liquidation is executed","* In SOL, in native decimals."],"type":"u32"},{"name":"order_init_flat_sol_fee","docs":["Flat fee assessed for preventing spam use when creating an order","* In SOL, in native decimals."],"type":"u32"},{"name":"order_execution_max_fee","docs":["Take-profit Orders can be executed at this premium, which Keepers are allowed to keep (no","pun intended) e.g. (1 + this) * amount repaid >= asset seized","* A percentage"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"_reserved1","type":{"array":["u8",32]}}]}},{"name":"FeeStateCache","docs":["Cached fee configuration propagated from the global FeeState"],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"global_fee_wallet","docs":["The wallet that receives program-level fees"],"type":"pubkey"},{"name":"program_fee_fixed","docs":["Fixed fee APR charged to borrowers (program-level)"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"program_fee_rate","docs":["Proportional fee rate on interest (program-level)"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"last_update","docs":["Unix timestamp of the last fee state propagation"],"type":"i64"}]}},{"name":"GroupEventHeader","type":{"kind":"struct","fields":[{"name":"signer","type":{"option":"pubkey"}},{"name":"marginfi_group","type":"pubkey"}]}},{"name":"GroupRateLimiter","docs":["Per-group rate limiting configuration and state.","Tracks aggregate net outflow in USD."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"hourly","docs":["Hourly window rate limiter (USD)."],"type":{"defined":{"name":"RateLimitWindow"}}},{"name":"daily","docs":["Daily window rate limiter (USD)."],"type":{"defined":{"name":"RateLimitWindow"}}}]}},{"name":"HealthCache","docs":["A read-only cache of the internal risk engine's information. Only valid in borrow/withdraw if","the tx does not fail. To see the state in any context, e.g. to figure out if the risk engine is","failing due to some bad price information, use `pulse_health`."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"asset_value","docs":["Internal risk engine asset value, using initial weight (e.g. what is used for borrowing","purposes), with all confidence adjustments, and other discounts on price.","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_value","docs":["Internal risk engine liability value, using initial weight (e.g. what is used for borrowing","purposes), with all confidence adjustments, and other discounts on price.","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_value_maint","docs":["Internal risk engine asset value, using maintenance weight (e.g. what is used for","liquidation purposes), with all confidence adjustments.","* Zero if the risk engine failed to load","* Uses SPOT price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_value_maint","docs":["Internal risk engine liability value, using maintenance weight (e.g. what is used for","liquidation purposes), with all confidence adjustments.","* Zero if the risk engine failed to load","* Uses SPOT price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_value_equity","docs":["The \"true\" value of assets without any confidence or weight adjustments. Internally, used","only for bankruptcies.","* Zero if the risk engine failed to load","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_value_equity","docs":["The \"true\" value of liabilities without any confidence or weight adjustments.","Internally, used only for bankruptcies.","* Zero if the risk engine failed to load","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"timestamp","docs":["Unix timestamp from the system clock when this cache was last updated"],"type":"i64"},{"name":"flags","docs":["The flags that indicate the state of the health cache. This is a u32 bitfield, where each","bit represents a flag.","","* HEALTHY = 1 - If set, the account cannot be liquidated. If 0, the account is unhealthy and","can be liquidated.","* ENGINE STATUS = 2 - If set, the engine did not error during the last health pulse. If 0,","the engine would have errored and this cache is likely invalid. `RiskEngineInitRejected`","is ignored and will allow the flag to be set anyways.","* ORACLE OK = 4 - If set, the engine did not error due to an oracle issue. If 0, engine was","passed a bad bank or oracle account, or an oracle was stale. Check the order in which","accounts were passed and ensure each balance has the correct banks/oracles, and that","oracle cranks ran recently enough. Check `internal_err` and `err_index` for more details","in some circumstances. Invalid if generated after borrow/withdraw (these instructions will","ignore oracle issues if health is still satisfactory with some balance zeroed out).","* 8, 16, 32, 64, 128, etc - reserved for future use"],"type":"u32"},{"name":"mrgn_err","docs":["If the engine errored, look here for the error code. If the engine returns ok, you may also","check here to see if the risk engine rejected this tx (3009)."],"type":"u32"},{"name":"prices","docs":["Each price corresponds to that index of Balances in the LendingAccount. Useful for debugging","or liquidator consumption, to determine how a user's position is priced internally.","* An f64 stored as bytes"],"type":{"array":[{"array":["u8",8]},16]}},{"name":"internal_err","docs":["Errors in asset oracles are ignored (with prices treated as zero). If you see a zero price","and the `ORACLE_OK` flag is not set, check here to see what error was ignored internally."],"type":"u32"},{"name":"err_index","docs":["Index in `balances` where `internal_err` appeared"],"type":"u8"},{"name":"program_version","docs":["Since 0.1.3, the version will be encoded here. See PROGRAM_VERSION."],"type":"u8"},{"name":"pad0","type":{"array":["u8",2]}},{"name":"internal_liq_err","docs":["Error code from the liquidation health check during the last health pulse (0 if none)"],"type":"u32"},{"name":"internal_bankruptcy_err","docs":["Error code from the bankruptcy check during the last health pulse (0 if none)"],"type":"u32"},{"name":"reserved0","type":{"array":["u8",32]}},{"name":"reserved1","type":{"array":["u8",16]}}]}},{"name":"HealthPulseEvent","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"health_cache","type":{"defined":{"name":"HealthCache"}}}]}},{"name":"InterestRateConfig","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"optimal_utilization_rate","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"plateau_interest_rate","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"max_interest_rate","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"insurance_fee_fixed_apr","docs":["Goes to insurance, funds `collected_insurance_fees_outstanding`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"insurance_ir_fee","docs":["Goes to insurance, funds `collected_insurance_fees_outstanding`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_fixed_fee_apr","docs":["Earned by the group, goes to `collected_group_fees_outstanding`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_ir_fee","docs":["Earned by the group, goes to `collected_group_fees_outstanding`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_origination_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"zero_util_rate","docs":["The base rate at utilization = 0","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":"u32"},{"name":"hundred_util_rate","docs":["The base rate at utilization = 100","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":"u32"},{"name":"points","docs":["The base rate at various points between 0 and 100%, exclusive. Essentially a piece-wise","linear curve.","* always in ascending order, e.g. points[0] = first kink point, points[1] = second kink","point, and so forth.","* points where util = 0 are unused"],"type":{"array":[{"defined":{"name":"RatePoint"}},5]}},{"name":"curve_type","docs":["Determines which interest rate curve implementation is active. 0 (INTEREST_CURVE_LEGACY) =","legacy three point curve, 1 (INTEREST_CURVE_SEVEN_POINT) = multi-point curve."],"type":"u8"},{"name":"_pad0","type":{"array":["u8",7]}},{"name":"_padding1","type":{"array":["u8",32]}},{"name":"_padding2","type":{"array":["u8",16]}},{"name":"_padding3","type":{"array":["u8",8]}}]}},{"name":"InterestRateConfigCompact","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"insurance_fee_fixed_apr","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"insurance_ir_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_fixed_fee_apr","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_ir_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_origination_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"zero_util_rate","docs":["The base rate at utilization = 0","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":"u32"},{"name":"hundred_util_rate","docs":["The base rate at utilization = 100","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":"u32"},{"name":"points","docs":["The base rate at various points between 0 and 100%, exclusive. Essentially a piece-wise","linear curve.","* always in ascending order, e.g. points[0] = first kink point, points[1] = second kink","point, and so forth.","* points where util = 0 are unused"],"type":{"array":[{"defined":{"name":"RatePoint"}},5]}}]}},{"name":"InterestRateConfigOpt","type":{"kind":"struct","fields":[{"name":"insurance_fee_fixed_apr","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"insurance_ir_fee","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"protocol_fixed_fee_apr","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"protocol_ir_fee","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"protocol_origination_fee","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"zero_util_rate","docs":["The base rate at utilization = 0","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":{"option":"u32"}},{"name":"hundred_util_rate","docs":["The base rate at utilization = 100","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":{"option":"u32"}},{"name":"points","docs":["The base rate at various points between 0 and 100%, exclusive. Essentially a piece-wise","linear curve.","* always in ascending order, e.g. points[0] = first kink point, points[1] = second kink","point, and so forth.","* points where util = 0 are unused"],"type":{"option":{"array":[{"defined":{"name":"RatePoint"}},5]}}}]}},{"name":"JuplendConfigCompact","docs":["Used to configure JupLend banks. A simplified version of `BankConfigCompact` which omits most","values related to interest since JupLend banks cannot earn interest or be borrowed against.","","Note: JupLend banks do not take an Operational State, they always start in `Paused` state and","are set to `Operational` via `juplend_init_position` (seed deposit + protocol fToken vault)."],"type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"oracle_setup","docs":["Either `JuplendPythPull` or `JuplendSwitchboardPull`"],"type":{"defined":{"name":"OracleSetup"}}},{"name":"risk_tier","docs":["Isolated or Collateral"],"type":{"defined":{"name":"RiskTier"}}},{"name":"config_flags","docs":["Config flags for future-proofing, currently ignored"],"type":"u8"},{"name":"total_asset_value_init_limit","docs":["In $"],"type":"u64"},{"name":"oracle_max_age","docs":["In seconds"],"type":"u16"},{"name":"oracle_max_confidence","docs":["Oracle confidence threshold (0 = use default 10%)"],"type":"u32"}]}},{"name":"KaminoConfigCompact","docs":["Used to configure Kamino banks. A simplified version of `BankConfigCompact` which omits most","values related to interest since Kamino banks cannot earn interest or be borrowed against."],"type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"oracle_setup","docs":["Either `KaminoPythPush` or `KaminoSwitchboardPull`"],"type":{"defined":{"name":"OracleSetup"}}},{"name":"operational_state","docs":["Bank operational state - allows starting banks in paused state"],"type":{"defined":{"name":"BankOperationalState"}}},{"name":"risk_tier","docs":["Risk tier - determines if assets can be borrowed in isolation"],"type":{"defined":{"name":"RiskTier"}}},{"name":"config_flags","docs":["Config flags for future-proofing"],"type":"u8"},{"name":"total_asset_value_init_limit","type":"u64"},{"name":"oracle_max_age","docs":["Currently unused: Kamino's oracle age applies to kamino banks."],"type":"u16"},{"name":"oracle_max_confidence","docs":["Oracle confidence threshold (0 = use default 10%)"],"type":"u32"}]}},{"name":"KeeperCloseOrderEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"order","type":"pubkey"}]}},{"name":"Lending","docs":["Minimal representation of the on-chain JupLend `Lending` account.","","Notes:","- We intentionally use a **zero-copy** layout here to match how other integrations load large","external accounts (and to avoid paying Borsh (de)serialization cost on every access).","- `repr(C, packed)` keeps the byte layout identical to a field-by-field serialization","(i.e. no implicit padding). This is important because `Pubkey` has alignment=1 while `u64`","has alignment=8; using plain `repr(C)` would insert padding before the first `u64`."],"serialization":"bytemuck","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"f_token_mint","type":"pubkey"},{"name":"lending_id","type":"u16"},{"name":"decimals","docs":["number of decimals for the fToken, same as underlying mint"],"type":"u8"},{"name":"rewards_rate_model","docs":["PDA of rewards rate model (LRRM)"],"type":"pubkey"},{"name":"liquidity_exchange_price","docs":["exchange price in the liquidity layer (no rewards)"],"type":"u64"},{"name":"token_exchange_price","docs":["exchange price between fToken and underlying (with rewards)"],"type":"u64"},{"name":"last_update_timestamp","docs":["unix timestamp when exchange prices were updated last"],"type":"u64"},{"name":"token_reserves_liquidity","type":"pubkey"},{"name":"supply_position_on_liquidity","type":"pubkey"},{"name":"bump","type":"u8"}]}},{"name":"LendingAccount","docs":["The lending account holds up to 16 balance positions for a user."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"balances","docs":["Array of balance positions (max 16). Sorted in descending order by bank_pk."],"type":{"array":[{"defined":{"name":"Balance"}},16]}},{"name":"last_tag_used","docs":["Last allocated balance tag (u16), used to find the next unused tag."],"type":"u16"},{"name":"_pad1","docs":["Reserved for future use"],"type":{"array":["u8",6]}},{"name":"_padding","docs":["Reserved for future use"],"type":{"array":["u64",7]}}]}},{"name":"LendingAccountBorrowEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"LendingAccountDepositEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"LendingAccountLiquidateEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"liquidatee_marginfi_account","type":"pubkey"},{"name":"liquidatee_marginfi_account_authority","type":"pubkey"},{"name":"asset_bank","type":"pubkey"},{"name":"asset_mint","type":"pubkey"},{"name":"liability_bank","type":"pubkey"},{"name":"liability_mint","type":"pubkey"},{"name":"liquidatee_pre_health","type":"f64"},{"name":"liquidatee_post_health","type":"f64"},{"name":"pre_balances","type":{"defined":{"name":"LiquidationBalances"}}},{"name":"post_balances","type":{"defined":{"name":"LiquidationBalances"}}}]}},{"name":"LendingAccountRepayEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"close_balance","type":"bool"}]}},{"name":"LendingAccountWithdrawEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"close_balance","type":"bool"}]}},{"name":"LendingPoolBankAccrueInterestEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"delta","type":"u64"},{"name":"fees_collected","type":"f64"},{"name":"insurance_collected","type":"f64"}]}},{"name":"LendingPoolBankCollectFeesEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"group_fees_collected","type":"f64"},{"name":"group_fees_outstanding","type":"f64"},{"name":"insurance_fees_collected","type":"f64"},{"name":"insurance_fees_outstanding","type":"f64"}]}},{"name":"LendingPoolBankConfigureEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"config","type":{"defined":{"name":"BankConfigOpt"}}}]}},{"name":"LendingPoolBankConfigureFrozenEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"deposit_limit","type":"u64"},{"name":"borrow_limit","type":"u64"}]}},{"name":"LendingPoolBankConfigureOracleEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"oracle_setup","type":"u8"},{"name":"oracle","type":"pubkey"}]}},{"name":"LendingPoolBankCreateEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"LendingPoolBankHandleBankruptcyEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"bad_debt","type":"f64"},{"name":"covered_amount","type":"f64"},{"name":"socialized_amount","type":"f64"}]}},{"name":"LendingPoolBankSetFixedOraclePriceEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"price","type":{"defined":{"name":"WrappedI80F48"}}}]}},{"name":"LendingPoolSuperAdminDepositEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"transfer_amount","docs":["Amount requested in SPL transfer instruction."],"type":"u64"},{"name":"vault_inflow_amount","docs":["Assumed vault inflow. Token-2022 transfer fees are not handled by this instruction path."],"type":"u64"}]}},{"name":"LendingPoolSuperAdminWithdrawEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"vault_outflow_amount","type":"u64"}]}},{"name":"LiquidationBalances","type":{"kind":"struct","fields":[{"name":"liquidatee_asset_balance","type":"f64"},{"name":"liquidatee_liability_balance","type":"f64"},{"name":"liquidator_asset_balance","type":"f64"},{"name":"liquidator_liability_balance","type":"f64"}]}},{"name":"LiquidationCache","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"asset_value_maint","docs":["Internal risk engine asset value snapshot taken when liquidation begins, using maintenance","weight with all confidence adjustments.","* Uses SPOT price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_value_maint","docs":["Internal risk engine liability value snapshot taken when liquidation begins, using","maintenance weight with all confidence adjustments.","* Uses SPOT price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_value_equity","docs":["Actual cash value of assets pre-liquidation (inclusive of price adjustment for oracle","confidence, but without any weights)","* Liquidator is allowed to seize up to `liability_value_equity` - this amount","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_value_equity","docs":["Actual cash value of liabilities pre-liquidation (inclusive of price adjustment for oracle","confidence, but without any weights)","* Liquidator is allowed to seize up to this amount - `asset_value_equity`","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"_placeholder","type":"u64"},{"name":"_reserved0","type":{"array":["u8",32]}}]}},{"name":"LiquidationEntry","docs":["Used to record key details of the last few liquidation events on the account"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"asset_amount_seized","docs":["Dollar amount seized","* An f64 stored as bytes"],"type":{"array":["u8",8]}},{"name":"liab_amount_repaid","docs":["Dollar amount repaid","* An f64 stored as bytes"],"type":{"array":["u8",8]}},{"name":"placeholder0","type":"u64"},{"name":"timestamp","type":"i64"},{"name":"_reserved0","type":{"array":["u8",16]}}]}},{"name":"LiquidationReceiverEvent","type":{"kind":"struct","fields":[{"name":"marginfi_account","type":"pubkey"},{"name":"liquidation_receiver","type":"pubkey"},{"name":"liquidatee_assets_seized","type":"f64"},{"name":"liquidatee_liability_repaid","type":"f64"},{"name":"lamps_fee_paid","type":"u32"}]}},{"name":"LiquidationRecord","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"key","docs":["This account's own key. A PDA derived from `marginfi_account`"],"type":"pubkey"},{"name":"marginfi_account","docs":["Account this record tracks"],"type":"pubkey"},{"name":"record_payer","docs":["The key that paid to create this account. At some point, we may allow this wallet to reclaim","the rent paid to open a record."],"type":"pubkey"},{"name":"liquidation_receiver","docs":["The liquidator taking receivership of the `marginfi_account` to complete a liquidation. Pays","the liquidation fee.","* Always pubkey default unless actively within a liquidation event."],"type":"pubkey"},{"name":"entries","docs":["Basic historical data for the last few liquidation events on this account"],"type":{"array":[{"defined":{"name":"LiquidationEntry"}},4]}},{"name":"cache","type":{"defined":{"name":"LiquidationCache"}}},{"name":"_reserved0","type":{"array":["u8",64]}},{"name":"_reserved2","type":{"array":["u8",16]}},{"name":"_reserved3","type":{"array":["u8",8]}}]}},{"name":"MarginfiAccount","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"group","type":"pubkey"},{"name":"authority","type":"pubkey"},{"name":"lending_account","type":{"defined":{"name":"LendingAccount"}}},{"name":"account_flags","docs":["The flags that indicate the state of the account. This is u64 bitfield, where each bit","represents a flag.","","Flags:MarginfiAccount","- 1: `ACCOUNT_DISABLED` - Indicates that the account is disabled and no further actions can","be taken on it.","- 2: `ACCOUNT_IN_FLASHLOAN` - Only set when an account is within a flash loan, e.g. when","start_flashloan is called, then unset when the flashloan ends.","- 4: `ACCOUNT_FLAG_DEPRECATED` - Deprecated, available for future use","- 8: `ACCOUNT_TRANSFER_AUTHORITY_DEPRECATED` - the admin has flagged with account to be","moved, original owner can now call `set_account_transfer_authority`","- 16: `ACCOUNT_IN_RECEIVERSHIP` - the account is eligible to be liquidated and has entered","receivership, a liquidator is able to control borrows and withdraws until the end of the","tx. This flag will only appear within a tx.","- 32: `ACCOUNT_IN_DELEVERAGE - the account is being deleveraged by the risk admin","- 64: `ACCOUNT_FROZEN` - the admin has frozen the account; only the group admin may perform","actions until unfrozen."],"type":"u64"},{"name":"emissions_destination_account","docs":["Wallet whose canonical ATA receives off-chain emissions distributions."],"type":"pubkey"},{"name":"health_cache","type":{"defined":{"name":"HealthCache"}}},{"name":"migrated_from","docs":["If this account was migrated from another one, store the original account key"],"type":"pubkey"},{"name":"migrated_to","docs":["If this account has been migrated to another one, store the destination account key"],"type":"pubkey"},{"name":"last_update","docs":["Unix timestamp (u64) of the last account interaction. Note: Bank.last_update uses i64."],"type":"u64"},{"name":"account_index","docs":["If a PDA-based account, the account index, a seed used to derive the PDA that can be chosen","arbitrarily (0.1.5 or later). Otherwise, does nothing."],"type":"u16"},{"name":"third_party_index","docs":["If a PDA-based account (0.1.5 or later), a \"vendor specific\" id. Values < PDA_FREE_THRESHOLD","can be used by anyone with no restrictions. Values >= PDA_FREE_THRESHOLD can only be used by","a particular program via CPI. These values require being added to a list, contact us for","more details. For legacy non-pda accounts, does nothing.","","Note: use a unique seed to tag accounts related to some particular program or campaign so","you can easily fetch them all later."],"type":"u16"},{"name":"bump","docs":["This account's bump, if a PDA-based account (0.1.5 or later). Otherwise, does nothing."],"type":"u8"},{"name":"_pad0","type":{"array":["u8",3]}},{"name":"liquidation_record","docs":["Stores information related to liquidations made against this account. A pda of this","account's key, and \"liq_record\"","* Typically pubkey default if this account has never been liquidated or close to liquidation","* Opening this account is permissionless. Typically the liquidator pays, but e.g. we may","also charge the user if they are opening a risky position on the front end."],"type":"pubkey"},{"name":"_padding0","type":{"array":["u64",7]}}]}},{"name":"MarginfiAccountCloseOrderEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"order","type":"pubkey"}]}},{"name":"MarginfiAccountCreateEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}}]}},{"name":"MarginfiAccountFreezeEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"frozen","type":"bool"}]}},{"name":"MarginfiAccountPlaceOrderEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"order","type":"pubkey"},{"name":"trigger","type":{"defined":{"name":"OrderTriggerType"}}},{"name":"stop_loss","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"take_profit","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"tags","type":{"array":["u16",2]}}]}},{"name":"MarginfiAccountTransferToNewAccount","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"old_account","type":"pubkey"},{"name":"old_account_authority","type":"pubkey"},{"name":"new_account_authority","type":"pubkey"}]}},{"name":"MarginfiGroup","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"admin","docs":["Broadly able to modify anything, and can set/remove other admins at will."],"type":"pubkey"},{"name":"group_flags","docs":["Bitmask for group settings flags.","* Bit 0 (1): `PROGRAM_FEES_ENABLED` — If set, program-level fees are enabled.","* Bits 1-63: Reserved for future use."],"type":"u64"},{"name":"fee_state_cache","docs":["Caches information from the global `FeeState` so the FeeState can be omitted on certain ixes"],"type":{"defined":{"name":"FeeStateCache"}}},{"name":"banks","docs":["For groups initialized in versions 0.1.2 or greater, this is an authoritative count","of the number of banks under this group. For groups initialized prior to 0.1.2,","a non-authoritative count of the number of banks initiated after 0.1.2 went live."],"type":"u16"},{"name":"pad0","type":{"array":["u8",6]}},{"name":"emode_admin","docs":["This admin can configure collateral ratios above (but not below) the collateral ratio of","certain banks, e.g. allow SOL to count as 90% collateral when borrowing an LST instead of","the default rate."],"type":"pubkey"},{"name":"delegate_curve_admin","docs":["Can modify the fields in `config.interest_rate_config` but nothing else, for every bank","under this group"],"type":"pubkey"},{"name":"delegate_limit_admin","docs":["Can modify the `deposit_limit`, `borrow_limit`, `total_asset_value_init_limit` but nothing","else, for every bank under this group"],"type":"pubkey"},{"name":"delegate_emissions_admin","docs":["Can modify the emissions `flags`, `emissions_rate` and `emissions_mint`, but nothing else,","for every bank under this group"],"type":"pubkey"},{"name":"panic_state_cache","docs":["When program keeper temporarily puts the program into panic mode, information about the","duration of the lockup will be available here."],"type":{"defined":{"name":"PanicStateCache"}}},{"name":"deleverage_withdraw_window_cache","docs":["Keeps track of the liquidity withdrawn from the group over the day as a result of","deleverages. Used as a protection mechanism against too big (and unwanted) withdrawals (e.g.","when the risk admin is compromised)."],"type":{"defined":{"name":"WithdrawWindowCache"}}},{"name":"risk_admin","docs":["Can run bankruptcy and forced deleverage ixes to e.g. sunset risky/illiquid assets"],"type":"pubkey"},{"name":"metadata_admin","docs":["Can modify a Bank's metadata, and nothing else."],"type":"pubkey"},{"name":"emode_max_init_leverage","docs":["Maximum leverage allowed for emode positions (initial margin), stored as u32 basis.","Use `u32_to_basis` to convert to I80F48. Range: 1-100."],"type":"u32"},{"name":"emode_max_maint_leverage","docs":["Maximum leverage allowed for emode positions (maintenance margin), stored as u32 basis.","Must be > emode_max_init_leverage. Range: 1-100."],"type":"u32"},{"name":"_padding","docs":["Reserved for future use"],"type":{"array":["u8",8]}},{"name":"rate_limiter","docs":["Rate limiter for controlling aggregate withdraw/borrow outflow across all banks.","Tracks net outflow in USD."],"type":{"defined":{"name":"GroupRateLimiter"}}},{"name":"rate_limiter_last_admin_update_slot","docs":["Last slot covered by an admin group rate limiter aggregation update."],"type":"u64"},{"name":"rate_limiter_last_admin_update_seq","docs":["Monotonic sequence number for admin group rate limiter updates.","This is used to enforce strict ordering and prevent duplicate/replayed batches","when slot ranges overlap or multiple updates happen in the same slot."],"type":"u64"},{"name":"deleverage_withdraw_last_admin_update_slot","docs":["Last slot covered by an admin deleverage withdraw-limit aggregation update."],"type":"u64"},{"name":"deleverage_withdraw_last_admin_update_seq","docs":["Monotonic sequence number for admin deleverage withdraw-limit updates."],"type":"u64"},{"name":"delegate_flow_admin","docs":["Can modify flow-control status for the group, i.e. update the withdraw caches with flow","information from banks. Typically this is a hot wallet that lives in e.g. some cron job. If","compromised, flow control can be effectively disabled until the admin is restored, which","does not itself compromise any funds, and is merely annoying."],"type":"pubkey"},{"name":"_padding_0","type":{"array":[{"array":["u64",2]},2]}},{"name":"_padding_1","type":{"array":[{"array":["u64",2]},32]}}]}},{"name":"MarginfiGroupConfigureEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"admin","type":{"option":"pubkey"}},{"name":"flags","type":"u64"}]}},{"name":"MarginfiGroupCreateEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}}]}},{"name":"MinimalObligation","docs":["A minimal copy of Kamino's Obligation for zero-copy deserialization"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"tag","type":"u64"},{"name":"last_update_slot","docs":["Kamino obligations are only good for one slot, e.g. `refresh_obligation` must have run within the","same slot as any ix that needs a non-stale obligation e.g. withdraw."],"type":"u64"},{"name":"last_update_stale","docs":["True if the obligation is stale, which will cause various ixes like withdraw to fail. Typically","set to true in any tx that modifies obligation balance, and set to false at the end of a","successful `refresh_obligation`","* 0 = false, 1 = true"],"type":"u8"},{"name":"last_update_price_status","docs":["Each bit represents a passed check in price status.","* 63 = all checks passed","","Otherwise:","* PRICE_LOADED = 0b_0000_0001; // 1","* PRICE_AGE_CHECKED = 0b_0000_0010; // 2","* TWAP_CHECKED = 0b_0000_0100; // 4","* TWAP_AGE_CHECKED = 0b_0000_1000; // 8","* HEURISTIC_CHECKED = 0b_0001_0000; // 16","* PRICE_USAGE_ALLOWED = 0b_0010_0000; // 32"],"type":"u8"},{"name":"last_update_placeholder","type":{"array":["u8",6]}},{"name":"lending_market","type":"pubkey"},{"name":"owner","docs":["For mrgn banks, the bank's Liquidity Vault Authority (a pda which can be derived if the bank","key is known)"],"type":"pubkey"},{"name":"deposits","type":{"array":[{"defined":{"name":"MinimalObligationCollateral"}},8]}},{"name":"lowest_reserve_deposit_liquidation_ltv","type":"u64"},{"name":"deposited_value_sf","type":{"array":["u8",16]}},{"name":"padding_part1","type":{"array":["u8",512]}},{"name":"padding_part2","type":{"array":["u8",512]}},{"name":"padding_part3","type":{"array":["u8",512]}},{"name":"padding_part4","type":{"array":["u8",512]}},{"name":"padding_part5a","type":{"array":["u8",64]}},{"name":"padding_part5c","type":{"array":["u8",24]}}]}},{"name":"MinimalObligationCollateral","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"deposit_reserve","type":"pubkey"},{"name":"deposited_amount","docs":["In collateral token (NOT liquidity token), use `collateral_to_liquidity` to convert back to","liquidity token!","* Always 6 decimals"],"type":"u64"},{"name":"market_value_sf","docs":["* In dollars, based on last oracle price update","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino.","* A float (arbitrary decimals)"],"type":{"array":["u8",16]}},{"name":"borrowed_amount_against_this_collateral_in_elevation_group","type":"u64"},{"name":"padding","type":{"array":["u64",9]}}]}},{"name":"MinimalReserve","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"version","type":"u64"},{"name":"slot","docs":["Kamino reserves are only good for one slot, e.g. `refresh_reserve` must have run within the","same slot as any ix that needs a non-stale reserve e.g. withdraw."],"type":"u64"},{"name":"stale","docs":["True if the reserve is stale, which will cause various ixes like withdraw to fail. Typically","set to true in any tx that modifies reserve balance, and set to false at the end of a","successful `refresh_reserve`","* 0 = false, 1 = true"],"type":"u8"},{"name":"price_status","docs":["Each bit represents a passed check in price status.","* 63 = all checks passed","","Otherwise:","* PRICE_LOADED = 0b_0000_0001; // 1","* PRICE_AGE_CHECKED = 0b_0000_0010; // 2","* TWAP_CHECKED = 0b_0000_0100; // 4","* TWAP_AGE_CHECKED = 0b_0000_1000; // 8","* HEURISTIC_CHECKED = 0b_0001_0000; // 16","* PRICE_USAGE_ALLOWED = 0b_0010_0000; // 32"],"type":"u8"},{"name":"placeholder","type":{"array":["u8",6]}},{"name":"lending_market","type":"pubkey"},{"name":"farm_collateral","type":"pubkey"},{"name":"farm_debt","type":"pubkey"},{"name":"mint_pubkey","type":"pubkey"},{"name":"supply_vault","docs":["* A PDA"],"type":"pubkey"},{"name":"fee_vault","docs":["* A PDA"],"type":"pubkey"},{"name":"available_amount","docs":["In simple terms: (amount in supply vault - outstanding borrows)","* In token, with `mint_decimals`"],"type":"u64"},{"name":"borrowed_amount_sf","docs":["* In token, with `mint_decimals`","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"market_price_sf","docs":["* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"market_price_last_updated_ts","type":"u64"},{"name":"mint_decimals","type":"u64"},{"name":"deposit_limit_crossed_timestamp","type":"u64"},{"name":"borrow_limit_crossed_timestamp","type":"u64"},{"name":"cumulative_borrow_rate_bsf","type":{"array":["u8",48]}},{"name":"accumulated_protocol_fees_sf","docs":["* In token, with `mint_decimals`","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"accumulated_referrer_fees_sf","docs":["* In token, with `mint_decimals`","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"pending_referrer_fees_sf","docs":["* In token, with `mint_decimals`","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"absolute_referral_rate_sf","docs":["* In token, with `mint_decimals`","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"token_program","docs":["Token or Token22. If token22, note that Kamino does not support all Token22 extensions."],"type":"pubkey"},{"name":"padding2_part1","type":{"array":["u8",256]}},{"name":"padding2_part2","type":{"array":["u8",128]}},{"name":"padding2_part3","type":{"array":["u8",24]}},{"name":"padding3","type":{"array":["u8",512]}},{"name":"padding_part1","type":{"array":["u8",512]}},{"name":"padding_part2","type":{"array":["u8",512]}},{"name":"padding_part3","type":{"array":["u8",128]}},{"name":"padding_part4","type":{"array":["u8",48]}},{"name":"collateral_mint_pubkey","docs":["Mints collateral tokens","* A PDA","* technically 6 decimals, but uses `mint_decimals` regardless for all purposes","* authority = lending_market_authority"],"type":"pubkey"},{"name":"mint_total_supply","docs":["Total number of collateral tokens","* uses `mint_decimals`, even though it's technically 6 decimals under the hood"],"type":"u64"},{"name":"collateral_supply_vault","docs":["* A PDA"],"type":"pubkey"},{"name":"padding1_reserve_collateral","type":{"array":["u8",512]}},{"name":"padding2_reserve_collateral","type":{"array":["u8",512]}},{"name":"padding4_part1","type":{"array":["u8",4096]}},{"name":"padding4_part2","type":{"array":["u8",512]}},{"name":"padding4_part3","type":{"array":["u8",256]}},{"name":"padding4_part4","type":{"array":["u8",64]}},{"name":"padding4_part5","type":{"array":["u8",32]}},{"name":"padding4_part6","type":{"array":["u8",8]}}]}},{"name":"MinimalSpotMarket","docs":["Minimal representation of Drift's SpotMarket account","Only includes the fields we actually need for marginfi integration","https://github.com/drift-labs/protocol-v2/tree/master/programs/drift/src/state/spot_market.rs#L35"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pubkey","docs":["The address of the spot market. It is a pda of the market index"],"type":"pubkey"},{"name":"oracle","docs":["The oracle used to price the markets deposits/borrows"],"type":"pubkey"},{"name":"mint","docs":["The token mint of the market"],"type":"pubkey"},{"name":"vault","docs":["The vault used to store the market's deposits"],"type":"pubkey"},{"name":"_padding1","type":{"array":[{"array":["u64",4]},9]}},{"name":"_padding2","type":{"array":["u8",8]}},{"name":"deposit_balance","docs":["All the fields we need for testing (stored as raw bytes for simplicity)"],"type":{"array":["u8",16]}},{"name":"borrow_balance","type":{"array":["u8",16]}},{"name":"cumulative_deposit_interest","type":{"array":["u8",16]}},{"name":"cumulative_borrow_interest","type":{"array":["u8",16]}},{"name":"_padding3","type":{"array":["u64",9]}},{"name":"last_interest_ts","docs":["Last time the cumulative deposit and borrow interest was updated","Offset: 568 bytes from start of struct (including discriminator)"],"type":"u64"},{"name":"_padding4","type":{"array":["u64",13]}},{"name":"decimals","type":"u32"},{"name":"market_index","type":"u16"},{"name":"_padding5","type":{"array":["u16",24]}},{"name":"_padding6","type":{"array":["u8",1]}},{"name":"pool_id","type":"u8"},{"name":"_padding7","docs":["Padding to reach 776 bytes total (including discriminator)"],"type":{"array":["u64",5]}}]}},{"name":"MinimalUser","docs":["Minimal representation of Drift's User account","Only includes the fields we actually need"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"authority","docs":["The owner/authority of the account"],"type":"pubkey"},{"name":"delegate","docs":["An addresses that can control the account on the authority's behalf"],"type":"pubkey"},{"name":"name","docs":["Encoded display name for the account"],"type":{"array":["u8",32]}},{"name":"spot_positions","docs":["The user's spot positions (8 positions)"],"type":{"array":[{"defined":{"name":"SpotPosition"}},8]}},{"name":"_padding1","docs":["Skip to the fields we need at the end"],"type":{"array":["u64",256]}},{"name":"_padding2","type":{"array":["u64",128]}},{"name":"_padding3","type":{"array":["u64",64]}},{"name":"_padding4","type":{"array":["u64",32]}},{"name":"_padding5","type":{"array":["u64",8]}},{"name":"_padding6","type":{"array":["u64",2]}},{"name":"_padding7","type":{"array":["u16",1]}},{"name":"sub_account_id","docs":["Sub account id for this user account"],"type":"u16"},{"name":"status","type":{"defined":{"name":"UserStatus"}}},{"name":"_padding8","type":{"array":["u8",27]}}]}},{"name":"OracleSetup","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"None"},{"name":"PythLegacy"},{"name":"SwitchboardV2"},{"name":"PythPushOracle"},{"name":"SwitchboardPull"},{"name":"StakedWithPythPush"},{"name":"KaminoPythPush"},{"name":"KaminoSwitchboardPull"},{"name":"Fixed"},{"name":"DriftPythPull"},{"name":"DriftSwitchboardPull"},{"name":"SolendPythPull"},{"name":"SolendSwitchboardPull"},{"name":"FixedKamino"},{"name":"FixedDrift"},{"name":"JuplendPythPull"},{"name":"JuplendSwitchboardPull"},{"name":"FixedJuplend"}]}},{"name":"Order","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"marginfi_account","type":"pubkey"},{"name":"stop_loss","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"take_profit","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"placeholder","docs":["Reserved for future use"],"type":"u64"},{"name":"max_slippage","docs":["* a %, as u32, out of 100%, e.g. 50% = .5 * u32::MAX"],"type":"u32"},{"name":"pad0","type":{"array":["u8",4]}},{"name":"tags","docs":["Active tags (currently 2). Remaining capacity is stored in padding for layout compatibility.","Padding byte `ORDER_TAG_PADDING - 1` stores the tag count for forward compatibility. (u16 *","2 = 4 bytes)"],"type":{"array":["u16",2]}},{"name":"pad1","type":{"array":["u8",4]}},{"name":"_tags_padding","type":{"array":["u8",32]}},{"name":"trigger","docs":["Stop Loss (0), Take Profit (1), or Both (2)"],"type":{"defined":{"name":"OrderTriggerType"}}},{"name":"bump","docs":["Bump to derive this pda"],"type":"u8"},{"name":"pad2","type":{"array":["u8",6]}},{"name":"_reserved1","type":{"array":[{"array":["u8",32]},4]}}]}},{"name":"OrderTrigger","repr":{"kind":"c"},"type":{"kind":"enum","variants":[{"name":"StopLoss","fields":[{"name":"threshold","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"max_slippage","type":"u32"}]},{"name":"TakeProfit","fields":[{"name":"threshold","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"max_slippage","type":"u32"}]},{"name":"Both","fields":[{"name":"stop_loss","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"take_profit","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"max_slippage","type":"u32"}]}]}},{"name":"OrderTriggerType","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"StopLoss"},{"name":"TakeProfit"},{"name":"Both"}]}},{"name":"PanicState","docs":["Panic state for emergency protocol pausing"],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pause_flags","docs":["Whether the protocol is currently paused (1 = paused, 0 = not paused)"],"type":"u8"},{"name":"daily_pause_count","docs":["Number of times paused today (resets every 24 hours)"],"type":"u8"},{"name":"consecutive_pause_count","docs":["Number of consecutive pauses (resets when unpause happens)"],"type":"u8"},{"name":"_reserved","type":{"array":["u8",5]}},{"name":"pause_start_timestamp","docs":["Timestamp when the current pause started (0 if not paused)","* When a pause is extended before expiring, this could be in the future."],"type":"i64"},{"name":"last_daily_reset_timestamp","docs":["Timestamp of the last daily reset (for tracking daily pause count)"],"type":"i64"},{"name":"_reserved_space","docs":["Reserved for future use (making total struct 32 bytes)"],"type":{"array":["u8",8]}}]}},{"name":"PanicStateCache","docs":["Cached panic state information for fast checking during user operations"],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pause_flags","docs":["Whether the protocol is currently paused (1 = paused, 0 = not paused)"],"type":"u8"},{"name":"_reserved","type":{"array":["u8",7]}},{"name":"pause_start_timestamp","docs":["Timestamp when the current pause started (0 if not paused)"],"type":"i64"},{"name":"last_cache_update","docs":["Timestamp when this cache was last updated"],"type":"i64"}]}},{"name":"RateLimitFlowEvent","docs":["Emitted when a bank-level inflow or outflow is recorded.","The delegate flow admin aggregates these off-chain and","updates the group rate limiter via `update_group_rate_limiter`."],"type":{"kind":"struct","fields":[{"name":"group","type":"pubkey"},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"flow_direction","docs":["0 = outflow (withdraw/borrow), 1 = inflow (deposit/repay)"],"type":"u8"},{"name":"native_amount","docs":["Amount in native tokens"],"type":"u64"},{"name":"mint_decimals","type":"u8"},{"name":"current_timestamp","docs":["Unix timestamp when the flow was recorded"],"type":"i64"}]}},{"name":"RateLimitWindow","docs":["A sliding window rate limiter that tracks net outflow over a time window.","Uses weighted blend of previous and current windows for smooth transitions.","","Net outflow = (withdraws + borrows) - (deposits + repays).","A negative net outflow increases remaining capacity for subsequent outflows."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"max_outflow","docs":["Maximum net outflow allowed per window (0 = disabled).","For bank-level: denominated in native tokens.","For group-level: denominated in USD."],"type":"u64"},{"name":"window_duration","docs":["Window duration in seconds (e.g., 3600 for hourly, 86400 for daily)."],"type":"u64"},{"name":"window_start","docs":["Unix timestamp when the current window started."],"type":"i64"},{"name":"prev_window_outflow","docs":["Net outflow accumulated in the previous window.","Signed to allow tracking when inflows exceed outflows."],"type":"i64"},{"name":"cur_window_outflow","docs":["Net outflow accumulated in the current window.","Signed to allow tracking when inflows exceed outflows."],"type":"i64"}]}},{"name":"RatePoint","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"util","docs":["The utilization rate where `rate` applies","* a %, as u32, out of 100%, e.g. 50% = .5 * u32::MAX"],"type":"u32"},{"name":"rate","docs":["The base rate that applies","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":"u32"}]}},{"name":"RiskTier","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Collateral"},{"name":"Isolated"}]}},{"name":"SetKeeperCloseFlagsEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank_keys","type":{"option":{"vec":"pubkey"}}}]}},{"name":"SolendConfigCompact","docs":["Used to configure Solend banks. A simplified version of `BankConfigCompact` which omits most","values related to interest since Solend banks cannot earn interest or be borrowed against."],"type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"oracle_setup","docs":["Either `SolendPythPull` or `SolendSwitchboardPull`"],"type":{"defined":{"name":"OracleSetup"}}},{"name":"operational_state","docs":["Bank operational state - allows starting banks in paused state"],"type":{"defined":{"name":"BankOperationalState"}}},{"name":"risk_tier","docs":["Risk tier - determines if assets can be borrowed in isolation"],"type":{"defined":{"name":"RiskTier"}}},{"name":"config_flags","docs":["Config flags for future-proofing"],"type":"u8"},{"name":"total_asset_value_init_limit","type":"u64"},{"name":"oracle_max_age","type":"u16"},{"name":"oracle_max_confidence","docs":["Oracle confidence threshold (0 = use default 10%)"],"type":"u32"}]}},{"name":"SolendMinimalReserve","serialization":"bytemuck","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"last_update_slot","docs":["Last slot when supply and rates updated"],"type":"u64"},{"name":"last_update_stale","docs":["True when marked stale"],"type":"u8"},{"name":"lending_market","docs":["Lending market address"],"type":"pubkey"},{"name":"liquidity_mint_pubkey","type":"pubkey"},{"name":"liquidity_mint_decimals","type":"u8"},{"name":"liquidity_supply_pubkey","type":"pubkey"},{"name":"liquidity_pyth_oracle_pubkey","type":"pubkey"},{"name":"liquidity_switchboard_oracle_pubkey","type":"pubkey"},{"name":"liquidity_available_amount","type":"u64"},{"name":"liquidity_borrowed_amount_wads","type":{"array":["u8",16]}},{"name":"liquidity_cumulative_borrow_rate_wads","type":{"array":["u8",16]}},{"name":"liquidity_market_price","type":{"array":["u8",16]}},{"name":"collateral_mint_pubkey","type":"pubkey"},{"name":"collateral_mint_total_supply","type":"u64"},{"name":"collateral_supply_pubkey","type":"pubkey"},{"name":"config_optimal_utilization_rate","type":"u8"},{"name":"config_loan_to_value_ratio","type":"u8"},{"name":"config_liquidation_bonus","type":"u8"},{"name":"config_liquidation_threshold","type":"u8"},{"name":"_padding_to_fees_64","type":{"array":["u8",64]}},{"name":"_padding_to_fees_6","type":{"array":["u8",6]}},{"name":"liquidity_accumulated_protocol_fees_wads","type":{"array":["u8",16]}},{"name":"_padding_final_128","type":{"array":["u8",128]}},{"name":"_padding_final_64","type":{"array":["u8",64]}},{"name":"_padding_final_32","type":{"array":["u8",32]}},{"name":"_padding_final_6","type":{"array":["u8",6]}}]}},{"name":"SpotBalanceType","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Deposit"},{"name":"Borrow"}]}},{"name":"SpotPosition","docs":["Minimal representation of a spot position within a User account"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"scaled_balance","docs":["The scaled balance of the position.","* Precision: SPOT_BALANCE_PRECISION"],"type":"u64"},{"name":"open_bids","docs":["How many spot bids the user has open","* Precision: token mint precision"],"type":"i64"},{"name":"open_asks","docs":["How many spot asks the user has open","* Precision: token mint precision"],"type":"i64"},{"name":"cumulative_deposits","docs":["The cumulative deposits/borrows a user has made","* Precision: token mint precision"],"type":"i64"},{"name":"market_index","docs":["The market index of the corresponding spot market"],"type":"u16"},{"name":"balance_type","docs":["Whether the position is deposit or borrow"],"type":{"defined":{"name":"SpotBalanceType"}}},{"name":"open_orders","docs":["Number of open orders"],"type":"u8"},{"name":"padding","docs":["Padding"],"type":{"array":["u8",4]}}]}},{"name":"StakedSettings","docs":["Unique per-group. Staked Collateral banks created under a group automatically use these","settings. Groups that have not created this struct cannot create staked collateral banks. When","this struct updates, changes must be permissionlessly propagated to staked collateral banks.","Administrators can also edit the bank manually, i.e. with configure_bank, to temporarily make","changes such as raising the deposit limit for a single bank."],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"key","docs":["This account's own key. A PDA derived from `marginfi_group` and `STAKED_SETTINGS_SEED`"],"type":"pubkey"},{"name":"marginfi_group","docs":["Group for which these settings apply"],"type":"pubkey"},{"name":"oracle","docs":["Generally, the Pyth push oracle for SOL"],"type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"total_asset_value_init_limit","type":"u64"},{"name":"oracle_max_age","type":"u16"},{"name":"risk_tier","type":{"defined":{"name":"RiskTier"}}},{"name":"_pad0","type":{"array":["u8",5]}},{"name":"_reserved0","docs":["The following values are irrelevant because staked collateral positions do not support","borrowing."],"type":{"array":["u8",8]}},{"name":"_reserved1","type":{"array":["u8",32]}},{"name":"_reserved2","type":{"array":["u8",64]}}]}},{"name":"StakedSettingsConfig","type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"total_asset_value_init_limit","type":"u64"},{"name":"oracle_max_age","type":"u16"},{"name":"risk_tier","docs":["WARN: You almost certainly want \"Collateral\", using Isolated risk tier makes the asset","worthless as collateral, and is generally useful only when creating a staked collateral pool","for rewards purposes only."],"type":{"defined":{"name":"RiskTier"}}}]}},{"name":"StakedSettingsEditConfig","type":{"kind":"struct","fields":[{"name":"oracle","type":{"option":"pubkey"}},{"name":"asset_weight_init","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"asset_weight_maint","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"deposit_limit","type":{"option":"u64"}},{"name":"total_asset_value_init_limit","type":{"option":"u64"}},{"name":"oracle_max_age","type":{"option":"u16"}},{"name":"risk_tier","docs":["WARN: You almost certainly want \"Collateral\", using Isolated risk tier makes the asset","worthless as collateral, making all outstanding accounts eligible to be liquidated, and is","generally useful only when creating a staked collateral pool for rewards purposes only."],"type":{"option":{"defined":{"name":"RiskTier"}}}}]}},{"name":"UserStatus","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Active"},{"name":"BeingLiquidated"},{"name":"Bankrupt"},{"name":"ReduceOnly"},{"name":"AdvancedLp"},{"name":"ProtectedMakerOrders"}]}},{"name":"WithdrawWindowCache","docs":["Tracks deleverage withdrawal limits to protect against compromised risk admin"],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"daily_limit","docs":["Maximum USD value that can be withdrawn per day via deleverage (0 = no limit)"],"type":"u32"},{"name":"withdrawn_today","docs":["USD value withdrawn today via deleverage (approximate, rounded)"],"type":"u32"},{"name":"last_daily_reset_timestamp","docs":["Unix timestamp of the last daily counter reset"],"type":"i64"}]}},{"name":"WrappedI80F48","serialization":"bytemuck","repr":{"kind":"c","align":8},"type":{"kind":"struct","fields":[{"name":"value","type":{"array":["u8",16]}}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/marinade_finance.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.json b/olddocs/archivekbot2/idls/marinade_finance.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.json new file mode 100644 index 0000000..8b5674a --- /dev/null +++ b/olddocs/archivekbot2/idls/marinade_finance.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"marinade_finance","instructions":[{"name":"initialize","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"reservePda","isMut":false,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"msolMint","isMut":false,"isSigner":false},{"name":"operationalSolAccount","isMut":false,"isSigner":false},{"name":"liqPool","accounts":[{"name":"lpMint","isMut":false,"isSigner":false},{"name":"solLegPda","isMut":false,"isSigner":false},{"name":"msolLeg","isMut":false,"isSigner":false}]},{"name":"treasuryMsolAccount","isMut":false,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"data","type":{"defined":"InitializeData"}}]},{"name":"changeAuthority","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"adminAuthority","isMut":false,"isSigner":true}],"args":[{"name":"data","type":{"defined":"ChangeAuthorityData"}}]},{"name":"addValidator","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"managerAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"validatorVote","isMut":false,"isSigner":false},{"name":"duplicationFlag","isMut":true,"isSigner":false,"docs":["by initializing this account we mark the validator as added"]},{"name":"rentPayer","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"score","type":"u32"}]},{"name":"removeValidator","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"managerAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"duplicationFlag","isMut":true,"isSigner":false},{"name":"operationalSolAccount","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u32"},{"name":"validatorVote","type":"publicKey"}]},{"name":"setValidatorScore","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"managerAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u32"},{"name":"validatorVote","type":"publicKey"},{"name":"score","type":"u32"}]},{"name":"configValidatorSystem","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"managerAuthority","isMut":false,"isSigner":true}],"args":[{"name":"extraRuns","type":"u32"}]},{"name":"deposit","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":true,"isSigner":false},{"name":"liqPoolMsolLegAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"transferFrom","isMut":true,"isSigner":true},{"name":"mintTo","isMut":true,"isSigner":false,"docs":["user mSOL Token account to send the mSOL"]},{"name":"msolMintAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"lamports","type":"u64"}]},{"name":"depositStakeAccount","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeAuthority","isMut":false,"isSigner":true},{"name":"duplicationFlag","isMut":true,"isSigner":false},{"name":"rentPayer","isMut":true,"isSigner":true},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"mintTo","isMut":true,"isSigner":false,"docs":["user mSOL Token account to send the mSOL"]},{"name":"msolMintAuthority","isMut":false,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"validatorIndex","type":"u32"}]},{"name":"liquidUnstake","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":true,"isSigner":false},{"name":"treasuryMsolAccount","isMut":true,"isSigner":false},{"name":"getMsolFrom","isMut":true,"isSigner":false},{"name":"getMsolFromAuthority","isMut":false,"isSigner":true},{"name":"transferSolTo","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"msolAmount","type":"u64"}]},{"name":"addLiquidity","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"lpMintAuthority","isMut":false,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":false,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"transferFrom","isMut":true,"isSigner":true},{"name":"mintTo","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"lamports","type":"u64"}]},{"name":"removeLiquidity","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"burnFrom","isMut":true,"isSigner":false},{"name":"burnFromAuthority","isMut":false,"isSigner":true},{"name":"transferSolTo","isMut":true,"isSigner":false},{"name":"transferMsolTo","isMut":true,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":true,"isSigner":false},{"name":"liqPoolMsolLegAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"tokens","type":"u64"}]},{"name":"configLp","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"adminAuthority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"ConfigLpParams"}}]},{"name":"configMarinade","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"adminAuthority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"ConfigMarinadeParams"}}]},{"name":"orderUnstake","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"burnMsolFrom","isMut":true,"isSigner":false},{"name":"burnMsolAuthority","isMut":false,"isSigner":true},{"name":"newTicketAccount","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"msolAmount","type":"u64"}]},{"name":"claim","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"ticketAccount","isMut":true,"isSigner":false},{"name":"transferSolTo","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"stakeReserve","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"validatorVote","isMut":true,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":true},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"rentPayer","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"epochSchedule","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeConfig","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"validatorIndex","type":"u32"}]},{"name":"updateActive","accounts":[{"name":"common","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeWithdrawAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"msolMintAuthority","isMut":false,"isSigner":false},{"name":"treasuryMsolAccount","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}]},{"name":"validatorList","isMut":true,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"}]},{"name":"updateDeactivated","accounts":[{"name":"common","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeWithdrawAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"msolMintAuthority","isMut":false,"isSigner":false},{"name":"treasuryMsolAccount","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}]},{"name":"operationalSolAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"}]},{"name":"deactivateStake","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"reservePda","isMut":false,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"splitStakeAccount","isMut":true,"isSigner":true},{"name":"splitStakeRentPayer","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"epochSchedule","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"}]},{"name":"emergencyUnstake","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"validatorManagerAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"}]},{"name":"partialUnstake","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"validatorManagerAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":false,"isSigner":false},{"name":"splitStakeAccount","isMut":true,"isSigner":true},{"name":"splitStakeRentPayer","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"},{"name":"desiredUnstakeAmount","type":"u64"}]},{"name":"mergeStakes","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"destinationStake","isMut":true,"isSigner":false},{"name":"sourceStake","isMut":true,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"stakeWithdrawAuthority","isMut":false,"isSigner":false},{"name":"operationalSolAccount","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"destinationStakeIndex","type":"u32"},{"name":"sourceStakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"}]},{"name":"redelegate","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":false,"isSigner":false},{"name":"splitStakeAccount","isMut":true,"isSigner":true},{"name":"splitStakeRentPayer","isMut":true,"isSigner":true},{"name":"destValidatorAccount","isMut":false,"isSigner":false},{"name":"redelegateStakeAccount","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeConfig","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"sourceValidatorIndex","type":"u32"},{"name":"destValidatorIndex","type":"u32"}]},{"name":"pause","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pauseAuthority","isMut":false,"isSigner":true}],"args":[]},{"name":"resume","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pauseAuthority","isMut":false,"isSigner":true}],"args":[]},{"name":"withdrawStakeAccount","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"burnMsolFrom","isMut":true,"isSigner":false},{"name":"burnMsolAuthority","isMut":true,"isSigner":true},{"name":"treasuryMsolAccount","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeWithdrawAuthority","isMut":false,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"splitStakeAccount","isMut":true,"isSigner":true},{"name":"splitStakeRentPayer","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"},{"name":"msolAmount","type":"u64"},{"name":"beneficiary","type":"publicKey"}]},{"name":"reallocValidatorList","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"adminAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"rentFunds","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"capacity","type":"u32"}]},{"name":"reallocStakeList","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"adminAuthority","isMut":false,"isSigner":true},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"rentFunds","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"capacity","type":"u32"}]}],"accounts":[{"name":"TicketAccountData","type":{"kind":"struct","fields":[{"name":"stateAddress","type":"publicKey"},{"name":"beneficiary","type":"publicKey"},{"name":"lamportsAmount","type":"u64"},{"name":"createdEpoch","type":"u64"}]}},{"name":"State","type":{"kind":"struct","fields":[{"name":"msolMint","type":"publicKey"},{"name":"adminAuthority","type":"publicKey"},{"name":"operationalSolAccount","type":"publicKey"},{"name":"treasuryMsolAccount","type":"publicKey"},{"name":"reserveBumpSeed","type":"u8"},{"name":"msolMintAuthorityBumpSeed","type":"u8"},{"name":"rentExemptForTokenAcc","type":"u64"},{"name":"rewardFee","type":{"defined":"Fee"}},{"name":"stakeSystem","type":{"defined":"StakeSystem"}},{"name":"validatorSystem","type":{"defined":"ValidatorSystem"}},{"name":"liqPool","type":{"defined":"LiqPool"}},{"name":"availableReserveBalance","type":"u64"},{"name":"msolSupply","type":"u64"},{"name":"msolPrice","type":"u64"},{"name":"circulatingTicketCount","docs":["count tickets for delayed-unstake"],"type":"u64"},{"name":"circulatingTicketBalance","docs":["total lamports amount of generated and not claimed yet tickets"],"type":"u64"},{"name":"lentFromReserve","type":"u64"},{"name":"minDeposit","type":"u64"},{"name":"minWithdraw","type":"u64"},{"name":"stakingSolCap","type":"u64"},{"name":"emergencyCoolingDown","type":"u64"},{"name":"pauseAuthority","docs":["emergency pause"],"type":"publicKey"},{"name":"paused","type":"bool"},{"name":"delayedUnstakeFee","type":{"defined":"FeeCents"}},{"name":"withdrawStakeAccountFee","type":{"defined":"FeeCents"}},{"name":"withdrawStakeAccountEnabled","type":"bool"},{"name":"lastStakeMoveEpoch","type":"u64"},{"name":"stakeMoved","type":"u64"},{"name":"maxStakeMovedPerEpoch","type":{"defined":"Fee"}}]}}],"types":[{"name":"SplitStakeAccountInfo","type":{"kind":"struct","fields":[{"name":"account","type":"publicKey"},{"name":"index","type":"u32"}]}},{"name":"U64ValueChange","type":{"kind":"struct","fields":[{"name":"old","type":"u64"},{"name":"new","type":"u64"}]}},{"name":"U32ValueChange","type":{"kind":"struct","fields":[{"name":"old","type":"u32"},{"name":"new","type":"u32"}]}},{"name":"FeeValueChange","type":{"kind":"struct","fields":[{"name":"old","type":{"defined":"Fee"}},{"name":"new","type":{"defined":"Fee"}}]}},{"name":"FeeCentsValueChange","type":{"kind":"struct","fields":[{"name":"old","type":{"defined":"FeeCents"}},{"name":"new","type":{"defined":"FeeCents"}}]}},{"name":"PubkeyValueChange","type":{"kind":"struct","fields":[{"name":"old","type":"publicKey"},{"name":"new","type":"publicKey"}]}},{"name":"BoolValueChange","type":{"kind":"struct","fields":[{"name":"old","type":"bool"},{"name":"new","type":"bool"}]}},{"name":"ChangeAuthorityData","type":{"kind":"struct","fields":[{"name":"admin","type":{"option":"publicKey"}},{"name":"validatorManager","type":{"option":"publicKey"}},{"name":"operationalSolAccount","type":{"option":"publicKey"}},{"name":"treasuryMsolAccount","type":{"option":"publicKey"}},{"name":"pauseAuthority","type":{"option":"publicKey"}}]}},{"name":"ConfigLpParams","type":{"kind":"struct","fields":[{"name":"minFee","type":{"option":{"defined":"Fee"}}},{"name":"maxFee","type":{"option":{"defined":"Fee"}}},{"name":"liquidityTarget","type":{"option":"u64"}},{"name":"treasuryCut","type":{"option":{"defined":"Fee"}}}]}},{"name":"ConfigMarinadeParams","type":{"kind":"struct","fields":[{"name":"rewardsFee","type":{"option":{"defined":"Fee"}}},{"name":"slotsForStakeDelta","type":{"option":"u64"}},{"name":"minStake","type":{"option":"u64"}},{"name":"minDeposit","type":{"option":"u64"}},{"name":"minWithdraw","type":{"option":"u64"}},{"name":"stakingSolCap","type":{"option":"u64"}},{"name":"liquiditySolCap","type":{"option":"u64"}},{"name":"withdrawStakeAccountEnabled","type":{"option":"bool"}},{"name":"delayedUnstakeFee","type":{"option":{"defined":"FeeCents"}}},{"name":"withdrawStakeAccountFee","type":{"option":{"defined":"FeeCents"}}},{"name":"maxStakeMovedPerEpoch","type":{"option":{"defined":"Fee"}}}]}},{"name":"InitializeData","type":{"kind":"struct","fields":[{"name":"adminAuthority","type":"publicKey"},{"name":"validatorManagerAuthority","type":"publicKey"},{"name":"minStake","type":"u64"},{"name":"rewardsFee","type":{"defined":"Fee"}},{"name":"liqPool","type":{"defined":"LiqPoolInitializeData"}},{"name":"additionalStakeRecordSpace","type":"u32"},{"name":"additionalValidatorRecordSpace","type":"u32"},{"name":"slotsForStakeDelta","type":"u64"},{"name":"pauseAuthority","type":"publicKey"}]}},{"name":"LiqPoolInitializeData","type":{"kind":"struct","fields":[{"name":"lpLiquidityTarget","type":"u64"},{"name":"lpMaxFee","type":{"defined":"Fee"}},{"name":"lpMinFee","type":{"defined":"Fee"}},{"name":"lpTreasuryCut","type":{"defined":"Fee"}}]}},{"name":"Fee","type":{"kind":"struct","fields":[{"name":"basisPoints","type":"u32"}]}},{"name":"FeeCents","docs":["FeeCents, same as Fee but / 1_000_000 instead of 10_000","1 FeeCent = 0.0001%, 10_000 FeeCent = 1%, 1_000_000 FeeCent = 100%"],"type":{"kind":"struct","fields":[{"name":"bpCents","type":"u32"}]}},{"name":"LiqPool","type":{"kind":"struct","fields":[{"name":"lpMint","type":"publicKey"},{"name":"lpMintAuthorityBumpSeed","type":"u8"},{"name":"solLegBumpSeed","type":"u8"},{"name":"msolLegAuthorityBumpSeed","type":"u8"},{"name":"msolLeg","type":"publicKey"},{"name":"lpLiquidityTarget","docs":["Liquidity target. If the Liquidity reach this amount, the fee reaches lp_min_discount_fee"],"type":"u64"},{"name":"lpMaxFee","docs":["Liquidity pool max fee"],"type":{"defined":"Fee"}},{"name":"lpMinFee","docs":["SOL/mSOL Liquidity pool min fee"],"type":{"defined":"Fee"}},{"name":"treasuryCut","docs":["Treasury cut"],"type":{"defined":"Fee"}},{"name":"lpSupply","type":"u64"},{"name":"lentFromSolLeg","type":"u64"},{"name":"liquiditySolCap","type":"u64"}]}},{"name":"List","type":{"kind":"struct","fields":[{"name":"account","type":"publicKey"},{"name":"itemSize","type":"u32"},{"name":"count","type":"u32"},{"name":"reserved1","type":"publicKey"},{"name":"reserved2","type":"u32"}]}},{"name":"StakeRecord","type":{"kind":"struct","fields":[{"name":"stakeAccount","type":"publicKey"},{"name":"lastUpdateDelegatedLamports","type":"u64"},{"name":"lastUpdateEpoch","type":"u64"},{"name":"isEmergencyUnstaking","type":"u8"}]}},{"name":"StakeList","type":{"kind":"struct","fields":[]}},{"name":"StakeSystem","type":{"kind":"struct","fields":[{"name":"stakeList","type":{"defined":"List"}},{"name":"delayedUnstakeCoolingDown","type":"u64"},{"name":"stakeDepositBumpSeed","type":"u8"},{"name":"stakeWithdrawBumpSeed","type":"u8"},{"name":"slotsForStakeDelta","docs":["set by admin, how much slots before the end of the epoch, stake-delta can start"],"type":"u64"},{"name":"lastStakeDeltaEpoch","docs":["Marks the start of stake-delta operations, meaning that if somebody starts a delayed-unstake ticket","after this var is set with epoch_num the ticket will have epoch_created = current_epoch+1","(the user must wait one more epoch, because their unstake-delta will be execute in this epoch)"],"type":"u64"},{"name":"minStake","type":"u64"},{"name":"extraStakeDeltaRuns","docs":["can be set by validator-manager-auth to allow a second run of stake-delta to stake late stakers in the last minute of the epoch","so we maximize user's rewards"],"type":"u32"}]}},{"name":"ValidatorRecord","type":{"kind":"struct","fields":[{"name":"validatorAccount","docs":["Validator vote pubkey"],"type":"publicKey"},{"name":"activeBalance","docs":["Validator total balance in lamports"],"type":"u64"},{"name":"score","type":"u32"},{"name":"lastStakeDeltaEpoch","type":"u64"},{"name":"duplicationFlagBumpSeed","type":"u8"}]}},{"name":"ValidatorList","type":{"kind":"struct","fields":[]}},{"name":"ValidatorSystem","type":{"kind":"struct","fields":[{"name":"validatorList","type":{"defined":"List"}},{"name":"managerAuthority","type":"publicKey"},{"name":"totalValidatorScore","type":"u32"},{"name":"totalActiveBalance","docs":["sum of all active lamports staked"],"type":"u64"},{"name":"autoAddValidatorEnabled","docs":["DEPRECATED, no longer used"],"type":"u8"}]}}],"events":[{"name":"ChangeAuthorityEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"adminChange","type":{"option":{"defined":"PubkeyValueChange"}},"index":false},{"name":"validatorManagerChange","type":{"option":{"defined":"PubkeyValueChange"}},"index":false},{"name":"operationalSolAccountChange","type":{"option":{"defined":"PubkeyValueChange"}},"index":false},{"name":"treasuryMsolAccountChange","type":{"option":{"defined":"PubkeyValueChange"}},"index":false},{"name":"pauseAuthorityChange","type":{"option":{"defined":"PubkeyValueChange"}},"index":false}]},{"name":"ConfigLpEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"minFeeChange","type":{"option":{"defined":"FeeValueChange"}},"index":false},{"name":"maxFeeChange","type":{"option":{"defined":"FeeValueChange"}},"index":false},{"name":"liquidityTargetChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"treasuryCutChange","type":{"option":{"defined":"FeeValueChange"}},"index":false}]},{"name":"ConfigMarinadeEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"rewardsFeeChange","type":{"option":{"defined":"FeeValueChange"}},"index":false},{"name":"slotsForStakeDeltaChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"minStakeChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"minDepositChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"minWithdrawChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"stakingSolCapChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"liquiditySolCapChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"withdrawStakeAccountEnabledChange","type":{"option":{"defined":"BoolValueChange"}},"index":false},{"name":"delayedUnstakeFeeChange","type":{"option":{"defined":"FeeCentsValueChange"}},"index":false},{"name":"withdrawStakeAccountFeeChange","type":{"option":{"defined":"FeeCentsValueChange"}},"index":false},{"name":"maxStakeMovedPerEpochChange","type":{"option":{"defined":"FeeValueChange"}},"index":false}]},{"name":"InitializeEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"params","type":{"defined":"InitializeData"},"index":false},{"name":"stakeList","type":"publicKey","index":false},{"name":"validatorList","type":"publicKey","index":false},{"name":"msolMint","type":"publicKey","index":false},{"name":"operationalSolAccount","type":"publicKey","index":false},{"name":"lpMint","type":"publicKey","index":false},{"name":"lpMsolLeg","type":"publicKey","index":false},{"name":"treasuryMsolAccount","type":"publicKey","index":false}]},{"name":"EmergencyPauseEvent","fields":[{"name":"state","type":"publicKey","index":false}]},{"name":"ResumeEvent","fields":[{"name":"state","type":"publicKey","index":false}]},{"name":"ReallocValidatorListEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"count","type":"u32","index":false},{"name":"newCapacity","type":"u32","index":false}]},{"name":"ReallocStakeListEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"count","type":"u32","index":false},{"name":"newCapacity","type":"u32","index":false}]},{"name":"DeactivateStakeEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"lastUpdateStakeDelegation","type":"u64","index":false},{"name":"splitStakeAccount","type":{"option":{"defined":"SplitStakeAccountInfo"}},"index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"validatorVote","type":"publicKey","index":false},{"name":"totalStakeTarget","type":"u64","index":false},{"name":"validatorStakeTarget","type":"u64","index":false},{"name":"totalActiveBalance","type":"u64","index":false},{"name":"delayedUnstakeCoolingDown","type":"u64","index":false},{"name":"validatorActiveBalance","type":"u64","index":false},{"name":"totalUnstakeDelta","type":"u64","index":false},{"name":"unstakedAmount","type":"u64","index":false}]},{"name":"MergeStakesEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"destinationStakeIndex","type":"u32","index":false},{"name":"destinationStakeAccount","type":"publicKey","index":false},{"name":"lastUpdateDestinationStakeDelegation","type":"u64","index":false},{"name":"sourceStakeIndex","type":"u32","index":false},{"name":"sourceStakeAccount","type":"publicKey","index":false},{"name":"lastUpdateSourceStakeDelegation","type":"u64","index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"validatorVote","type":"publicKey","index":false},{"name":"extraDelegated","type":"u64","index":false},{"name":"returnedStakeRent","type":"u64","index":false},{"name":"validatorActiveBalance","type":"u64","index":false},{"name":"totalActiveBalance","type":"u64","index":false},{"name":"operationalSolBalance","type":"u64","index":false}]},{"name":"RedelegateEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"lastUpdateDelegation","type":"u64","index":false},{"name":"sourceValidatorIndex","type":"u32","index":false},{"name":"sourceValidatorVote","type":"publicKey","index":false},{"name":"sourceValidatorScore","type":"u32","index":false},{"name":"sourceValidatorBalance","type":"u64","index":false},{"name":"sourceValidatorStakeTarget","type":"u64","index":false},{"name":"destValidatorIndex","type":"u32","index":false},{"name":"destValidatorVote","type":"publicKey","index":false},{"name":"destValidatorScore","type":"u32","index":false},{"name":"destValidatorBalance","type":"u64","index":false},{"name":"destValidatorStakeTarget","type":"u64","index":false},{"name":"redelegateAmount","type":"u64","index":false},{"name":"splitStakeAccount","type":{"option":{"defined":"SplitStakeAccountInfo"}},"index":false},{"name":"redelegateStakeIndex","type":"u32","index":false},{"name":"redelegateStakeAccount","type":"publicKey","index":false}]},{"name":"StakeReserveEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"validatorVote","type":"publicKey","index":false},{"name":"totalStakeTarget","type":"u64","index":false},{"name":"validatorStakeTarget","type":"u64","index":false},{"name":"reserveBalance","type":"u64","index":false},{"name":"totalActiveBalance","type":"u64","index":false},{"name":"validatorActiveBalance","type":"u64","index":false},{"name":"totalStakeDelta","type":"u64","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"UpdateActiveEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"validatorVote","type":"publicKey","index":false},{"name":"delegationChange","type":{"defined":"U64ValueChange"},"index":false},{"name":"delegationGrowthMsolFees","type":{"option":"u64"},"index":false},{"name":"extraLamports","type":"u64","index":false},{"name":"extraMsolFees","type":{"option":"u64"},"index":false},{"name":"validatorActiveBalance","type":"u64","index":false},{"name":"totalActiveBalance","type":"u64","index":false},{"name":"msolPriceChange","type":{"defined":"U64ValueChange"},"index":false},{"name":"rewardFeeUsed","type":{"defined":"Fee"},"index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"UpdateDeactivatedEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"balanceWithoutRentExempt","type":"u64","index":false},{"name":"lastUpdateDelegatedLamports","type":"u64","index":false},{"name":"msolFees","type":{"option":"u64"},"index":false},{"name":"msolPriceChange","type":{"defined":"U64ValueChange"},"index":false},{"name":"rewardFeeUsed","type":{"defined":"Fee"},"index":false},{"name":"operationalSolBalance","type":"u64","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"ClaimEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"ticket","type":"publicKey","index":false},{"name":"beneficiary","type":"publicKey","index":false},{"name":"circulatingTicketBalance","type":"u64","index":false},{"name":"circulatingTicketCount","type":"u64","index":false},{"name":"reserveBalance","type":"u64","index":false},{"name":"userBalance","type":"u64","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"OrderUnstakeEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"ticketEpoch","type":"u64","index":false},{"name":"ticket","type":"publicKey","index":false},{"name":"beneficiary","type":"publicKey","index":false},{"name":"circulatingTicketBalance","type":"u64","index":false},{"name":"circulatingTicketCount","type":"u64","index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"burnedMsolAmount","type":"u64","index":false},{"name":"solAmount","type":"u64","index":false},{"name":"feeBpCents","type":"u32","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"AddLiquidityEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"solOwner","type":"publicKey","index":false},{"name":"userSolBalance","type":"u64","index":false},{"name":"userLpBalance","type":"u64","index":false},{"name":"solLegBalance","type":"u64","index":false},{"name":"lpSupply","type":"u64","index":false},{"name":"solAddedAmount","type":"u64","index":false},{"name":"lpMinted","type":"u64","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"LiquidUnstakeEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"msolOwner","type":"publicKey","index":false},{"name":"liqPoolSolBalance","type":"u64","index":false},{"name":"liqPoolMsolBalance","type":"u64","index":false},{"name":"treasuryMsolBalance","type":{"option":"u64"},"index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"userSolBalance","type":"u64","index":false},{"name":"msolAmount","type":"u64","index":false},{"name":"msolFee","type":"u64","index":false},{"name":"treasuryMsolCut","type":"u64","index":false},{"name":"solAmount","type":"u64","index":false},{"name":"lpLiquidityTarget","type":"u64","index":false},{"name":"lpMaxFee","type":{"defined":"Fee"},"index":false},{"name":"lpMinFee","type":{"defined":"Fee"},"index":false},{"name":"treasuryCut","type":{"defined":"Fee"},"index":false}]},{"name":"RemoveLiquidityEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"solLegBalance","type":"u64","index":false},{"name":"msolLegBalance","type":"u64","index":false},{"name":"userLpBalance","type":"u64","index":false},{"name":"userSolBalance","type":"u64","index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"lpMintSupply","type":"u64","index":false},{"name":"lpBurned","type":"u64","index":false},{"name":"solOutAmount","type":"u64","index":false},{"name":"msolOutAmount","type":"u64","index":false}]},{"name":"AddValidatorEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"validator","type":"publicKey","index":false},{"name":"index","type":"u32","index":false},{"name":"score","type":"u32","index":false}]},{"name":"RemoveValidatorEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"validator","type":"publicKey","index":false},{"name":"index","type":"u32","index":false},{"name":"operationalSolBalance","type":"u64","index":false}]},{"name":"SetValidatorScoreEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"validator","type":"publicKey","index":false},{"name":"index","type":"u32","index":false},{"name":"scoreChange","type":{"defined":"U32ValueChange"},"index":false}]},{"name":"DepositStakeAccountEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"stake","type":"publicKey","index":false},{"name":"delegated","type":"u64","index":false},{"name":"withdrawer","type":"publicKey","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"validator","type":"publicKey","index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"validatorActiveBalance","type":"u64","index":false},{"name":"totalActiveBalance","type":"u64","index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"msolMinted","type":"u64","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"DepositEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"solOwner","type":"publicKey","index":false},{"name":"userSolBalance","type":"u64","index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"solLegBalance","type":"u64","index":false},{"name":"msolLegBalance","type":"u64","index":false},{"name":"reserveBalance","type":"u64","index":false},{"name":"solSwapped","type":"u64","index":false},{"name":"msolSwapped","type":"u64","index":false},{"name":"solDeposited","type":"u64","index":false},{"name":"msolMinted","type":"u64","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"WithdrawStakeAccountEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stake","type":"publicKey","index":false},{"name":"lastUpdateStakeDelegation","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"validator","type":"publicKey","index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"userMsolAuth","type":"publicKey","index":false},{"name":"msolBurned","type":"u64","index":false},{"name":"msolFees","type":"u64","index":false},{"name":"splitStake","type":"publicKey","index":false},{"name":"beneficiary","type":"publicKey","index":false},{"name":"splitLamports","type":"u64","index":false},{"name":"feeBpCents","type":"u32","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"WrongReserveOwner","msg":"Wrong reserve owner. Must be a system account"},{"code":6001,"name":"NonEmptyReserveData","msg":"Reserve must have no data, but has data"},{"code":6002,"name":"InvalidInitialReserveLamports","msg":"Invalid initial reserve lamports"},{"code":6003,"name":"ZeroValidatorChunkSize","msg":"Zero validator chunk size"},{"code":6004,"name":"TooBigValidatorChunkSize","msg":"Too big validator chunk size"},{"code":6005,"name":"ZeroCreditChunkSize","msg":"Zero credit chunk size"},{"code":6006,"name":"TooBigCreditChunkSize","msg":"Too big credit chunk size"},{"code":6007,"name":"TooLowCreditFee","msg":"Too low credit fee"},{"code":6008,"name":"InvalidMintAuthority","msg":"Invalid mint authority"},{"code":6009,"name":"MintHasInitialSupply","msg":"Non empty initial mint supply"},{"code":6010,"name":"InvalidOwnerFeeState","msg":"Invalid owner fee state"},{"code":6011,"name":"InvalidProgramId","msg":"Invalid program id. For using program from another account please update id in the code"},{"code":6012,"name":"UnexpectedAccount","msg":"Unexpected account"},{"code":6013,"name":"CalculationFailure","msg":"Calculation failure"},{"code":6014,"name":"StakeAccountWithLockup","msg":"You can't deposit a stake-account with lockup"},{"code":6015,"name":"MinStakeIsTooLow","msg":"Min stake is too low"},{"code":6016,"name":"LpMaxFeeIsTooHigh","msg":"Lp max fee is too high"},{"code":6017,"name":"BasisPointsOverflow","msg":"Basis points overflow"},{"code":6018,"name":"LpFeesAreWrongWayRound","msg":"LP min fee > LP max fee"},{"code":6019,"name":"LiquidityTargetTooLow","msg":"Liquidity target too low"},{"code":6020,"name":"TicketNotDue","msg":"Ticket not due. Wait more epochs"},{"code":6021,"name":"TicketNotReady","msg":"Ticket not ready. Wait a few hours and try again"},{"code":6022,"name":"WrongBeneficiary","msg":"Wrong Ticket Beneficiary"},{"code":6023,"name":"StakeAccountNotUpdatedYet","msg":"Stake Account not updated yet"},{"code":6024,"name":"StakeNotDelegated","msg":"Stake Account not delegated"},{"code":6025,"name":"StakeAccountIsEmergencyUnstaking","msg":"Stake Account is emergency unstaking"},{"code":6026,"name":"InsufficientLiquidity","msg":"Insufficient Liquidity in the Liquidity Pool"},{"code":6027,"name":"NotUsed6027"},{"code":6028,"name":"InvalidAdminAuthority","msg":"Invalid admin authority"},{"code":6029,"name":"InvalidValidatorManager","msg":"Invalid validator system manager"},{"code":6030,"name":"InvalidStakeListDiscriminator","msg":"Invalid stake list account discriminator"},{"code":6031,"name":"InvalidValidatorListDiscriminator","msg":"Invalid validator list account discriminator"},{"code":6032,"name":"TreasuryCutIsTooHigh","msg":"Treasury cut is too high"},{"code":6033,"name":"RewardsFeeIsTooHigh","msg":"Reward fee is too high"},{"code":6034,"name":"StakingIsCapped","msg":"Staking is capped"},{"code":6035,"name":"LiquidityIsCapped","msg":"Liquidity is capped"},{"code":6036,"name":"UpdateWindowIsTooLow","msg":"Update window is too low"},{"code":6037,"name":"MinWithdrawIsTooHigh","msg":"Min withdraw is too high"},{"code":6038,"name":"WithdrawAmountIsTooLow","msg":"Withdraw amount is too low"},{"code":6039,"name":"DepositAmountIsTooLow","msg":"Deposit amount is too low"},{"code":6040,"name":"NotEnoughUserFunds","msg":"Not enough user funds"},{"code":6041,"name":"WrongTokenOwnerOrDelegate","msg":"Wrong token owner or delegate"},{"code":6042,"name":"TooEarlyForStakeDelta","msg":"Too early for stake delta"},{"code":6043,"name":"RequiredDelegatedStake","msg":"Required delegated stake"},{"code":6044,"name":"RequiredActiveStake","msg":"Required active stake"},{"code":6045,"name":"RequiredDeactivatingStake","msg":"Required deactivating stake"},{"code":6046,"name":"DepositingNotActivatedStake","msg":"Depositing not activated stake"},{"code":6047,"name":"TooLowDelegationInDepositingStake","msg":"Too low delegation in the depositing stake"},{"code":6048,"name":"WrongStakeBalance","msg":"Wrong deposited stake balance"},{"code":6049,"name":"WrongValidatorAccountOrIndex","msg":"Wrong validator account or index"},{"code":6050,"name":"WrongStakeAccountOrIndex","msg":"Wrong stake account or index"},{"code":6051,"name":"UnstakingOnPositiveDelta","msg":"Delta stake is positive so we must stake instead of unstake"},{"code":6052,"name":"StakingOnNegativeDelta","msg":"Delta stake is negative so we must unstake instead of stake"},{"code":6053,"name":"MovingStakeIsCapped","msg":"Moving stake during an epoch is capped"},{"code":6054,"name":"StakeMustBeUninitialized","msg":"Stake must be uninitialized"},{"code":6055,"name":"DestinationStakeMustBeDelegated","msg":"Destination stake must be delegated"},{"code":6056,"name":"DestinationStakeMustNotBeDeactivating","msg":"Destination stake must not be deactivating"},{"code":6057,"name":"DestinationStakeMustBeUpdated","msg":"Destination stake must be updated"},{"code":6058,"name":"InvalidDestinationStakeDelegation","msg":"Invalid destination stake delegation"},{"code":6059,"name":"SourceStakeMustBeDelegated","msg":"Source stake must be delegated"},{"code":6060,"name":"SourceStakeMustNotBeDeactivating","msg":"Source stake must not be deactivating"},{"code":6061,"name":"SourceStakeMustBeUpdated","msg":"Source stake must be updated"},{"code":6062,"name":"InvalidSourceStakeDelegation","msg":"Invalid source stake delegation"},{"code":6063,"name":"InvalidDelayedUnstakeTicket","msg":"Invalid delayed unstake ticket"},{"code":6064,"name":"ReusingDelayedUnstakeTicket","msg":"Reusing delayed unstake ticket"},{"code":6065,"name":"EmergencyUnstakingFromNonZeroScoredValidator","msg":"Emergency unstaking from non zero scored validator"},{"code":6066,"name":"WrongValidatorDuplicationFlag","msg":"Wrong validator duplication flag"},{"code":6067,"name":"RedepositingMarinadeStake","msg":"Redepositing marinade stake"},{"code":6068,"name":"RemovingValidatorWithBalance","msg":"Removing validator with balance"},{"code":6069,"name":"RedelegateOverTarget","msg":"Redelegate will put validator over stake target"},{"code":6070,"name":"SourceAndDestValidatorsAreTheSame","msg":"Source and Dest Validators are the same"},{"code":6071,"name":"UnregisteredMsolMinted","msg":"Some mSOL tokens was minted outside of marinade contract"},{"code":6072,"name":"UnregisteredLPMinted","msg":"Some LP tokens was minted outside of marinade contract"},{"code":6073,"name":"ListIndexOutOfBounds","msg":"List index out of bounds"},{"code":6074,"name":"ListOverflow","msg":"List overflow"},{"code":6075,"name":"AlreadyPaused","msg":"Requested pause and already Paused"},{"code":6076,"name":"NotPaused","msg":"Requested resume, but not Paused"},{"code":6077,"name":"ProgramIsPaused","msg":"Emergency Pause is Active"},{"code":6078,"name":"InvalidPauseAuthority","msg":"Invalid pause authority"},{"code":6079,"name":"SelectedStakeAccountHasNotEnoughFunds","msg":"Selected Stake account has not enough funds"},{"code":6080,"name":"BasisPointCentsOverflow","msg":"Basis point CENTS overflow"},{"code":6081,"name":"WithdrawStakeAccountIsNotEnabled","msg":"Withdraw stake account is not enabled"},{"code":6082,"name":"WithdrawStakeAccountFeeIsTooHigh","msg":"Withdraw stake account fee is too high"},{"code":6083,"name":"DelayedUnstakeFeeIsTooHigh","msg":"Delayed unstake fee is too high"},{"code":6084,"name":"WithdrawStakeLamportsIsTooLow","msg":"Withdraw stake account value is too low"},{"code":6085,"name":"StakeAccountRemainderTooLow","msg":"Stake account remainder too low"},{"code":6086,"name":"ShrinkingListWithDeletingContents","msg":"Capacity of the list must be not less than it's current size"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/metadao_amm_v0.5.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.json b/olddocs/archivekbot2/idls/metadao_amm_v0.5.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.json new file mode 100644 index 0000000..1a3998f --- /dev/null +++ b/olddocs/archivekbot2/idls/metadao_amm_v0.5.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.json @@ -0,0 +1 @@ +{"version":"0.5.0","name":"amm","instructions":[{"name":"createAmm","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"amm","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"vaultAtaBase","isMut":true,"isSigner":false},{"name":"vaultAtaQuote","isMut":true,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"CreateAmmArgs"}}]},{"name":"addLiquidity","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"amm","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"userLpAccount","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"vaultAtaBase","isMut":true,"isSigner":false},{"name":"vaultAtaQuote","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"AddLiquidityArgs"}}]},{"name":"removeLiquidity","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"amm","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"userLpAccount","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"vaultAtaBase","isMut":true,"isSigner":false},{"name":"vaultAtaQuote","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"RemoveLiquidityArgs"}}]},{"name":"swap","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"amm","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"vaultAtaBase","isMut":true,"isSigner":false},{"name":"vaultAtaQuote","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"SwapArgs"}}]},{"name":"crankThatTwap","accounts":[{"name":"amm","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Amm","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"createdAtSlot","type":"u64"},{"name":"lpMint","type":"publicKey"},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"baseMintDecimals","type":"u8"},{"name":"quoteMintDecimals","type":"u8"},{"name":"baseAmount","type":"u64"},{"name":"quoteAmount","type":"u64"},{"name":"oracle","type":{"defined":"TwapOracle"}},{"name":"seqNum","type":"u64"},{"name":"vaultAtaBase","type":"publicKey"},{"name":"vaultAtaQuote","type":"publicKey"}]}}],"types":[{"name":"CommonFields","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"unixTimestamp","type":"i64"},{"name":"user","type":"publicKey"},{"name":"amm","type":"publicKey"},{"name":"postBaseReserves","type":"u64"},{"name":"postQuoteReserves","type":"u64"},{"name":"oracleLastPrice","type":"u128"},{"name":"oracleLastObservation","type":"u128"},{"name":"oracleAggregator","type":"u128"},{"name":"seqNum","type":"u64"}]}},{"name":"AddLiquidityArgs","type":{"kind":"struct","fields":[{"name":"quoteAmount","docs":["How much quote token you will deposit to the pool"],"type":"u64"},{"name":"maxBaseAmount","docs":["The maximum base token you will deposit to the pool"],"type":"u64"},{"name":"minLpTokens","docs":["The minimum LP token you will get back"],"type":"u64"}]}},{"name":"CreateAmmArgs","type":{"kind":"struct","fields":[{"name":"twapInitialObservation","type":"u128"},{"name":"twapMaxObservationChangePerUpdate","type":"u128"},{"name":"twapStartDelaySlots","type":"u64"}]}},{"name":"RemoveLiquidityArgs","type":{"kind":"struct","fields":[{"name":"lpTokensToBurn","type":"u64"},{"name":"minQuoteAmount","type":"u64"},{"name":"minBaseAmount","type":"u64"}]}},{"name":"SwapArgs","type":{"kind":"struct","fields":[{"name":"swapType","type":{"defined":"SwapType"}},{"name":"inputAmount","type":"u64"},{"name":"outputAmountMin","type":"u64"}]}},{"name":"TwapOracle","type":{"kind":"struct","fields":[{"name":"lastUpdatedSlot","type":"u64"},{"name":"lastPrice","docs":["A price is the number of quote units per base unit multiplied by 1e12.","You cannot simply divide by 1e12 to get a price you can display in the UI","because the base and quote decimals may be different. Instead, do:","ui_price = (price * (10**(base_decimals - quote_decimals))) / 1e12"],"type":"u128"},{"name":"lastObservation","docs":["If we did a raw TWAP over prices, someone could push the TWAP heavily with","a few extremely large outliers. So we use observations, which can only move","by `max_observation_change_per_update` per update."],"type":"u128"},{"name":"aggregator","docs":["Running sum of slots_per_last_update * last_observation.","","Assuming latest observations are as big as possible (u64::MAX * 1e12),","we can store 18 million slots worth of observations, which turns out to","be ~85 days worth of slots.","","Assuming that latest observations are 100x smaller than they could theoretically","be, we can store 8500 days (23 years) worth of them. Even this is a very","very conservative assumption - META/USDC prices should be between 1e9 and","1e15, which would overflow after 1e15 years worth of slots.","","So in the case of an overflow, the aggregator rolls back to 0. It's the","client's responsibility to sanity check the assets or to handle an","aggregator at T2 being smaller than an aggregator at T1."],"type":"u128"},{"name":"maxObservationChangePerUpdate","docs":["The most that an observation can change per update."],"type":"u128"},{"name":"initialObservation","docs":["What the initial `latest_observation` is set to."],"type":"u128"},{"name":"startDelaySlots","docs":["Number of slots after amm.created_at_slot to start recording TWAP"],"type":"u64"}]}},{"name":"SwapType","type":{"kind":"enum","variants":[{"name":"Buy"},{"name":"Sell"}]}}],"events":[{"name":"SwapEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"inputAmount","type":"u64","index":false},{"name":"outputAmount","type":"u64","index":false},{"name":"swapType","type":{"defined":"SwapType"},"index":false}]},{"name":"AddLiquidityEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"quoteAmount","type":"u64","index":false},{"name":"maxBaseAmount","type":"u64","index":false},{"name":"minLpTokens","type":"u64","index":false},{"name":"baseAmount","type":"u64","index":false},{"name":"lpTokensMinted","type":"u64","index":false}]},{"name":"RemoveLiquidityEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"lpTokensBurned","type":"u64","index":false},{"name":"minQuoteAmount","type":"u64","index":false},{"name":"minBaseAmount","type":"u64","index":false},{"name":"baseAmount","type":"u64","index":false},{"name":"quoteAmount","type":"u64","index":false}]},{"name":"CreateAmmEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"twapInitialObservation","type":"u128","index":false},{"name":"twapMaxObservationChangePerUpdate","type":"u128","index":false},{"name":"lpMint","type":"publicKey","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"vaultAtaBase","type":"publicKey","index":false},{"name":"vaultAtaQuote","type":"publicKey","index":false}]},{"name":"CrankThatTwapEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false}]}],"errors":[{"code":6000,"name":"AssertFailed","msg":"An assertion failed"},{"code":6001,"name":"NoSlotsPassed","msg":"Can't get a TWAP before some observations have been stored"},{"code":6002,"name":"NoReserves","msg":"Can't swap through a pool without token reserves on either side"},{"code":6003,"name":"InputAmountOverflow","msg":"Input token amount is too large for a swap, causes overflow"},{"code":6004,"name":"AddLiquidityCalculationError","msg":"Add liquidity calculation error"},{"code":6005,"name":"DecimalScaleError","msg":"Error in decimal scale conversion"},{"code":6006,"name":"SameTokenMints","msg":"You can't create an AMM pool where the token mints are the same"},{"code":6007,"name":"SwapSlippageExceeded","msg":"A user wouldn't have gotten back their `output_amount_min`, reverting"},{"code":6008,"name":"InsufficientBalance","msg":"The user had insufficient balance to do this"},{"code":6009,"name":"ZeroLiquidityRemove","msg":"Must remove a non-zero amount of liquidity"},{"code":6010,"name":"ZeroLiquidityToAdd","msg":"Cannot add liquidity with 0 tokens on either side"},{"code":6011,"name":"ZeroMinLpTokens","msg":"Must specify a non-zero `min_lp_tokens` when adding to an existing pool"},{"code":6012,"name":"AddLiquiditySlippageExceeded","msg":"LP wouldn't have gotten back `lp_token_min`"},{"code":6013,"name":"AddLiquidityMaxBaseExceeded","msg":"LP would have spent more than `max_base_amount`"},{"code":6014,"name":"InsufficientQuoteAmount","msg":"`quote_amount` must be greater than 100000000 when initializing a pool"},{"code":6015,"name":"ZeroSwapAmount","msg":"Users must swap a non-zero amount"},{"code":6016,"name":"ConstantProductInvariantFailed","msg":"K should always be increasing"},{"code":6017,"name":"CastingOverflow","msg":"Casting has caused an overflow"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/metadao_futarchy.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.json b/olddocs/archivekbot2/idls/metadao_futarchy.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.json new file mode 100644 index 0000000..6d88d2c --- /dev/null +++ b/olddocs/archivekbot2/idls/metadao_futarchy.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.json @@ -0,0 +1 @@ +{"version":"0.6.1","name":"futarchy","instructions":[{"name":"initializeDao","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"daoCreator","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsMultisigVault","isMut":false,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"squadsProgramConfig","isMut":false,"isSigner":false},{"name":"squadsProgramConfigTreasury","isMut":true,"isSigner":false},{"name":"spendingLimit","isMut":true,"isSigner":false},{"name":"futarchyAmmBaseVault","isMut":true,"isSigner":false},{"name":"futarchyAmmQuoteVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitializeDaoParams"}}]},{"name":"initializeProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"squadsProposal","isMut":false,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"question","isMut":false,"isSigner":false},{"name":"quoteVault","isMut":false,"isSigner":false},{"name":"baseVault","isMut":false,"isSigner":false},{"name":"proposer","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"stakeToProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"stakerBaseAccount","isMut":true,"isSigner":false},{"name":"proposalBaseAccount","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"staker","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"StakeToProposalParams"}}]},{"name":"unstakeFromProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"stakerBaseAccount","isMut":true,"isSigner":false},{"name":"proposalBaseAccount","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"staker","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UnstakeFromProposalParams"}}]},{"name":"launchProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"baseVault","isMut":false,"isSigner":false},{"name":"quoteVault","isMut":false,"isSigner":false},{"name":"passBaseMint","isMut":false,"isSigner":false},{"name":"passQuoteMint","isMut":false,"isSigner":false},{"name":"failBaseMint","isMut":false,"isSigner":false},{"name":"failQuoteMint","isMut":false,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"ammPassBaseVault","isMut":true,"isSigner":false},{"name":"ammPassQuoteVault","isMut":true,"isSigner":false},{"name":"ammFailBaseVault","isMut":true,"isSigner":false},{"name":"ammFailQuoteVault","isMut":true,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsProposal","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"finalizeProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"question","isMut":true,"isSigner":false},{"name":"squadsProposal","isMut":true,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigProgram","isMut":false,"isSigner":false},{"name":"ammPassBaseVault","isMut":true,"isSigner":false},{"name":"ammPassQuoteVault","isMut":true,"isSigner":false},{"name":"ammFailBaseVault","isMut":true,"isSigner":false},{"name":"ammFailQuoteVault","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false},{"name":"vaultEventAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"quoteVault","isMut":true,"isSigner":false},{"name":"quoteVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"passQuoteMint","isMut":true,"isSigner":false},{"name":"failQuoteMint","isMut":true,"isSigner":false},{"name":"passBaseMint","isMut":true,"isSigner":false},{"name":"failBaseMint","isMut":true,"isSigner":false},{"name":"baseVault","isMut":true,"isSigner":false},{"name":"baseVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"updateDao","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"squadsMultisigVault","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"daoParams","type":{"defined":"UpdateDaoParams"}}]},{"name":"resizeDao","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"spotSwap","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"user","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SpotSwapParams"}}]},{"name":"conditionalSwap","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"proposal","isMut":false,"isSigner":false},{"name":"ammPassBaseVault","isMut":true,"isSigner":false},{"name":"ammPassQuoteVault","isMut":true,"isSigner":false},{"name":"ammFailBaseVault","isMut":true,"isSigner":false},{"name":"ammFailQuoteVault","isMut":true,"isSigner":false},{"name":"trader","isMut":false,"isSigner":true},{"name":"userInputAccount","isMut":true,"isSigner":false},{"name":"userOutputAccount","isMut":true,"isSigner":false},{"name":"baseVault","isMut":true,"isSigner":false},{"name":"baseVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"quoteVault","isMut":true,"isSigner":false},{"name":"quoteVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"passBaseMint","isMut":true,"isSigner":false},{"name":"failBaseMint","isMut":true,"isSigner":false},{"name":"passQuoteMint","isMut":true,"isSigner":false},{"name":"failQuoteMint","isMut":true,"isSigner":false},{"name":"conditionalVaultProgram","isMut":false,"isSigner":false},{"name":"vaultEventAuthority","isMut":false,"isSigner":false},{"name":"question","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ConditionalSwapParams"}}]},{"name":"provideLiquidity","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"liquidityProvider","isMut":false,"isSigner":true},{"name":"liquidityProviderBaseAccount","isMut":true,"isSigner":false},{"name":"liquidityProviderQuoteAccount","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"ammPosition","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ProvideLiquidityParams"}}]},{"name":"withdrawLiquidity","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"positionAuthority","isMut":false,"isSigner":true},{"name":"liquidityProviderBaseAccount","isMut":true,"isSigner":false},{"name":"liquidityProviderQuoteAccount","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"ammPosition","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"WithdrawLiquidityParams"}}]},{"name":"collectFees","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"baseTokenAccount","isMut":true,"isSigner":false},{"name":"quoteTokenAccount","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"executeSpendingLimitChange","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"squadsProposal","isMut":true,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigProgram","isMut":false,"isSigner":false},{"name":"vaultTransaction","isMut":false,"isSigner":false}],"args":[]},{"name":"sponsorProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"teamAddress","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"collectMeteoraDammFees","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsMultisigVault","isMut":true,"isSigner":false},{"name":"squadsMultisigVaultTransaction","isMut":true,"isSigner":false},{"name":"squadsMultisigProposal","isMut":true,"isSigner":false},{"name":"squadsMultisigPermissionlessAccount","isMut":false,"isSigner":true},{"name":"meteoraClaimPositionFeesAccounts","accounts":[{"name":"dammV2Program","isMut":false,"isSigner":false},{"name":"dammV2EventAuthority","isMut":false,"isSigner":false},{"name":"poolAuthority","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"tokenAAccount","isMut":true,"isSigner":false,"docs":["Token account of base tokens recipient"]},{"name":"tokenBAccount","isMut":true,"isSigner":false,"docs":["Token account of quote tokens recipient"]},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"positionNftAccount","isMut":false,"isSigner":false},{"name":"owner","isMut":false,"isSigner":false},{"name":"tokenAProgram","isMut":false,"isSigner":false},{"name":"tokenBProgram","isMut":false,"isSigner":false}]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"initiateVaultSpendOptimisticProposal","accounts":[{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigVault","isMut":false,"isSigner":false},{"name":"squadsSpendingLimit","isMut":false,"isSigner":false},{"name":"squadsProposal","isMut":false,"isSigner":false},{"name":"squadsVaultTransaction","isMut":false,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"daoQuoteVaultAccount","isMut":false,"isSigner":false},{"name":"proposer","isMut":false,"isSigner":true},{"name":"recipient","isMut":false,"isSigner":false},{"name":"recipientQuoteAccount","isMut":false,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitiateVaultSpendOptimisticProposalParams"}}]},{"name":"finalizeOptimisticProposal","accounts":[{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsProposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"adminEnqueueMultisigProposalApproval","accounts":[{"name":"dao","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigProposal","isMut":false,"isSigner":false},{"name":"enqueuedApproval","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"AdminEnqueueMultisigProposalApprovalArgs"}}]},{"name":"executeMultisigProposalApproval","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"rentReceiver","isMut":true,"isSigner":true},{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsMultisigProposal","isMut":true,"isSigner":false},{"name":"enqueuedApproval","isMut":true,"isSigner":false},{"name":"squadsMultisigProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"adminExecuteMultisigProposal","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsMultisigProposal","isMut":true,"isSigner":false},{"name":"squadsMultisigVaultTransaction","isMut":true,"isSigner":false},{"name":"squadsMultisigProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"adminCancelProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"question","isMut":true,"isSigner":false},{"name":"squadsProposal","isMut":true,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigProgram","isMut":false,"isSigner":false},{"name":"ammPassBaseVault","isMut":true,"isSigner":false},{"name":"ammPassQuoteVault","isMut":true,"isSigner":false},{"name":"ammFailBaseVault","isMut":true,"isSigner":false},{"name":"ammFailQuoteVault","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false},{"name":"vaultEventAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"quoteVault","isMut":true,"isSigner":false},{"name":"quoteVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"passQuoteMint","isMut":true,"isSigner":false},{"name":"failQuoteMint","isMut":true,"isSigner":false},{"name":"passBaseMint","isMut":true,"isSigner":false},{"name":"failBaseMint","isMut":true,"isSigner":false},{"name":"baseVault","isMut":true,"isSigner":false},{"name":"baseVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"adminRemoveProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"AmmPosition","type":{"kind":"struct","fields":[{"name":"dao","type":"publicKey"},{"name":"positionAuthority","type":"publicKey"},{"name":"liquidity","type":"u128"}]}},{"name":"Dao","type":{"kind":"struct","fields":[{"name":"amm","docs":["Embedded FutarchyAmm - 1:1 relationship"],"type":{"defined":"FutarchyAmm"}},{"name":"nonce","docs":["`nonce` + `dao_creator` are PDA seeds"],"type":"u64"},{"name":"daoCreator","type":"publicKey"},{"name":"pdaBump","type":"u8"},{"name":"squadsMultisig","type":"publicKey"},{"name":"squadsMultisigVault","type":"publicKey"},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"proposalCount","type":"u32"},{"name":"passThresholdBps","type":"u16"},{"name":"secondsPerProposal","type":"u32"},{"name":"twapInitialObservation","docs":["For manipulation-resistance the TWAP is a time-weighted average observation,","where observation tries to approximate price but can only move by","`twap_max_observation_change_per_update` per update. Because it can only move","a little bit per update, you need to check that it has a good initial observation.","Otherwise, an attacker could create a very high initial observation in the pass","market and a very low one in the fail market to force the proposal to pass.","","We recommend setting an initial observation around the spot price of the token,","and max observation change per update around 2% the spot price of the token.","For example, if the spot price of META is $400, we'd recommend setting an initial","observation of 400 (converted into the AMM prices) and a max observation change per","update of 8 (also converted into the AMM prices). Observations can be updated once","a minute, so 2% allows the proposal market to reach double the spot price or 0","in 50 minutes."],"type":"u128"},{"name":"twapMaxObservationChangePerUpdate","type":"u128"},{"name":"twapStartDelaySeconds","docs":["Forces TWAP calculation to start after `twap_start_delay_seconds` seconds"],"type":"u32"},{"name":"minQuoteFutarchicLiquidity","docs":["As an anti-spam measure and to help liquidity, you need to lock up some liquidity","in both futarchic markets in order to create a proposal.","","For example, for META, we can use a `min_quote_futarchic_liquidity` of","5000 * 1_000_000 (5000 USDC) and a `min_base_futarchic_liquidity` of","10 * 1_000_000_000 (10 META)."],"type":"u64"},{"name":"minBaseFutarchicLiquidity","type":"u64"},{"name":"baseToStake","docs":["Minimum amount of base tokens that must be staked to launch a proposal"],"type":"u64"},{"name":"seqNum","type":"u64"},{"name":"initialSpendingLimit","type":{"option":{"defined":"InitialSpendingLimit"}}},{"name":"teamSponsoredPassThresholdBps","docs":["The percentage, in basis points, the pass price needs to be above the","fail price in order for the proposal to pass for team-sponsored proposals.","","Can be negative to allow for team-sponsored proposals to pass by default."],"type":"i16"},{"name":"teamAddress","type":"publicKey"},{"name":"optimisticProposal","type":{"option":{"defined":"OptimisticProposal"}}},{"name":"isOptimisticGovernanceEnabled","type":"bool"}]}},{"name":"OldDao","type":{"kind":"struct","fields":[{"name":"amm","docs":["Embedded FutarchyAmm - 1:1 relationship"],"type":{"defined":"FutarchyAmm"}},{"name":"nonce","docs":["`nonce` + `dao_creator` are PDA seeds"],"type":"u64"},{"name":"daoCreator","type":"publicKey"},{"name":"pdaBump","type":"u8"},{"name":"squadsMultisig","type":"publicKey"},{"name":"squadsMultisigVault","type":"publicKey"},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"proposalCount","type":"u32"},{"name":"passThresholdBps","type":"u16"},{"name":"secondsPerProposal","type":"u32"},{"name":"twapInitialObservation","docs":["For manipulation-resistance the TWAP is a time-weighted average observation,","where observation tries to approximate price but can only move by","`twap_max_observation_change_per_update` per update. Because it can only move","a little bit per update, you need to check that it has a good initial observation.","Otherwise, an attacker could create a very high initial observation in the pass","market and a very low one in the fail market to force the proposal to pass.","","We recommend setting an initial observation around the spot price of the token,","and max observation change per update around 2% the spot price of the token.","For example, if the spot price of META is $400, we'd recommend setting an initial","observation of 400 (converted into the AMM prices) and a max observation change per","update of 8 (also converted into the AMM prices). Observations can be updated once","a minute, so 2% allows the proposal market to reach double the spot price or 0","in 50 minutes."],"type":"u128"},{"name":"twapMaxObservationChangePerUpdate","type":"u128"},{"name":"twapStartDelaySeconds","docs":["Forces TWAP calculation to start after `twap_start_delay_seconds` seconds"],"type":"u32"},{"name":"minQuoteFutarchicLiquidity","docs":["As an anti-spam measure and to help liquidity, you need to lock up some liquidity","in both futarchic markets in order to create a proposal.","","For example, for META, we can use a `min_quote_futarchic_liquidity` of","5000 * 1_000_000 (5000 USDC) and a `min_base_futarchic_liquidity` of","10 * 1_000_000_000 (10 META)."],"type":"u64"},{"name":"minBaseFutarchicLiquidity","type":"u64"},{"name":"baseToStake","docs":["Minimum amount of base tokens that must be staked to launch a proposal"],"type":"u64"},{"name":"seqNum","type":"u64"},{"name":"initialSpendingLimit","type":{"option":{"defined":"InitialSpendingLimit"}}},{"name":"teamSponsoredPassThresholdBps","docs":["The percentage, in basis points, the pass price needs to be above the","fail price in order for the proposal to pass for team-sponsored proposals.","","Can be negative to allow for team-sponsored proposals to pass by default."],"type":"i16"},{"name":"teamAddress","type":"publicKey"}]}},{"name":"EnqueuedMultisigProposalApproval","type":{"kind":"struct","fields":[{"name":"dao","type":"publicKey"},{"name":"transactionIndex","type":"u64"},{"name":"pdaBump","type":"u8"}]}},{"name":"Proposal","type":{"kind":"struct","fields":[{"name":"number","type":"u32"},{"name":"proposer","type":"publicKey"},{"name":"timestampEnqueued","type":"i64"},{"name":"state","type":{"defined":"ProposalState"}},{"name":"baseVault","type":"publicKey"},{"name":"quoteVault","type":"publicKey"},{"name":"dao","type":"publicKey"},{"name":"pdaBump","type":"u8"},{"name":"question","type":"publicKey"},{"name":"durationInSeconds","type":"u32"},{"name":"squadsProposal","type":"publicKey"},{"name":"passBaseMint","type":"publicKey"},{"name":"passQuoteMint","type":"publicKey"},{"name":"failBaseMint","type":"publicKey"},{"name":"failQuoteMint","type":"publicKey"},{"name":"isTeamSponsored","type":"bool"}]}},{"name":"StakeAccount","type":{"kind":"struct","fields":[{"name":"proposal","type":"publicKey"},{"name":"staker","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"bump","type":"u8"}]}}],"types":[{"name":"CommonFields","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"unixTimestamp","type":"i64"},{"name":"daoSeqNum","type":"u64"}]}},{"name":"AdminEnqueueMultisigProposalApprovalArgs","type":{"kind":"struct","fields":[{"name":"transactionIndex","type":"u64"}]}},{"name":"ConditionalSwapParams","type":{"kind":"struct","fields":[{"name":"market","type":{"defined":"Market"}},{"name":"swapType","type":{"defined":"SwapType"}},{"name":"inputAmount","type":"u64"},{"name":"minOutputAmount","type":"u64"}]}},{"name":"InitializeDaoParams","type":{"kind":"struct","fields":[{"name":"twapInitialObservation","type":"u128"},{"name":"twapMaxObservationChangePerUpdate","type":"u128"},{"name":"twapStartDelaySeconds","type":"u32"},{"name":"minQuoteFutarchicLiquidity","type":"u64"},{"name":"minBaseFutarchicLiquidity","type":"u64"},{"name":"baseToStake","type":"u64"},{"name":"passThresholdBps","type":"u16"},{"name":"secondsPerProposal","type":"u32"},{"name":"nonce","type":"u64"},{"name":"initialSpendingLimit","type":{"option":{"defined":"InitialSpendingLimit"}}},{"name":"teamSponsoredPassThresholdBps","type":"i16"},{"name":"teamAddress","type":"publicKey"}]}},{"name":"InitiateVaultSpendOptimisticProposalParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"ProvideLiquidityParams","type":{"kind":"struct","fields":[{"name":"quoteAmount","docs":["How much quote token you will deposit to the pool"],"type":"u64"},{"name":"maxBaseAmount","docs":["The maximum base token you will deposit to the pool"],"type":"u64"},{"name":"minLiquidity","docs":["The minimum liquidity you will be assigned"],"type":"u128"},{"name":"positionAuthority","docs":["The account that will own the LP position, usually the same as the","liquidity provider"],"type":"publicKey"}]}},{"name":"SpotSwapParams","type":{"kind":"struct","fields":[{"name":"inputAmount","type":"u64"},{"name":"swapType","type":{"defined":"SwapType"}},{"name":"minOutputAmount","type":"u64"}]}},{"name":"StakeToProposalParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"UnstakeFromProposalParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"UpdateDaoParams","type":{"kind":"struct","fields":[{"name":"passThresholdBps","type":{"option":"u16"}},{"name":"secondsPerProposal","type":{"option":"u32"}},{"name":"twapInitialObservation","type":{"option":"u128"}},{"name":"twapMaxObservationChangePerUpdate","type":{"option":"u128"}},{"name":"twapStartDelaySeconds","type":{"option":"u32"}},{"name":"minQuoteFutarchicLiquidity","type":{"option":"u64"}},{"name":"minBaseFutarchicLiquidity","type":{"option":"u64"}},{"name":"baseToStake","type":{"option":"u64"}},{"name":"teamSponsoredPassThresholdBps","type":{"option":"i16"}},{"name":"teamAddress","type":{"option":"publicKey"}},{"name":"isOptimisticGovernanceEnabled","type":{"option":"bool"}}]}},{"name":"WithdrawLiquidityParams","type":{"kind":"struct","fields":[{"name":"liquidityToWithdraw","docs":["How much liquidity to withdraw"],"type":"u128"},{"name":"minBaseAmount","docs":["Minimum base tokens to receive"],"type":"u64"},{"name":"minQuoteAmount","docs":["Minimum quote tokens to receive"],"type":"u64"}]}},{"name":"OptimisticProposal","type":{"kind":"struct","fields":[{"name":"squadsProposal","docs":["The squads proposal currently enqueued for execution if not challenged by a new proposal."],"type":"publicKey"},{"name":"enqueuedTimestamp","docs":["The timestamp when the active optimistic squads proposal was enqueued."],"type":"i64"}]}},{"name":"InitialSpendingLimit","type":{"kind":"struct","fields":[{"name":"amountPerMonth","type":"u64"},{"name":"members","type":{"vec":"publicKey"}}]}},{"name":"FutarchyAmm","type":{"kind":"struct","fields":[{"name":"state","type":{"defined":"PoolState"}},{"name":"totalLiquidity","type":"u128"},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"ammBaseVault","type":"publicKey"},{"name":"ammQuoteVault","type":"publicKey"}]}},{"name":"TwapOracle","type":{"kind":"struct","fields":[{"name":"aggregator","docs":["Running sum of seconds_since_last_update * last_observation.","","Assuming latest observations are as big as possible (u64::MAX * 1e12),","we can store 18 million seconds worth of observations, which turns out to","be ~213 days.","","Assuming that latest observations are 100x smaller than they could theoretically","be, we can store ~57 years worth of them. Even this is a very","very conservative assumption - META/USDC prices should be between 1e9 and","1e15, which would overflow after 1e15 years.","","So in the case of an overflow, the aggregator rolls back to 0. It's the","client's responsibility to sanity check the assets or to handle an","aggregator at T2 being smaller than an aggregator at T1."],"type":"u128"},{"name":"lastUpdatedTimestamp","type":"i64"},{"name":"createdAtTimestamp","type":"i64"},{"name":"lastPrice","docs":["A price is the number of quote units per base unit multiplied by 1e12.","You cannot simply divide by 1e12 to get a price you can display in the UI","because the base and quote decimals may be different. Instead, do:","ui_price = (price * (10**(base_decimals - quote_decimals))) / 1e12"],"type":"u128"},{"name":"lastObservation","docs":["If we did a raw TWAP over prices, someone could push the TWAP heavily with","a few extremely large outliers. So we use observations, which can only move","by `max_observation_change_per_update` per update."],"type":"u128"},{"name":"maxObservationChangePerUpdate","docs":["The most that an observation can change per update."],"type":"u128"},{"name":"initialObservation","docs":["What the initial `latest_observation` is set to."],"type":"u128"},{"name":"startDelaySeconds","docs":["Number of seconds after amm.created_at_slot to start recording TWAP"],"type":"u32"}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"oracle","type":{"defined":"TwapOracle"}},{"name":"quoteReserves","type":"u64"},{"name":"baseReserves","type":"u64"},{"name":"quoteProtocolFeeBalance","type":"u64"},{"name":"baseProtocolFeeBalance","type":"u64"}]}},{"name":"PoolState","type":{"kind":"enum","variants":[{"name":"Spot","fields":[{"name":"spot","type":{"defined":"Pool"}}]},{"name":"Futarchy","fields":[{"name":"spot","type":{"defined":"Pool"}},{"name":"pass","type":{"defined":"Pool"}},{"name":"fail","type":{"defined":"Pool"}}]}]}},{"name":"Market","type":{"kind":"enum","variants":[{"name":"Spot"},{"name":"Pass"},{"name":"Fail"}]}},{"name":"SwapType","type":{"kind":"enum","variants":[{"name":"Buy"},{"name":"Sell"}]}},{"name":"Token","type":{"kind":"enum","variants":[{"name":"Base"},{"name":"Quote"}]}},{"name":"ProposalState","type":{"kind":"enum","variants":[{"name":"Draft","fields":[{"name":"amountStaked","type":"u64"}]},{"name":"Pending"},{"name":"Passed"},{"name":"Failed"},{"name":"Removed"}]}}],"events":[{"name":"CollectFeesEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"baseTokenAccount","type":"publicKey","index":false},{"name":"quoteTokenAccount","type":"publicKey","index":false},{"name":"ammBaseVault","type":"publicKey","index":false},{"name":"ammQuoteVault","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteFeesCollected","type":"u64","index":false},{"name":"baseFeesCollected","type":"u64","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"InitializeDaoEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"passThresholdBps","type":"u16","index":false},{"name":"secondsPerProposal","type":"u32","index":false},{"name":"twapInitialObservation","type":"u128","index":false},{"name":"twapMaxObservationChangePerUpdate","type":"u128","index":false},{"name":"twapStartDelaySeconds","type":"u32","index":false},{"name":"minQuoteFutarchicLiquidity","type":"u64","index":false},{"name":"minBaseFutarchicLiquidity","type":"u64","index":false},{"name":"baseToStake","type":"u64","index":false},{"name":"initialSpendingLimit","type":{"option":{"defined":"InitialSpendingLimit"}},"index":false},{"name":"squadsMultisig","type":"publicKey","index":false},{"name":"squadsMultisigVault","type":"publicKey","index":false},{"name":"teamSponsoredPassThresholdBps","type":"i16","index":false},{"name":"teamAddress","type":"publicKey","index":false}]},{"name":"UpdateDaoEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"passThresholdBps","type":"u16","index":false},{"name":"secondsPerProposal","type":"u32","index":false},{"name":"twapInitialObservation","type":"u128","index":false},{"name":"twapMaxObservationChangePerUpdate","type":"u128","index":false},{"name":"twapStartDelaySeconds","type":"u32","index":false},{"name":"minQuoteFutarchicLiquidity","type":"u64","index":false},{"name":"minBaseFutarchicLiquidity","type":"u64","index":false},{"name":"baseToStake","type":"u64","index":false},{"name":"teamSponsoredPassThresholdBps","type":"i16","index":false},{"name":"teamAddress","type":"publicKey","index":false},{"name":"isOptimisticGovernanceEnabled","type":"bool","index":false}]},{"name":"InitializeProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"question","type":"publicKey","index":false},{"name":"quoteVault","type":"publicKey","index":false},{"name":"baseVault","type":"publicKey","index":false},{"name":"proposer","type":"publicKey","index":false},{"name":"number","type":"u32","index":false},{"name":"pdaBump","type":"u8","index":false},{"name":"durationInSeconds","type":"u32","index":false},{"name":"squadsProposal","type":"publicKey","index":false},{"name":"squadsMultisig","type":"publicKey","index":false},{"name":"squadsMultisigVault","type":"publicKey","index":false}]},{"name":"StakeToProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"staker","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"totalStaked","type":"u64","index":false}]},{"name":"UnstakeFromProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"staker","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"totalStaked","type":"u64","index":false}]},{"name":"LaunchProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"timestampEnqueued","type":"i64","index":false},{"name":"totalStaked","type":"u64","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"FinalizeProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"passMarketTwap","type":"u128","index":false},{"name":"failMarketTwap","type":"u128","index":false},{"name":"threshold","type":"u128","index":false},{"name":"state","type":{"defined":"ProposalState"},"index":false},{"name":"squadsProposal","type":"publicKey","index":false},{"name":"squadsMultisig","type":"publicKey","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false},{"name":"isTeamSponsored","type":"bool","index":false}]},{"name":"SpotSwapEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"swapType","type":{"defined":"SwapType"},"index":false},{"name":"inputAmount","type":"u64","index":false},{"name":"outputAmount","type":"u64","index":false},{"name":"minOutputAmount","type":"u64","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"ConditionalSwapEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"trader","type":"publicKey","index":false},{"name":"market","type":{"defined":"Market"},"index":false},{"name":"swapType","type":{"defined":"SwapType"},"index":false},{"name":"inputAmount","type":"u64","index":false},{"name":"outputAmount","type":"u64","index":false},{"name":"minOutputAmount","type":"u64","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"ProvideLiquidityEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"liquidityProvider","type":"publicKey","index":false},{"name":"positionAuthority","type":"publicKey","index":false},{"name":"quoteAmount","type":"u64","index":false},{"name":"baseAmount","type":"u64","index":false},{"name":"liquidityMinted","type":"u128","index":false},{"name":"minLiquidity","type":"u128","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"WithdrawLiquidityEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"liquidityProvider","type":"publicKey","index":false},{"name":"liquidityWithdrawn","type":"u128","index":false},{"name":"minBaseAmount","type":"u64","index":false},{"name":"minQuoteAmount","type":"u64","index":false},{"name":"baseAmount","type":"u64","index":false},{"name":"quoteAmount","type":"u64","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"SponsorProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"teamAddress","type":"publicKey","index":false}]},{"name":"RemoveProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"admin","type":"publicKey","index":false}]},{"name":"AdminCancelProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"admin","type":"publicKey","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"CollectMeteoraDammFeesEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"baseTokenAccount","type":"publicKey","index":false},{"name":"quoteTokenAccount","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteFeesCollected","type":"u64","index":false},{"name":"baseFeesCollected","type":"u64","index":false}]},{"name":"AdminFixPositionAuthorityEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"admin","type":"publicKey","index":false},{"name":"ammPosition","type":"publicKey","index":false},{"name":"oldAuthority","type":"publicKey","index":false},{"name":"newAuthority","type":"publicKey","index":false}]},{"name":"InitiateVaultSpendOptimisticProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"proposer","type":"publicKey","index":false},{"name":"squadsProposal","type":"publicKey","index":false},{"name":"squadsMultisig","type":"publicKey","index":false},{"name":"squadsMultisigVault","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"recipient","type":"publicKey","index":false},{"name":"daoQuoteVaultAccount","type":"publicKey","index":false},{"name":"recipientQuoteAccount","type":"publicKey","index":false},{"name":"enqueuedTimestamp","type":"i64","index":false}]},{"name":"FinalizeOptimisticProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"squadsProposal","type":"publicKey","index":false}]}],"errors":[{"code":6000,"name":"AmmTooOld","msg":"Amms must have been created within 5 minutes (counted in slots) of proposal initialization"},{"code":6001,"name":"InvalidInitialObservation","msg":"An amm has an `initial_observation` that doesn't match the `dao`'s config"},{"code":6002,"name":"InvalidMaxObservationChange","msg":"An amm has a `max_observation_change_per_update` that doesn't match the `dao`'s config"},{"code":6003,"name":"InvalidStartDelaySlots","msg":"An amm has a `start_delay_slots` that doesn't match the `dao`'s config"},{"code":6004,"name":"InvalidSettlementAuthority","msg":"One of the vaults has an invalid `settlement_authority`"},{"code":6005,"name":"ProposalTooYoung","msg":"Proposal is too young to be executed or rejected"},{"code":6006,"name":"MarketsTooYoung","msg":"Markets too young for proposal to be finalized. TWAP might need to be cranked"},{"code":6007,"name":"ProposalAlreadyFinalized","msg":"This proposal has already been finalized"},{"code":6008,"name":"InvalidVaultNonce","msg":"A conditional vault has an invalid nonce. A nonce should encode the proposal number"},{"code":6009,"name":"ProposalNotPassed","msg":"This proposal can't be executed because it isn't in the passed state"},{"code":6010,"name":"InsufficientLiquidity","msg":"More liquidity needs to be in the AMM to launch this proposal"},{"code":6011,"name":"ProposalDurationTooShort","msg":"Proposal duration must be longer 1 day and longer than 2 times the TWAP start delay"},{"code":6012,"name":"PassThresholdTooHigh","msg":"Pass threshold must be less than 10%"},{"code":6013,"name":"QuestionMustBeBinary","msg":"Question must have exactly 2 outcomes for binary futarchy"},{"code":6014,"name":"InvalidSquadsProposalStatus","msg":"Squads proposal must be in Active status"},{"code":6015,"name":"CastingOverflow","msg":"Casting overflow. If you're seeing this, please report this"},{"code":6016,"name":"InsufficientBalance","msg":"Insufficient balance"},{"code":6017,"name":"ZeroLiquidityRemove","msg":"Cannot remove zero liquidity"},{"code":6018,"name":"SwapSlippageExceeded","msg":"Swap slippage exceeded"},{"code":6019,"name":"AssertFailed","msg":"Assert failed"},{"code":6020,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6021,"name":"ProposalNotInDraftState","msg":"Proposal is not in draft state"},{"code":6022,"name":"InsufficientTokenBalance","msg":"Insufficient token balance"},{"code":6023,"name":"InvalidAmount","msg":"Invalid amount"},{"code":6024,"name":"InsufficientStakeToLaunch","msg":"Insufficient stake to launch proposal"},{"code":6025,"name":"StakerNotFound","msg":"Staker not found in proposal"},{"code":6026,"name":"PoolNotInSpotState","msg":"Pool must be in spot state"},{"code":6027,"name":"InvalidDaoCreateLiquidity","msg":"If you're providing liquidity, you must provide both base and quote token accounts"},{"code":6028,"name":"InvalidStakeAccount","msg":"Invalid stake account"},{"code":6029,"name":"InvariantViolated","msg":"An invariant was violated. You should get in contact with the MetaDAO team if you see this"},{"code":6030,"name":"ProposalNotActive","msg":"Proposal needs to be active to perform a conditional swap"},{"code":6031,"name":"InvalidTransaction","msg":"This Squads transaction should only contain calls to update spending limits"},{"code":6032,"name":"ProposalAlreadySponsored","msg":"Proposal has already been sponsored"},{"code":6033,"name":"InvalidTeamSponsoredPassThreshold","msg":"Team sponsored pass threshold must be between -10% and 10%"},{"code":6034,"name":"InvalidTargetK","msg":"Target K must be greater than the current K"},{"code":6035,"name":"InvalidTransactionMessage","msg":"Failed to compile transaction message for Squads vault transaction"},{"code":6036,"name":"InvalidMint","msg":"Base mint and quote mint must be different"},{"code":6037,"name":"ProposalNotReadyToUnstake","msg":"Proposal is not ready to be unstaked"},{"code":6038,"name":"OptimisticGovernanceDisabled","msg":"Optimistic governance is disabled"},{"code":6039,"name":"ActiveOptimisticProposalAlreadyEnqueued","msg":"An active optimistic proposal is already enqueued"},{"code":6040,"name":"OptimisticProposalAlreadyPassed","msg":"Optimistic proposal has already passed"},{"code":6041,"name":"InvalidSpendingLimitMint","msg":"Invalid spending limit mint. Must be the same as the DAO's quote mint"},{"code":6042,"name":"NoActiveOptimisticProposal","msg":"No active optimistic proposal"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/metadao_launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.json b/olddocs/archivekbot2/idls/metadao_launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.json new file mode 100644 index 0000000..0bf7c0c --- /dev/null +++ b/olddocs/archivekbot2/idls/metadao_launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.json @@ -0,0 +1 @@ +{"version":"0.7.0","name":"launchpad_v7","instructions":[{"name":"initializeLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"baseMint","isMut":true,"isSigner":false},{"name":"tokenMetadata","isMut":true,"isSigner":false},{"name":"launchSigner","isMut":false,"isSigner":false},{"name":"quoteVault","isMut":true,"isSigner":false},{"name":"baseVault","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"launchAuthority","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"additionalTokensRecipient","isMut":false,"isSigner":false,"isOptional":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeLaunchArgs"}}]},{"name":"startLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"launchAuthority","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"fund","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"fundingRecord","isMut":true,"isSigner":false},{"name":"launchQuoteVault","isMut":true,"isSigner":false},{"name":"funder","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"funderQuoteAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"setFundingRecordApproval","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"fundingRecord","isMut":true,"isSigner":false},{"name":"launchAuthority","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"approvedAmount","type":"u64"}]},{"name":"completeLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"launchAuthority","isMut":false,"isSigner":true,"isOptional":true},{"name":"tokenMetadata","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"launchSigner","isMut":true,"isSigner":false},{"name":"launchQuoteVault","isMut":true,"isSigner":false},{"name":"launchBaseVault","isMut":true,"isSigner":false},{"name":"treasuryQuoteAccount","isMut":true,"isSigner":false},{"name":"baseMint","isMut":true,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"daoOwnedLpPosition","isMut":true,"isSigner":false},{"name":"futarchyAmmBaseVault","isMut":true,"isSigner":false},{"name":"futarchyAmmQuoteVault","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsMultisigVault","isMut":false,"isSigner":false},{"name":"spendingLimit","isMut":true,"isSigner":false},{"name":"bidWall","isMut":true,"isSigner":false},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"feeRecipient","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"staticAccounts","accounts":[{"name":"futarchyProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"futarchyEventAuthority","isMut":false,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"squadsProgramConfig","isMut":false,"isSigner":false},{"name":"squadsProgramConfigTreasury","isMut":true,"isSigner":false},{"name":"bidWallProgram","isMut":false,"isSigner":false},{"name":"bidWallEventAuthority","isMut":false,"isSigner":false}]},{"name":"meteoraAccounts","accounts":[{"name":"dammV2Program","isMut":false,"isSigner":false},{"name":"config","isMut":false,"isSigner":false},{"name":"token2022Program","isMut":false,"isSigner":false},{"name":"positionNftAccount","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"positionNftMint","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"poolCreatorAuthority","isMut":false,"isSigner":false},{"name":"poolAuthority","isMut":false,"isSigner":false},{"name":"dammV2EventAuthority","isMut":false,"isSigner":false}]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"refund","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"fundingRecord","isMut":true,"isSigner":false},{"name":"launchQuoteVault","isMut":true,"isSigner":false},{"name":"launchSigner","isMut":false,"isSigner":false},{"name":"funder","isMut":false,"isSigner":false},{"name":"funderQuoteAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"claim","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"fundingRecord","isMut":true,"isSigner":false},{"name":"launchSigner","isMut":false,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"launchBaseVault","isMut":true,"isSigner":false},{"name":"funder","isMut":false,"isSigner":false},{"name":"funderTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"closeLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"claimAdditionalTokenAllocation","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"launchSigner","isMut":false,"isSigner":false},{"name":"launchBaseVault","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"additionalTokensRecipient","isMut":false,"isSigner":false},{"name":"additionalTokensRecipientTokenAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"initializePerformancePackage","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"launchSigner","isMut":false,"isSigner":false},{"name":"launchBaseVault","isMut":true,"isSigner":false},{"name":"baseMint","isMut":true,"isSigner":false},{"name":"dao","isMut":false,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigVault","isMut":false,"isSigner":false},{"name":"performancePackage","isMut":true,"isSigner":false},{"name":"performancePackageTokenAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"priceBasedPerformancePackageProgram","isMut":false,"isSigner":false},{"name":"priceBasedPerformancePackageEventAuthority","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"resizeFundingRecord","accounts":[{"name":"fundingRecord","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"resizeLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"extendLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ExtendLaunchArgs"}}]}],"accounts":[{"name":"FundingRecord","type":{"kind":"struct","fields":[{"name":"pdaBump","docs":["The PDA bump."],"type":"u8"},{"name":"funder","docs":["The funder."],"type":"publicKey"},{"name":"launch","docs":["The launch."],"type":"publicKey"},{"name":"committedAmount","docs":["The amount of USDC that has been committed by the funder."],"type":"u64"},{"name":"isTokensClaimed","docs":["Whether the tokens have been claimed."],"type":"bool"},{"name":"isUsdcRefunded","docs":["Whether the USDC has been refunded."],"type":"bool"},{"name":"approvedAmount","docs":["The amount of USDC that the launch authority has approved for the funder.","If zero, the funder has not been approved for any amount."],"type":"u64"},{"name":"committedAmountAccumulator","docs":["Running integral of committed_amount over time (committed_amount * seconds)."],"type":"u128"},{"name":"lastAccumulatorUpdate","docs":["Unix timestamp of the last accumulator update."],"type":"i64"}]}},{"name":"OldFundingRecord","type":{"kind":"struct","fields":[{"name":"pdaBump","docs":["The PDA bump."],"type":"u8"},{"name":"funder","docs":["The funder."],"type":"publicKey"},{"name":"launch","docs":["The launch."],"type":"publicKey"},{"name":"committedAmount","docs":["The amount of USDC that has been committed by the funder."],"type":"u64"},{"name":"isTokensClaimed","docs":["Whether the tokens have been claimed."],"type":"bool"},{"name":"isUsdcRefunded","docs":["Whether the USDC has been refunded."],"type":"bool"},{"name":"approvedAmount","docs":["The amount of USDC that the launch authority has approved for the funder.","If zero, the funder has not been approved for any amount."],"type":"u64"}]}},{"name":"Launch","type":{"kind":"struct","fields":[{"name":"pdaBump","docs":["The PDA bump."],"type":"u8"},{"name":"minimumRaiseAmount","docs":["The minimum amount of USDC that must be raised, otherwise","everyone can get their USDC back."],"type":"u64"},{"name":"monthlySpendingLimitAmount","docs":["The monthly spending limit the DAO allocates to the team. Must be","less than 1/6th of the minimum raise amount (so 6 months of burn)."],"type":"u64"},{"name":"monthlySpendingLimitMembers","docs":["The wallets that have access to the monthly spending limit."],"type":{"vec":"publicKey"}},{"name":"launchAuthority","docs":["The account that can start the launch."],"type":"publicKey"},{"name":"launchSigner","docs":["The launch signer address. Needed because Raydium pools need a SOL payer and this PDA can't hold SOL."],"type":"publicKey"},{"name":"launchSignerPdaBump","docs":["The PDA bump for the launch signer."],"type":"u8"},{"name":"launchQuoteVault","docs":["The USDC vault that will hold the USDC raised until the launch is over."],"type":"publicKey"},{"name":"launchBaseVault","docs":["The token vault, used to send tokens to Raydium."],"type":"publicKey"},{"name":"baseMint","docs":["The token that will be minted to funders and that will control the DAO."],"type":"publicKey"},{"name":"quoteMint","docs":["The USDC mint."],"type":"publicKey"},{"name":"unixTimestampStarted","docs":["The unix timestamp when the launch was started."],"type":{"option":"i64"}},{"name":"unixTimestampClosed","docs":["The unix timestamp when the launch stopped taking new contributions."],"type":{"option":"i64"}},{"name":"totalCommittedAmount","docs":["The amount of USDC that has been committed by the users."],"type":"u64"},{"name":"state","docs":["The state of the launch."],"type":{"defined":"LaunchState"}},{"name":"seqNum","docs":["The sequence number of this launch. Useful for sorting events."],"type":"u64"},{"name":"secondsForLaunch","docs":["The number of seconds that the launch will be live for."],"type":"u32"},{"name":"dao","docs":["The DAO, if the launch is complete."],"type":{"option":"publicKey"}},{"name":"daoVault","docs":["The DAO treasury that USDC / LP is sent to, if the launch is complete."],"type":{"option":"publicKey"}},{"name":"performancePackageGrantee","docs":["The address that will receive the performance package tokens."],"type":"publicKey"},{"name":"performancePackageTokenAmount","docs":["The amount of tokens to be granted to the performance package grantee."],"type":"u64"},{"name":"monthsUntilInsidersCanUnlock","docs":["The number of months that insiders must wait before unlocking their tokens."],"type":"u8"},{"name":"teamAddress","docs":["The initial address used to sponsor team proposals."],"type":"publicKey"},{"name":"totalApprovedAmount","docs":["The amount of USDC that the launch authority has approved across all funders."],"type":"u64"},{"name":"additionalTokensAmount","docs":["The amount of additional tokens to be minted on a successful launch."],"type":"u64"},{"name":"additionalTokensRecipient","docs":["The token account that will receive the additional tokens."],"type":{"option":"publicKey"}},{"name":"additionalTokensClaimed","docs":["Are the additional tokens claimed"],"type":"bool"},{"name":"unixTimestampCompleted","docs":["The unix timestamp when the launch was completed."],"type":{"option":"i64"}},{"name":"isPerformancePackageInitialized","docs":["Whether the performance package has been initialized."],"type":"bool"},{"name":"accumulatorActivationDelaySeconds","docs":["Number of seconds after launch start before the funding accumulator","begins tracking."],"type":"u32"},{"name":"hasBidWall","docs":["Whether the launch has a bid wall."],"type":"bool"}]}},{"name":"OldLaunch","type":{"kind":"struct","fields":[{"name":"pdaBump","docs":["The PDA bump."],"type":"u8"},{"name":"minimumRaiseAmount","docs":["The minimum amount of USDC that must be raised, otherwise","everyone can get their USDC back."],"type":"u64"},{"name":"monthlySpendingLimitAmount","docs":["The monthly spending limit the DAO allocates to the team. Must be","less than 1/6th of the minimum raise amount (so 6 months of burn)."],"type":"u64"},{"name":"monthlySpendingLimitMembers","docs":["The wallets that have access to the monthly spending limit."],"type":{"vec":"publicKey"}},{"name":"launchAuthority","docs":["The account that can start the launch."],"type":"publicKey"},{"name":"launchSigner","docs":["The launch signer address. Needed because Raydium pools need a SOL payer and this PDA can't hold SOL."],"type":"publicKey"},{"name":"launchSignerPdaBump","docs":["The PDA bump for the launch signer."],"type":"u8"},{"name":"launchQuoteVault","docs":["The USDC vault that will hold the USDC raised until the launch is over."],"type":"publicKey"},{"name":"launchBaseVault","docs":["The token vault, used to send tokens to Raydium."],"type":"publicKey"},{"name":"baseMint","docs":["The token that will be minted to funders and that will control the DAO."],"type":"publicKey"},{"name":"quoteMint","docs":["The USDC mint."],"type":"publicKey"},{"name":"unixTimestampStarted","docs":["The unix timestamp when the launch was started."],"type":{"option":"i64"}},{"name":"unixTimestampClosed","docs":["The unix timestamp when the launch stopped taking new contributions."],"type":{"option":"i64"}},{"name":"totalCommittedAmount","docs":["The amount of USDC that has been committed by the users."],"type":"u64"},{"name":"state","docs":["The state of the launch."],"type":{"defined":"LaunchState"}},{"name":"seqNum","docs":["The sequence number of this launch. Useful for sorting events."],"type":"u64"},{"name":"secondsForLaunch","docs":["The number of seconds that the launch will be live for."],"type":"u32"},{"name":"dao","docs":["The DAO, if the launch is complete."],"type":{"option":"publicKey"}},{"name":"daoVault","docs":["The DAO treasury that USDC / LP is sent to, if the launch is complete."],"type":{"option":"publicKey"}},{"name":"performancePackageGrantee","docs":["The address that will receive the performance package tokens."],"type":"publicKey"},{"name":"performancePackageTokenAmount","docs":["The amount of tokens to be granted to the performance package grantee."],"type":"u64"},{"name":"monthsUntilInsidersCanUnlock","docs":["The number of months that insiders must wait before unlocking their tokens."],"type":"u8"},{"name":"teamAddress","docs":["The initial address used to sponsor team proposals."],"type":"publicKey"},{"name":"totalApprovedAmount","docs":["The amount of USDC that the launch authority has approved across all funders."],"type":"u64"},{"name":"additionalTokensAmount","docs":["The amount of additional tokens to be minted on a successful launch."],"type":"u64"},{"name":"additionalTokensRecipient","docs":["The token account that will receive the additional tokens."],"type":{"option":"publicKey"}},{"name":"additionalTokensClaimed","docs":["Are the additional tokens claimed"],"type":"bool"},{"name":"unixTimestampCompleted","docs":["The unix timestamp when the launch was completed."],"type":{"option":"i64"}},{"name":"isPerformancePackageInitialized","type":"bool"},{"name":"accumulatorActivationDelaySeconds","docs":["Number of seconds after launch start before the funding accumulator","begins tracking."],"type":"u32"}]}}],"types":[{"name":"CommonFields","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"unixTimestamp","type":"i64"},{"name":"launchSeqNum","type":"u64"}]}},{"name":"ExtendLaunchArgs","type":{"kind":"struct","fields":[{"name":"durationSeconds","type":"u32"}]}},{"name":"InitializeLaunchArgs","type":{"kind":"struct","fields":[{"name":"minimumRaiseAmount","type":"u64"},{"name":"monthlySpendingLimitAmount","type":"u64"},{"name":"monthlySpendingLimitMembers","type":{"vec":"publicKey"}},{"name":"secondsForLaunch","type":"u32"},{"name":"tokenName","type":"string"},{"name":"tokenSymbol","type":"string"},{"name":"tokenUri","type":"string"},{"name":"performancePackageGrantee","type":"publicKey"},{"name":"performancePackageTokenAmount","type":"u64"},{"name":"monthsUntilInsidersCanUnlock","type":"u8"},{"name":"teamAddress","type":"publicKey"},{"name":"additionalTokensAmount","type":"u64"},{"name":"accumulatorActivationDelaySeconds","type":"u32"},{"name":"hasBidWall","type":"bool"}]}},{"name":"LaunchState","type":{"kind":"enum","variants":[{"name":"Initialized"},{"name":"Live"},{"name":"Closed"},{"name":"Complete"},{"name":"Refunding"}]}}],"events":[{"name":"LaunchInitializedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"minimumRaiseAmount","type":"u64","index":false},{"name":"launchAuthority","type":"publicKey","index":false},{"name":"launchSigner","type":"publicKey","index":false},{"name":"launchSignerPdaBump","type":"u8","index":false},{"name":"launchUsdcVault","type":"publicKey","index":false},{"name":"launchTokenVault","type":"publicKey","index":false},{"name":"performancePackageGrantee","type":"publicKey","index":false},{"name":"performancePackageTokenAmount","type":"u64","index":false},{"name":"monthsUntilInsidersCanUnlock","type":"u8","index":false},{"name":"monthlySpendingLimitAmount","type":"u64","index":false},{"name":"monthlySpendingLimitMembers","type":{"vec":"publicKey"},"index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"pdaBump","type":"u8","index":false},{"name":"secondsForLaunch","type":"u32","index":false},{"name":"additionalTokensAmount","type":"u64","index":false},{"name":"additionalTokensRecipient","type":{"option":"publicKey"},"index":false},{"name":"accumulatorActivationDelaySeconds","type":"u32","index":false},{"name":"hasBidWall","type":"bool","index":false}]},{"name":"LaunchStartedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"launchAuthority","type":"publicKey","index":false},{"name":"slotStarted","type":"u64","index":false}]},{"name":"LaunchFundedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"fundingRecord","type":"publicKey","index":false},{"name":"launch","type":"publicKey","index":false},{"name":"funder","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"totalCommittedByFunder","type":"u64","index":false},{"name":"totalCommitted","type":"u64","index":false},{"name":"committedAmountAccumulator","type":"u128","index":false}]},{"name":"FundingRecordApprovalSetEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"fundingRecord","type":"publicKey","index":false},{"name":"funder","type":"publicKey","index":false},{"name":"approvedAmount","type":"u64","index":false},{"name":"totalApproved","type":"u64","index":false}]},{"name":"LaunchCompletedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"finalState","type":{"defined":"LaunchState"},"index":false},{"name":"totalCommitted","type":"u64","index":false},{"name":"dao","type":{"option":"publicKey"},"index":false},{"name":"daoTreasury","type":{"option":"publicKey"},"index":false},{"name":"totalApprovedAmount","type":"u64","index":false},{"name":"bidWall","type":{"option":"publicKey"},"index":false},{"name":"bidWallAmount","type":"u64","index":false}]},{"name":"LaunchRefundedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"funder","type":"publicKey","index":false},{"name":"usdcRefunded","type":"u64","index":false},{"name":"fundingRecord","type":"publicKey","index":false}]},{"name":"LaunchClaimEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"funder","type":"publicKey","index":false},{"name":"tokensClaimed","type":"u64","index":false},{"name":"fundingRecord","type":"publicKey","index":false}]},{"name":"LaunchCloseEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"newState","type":{"defined":"LaunchState"},"index":false}]},{"name":"LaunchClaimAdditionalTokenAllocationEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"additionalTokensAmount","type":"u64","index":false},{"name":"additionalTokensRecipient","type":"publicKey","index":false}]},{"name":"LaunchPerformancePackageInitializedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"performancePackage","type":"publicKey","index":false}]},{"name":"LaunchExtendedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"oldSecondsForLaunch","type":"u32","index":false},{"name":"newSecondsForLaunch","type":"u32","index":false}]}],"errors":[{"code":6000,"name":"InvalidAmount","msg":"Invalid amount"},{"code":6001,"name":"SupplyNonZero","msg":"Supply must be zero"},{"code":6002,"name":"InvalidSecondsForLaunch","msg":"Launch period must be between 1 hour and 2 weeks"},{"code":6003,"name":"InsufficientFunds","msg":"Insufficient funds"},{"code":6004,"name":"InvalidTokenKey","msg":"Token mint key must end in 'meta'"},{"code":6005,"name":"InvalidLaunchState","msg":"Invalid launch state"},{"code":6006,"name":"LaunchPeriodNotOver","msg":"Launch period not over"},{"code":6007,"name":"LaunchExpired","msg":"Launch is complete, no more funding allowed"},{"code":6008,"name":"LaunchNotRefunding","msg":"For you to get a refund, either the launch needs to be in a refunding state or the launch must have been over-committed"},{"code":6009,"name":"LaunchNotInitialized","msg":"Launch must be initialized to be started"},{"code":6010,"name":"FreezeAuthoritySet","msg":"Freeze authority can't be set on launchpad tokens"},{"code":6011,"name":"InvalidMonthlySpendingLimit","msg":"Monthly spending limit must be less than 1/6th of the minimum raise amount and cannot be 0"},{"code":6012,"name":"InvalidMonthlySpendingLimitMembers","msg":"There can only be at most 10 monthly spending limit members"},{"code":6013,"name":"InvalidPriceBasedPremineAmount","msg":"Cannot do more than a 50% premine, minimum is 10 atoms of token"},{"code":6014,"name":"InvalidPerformancePackageMinUnlockTime","msg":"Insiders must be forced to wait at least 18 months before unlocking their tokens"},{"code":6015,"name":"LaunchAuthorityNotSet","msg":"Launch authority must be set to complete the launch until 2 days after closing"},{"code":6016,"name":"FinalRaiseAmountTooLow","msg":"The final amount raised must be greater than or equal to the minimum raise amount"},{"code":6017,"name":"TokensAlreadyClaimed","msg":"Tokens already claimed"},{"code":6018,"name":"MoneyAlreadyRefunded","msg":"Money already refunded"},{"code":6019,"name":"InvariantViolated","msg":"An invariant was violated. You should get in contact with the MetaDAO team if you see this"},{"code":6020,"name":"LaunchNotLive","msg":"Launch must be live to be closed"},{"code":6021,"name":"InvalidMinimumRaiseAmount","msg":"Minimum raise amount must be greater than or equal to $0.5 so that there's enough liquidity for the launch"},{"code":6022,"name":"FinalRaiseAmountAlreadySet","msg":"The final raise amount has already been set"},{"code":6023,"name":"TotalApprovedAmountTooLow","msg":"Total approved amount must be greater than or equal to the minimum raise amount"},{"code":6024,"name":"InvalidAdditionalTokensRecipient","msg":"Invalid additional tokens recipient - should be set if additional tokens amount is greater than 0"},{"code":6025,"name":"NoAdditionalTokensRecipientSet","msg":"No additional tokens recipient set"},{"code":6026,"name":"AdditionalTokensAlreadyClaimed","msg":"Additional tokens already claimed"},{"code":6027,"name":"FundingRecordApprovalPeriodOver","msg":"Funding record approval period is over"},{"code":6028,"name":"PerformancePackageAlreadyInitialized","msg":"Performance package already initialized"},{"code":6029,"name":"InvalidDao","msg":"Invalid DAO"},{"code":6030,"name":"InvalidAccumulatorActivationDelaySeconds","msg":"Accumulator activation delay must be less than the launch duration"},{"code":6031,"name":"ExtendDurationExceedsMax","msg":"The extend duration would exceed the maximum allowed launch duration"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/metdao_bid_wall.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.json b/olddocs/archivekbot2/idls/metdao_bid_wall.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.json new file mode 100644 index 0000000..45aa0a6 --- /dev/null +++ b/olddocs/archivekbot2/idls/metdao_bid_wall.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.json @@ -0,0 +1 @@ +{"version":"0.7.0","name":"bid_wall","instructions":[{"name":"initializeBidWall","accounts":[{"name":"bidWall","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"feeRecipient","isMut":false,"isSigner":false},{"name":"creator","isMut":false,"isSigner":true},{"name":"authority","isMut":false,"isSigner":false},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"creatorQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"daoTreasury","isMut":false,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeBidWallArgs"}}]},{"name":"closeBidWall","accounts":[{"name":"bidWall","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":false},{"name":"feeRecipient","isMut":false,"isSigner":false},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"authorityQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"feeRecipientQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"sellTokens","accounts":[{"name":"bidWall","isMut":true,"isSigner":false},{"name":"user","isMut":false,"isSigner":true},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"userQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"daoTreasury","isMut":false,"isSigner":false},{"name":"daoTreasuryQuoteTokenAccount","isMut":false,"isSigner":false},{"name":"baseMint","isMut":true,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"SellTokensArgs"}}]},{"name":"collectFees","accounts":[{"name":"bidWall","isMut":true,"isSigner":false},{"name":"cranker","isMut":false,"isSigner":true},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"feeRecipientQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"cancelBidWall","accounts":[{"name":"bidWall","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"authority","isMut":false,"isSigner":true},{"name":"feeRecipient","isMut":false,"isSigner":false},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"authorityQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"feeRecipientQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"BidWall","type":{"kind":"struct","fields":[{"name":"nonce","docs":["The nonce of the bid wall."],"type":"u64"},{"name":"createdTimestamp","docs":["When the bid wall was created."],"type":"i64"},{"name":"initialAmmQuoteReserves","docs":["The initial quote (USDC) reserves of the Futarchy AMM."],"type":"u64"},{"name":"quoteAmount","docs":["The current amount of quote tokens assigned to the bid wall.","This is different from the amount in the bid wall quote token account,","because anyone can transfer quote tokens to the bid wall, and we don't want that to affect the bid wall's NAV calculation."],"type":"u64"},{"name":"feesCollected","docs":["The fees collected by the bid wall."],"type":"u64"},{"name":"baseBoughtAmount","docs":["The amount of base tokens bought up by the bid wall."],"type":"u64"},{"name":"seqNum","docs":["The event sequence number of the bid wall."],"type":"u64"},{"name":"creator","docs":["The authority of the bid wall."],"type":"publicKey"},{"name":"authority","docs":["The authority of the bid wall."],"type":"publicKey"},{"name":"daoTreasury","docs":["The DAO treasury address."],"type":"publicKey"},{"name":"baseMint","docs":["The mint of the token being sold into the bid wall."],"type":"publicKey"},{"name":"feeRecipient","docs":["The recipient of the fees collected by the bid wall."],"type":"publicKey"},{"name":"durationSeconds","docs":["The minimum duration in seconds before the bid wall can be closed."],"type":"u32"},{"name":"pdaBump","docs":["The PDA bump."],"type":"u8"}]}}],"types":[{"name":"CommonFields","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"unixTimestamp","type":"i64"},{"name":"bidWallSeqNum","type":"u64"}]}},{"name":"InitializeBidWallArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"nonce","type":"u64"},{"name":"initialAmmQuoteReserves","type":"u64"},{"name":"durationSeconds","type":"u32"}]}},{"name":"SellTokensArgs","type":{"kind":"struct","fields":[{"name":"amountIn","type":"u64"},{"name":"minAmountOut","type":"u64"}]}}],"events":[{"name":"BidWallInitializedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"bidWall","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false},{"name":"initialAmmQuoteReserves","type":"u64","index":false},{"name":"amount","type":"u64","index":false},{"name":"creator","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"daoTreasury","type":"publicKey","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"feeRecipient","type":"publicKey","index":false},{"name":"durationSeconds","type":"u32","index":false},{"name":"pdaBump","type":"u8","index":false}]},{"name":"BidWallTokensSoldEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"bidWall","type":"publicKey","index":false},{"name":"amountIn","type":"u64","index":false},{"name":"amountOut","type":"u64","index":false},{"name":"fee","type":"u64","index":false},{"name":"postBidWallQuoteTokenAccountAmount","type":"u64","index":false},{"name":"postBidWallBaseBoughtAmount","type":"u64","index":false},{"name":"user","type":"publicKey","index":false}]},{"name":"BidWallFeesCollectedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"bidWall","type":"publicKey","index":false},{"name":"feesCollected","type":"u64","index":false},{"name":"postBidWallQuoteTokenAccountAmount","type":"u64","index":false}]},{"name":"BidWallClosedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"bidWall","type":"publicKey","index":false}]},{"name":"BidWallCanceledEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"bidWall","type":"publicKey","index":false}]}],"errors":[{"code":6000,"name":"BidWallExpired","msg":"Bid wall expired"},{"code":6001,"name":"BidWallNotExpired","msg":"Bid wall not expired"},{"code":6002,"name":"FeeRecipientMismatch","msg":"Fee recipient mismatch"},{"code":6003,"name":"InsufficientQuoteReserves","msg":"Insufficient quote reserves"},{"code":6004,"name":"BidWallDepleted","msg":"Bid wall depleted"},{"code":6005,"name":"InvalidInputAmount","msg":"Invalid input amount"},{"code":6006,"name":"InvalidCrankAddress","msg":"Invalid crank address"},{"code":6007,"name":"InsufficientOutputAmount","msg":"Insufficient output amount"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/meteora_damm_v2.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.json b/olddocs/archivekbot2/idls/meteora_damm_v2.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.json new file mode 100644 index 0000000..cef0305 --- /dev/null +++ b/olddocs/archivekbot2/idls/meteora_damm_v2.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.json @@ -0,0 +1 @@ +{"address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG","metadata":{"name":"cp_amm","version":"0.2.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_liquidity","discriminator":[181,157,89,67,143,182,52,72],"accounts":[{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"token_a_account","docs":["The user token a account"],"writable":true},{"name":"token_b_account","docs":["The user token b account"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"token_b_mint","docs":["The mint of token b"],"relations":["pool"]},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b 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":"params","type":{"defined":{"name":"AddLiquidityParameters"}}}]},{"name":"claim_position_fee","discriminator":[180,38,154,17,133,33,162,211],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","relations":["position"]},{"name":"position","writable":true},{"name":"token_a_account","docs":["The user token a account"],"writable":true},{"name":"token_b_account","docs":["The user token b account"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"token_b_mint","docs":["The mint of token b"],"relations":["pool"]},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b 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":"claim_protocol_fee","discriminator":[165,228,133,48,99,249,255,33],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"token_b_mint","docs":["The mint of token b"],"relations":["pool"]},{"name":"token_a_account","writable":true},{"name":"token_b_account","writable":true},{"name":"operator","docs":["Claim fee operator"]},{"name":"signer","docs":["Operator"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b 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":"max_amount_a","type":"u64"},{"name":"max_amount_b","type":"u64"}]},{"name":"claim_reward","discriminator":[149,95,181,242,94,90,158,162],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"reward_vault","docs":["The vault token account for reward token"],"writable":true},{"name":"reward_mint"},{"name":"user_token_account","writable":true},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"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":"reward_index","type":"u8"},{"name":"skip_reward","type":"u8"}]},{"name":"close_config","discriminator":[145,9,72,157,95,125,61,85],"accounts":[{"name":"config","writable":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"rent_receiver","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":"close_operator_account","discriminator":[171,9,213,74,120,23,3,29],"accounts":[{"name":"operator","writable":true},{"name":"signer","signer":true},{"name":"rent_receiver","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":"close_position","discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"position_nft_mint","docs":["position_nft_mint"],"writable":true},{"name":"position_nft_account","docs":["The token account for nft"],"writable":true},{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"rent_receiver","writable":true},{"name":"owner","docs":["Owner of position"],"signer":true},{"name":"token_program","docs":["Program to create NFT mint/token account and transfer for token22 account"],"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":"close_token_badge","discriminator":[108,146,86,110,179,254,10,104],"accounts":[{"name":"token_badge","writable":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"rent_receiver","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","docs":["OPERATOR FUNCTIONS /////"],"discriminator":[201,207,243,114,75,111,47,189],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"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":"index","type":"u64"},{"name":"config_parameters","type":{"defined":{"name":"StaticConfigParameters"}}}]},{"name":"create_dynamic_config","discriminator":[81,251,122,78,66,57,208,82],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"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":"index","type":"u64"},{"name":"config_parameters","type":{"defined":{"name":"DynamicConfigParameters"}}}]},{"name":"create_operator_account","docs":["ADMIN FUNCTIONS /////"],"discriminator":[221,64,246,149,240,153,229,163],"accounts":[{"name":"operator","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,111,114]},{"kind":"account","path":"whitelisted_address"}]}},{"name":"whitelisted_address"},{"name":"signer","signer":true},{"name":"payer","writable":true,"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":"permission","type":"u128"}]},{"name":"create_position","discriminator":[48,215,197,153,96,203,180,133],"accounts":[{"name":"owner"},{"name":"position_nft_mint","docs":["position_nft_mint"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["position nft account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,110,102,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"pool","writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"payer","docs":["Address paying to create the position. Can be anyone"],"writable":true,"signer":true},{"name":"token_program","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"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":"create_token_badge","discriminator":[88,206,0,91,60,175,151,118],"accounts":[{"name":"token_badge","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"token_mint"}]}},{"name":"token_mint"},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"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":"dummy_ix","discriminator":[234,95,176,185,7,42,35,159],"accounts":[{"name":"pod_aligned_fee_time_scheduler"},{"name":"pod_aligned_fee_rate_limiter"},{"name":"pod_aligned_fee_market_cap_scheduler"}],"args":[{"name":"_ixs","type":{"defined":{"name":"DummyParams"}}}]},{"name":"fix_config_fee_params","discriminator":[38,30,216,81,250,177,243,254],"accounts":[{"name":"config","writable":true},{"name":"operator"},{"name":"signer","signer":true}],"args":[{"name":"params","type":{"defined":{"name":"BaseFeeParameters"}}}]},{"name":"fix_pool_fee_params","discriminator":[132,98,81,196,44,58,120,193],"accounts":[{"name":"pool","writable":true},{"name":"operator"},{"name":"signer","signer":true}],"args":[{"name":"params","type":{"defined":{"name":"BaseFeeParameters"}}}]},{"name":"fix_pool_layout_version","discriminator":[166,158,69,35,81,167,200,215],"accounts":[{"name":"pool","writable":true},{"name":"operator"},{"name":"signer","signer":true}],"args":[]},{"name":"fund_reward","discriminator":[188,50,249,165,93,151,38,63],"accounts":[{"name":"pool","writable":true},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"funder_token_account","writable":true},{"name":"funder","signer":true},{"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":"reward_index","type":"u8"},{"name":"amount","type":"u64"},{"name":"carry_forward","type":"bool"}]},{"name":"initialize_customizable_pool","discriminator":[20,161,241,24,189,221,180,2],"accounts":[{"name":"creator"},{"name":"position_nft_mint","docs":["position_nft_mint"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["position nft account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,110,102,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","docs":["Initialize an account to store the pool state"],"writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_a_mint","docs":["Token a mint"]},{"name":"token_b_mint","docs":["Token b mint"]},{"name":"token_a_vault","docs":["Token a vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"},{"kind":"account","path":"pool"}]}},{"name":"token_b_vault","docs":["Token b vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_b_mint"},{"kind":"account","path":"pool"}]}},{"name":"payer_token_a","docs":["payer token a account"],"writable":true},{"name":"payer_token_b","docs":["creator token b account"],"writable":true},{"name":"token_a_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_b_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_2022_program","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"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":"params","type":{"defined":{"name":"InitializeCustomizablePoolParameters"}}}]},{"name":"initialize_pool","docs":["USER FUNCTIONS ////"],"discriminator":[95,180,10,172,84,174,232,40],"accounts":[{"name":"creator"},{"name":"position_nft_mint","docs":["position_nft_mint"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["position nft account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,110,102,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"config","docs":["Which config the pool belongs to."]},{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","docs":["Initialize an account to store the pool state"],"writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_a_mint","docs":["Token a mint"]},{"name":"token_b_mint","docs":["Token b mint"]},{"name":"token_a_vault","docs":["Token a vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"},{"kind":"account","path":"pool"}]}},{"name":"token_b_vault","docs":["Token b vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_b_mint"},{"kind":"account","path":"pool"}]}},{"name":"payer_token_a","docs":["payer token a account"],"writable":true},{"name":"payer_token_b","docs":["creator token b account"],"writable":true},{"name":"token_a_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_b_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_2022_program","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"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":"params","type":{"defined":{"name":"InitializePoolParameters"}}}]},{"name":"initialize_pool_with_dynamic_config","discriminator":[149,82,72,197,253,252,68,15],"accounts":[{"name":"creator"},{"name":"position_nft_mint","docs":["position_nft_mint"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["position nft account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,110,102,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"pool_creator_authority","signer":true,"relations":["config"]},{"name":"config","docs":["Which config the pool belongs to."]},{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","docs":["Initialize an account to store the pool state"],"writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_a_mint","docs":["Token a mint"]},{"name":"token_b_mint","docs":["Token b mint"]},{"name":"token_a_vault","docs":["Token a vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"},{"kind":"account","path":"pool"}]}},{"name":"token_b_vault","docs":["Token b vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_b_mint"},{"kind":"account","path":"pool"}]}},{"name":"payer_token_a","docs":["payer token a account"],"writable":true},{"name":"payer_token_b","docs":["creator token b account"],"writable":true},{"name":"token_a_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_b_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_2022_program","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"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":"params","type":{"defined":{"name":"InitializeCustomizablePoolParameters"}}}]},{"name":"initialize_reward","discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true},{"name":"reward_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"arg","path":"reward_index"}]}},{"name":"reward_mint"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"token_program"},{"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":"reward_index","type":"u8"},{"name":"reward_duration","type":"u64"},{"name":"funder","type":"pubkey"}]},{"name":"lock_inner_position","discriminator":[72,19,49,204,18,122,23,90],"accounts":[{"name":"pool","relations":["position"]},{"name":"position","writable":true},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":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":"params","type":{"defined":{"name":"VestingParameters"}}}]},{"name":"lock_position","discriminator":[227,62,2,252,247,10,171,185],"accounts":[{"name":"pool","relations":["position"]},{"name":"position","writable":true},{"name":"vesting","writable":true,"signer":true},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"payer","writable":true,"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":"params","type":{"defined":{"name":"VestingParameters"}}}]},{"name":"permanent_lock_position","discriminator":[165,176,125,6,231,171,186,213],"accounts":[{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":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":"permanent_lock_liquidity","type":"u128"}]},{"name":"refresh_vesting","discriminator":[9,94,216,14,116,204,247,0],"accounts":[{"name":"pool","relations":["position"]},{"name":"position","writable":true},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner"}],"args":[]},{"name":"remove_all_liquidity","discriminator":[10,51,61,35,112,105,24,85],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"token_a_account","docs":["The user token a account"],"writable":true},{"name":"token_b_account","docs":["The user token b account"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"token_b_mint","docs":["The mint of token b"],"relations":["pool"]},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b 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":"token_a_amount_threshold","type":"u64"},{"name":"token_b_amount_threshold","type":"u64"}]},{"name":"remove_liquidity","discriminator":[80,85,209,72,24,206,177,108],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"token_a_account","docs":["The user token a account"],"writable":true},{"name":"token_b_account","docs":["The user token b account"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"token_b_mint","docs":["The mint of token b"],"relations":["pool"]},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b 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":"params","type":{"defined":{"name":"RemoveLiquidityParameters"}}}]},{"name":"set_pool_status","discriminator":[112,87,135,223,83,204,132,53],"accounts":[{"name":"pool","writable":true},{"name":"operator"},{"name":"signer","signer":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":"status","type":"u8"}]},{"name":"split_position","discriminator":[172,241,221,138,161,29,253,42],"accounts":[{"name":"pool","writable":true,"relations":["first_position","second_position"]},{"name":"first_position","docs":["The first position"],"writable":true},{"name":"first_position_nft_account","docs":["The token account for position nft"]},{"name":"second_position","docs":["The second position"],"writable":true},{"name":"second_position_nft_account","docs":["The token account for position nft"]},{"name":"first_owner","docs":["Owner of first position"],"signer":true},{"name":"second_owner","docs":["Owner of second position"],"signer":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":"params","type":{"defined":{"name":"SplitPositionParameters"}}}]},{"name":"split_position2","discriminator":[221,147,228,207,140,212,17,119],"accounts":[{"name":"pool","writable":true,"relations":["first_position","second_position"]},{"name":"first_position","docs":["The first position"],"writable":true},{"name":"first_position_nft_account","docs":["The token account for position nft"]},{"name":"second_position","docs":["The second position"],"writable":true},{"name":"second_position_nft_account","docs":["The token account for position nft"]},{"name":"first_owner","docs":["Owner of first position"],"signer":true},{"name":"second_owner","docs":["Owner of second position"],"signer":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":"numerator","type":"u32"}]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","docs":["Pool account"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"]},{"name":"token_b_mint","docs":["The mint of token b"]},{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b program"]},{"name":"referral_token_account","docs":["referral token account"],"writable":true,"optional":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":"_params","type":{"defined":{"name":"SwapParameters"}}}]},{"name":"swap2","discriminator":[65,75,63,76,235,91,91,136],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","docs":["Pool account"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"]},{"name":"token_b_mint","docs":["The mint of token b"]},{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b program"]},{"name":"referral_token_account","docs":["referral token account"],"writable":true,"optional":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":"_params","type":{"defined":{"name":"SwapParameters2"}}}]},{"name":"update_pool_fees","discriminator":[118,217,203,179,60,8,70,89],"accounts":[{"name":"pool","writable":true},{"name":"operator"},{"name":"signer","signer":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":"params","type":{"defined":{"name":"UpdatePoolFeesParameters"}}}]},{"name":"update_reward_duration","discriminator":[138,174,196,169,213,235,254,107],"accounts":[{"name":"pool","writable":true},{"name":"signer","signer":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":"reward_index","type":"u8"},{"name":"new_duration","type":"u64"}]},{"name":"update_reward_funder","discriminator":[211,28,48,32,215,160,35,23],"accounts":[{"name":"pool","writable":true},{"name":"signer","signer":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":"reward_index","type":"u8"},{"name":"new_funder","type":"pubkey"}]},{"name":"withdraw_ineligible_reward","discriminator":[148,206,42,195,247,49,103,8],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"funder_token_account","writable":true},{"name":"funder","signer":true},{"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":"reward_index","type":"u8"}]},{"name":"zap_protocol_fee","discriminator":[213,155,187,34,56,182,91,240],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true},{"name":"token_vault","writable":true},{"name":"token_mint"},{"name":"receiver_token","writable":true},{"name":"operator","docs":["zap claim fee operator"]},{"name":"signer","docs":["Operator"],"signer":true},{"name":"token_program","docs":["Token program"]},{"name":"sysvar_instructions","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"max_amount","type":"u64"}]}],"accounts":[{"name":"Config","discriminator":[155,12,170,224,30,250,204,130]},{"name":"Operator","discriminator":[219,31,188,145,69,139,204,117]},{"name":"PodAlignedFeeMarketCapScheduler","discriminator":[251,130,208,253,245,27,145,203]},{"name":"PodAlignedFeeRateLimiter","discriminator":[160,219,8,251,179,7,16,117]},{"name":"PodAlignedFeeTimeScheduler","discriminator":[239,132,138,213,67,154,130,70]},{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"Position","discriminator":[170,188,143,228,122,64,247,208]},{"name":"TokenBadge","discriminator":[116,219,204,229,249,116,255,150]},{"name":"Vesting","discriminator":[100,149,66,138,95,200,128,241]}],"events":[{"name":"EvtClaimPositionFee","discriminator":[198,182,183,52,97,12,49,56]},{"name":"EvtClaimProtocolFee","discriminator":[186,244,75,251,188,13,25,33]},{"name":"EvtClaimReward","discriminator":[218,86,147,200,235,188,215,231]},{"name":"EvtCloseConfig","discriminator":[36,30,239,45,58,132,14,5]},{"name":"EvtClosePosition","discriminator":[20,145,144,68,143,142,214,178]},{"name":"EvtCreateConfig","discriminator":[131,207,180,174,180,73,165,54]},{"name":"EvtCreateDynamicConfig","discriminator":[231,197,13,164,248,213,133,152]},{"name":"EvtCreatePosition","discriminator":[156,15,119,198,29,181,221,55]},{"name":"EvtCreateTokenBadge","discriminator":[141,120,134,116,34,28,114,160]},{"name":"EvtFundReward","discriminator":[104,233,237,122,199,191,121,85]},{"name":"EvtInitializePool","discriminator":[228,50,246,85,203,66,134,37]},{"name":"EvtInitializeReward","discriminator":[129,91,188,3,246,52,185,249]},{"name":"EvtLiquidityChange","discriminator":[197,171,78,127,224,211,87,13]},{"name":"EvtLockPosition","discriminator":[168,63,108,83,219,82,2,200]},{"name":"EvtPermanentLockPosition","discriminator":[145,143,162,218,218,80,67,11]},{"name":"EvtSetPoolStatus","discriminator":[100,213,74,3,95,91,228,146]},{"name":"EvtSplitPosition2","discriminator":[165,32,203,174,72,100,233,103]},{"name":"EvtSplitPosition3","discriminator":[232,117,190,218,85,162,207,78]},{"name":"EvtSwap2","discriminator":[189,66,51,168,38,80,117,153]},{"name":"EvtUpdatePoolFees","discriminator":[76,165,246,102,102,217,156,44]},{"name":"EvtUpdateRewardDuration","discriminator":[149,135,65,231,129,153,65,57]},{"name":"EvtUpdateRewardFunder","discriminator":[76,154,208,13,40,115,246,146]},{"name":"EvtWithdrawIneligibleReward","discriminator":[248,215,184,78,31,180,179,168]}],"errors":[{"code":6000,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6001,"name":"InvalidFee","msg":"Invalid fee setup"},{"code":6002,"name":"ExceededSlippage","msg":"Exceeded slippage tolerance"},{"code":6003,"name":"PoolDisabled","msg":"Pool disabled"},{"code":6004,"name":"ExceedMaxFeeBps","msg":"Exceeded max fee bps"},{"code":6005,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6006,"name":"AmountIsZero","msg":"Amount is zero"},{"code":6007,"name":"TypeCastFailed","msg":"Type cast error"},{"code":6008,"name":"UnableToModifyActivationPoint","msg":"Unable to modify activation point"},{"code":6009,"name":"InvalidAuthorityToCreateThePool","msg":"Invalid authority to create the pool"},{"code":6010,"name":"InvalidActivationType","msg":"Invalid activation type"},{"code":6011,"name":"InvalidActivationPoint","msg":"Invalid activation point"},{"code":6012,"name":"InvalidQuoteMint","msg":"Quote token must be SOL,USDC"},{"code":6013,"name":"InvalidFeeCurve","msg":"Invalid fee curve"},{"code":6014,"name":"InvalidPriceRange","msg":"Invalid Price Range"},{"code":6015,"name":"PriceRangeViolation","msg":"Trade is over price range"},{"code":6016,"name":"InvalidParameters","msg":"Invalid parameters"},{"code":6017,"name":"InvalidCollectFeeMode","msg":"Invalid collect fee mode"},{"code":6018,"name":"InvalidInput","msg":"Invalid input"},{"code":6019,"name":"CannotCreateTokenBadgeOnSupportedMint","msg":"Cannot create token badge on supported mint"},{"code":6020,"name":"InvalidTokenBadge","msg":"Invalid token badge"},{"code":6021,"name":"InvalidMinimumLiquidity","msg":"Invalid minimum liquidity"},{"code":6022,"name":"InvalidVestingInfo","msg":"Invalid vesting information"},{"code":6023,"name":"InsufficientLiquidity","msg":"Insufficient liquidity"},{"code":6024,"name":"InvalidVestingAccount","msg":"Invalid vesting account"},{"code":6025,"name":"InvalidPoolStatus","msg":"Invalid pool status"},{"code":6026,"name":"UnsupportNativeMintToken2022","msg":"Unsupported native mint token2022"},{"code":6027,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6028,"name":"InvalidRewardDuration","msg":"Invalid reward duration"},{"code":6029,"name":"RewardInitialized","msg":"Reward already initialized"},{"code":6030,"name":"RewardUninitialized","msg":"Reward not initialized"},{"code":6031,"name":"InvalidRewardVault","msg":"Invalid reward vault"},{"code":6032,"name":"MustWithdrawnIneligibleReward","msg":"Must withdraw ineligible reward"},{"code":6033,"name":"IdenticalRewardDuration","msg":"Reward duration is the same"},{"code":6034,"name":"RewardCampaignInProgress","msg":"Reward campaign in progress"},{"code":6035,"name":"IdenticalFunder","msg":"Identical funder"},{"code":6036,"name":"InvalidFunder","msg":"Invalid funder"},{"code":6037,"name":"RewardNotEnded","msg":"Reward not ended"},{"code":6038,"name":"FeeInverseIsIncorrect","msg":"Fee inverse is incorrect"},{"code":6039,"name":"PositionIsNotEmpty","msg":"Position is not empty"},{"code":6040,"name":"InvalidPoolCreatorAuthority","msg":"Invalid pool creator authority"},{"code":6041,"name":"InvalidConfigType","msg":"Invalid config type"},{"code":6042,"name":"InvalidPoolCreator","msg":"Invalid pool creator"},{"code":6043,"name":"RewardVaultFrozenSkipRequired","msg":"Reward vault is frozen, must skip reward to proceed"},{"code":6044,"name":"InvalidSplitPositionParameters","msg":"Invalid parameters for split position"},{"code":6045,"name":"UnsupportPositionHasVestingLock","msg":"Unsupported split position has vesting lock"},{"code":6046,"name":"SamePosition","msg":"Same position"},{"code":6047,"name":"InvalidBaseFeeMode","msg":"Invalid base fee mode"},{"code":6048,"name":"InvalidFeeRateLimiter","msg":"Invalid fee rate limiter"},{"code":6049,"name":"FailToValidateSingleSwapInstruction","msg":"Fail to validate single swap instruction in rate limiter"},{"code":6050,"name":"InvalidFeeTimeScheduler","msg":"Invalid fee scheduler"},{"code":6051,"name":"UndeterminedError","msg":"Undetermined error"},{"code":6052,"name":"InvalidPoolVersion","msg":"Invalid pool version"},{"code":6053,"name":"InvalidAuthority","msg":"Invalid authority to do that action"},{"code":6054,"name":"InvalidPermission","msg":"Invalid permission"},{"code":6055,"name":"InvalidFeeMarketCapScheduler","msg":"Invalid fee market cap scheduler"},{"code":6056,"name":"CannotUpdateBaseFee","msg":"Cannot update base fee"},{"code":6057,"name":"InvalidDynamicFeeParameters","msg":"Invalid dynamic fee parameters"},{"code":6058,"name":"InvalidUpdatePoolFeesParameters","msg":"Invalid update pool fees parameters"},{"code":6059,"name":"MissingOperatorAccount","msg":"Missing operator account"},{"code":6060,"name":"IncorrectATA","msg":"Incorrect ATA"},{"code":6061,"name":"InvalidZapOutParameters","msg":"Invalid zap out parameters"},{"code":6062,"name":"InvalidWithdrawProtocolFeeZapAccounts","msg":"Invalid withdraw protocol fee zap accounts"},{"code":6063,"name":"MintRestrictedFromZap","msg":"SOL,USDC protocol fee cannot be withdrawn via zap"},{"code":6064,"name":"CpiDisabled","msg":"CPI disabled"},{"code":6065,"name":"MissingZapOutInstruction","msg":"Missing zap out instruction"},{"code":6066,"name":"InvalidZapAccounts","msg":"Invalid zap accounts"},{"code":6067,"name":"InvalidCompoundingFeeBps","msg":"Invalid compounding fee bps"}],"types":[{"name":"AddLiquidityParameters","type":{"kind":"struct","fields":[{"name":"liquidity_delta","docs":["delta liquidity"],"type":"u128"},{"name":"token_a_amount_threshold","docs":["maximum token a amount"],"type":"u64"},{"name":"token_b_amount_threshold","docs":["maximum token b amount"],"type":"u64"}]}},{"name":"BaseFeeInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"data","type":{"array":["u8",32]}}]}},{"name":"BaseFeeParameters","type":{"kind":"struct","fields":[{"name":"data","type":{"array":["u8",27]}}]}},{"name":"BaseFeeStruct","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee_info","type":{"defined":{"name":"BaseFeeInfo"}}},{"name":"padding_1","type":"u64"}]}},{"name":"BorshFeeMarketCapScheduler","type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"number_of_period","type":"u16"},{"name":"sqrt_price_step_bps","type":"u32"},{"name":"scheduler_expiration_duration","type":"u32"},{"name":"reduction_factor","type":"u64"},{"name":"base_fee_mode","type":"u8"}]}},{"name":"BorshFeeRateLimiter","docs":["we denote reference_amount = x0, cliff_fee_numerator = c, fee_increment = i","if input_amount <= x0, then fee = input_amount * c","","if input_amount > x0, then input_amount = x0 + (a * x0 + b)","if a < max_index","then fee = x0 * c + x0 * (c + i) + .... + x0 * (c + i*a) + b * (c + i * (a+1))","then fee = x0 * (c + c*a + i*a*(a+1)/2) + b * (c + i * (a+1))","","if a >= max_index","if a = max_index + d, input_amount = x0 + max_index * x0 + (d * x0 + b)","then fee = x0 * (c + c*max_index + i*max_index*(max_index+1)/2) + (d * x0 + b) * MAX_FEE"],"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"fee_increment_bps","type":"u16"},{"name":"max_limiter_duration","type":"u32"},{"name":"max_fee_bps","type":"u32"},{"name":"reference_amount","type":"u64"},{"name":"base_fee_mode","type":"u8"}]}},{"name":"BorshFeeTimeScheduler","type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"number_of_period","type":"u16"},{"name":"period_frequency","type":"u64"},{"name":"reduction_factor","type":"u64"},{"name":"base_fee_mode","type":"u8"}]}},{"name":"Config","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"vault_config_key","docs":["Vault config key"],"type":"pubkey"},{"name":"pool_creator_authority","docs":["Only pool_creator_authority can use the current config to initialize new pool. When it's Pubkey::default, it's a public config."],"type":"pubkey"},{"name":"pool_fees","docs":["Pool fee"],"type":{"defined":{"name":"PoolFeesConfig"}}},{"name":"activation_type","docs":["Activation type"],"type":"u8"},{"name":"collect_fee_mode","docs":["Collect fee mode"],"type":"u8"},{"name":"config_type","docs":["Config type mode, 0 for static, 1 for dynamic"],"type":"u8"},{"name":"_padding_0","docs":["padding 0"],"type":{"array":["u8",5]}},{"name":"index","docs":["config index"],"type":"u64"},{"name":"sqrt_min_price","docs":["sqrt min price"],"type":"u128"},{"name":"sqrt_max_price","docs":["sqrt max price"],"type":"u128"},{"name":"_padding_1","docs":["Fee curve point","Padding for further use"],"type":{"array":["u64",10]}}]}},{"name":"DummyParams","type":{"kind":"struct","fields":[{"name":"borsh_fee_time_scheduler_params","type":{"defined":{"name":"BorshFeeTimeScheduler"}}},{"name":"borsh_fee_rate_limiter_params","type":{"defined":{"name":"BorshFeeRateLimiter"}}},{"name":"borsh_fee_market_cap_scheduler_params","type":{"defined":{"name":"BorshFeeMarketCapScheduler"}}}]}},{"name":"DynamicConfigParameters","type":{"kind":"struct","fields":[{"name":"pool_creator_authority","type":"pubkey"}]}},{"name":"DynamicFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","type":"u8"},{"name":"padding","type":{"array":["u8",7]}},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"},{"name":"bin_step","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"padding_1","type":{"array":["u8",8]}},{"name":"bin_step_u128","type":"u128"}]}},{"name":"DynamicFeeParameters","type":{"kind":"struct","fields":[{"name":"bin_step","type":"u16"},{"name":"bin_step_u128","type":"u128"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"}]}},{"name":"DynamicFeeStruct","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","type":"u8"},{"name":"padding","type":{"array":["u8",7]}},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"},{"name":"bin_step","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"last_update_timestamp","type":"u64"},{"name":"bin_step_u128","type":"u128"},{"name":"sqrt_price_reference","type":"u128"},{"name":"volatility_accumulator","type":"u128"},{"name":"volatility_reference","type":"u128"}]}},{"name":"EvtClaimPositionFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"fee_a_claimed","type":"u64"},{"name":"fee_b_claimed","type":"u64"}]}},{"name":"EvtClaimProtocolFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"}]}},{"name":"EvtClaimReward","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"mint_reward","type":"pubkey"},{"name":"reward_index","type":"u8"},{"name":"total_reward","type":"u64"}]}},{"name":"EvtCloseConfig","docs":["Close config"],"type":{"kind":"struct","fields":[{"name":"config","docs":["Config pubkey"],"type":"pubkey"},{"name":"admin","docs":["admin pk"],"type":"pubkey"}]}},{"name":"EvtClosePosition","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"position_nft_mint","type":"pubkey"}]}},{"name":"EvtCreateConfig","docs":["Create static config"],"type":{"kind":"struct","fields":[{"name":"pool_fees","type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"vault_config_key","type":"pubkey"},{"name":"pool_creator_authority","type":"pubkey"},{"name":"activation_type","type":"u8"},{"name":"sqrt_min_price","type":"u128"},{"name":"sqrt_max_price","type":"u128"},{"name":"collect_fee_mode","type":"u8"},{"name":"index","type":"u64"},{"name":"config","type":"pubkey"}]}},{"name":"EvtCreateDynamicConfig","docs":["Create dynamic config"],"type":{"kind":"struct","fields":[{"name":"config","type":"pubkey"},{"name":"pool_creator_authority","type":"pubkey"},{"name":"index","type":"u64"}]}},{"name":"EvtCreatePosition","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"position_nft_mint","type":"pubkey"}]}},{"name":"EvtCreateTokenBadge","docs":["Create token badge"],"type":{"kind":"struct","fields":[{"name":"token_mint","type":"pubkey"}]}},{"name":"EvtFundReward","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"funder","type":"pubkey"},{"name":"mint_reward","type":"pubkey"},{"name":"reward_index","type":"u8"},{"name":"amount","type":"u64"},{"name":"transfer_fee_excluded_amount_in","type":"u64"},{"name":"reward_duration_end","type":"u64"},{"name":"pre_reward_rate","type":"u128"},{"name":"post_reward_rate","type":"u128"}]}},{"name":"EvtInitializePool","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_a_mint","type":"pubkey"},{"name":"token_b_mint","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"payer","type":"pubkey"},{"name":"alpha_vault","type":"pubkey"},{"name":"pool_fees","type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"sqrt_min_price","type":"u128"},{"name":"sqrt_max_price","type":"u128"},{"name":"activation_type","type":"u8"},{"name":"collect_fee_mode","type":"u8"},{"name":"liquidity","type":"u128"},{"name":"sqrt_price","type":"u128"},{"name":"activation_point","type":"u64"},{"name":"token_a_flag","type":"u8"},{"name":"token_b_flag","type":"u8"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"},{"name":"total_amount_a","type":"u64"},{"name":"total_amount_b","type":"u64"},{"name":"pool_type","type":"u8"}]}},{"name":"EvtInitializeReward","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"reward_mint","type":"pubkey"},{"name":"funder","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"reward_index","type":"u8"},{"name":"reward_duration","type":"u64"}]}},{"name":"EvtLiquidityChange","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"},{"name":"transfer_fee_included_token_a_amount","type":"u64"},{"name":"transfer_fee_included_token_b_amount","type":"u64"},{"name":"reserve_a_amount","type":"u64"},{"name":"reserve_b_amount","type":"u64"},{"name":"liquidity_delta","type":"u128"},{"name":"token_a_amount_threshold","type":"u64"},{"name":"token_b_amount_threshold","type":"u64"},{"name":"change_type","type":"u8"}]}},{"name":"EvtLockPosition","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"vesting","type":"pubkey"},{"name":"cliff_point","type":"u64"},{"name":"period_frequency","type":"u64"},{"name":"cliff_unlock_liquidity","type":"u128"},{"name":"liquidity_per_period","type":"u128"},{"name":"number_of_period","type":"u16"}]}},{"name":"EvtPermanentLockPosition","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"lock_liquidity_amount","type":"u128"},{"name":"total_permanent_locked_liquidity","type":"u128"}]}},{"name":"EvtSetPoolStatus","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"status","type":"u8"}]}},{"name":"EvtSplitPosition2","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"first_owner","type":"pubkey"},{"name":"second_owner","type":"pubkey"},{"name":"first_position","type":"pubkey"},{"name":"second_position","type":"pubkey"},{"name":"current_sqrt_price","type":"u128"},{"name":"amount_splits","type":{"defined":{"name":"SplitAmountInfo"}}},{"name":"first_position_info","type":{"defined":{"name":"SplitPositionInfo"}}},{"name":"second_position_info","type":{"defined":{"name":"SplitPositionInfo"}}},{"name":"split_position_parameters","type":{"defined":{"name":"SplitPositionParameters2"}}}]}},{"name":"EvtSplitPosition3","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"first_owner","type":"pubkey"},{"name":"second_owner","type":"pubkey"},{"name":"first_position","type":"pubkey"},{"name":"second_position","type":"pubkey"},{"name":"current_sqrt_price","type":"u128"},{"name":"amount_splits","type":{"defined":{"name":"SplitAmountInfo2"}}},{"name":"first_position_info","type":{"defined":{"name":"SplitPositionInfo2"}}},{"name":"second_position_info","type":{"defined":{"name":"SplitPositionInfo2"}}},{"name":"split_position_parameters","type":{"defined":{"name":"SplitPositionParameters3"}}}]}},{"name":"EvtSwap2","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"trade_direction","type":"u8"},{"name":"collect_fee_mode","type":"u8"},{"name":"has_referral","type":"bool"},{"name":"params","type":{"defined":{"name":"SwapParameters2"}}},{"name":"swap_result","type":{"defined":{"name":"SwapResult2"}}},{"name":"included_transfer_fee_amount_in","type":"u64"},{"name":"included_transfer_fee_amount_out","type":"u64"},{"name":"excluded_transfer_fee_amount_out","type":"u64"},{"name":"current_timestamp","type":"u64"},{"name":"reserve_a_amount","type":"u64"},{"name":"reserve_b_amount","type":"u64"}]}},{"name":"EvtUpdatePoolFees","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"operator","type":"pubkey"},{"name":"params","type":{"defined":{"name":"UpdatePoolFeesParameters"}}}]}},{"name":"EvtUpdateRewardDuration","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"reward_index","type":"u8"},{"name":"old_reward_duration","type":"u64"},{"name":"new_reward_duration","type":"u64"}]}},{"name":"EvtUpdateRewardFunder","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"reward_index","type":"u8"},{"name":"old_funder","type":"pubkey"},{"name":"new_funder","type":"pubkey"}]}},{"name":"EvtWithdrawIneligibleReward","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"reward_mint","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"InitializeCustomizablePoolParameters","type":{"kind":"struct","fields":[{"name":"pool_fees","docs":["pool fees"],"type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"sqrt_min_price","docs":["sqrt min price"],"type":"u128"},{"name":"sqrt_max_price","docs":["sqrt max price"],"type":"u128"},{"name":"has_alpha_vault","docs":["has alpha vault"],"type":"bool"},{"name":"liquidity","docs":["initialize liquidity"],"type":"u128"},{"name":"sqrt_price","docs":["The init price of the pool as a sqrt(token_b/token_a) Q64.64 value. Market cap fee scheduler minimum price will be derived from this value"],"type":"u128"},{"name":"activation_type","docs":["activation type"],"type":"u8"},{"name":"collect_fee_mode","docs":["collect fee mode"],"type":"u8"},{"name":"activation_point","docs":["activation point"],"type":{"option":"u64"}}]}},{"name":"InitializePoolParameters","type":{"kind":"struct","fields":[{"name":"liquidity","docs":["initialize liquidity"],"type":"u128"},{"name":"sqrt_price","docs":["The init price of the pool as a sqrt(token_b/token_a) Q64.64 value"],"type":"u128"},{"name":"activation_point","docs":["activation point"],"type":{"option":"u64"}}]}},{"name":"InnerVesting","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_point","type":"u64"},{"name":"period_frequency","type":"u64"},{"name":"cliff_unlock_liquidity","type":"u128"},{"name":"liquidity_per_period","type":"u128"},{"name":"total_released_liquidity","type":"u128"},{"name":"number_of_period","type":"u16"},{"name":"padding","type":{"array":["u8",14]}}]}},{"name":"Operator","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"whitelisted_address","type":"pubkey"},{"name":"permission","type":"u128"},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"PodAlignedFeeMarketCapScheduler","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"base_fee_mode","type":"u8"},{"name":"padding","type":{"array":["u8",5]}},{"name":"number_of_period","type":"u16"},{"name":"sqrt_price_step_bps","type":"u32"},{"name":"scheduler_expiration_duration","type":"u32"},{"name":"reduction_factor","type":"u64"}]}},{"name":"PodAlignedFeeRateLimiter","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"base_fee_mode","type":"u8"},{"name":"padding","type":{"array":["u8",5]}},{"name":"fee_increment_bps","type":"u16"},{"name":"max_limiter_duration","type":"u32"},{"name":"max_fee_bps","type":"u32"},{"name":"reference_amount","type":"u64"}]}},{"name":"PodAlignedFeeTimeScheduler","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"base_fee_mode","type":"u8"},{"name":"padding","type":{"array":["u8",5]}},{"name":"number_of_period","type":"u16"},{"name":"period_frequency","type":"u64"},{"name":"reduction_factor","type":"u64"}]}},{"name":"Pool","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pool_fees","docs":["Pool fee"],"type":{"defined":{"name":"PoolFeesStruct"}}},{"name":"token_a_mint","docs":["token a mint"],"type":"pubkey"},{"name":"token_b_mint","docs":["token b mint"],"type":"pubkey"},{"name":"token_a_vault","docs":["token a vault"],"type":"pubkey"},{"name":"token_b_vault","docs":["token b vault"],"type":"pubkey"},{"name":"whitelisted_vault","docs":["Whitelisted vault to be able to buy pool before activation_point"],"type":"pubkey"},{"name":"padding_0","docs":["padding, previously partner pubkey, be careful when using this field"],"type":{"array":["u8",32]}},{"name":"liquidity","docs":["liquidity share"],"type":"u128"},{"name":"padding_1","docs":["padding, previous reserve amount, be careful to use that field"],"type":"u128"},{"name":"protocol_a_fee","docs":["protocol a fee"],"type":"u64"},{"name":"protocol_b_fee","docs":["protocol b fee"],"type":"u64"},{"name":"padding_2","type":"u128"},{"name":"sqrt_min_price","docs":["min price"],"type":"u128"},{"name":"sqrt_max_price","docs":["max price"],"type":"u128"},{"name":"sqrt_price","docs":["current price"],"type":"u128"},{"name":"activation_point","docs":["Activation point, can be slot or timestamp"],"type":"u64"},{"name":"activation_type","docs":["Activation type, 0 means by slot, 1 means by timestamp"],"type":"u8"},{"name":"pool_status","docs":["pool status, 0: enable, 1 disable"],"type":"u8"},{"name":"token_a_flag","docs":["token a flag"],"type":"u8"},{"name":"token_b_flag","docs":["token b flag"],"type":"u8"},{"name":"collect_fee_mode","docs":["0 is collect fee in both token, 1 only collect fee only in token b"],"type":"u8"},{"name":"pool_type","docs":["pool type"],"type":"u8"},{"name":"fee_version","docs":["pool fee version, 0: max_fee is still capped at 50%, 1: max_fee is capped at 99%"],"type":"u8"},{"name":"padding_3","docs":["padding"],"type":"u8"},{"name":"fee_a_per_liquidity","docs":["cumulative"],"type":{"array":["u8",32]}},{"name":"fee_b_per_liquidity","docs":["cumulative"],"type":{"array":["u8",32]}},{"name":"permanent_lock_liquidity","type":"u128"},{"name":"metrics","docs":["metrics"],"type":{"defined":{"name":"PoolMetrics"}}},{"name":"creator","docs":["pool creator"],"type":"pubkey"},{"name":"token_a_amount","docs":["token a amount"],"type":"u64"},{"name":"token_b_amount","docs":["token b amount"],"type":"u64"},{"name":"layout_version","docs":["layout version: version 0: haven't track token_a_amount and token_b_amount, version 1: track token_a_amount and token_b_amount"],"type":"u8"},{"name":"padding_4","docs":["Padding for further use"],"type":{"array":["u8",7]}},{"name":"padding_5","docs":["Padding for further use"],"type":{"array":["u64",3]}},{"name":"reward_infos","docs":["Farming reward information"],"type":{"array":[{"defined":{"name":"RewardInfo"}},2]}}]}},{"name":"PoolFeeParameters","docs":["Information regarding fee charges"],"type":{"kind":"struct","fields":[{"name":"base_fee","docs":["Base fee"],"type":{"defined":{"name":"BaseFeeParameters"}}},{"name":"compounding_fee_bps","docs":["compounding fee bps, only have value if CollectFeeMode::Compounding"],"type":"u16"},{"name":"padding","docs":["padding for future use"],"type":"u8"},{"name":"dynamic_fee","docs":["dynamic fee"],"type":{"option":{"defined":{"name":"DynamicFeeParameters"}}}}]}},{"name":"PoolFeesConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee","type":{"defined":{"name":"BaseFeeInfo"}}},{"name":"dynamic_fee","type":{"defined":{"name":"DynamicFeeConfig"}}},{"name":"protocol_fee_percent","type":"u8"},{"name":"padding_0","type":"u8"},{"name":"referral_fee_percent","type":"u8"},{"name":"padding_1","type":{"array":["u8",3]}},{"name":"compounding_fee_bps","docs":["Compounding fee bps, only non-zero if collect_fee_mode is compounding"],"type":"u16"},{"name":"padding_2","type":{"array":["u64",5]}}]}},{"name":"PoolFeesStruct","docs":["Information regarding fee charges","trading_fee = amount * trade_fee_numerator / denominator","protocol_fee = trading_fee * protocol_fee_percentage / 100","referral_fee = protocol_fee * referral_percentage / 100"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee","docs":["Trade fees are extra token amounts that are held inside the token","accounts during a trade, making the value of liquidity tokens rise.","Trade fee numerator"],"type":{"defined":{"name":"BaseFeeStruct"}}},{"name":"protocol_fee_percent","docs":["Protocol trading fees are extra token amounts that are held inside the token","accounts during a trade, with the equivalent in pool tokens minted to","the protocol of the program.","Protocol trade fee numerator"],"type":"u8"},{"name":"padding_0","docs":["padding for future use"],"type":"u8"},{"name":"referral_fee_percent","docs":["referral fee"],"type":"u8"},{"name":"padding_1","docs":["padding"],"type":{"array":["u8",3]}},{"name":"compounding_fee_bps","docs":["compounding fee bps, only non-zero in CollectFeeMode::Compounding"],"type":"u16"},{"name":"dynamic_fee","docs":["dynamic fee"],"type":{"defined":{"name":"DynamicFeeStruct"}}},{"name":"init_sqrt_price","type":"u128"}]}},{"name":"PoolMetrics","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"total_lp_a_fee","type":"u128"},{"name":"total_lp_b_fee","type":"u128"},{"name":"total_protocol_a_fee","type":"u64"},{"name":"total_protocol_b_fee","type":"u64"},{"name":"padding_0","type":{"array":["u64",2]}},{"name":"total_position","type":"u64"},{"name":"padding","type":"u64"}]}},{"name":"Position","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"nft_mint","docs":["nft mint"],"type":"pubkey"},{"name":"fee_a_per_token_checkpoint","docs":["fee a checkpoint"],"type":{"array":["u8",32]}},{"name":"fee_b_per_token_checkpoint","docs":["fee b checkpoint"],"type":{"array":["u8",32]}},{"name":"fee_a_pending","docs":["fee a pending"],"type":"u64"},{"name":"fee_b_pending","docs":["fee b pending"],"type":"u64"},{"name":"unlocked_liquidity","docs":["unlock liquidity"],"type":"u128"},{"name":"vested_liquidity","docs":["vesting liquidity"],"type":"u128"},{"name":"permanent_locked_liquidity","docs":["permanent locked liquidity"],"type":"u128"},{"name":"metrics","docs":["metrics"],"type":{"defined":{"name":"PositionMetrics"}}},{"name":"reward_infos","docs":["Farming reward information"],"type":{"array":[{"defined":{"name":"UserRewardInfo"}},2]}},{"name":"inner_vesting","docs":["inner vesting info"],"type":{"defined":{"name":"InnerVesting"}}},{"name":"padding","docs":["padding for future usage"],"type":"u128"}]}},{"name":"PositionMetrics","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"total_claimed_a_fee","type":"u64"},{"name":"total_claimed_b_fee","type":"u64"}]}},{"name":"RemoveLiquidityParameters","type":{"kind":"struct","fields":[{"name":"liquidity_delta","docs":["delta liquidity"],"type":"u128"},{"name":"token_a_amount_threshold","docs":["minimum token a amount"],"type":"u64"},{"name":"token_b_amount_threshold","docs":["minimum token b amount"],"type":"u64"}]}},{"name":"RewardInfo","docs":["Stores the state relevant for tracking liquidity mining rewards"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Indicates if the reward has been initialized"],"type":"u8"},{"name":"reward_token_flag","docs":["reward token flag"],"type":"u8"},{"name":"_padding_0","docs":["padding"],"type":{"array":["u8",6]}},{"name":"_padding_1","docs":["Padding to ensure `reward_rate: u128` is 16-byte aligned"],"type":{"array":["u8",8]}},{"name":"mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"funder","docs":["Authority account that allows to fund rewards"],"type":"pubkey"},{"name":"reward_duration","docs":["reward duration"],"type":"u64"},{"name":"reward_duration_end","docs":["reward duration end"],"type":"u64"},{"name":"reward_rate","docs":["reward rate"],"type":"u128"},{"name":"reward_per_token_stored","docs":["Reward per token stored"],"type":{"array":["u8",32]}},{"name":"last_update_time","docs":["The last time reward states were updated."],"type":"u64"},{"name":"cumulative_seconds_with_empty_liquidity_reward","docs":["Accumulated seconds when the farm distributed rewards but the bin was empty.","These rewards will be carried over to the next reward time window."],"type":"u64"}]}},{"name":"SplitAmountInfo","type":{"kind":"struct","fields":[{"name":"permanent_locked_liquidity","type":"u128"},{"name":"unlocked_liquidity","type":"u128"},{"name":"fee_a","type":"u64"},{"name":"fee_b","type":"u64"},{"name":"reward_0","type":"u64"},{"name":"reward_1","type":"u64"}]}},{"name":"SplitAmountInfo2","type":{"kind":"struct","fields":[{"name":"permanent_locked_liquidity","type":"u128"},{"name":"unlocked_liquidity","type":"u128"},{"name":"vested_liquidity","type":"u128"},{"name":"fee_a","type":"u64"},{"name":"fee_b","type":"u64"},{"name":"reward_0","type":"u64"},{"name":"reward_1","type":"u64"}]}},{"name":"SplitPositionInfo","type":{"kind":"struct","fields":[{"name":"liquidity","type":"u128"},{"name":"fee_a","type":"u64"},{"name":"fee_b","type":"u64"},{"name":"reward_0","type":"u64"},{"name":"reward_1","type":"u64"}]}},{"name":"SplitPositionInfo2","type":{"kind":"struct","fields":[{"name":"unlocked_liquidity","type":"u128"},{"name":"permanent_locked_liquidity","type":"u128"},{"name":"vested_liquidity","type":"u128"},{"name":"fee_a","type":"u64"},{"name":"fee_b","type":"u64"},{"name":"reward_0","type":"u64"},{"name":"reward_1","type":"u64"}]}},{"name":"SplitPositionParameters","type":{"kind":"struct","fields":[{"name":"unlocked_liquidity_percentage","docs":["Percentage of unlocked liquidity to split to the second position"],"type":"u8"},{"name":"permanent_locked_liquidity_percentage","docs":["Percentage of permanent locked liquidity to split to the second position"],"type":"u8"},{"name":"fee_a_percentage","docs":["Percentage of fee A pending to split to the second position"],"type":"u8"},{"name":"fee_b_percentage","docs":["Percentage of fee B pending to split to the second position"],"type":"u8"},{"name":"reward_0_percentage","docs":["Percentage of reward 0 pending to split to the second position"],"type":"u8"},{"name":"reward_1_percentage","docs":["Percentage of reward 1 pending to split to the second position"],"type":"u8"},{"name":"inner_vesting_liquidity_percentage","docs":["Percentage of inner vesting liquidity"],"type":"u8"},{"name":"padding","docs":["padding for future"],"type":{"array":["u8",15]}}]}},{"name":"SplitPositionParameters2","type":{"kind":"struct","fields":[{"name":"unlocked_liquidity_numerator","type":"u32"},{"name":"permanent_locked_liquidity_numerator","type":"u32"},{"name":"fee_a_numerator","type":"u32"},{"name":"fee_b_numerator","type":"u32"},{"name":"reward_0_numerator","type":"u32"},{"name":"reward_1_numerator","type":"u32"}]}},{"name":"SplitPositionParameters3","type":{"kind":"struct","fields":[{"name":"unlocked_liquidity_numerator","type":"u32"},{"name":"permanent_locked_liquidity_numerator","type":"u32"},{"name":"fee_a_numerator","type":"u32"},{"name":"fee_b_numerator","type":"u32"},{"name":"reward_0_numerator","type":"u32"},{"name":"reward_1_numerator","type":"u32"},{"name":"inner_vesting_liquidity_numerator","type":"u32"}]}},{"name":"StaticConfigParameters","type":{"kind":"struct","fields":[{"name":"pool_fees","type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"sqrt_min_price","type":"u128"},{"name":"sqrt_max_price","type":"u128"},{"name":"vault_config_key","type":"pubkey"},{"name":"pool_creator_authority","type":"pubkey"},{"name":"activation_type","type":"u8"},{"name":"collect_fee_mode","type":"u8"}]}},{"name":"SwapParameters","type":{"kind":"struct","fields":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]}},{"name":"SwapParameters2","type":{"kind":"struct","fields":[{"name":"amount_0","docs":["When it's exact in, partial fill, this will be amount_in. When it's exact out, this will be amount_out"],"type":"u64"},{"name":"amount_1","docs":["When it's exact in, partial fill, this will be minimum_amount_out. When it's exact out, this will be maximum_amount_in"],"type":"u64"},{"name":"swap_mode","docs":["Swap mode, refer [SwapMode]"],"type":"u8"}]}},{"name":"SwapResult2","type":{"kind":"struct","fields":[{"name":"included_fee_input_amount","type":"u64"},{"name":"excluded_fee_input_amount","type":"u64"},{"name":"amount_left","type":"u64"},{"name":"output_amount","type":"u64"},{"name":"next_sqrt_price","type":"u128"},{"name":"claiming_fee","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"compounding_fee","type":"u64"},{"name":"referral_fee","type":"u64"}]}},{"name":"TokenBadge","docs":["Parameter that set by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"token_mint","docs":["token mint"],"type":"pubkey"},{"name":"_padding","docs":["Reserve"],"type":{"array":["u8",128]}}]}},{"name":"UpdatePoolFeesParameters","type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","docs":["Base fee update mode:","- None: skip base fee update","- Some: update new cliff_fee_numerator if base fee is static"],"type":{"option":"u64"}},{"name":"dynamic_fee","docs":["Dynamic fee update mode:","- None: skip dynamic fee update","- Some(with default value): disable dynamic fee","- Some(with non default value): enable dynamic fee if disabled or update dynamic fee if enabled"],"type":{"option":{"defined":{"name":"DynamicFeeParameters"}}}}]}},{"name":"UserRewardInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"reward_per_token_checkpoint","docs":["The latest update reward checkpoint"],"type":{"array":["u8",32]}},{"name":"reward_pendings","docs":["Current pending rewards"],"type":"u64"},{"name":"total_claimed_rewards","docs":["Total claimed rewards"],"type":"u64"}]}},{"name":"Vesting","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"inner_vesting","type":{"defined":{"name":"InnerVesting"}}},{"name":"padding2","type":{"array":["u128",4]}}]}},{"name":"VestingParameters","type":{"kind":"struct","fields":[{"name":"cliff_point","type":{"option":"u64"}},{"name":"period_frequency","type":"u64"},{"name":"cliff_unlock_liquidity","type":"u128"},{"name":"liquidity_per_period","type":"u128"},{"name":"number_of_period","type":"u16"}]}}],"constants":[{"name":"BIN_STEP_BPS_DEFAULT","type":"u16","value":"1"},{"name":"BIN_STEP_U128_DEFAULT_LE_BYTES","type":{"array":["u8",16]},"value":"[203, 16, 199, 186, 184, 141, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0]"},{"name":"CURRENT_POOL_VERSION","type":"u8","value":"1"},{"name":"CUSTOMIZABLE_POOL_PREFIX","type":"bytes","value":"[99, 112, 111, 111, 108]"},{"name":"FEE_DENOMINATOR","docs":["Default fee denominator. DO NOT simply update it as it will break logic that depends on it as default value."],"type":"u64","value":"1000000000"},{"name":"MAX_BASIS_POINT","docs":["Max basis point. 100% in pct"],"type":"u16","value":"10000"},{"name":"MAX_FEE_NUMERATOR_V0","type":"u64","value":"500000000"},{"name":"MAX_FEE_NUMERATOR_V1","type":"u64","value":"990000000"},{"name":"MAX_SQRT_PRICE_LE_BYTES","type":{"array":["u8",16]},"value":"[155, 87, 105, 78, 169, 26, 92, 132, 177, 196, 254, 255, 0, 0, 0, 0]"},{"name":"MIN_FEE_NUMERATOR","type":"u64","value":"100000"},{"name":"MIN_SQRT_PRICE_LE_BYTES","type":{"array":["u8",16]},"value":"[80, 59, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]"},{"name":"POOL_AUTHORITY_PREFIX","type":"bytes","value":"[112, 111, 111, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]"},{"name":"POOL_PREFIX","type":"bytes","value":"[112, 111, 111, 108]"},{"name":"POSITION_NFT_ACCOUNT_PREFIX","type":"bytes","value":"[112, 111, 115, 105, 116, 105, 111, 110, 95, 110, 102, 116, 95, 97, 99, 99, 111, 117, 110, 116]"},{"name":"POSITION_PREFIX","type":"bytes","value":"[112, 111, 115, 105, 116, 105, 111, 110]"},{"name":"SPLIT_POSITION_DENOMINATOR","type":"u32","value":"1000000000"},{"name":"TOKEN_VAULT_PREFIX","type":"bytes","value":"[116, 111, 107, 101, 110, 95, 118, 97, 117, 108, 116]"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/meteora_dbc.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.json b/olddocs/archivekbot2/idls/meteora_dbc.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.json new file mode 100644 index 0000000..98ed38b --- /dev/null +++ b/olddocs/archivekbot2/idls/meteora_dbc.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.json @@ -0,0 +1 @@ +{"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN","metadata":{"name":"dynamic_bonding_curve","version":"0.1.10","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"claim_creator_trading_fee","discriminator":[82,220,250,189,3,85,107,45],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"pool","writable":true},{"name":"token_a_account","docs":["The treasury token a account"],"writable":true},{"name":"token_b_account","docs":["The treasury token b account"],"writable":true},{"name":"base_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"base_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"quote_mint","docs":["The mint of token b"]},{"name":"creator","signer":true},{"name":"token_base_program","docs":["Token a program"]},{"name":"token_quote_program","docs":["Token b 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":"max_base_amount","type":"u64"},{"name":"max_quote_amount","type":"u64"}]},{"name":"claim_partner_pool_creation_fee","discriminator":[250,238,26,4,139,10,101,248],"accounts":[{"name":"config","relations":["pool"]},{"name":"pool","writable":true},{"name":"fee_claimer","signer":true},{"name":"fee_receiver","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":"claim_protocol_fee","discriminator":[165,228,133,48,99,249,255,33],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["pool"]},{"name":"pool","writable":true},{"name":"base_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"base_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"quote_mint","docs":["The mint of token b"],"relations":["config"]},{"name":"token_base_account","writable":true},{"name":"token_quote_account","writable":true},{"name":"operator"},{"name":"signer","docs":["Signer"],"signer":true},{"name":"token_base_program","docs":["Token a program"]},{"name":"token_quote_program","docs":["Token b 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":"max_base_amount","type":"u64"},{"name":"max_quote_amount","type":"u64"}]},{"name":"claim_protocol_pool_creation_fee","discriminator":[114,205,83,188,240,153,25,54],"accounts":[{"name":"config","relations":["pool"]},{"name":"pool","writable":true},{"name":"operator"},{"name":"signer","docs":["Operator"],"signer":true},{"name":"treasury","writable":true,"address":"6aYhxiNGmG8AyU25rh2R7iFu4pBrqnQHpNUGhmsEXRcm"},{"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":"claim_trading_fee","discriminator":[8,236,89,49,152,125,177,81],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["pool"]},{"name":"pool","writable":true},{"name":"token_a_account","docs":["The treasury token a account"],"writable":true},{"name":"token_b_account","docs":["The treasury token b account"],"writable":true},{"name":"base_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"base_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"quote_mint","docs":["The mint of token b"],"relations":["config"]},{"name":"fee_claimer","signer":true},{"name":"token_base_program","docs":["Token a program"]},{"name":"token_quote_program","docs":["Token b 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":"max_amount_a","type":"u64"},{"name":"max_amount_b","type":"u64"}]},{"name":"close_claim_protocol_fee_operator","discriminator":[8,41,87,35,80,48,121,26],"accounts":[{"name":"claim_fee_operator","writable":true},{"name":"rent_receiver","writable":true},{"name":"signer","signer":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":"close_operator_account","discriminator":[171,9,213,74,120,23,3,29],"accounts":[{"name":"operator","writable":true},{"name":"signer","signer":true},{"name":"rent_receiver","writable":true}],"args":[]},{"name":"create_config","discriminator":[201,207,243,114,75,111,47,189],"accounts":[{"name":"config","writable":true,"signer":true},{"name":"fee_claimer"},{"name":"leftover_receiver"},{"name":"quote_mint","docs":["quote mint"]},{"name":"payer","writable":true,"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":"config_parameters","type":{"defined":{"name":"ConfigParameters"}}}]},{"name":"create_locker","docs":["PERMISSIONLESS FUNCTIONS ///","create locker"],"discriminator":[167,90,137,154,75,47,17,84],"accounts":[{"name":"virtual_pool","docs":["Virtual pool"],"writable":true},{"name":"config","docs":["Config"],"relations":["virtual_pool"]},{"name":"pool_authority","writable":true,"address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"base_vault","writable":true,"relations":["virtual_pool"]},{"name":"base_mint","writable":true,"relations":["virtual_pool"]},{"name":"base","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,97,115,101,95,108,111,99,107,101,114]},{"kind":"account","path":"virtual_pool"}]}},{"name":"creator","relations":["virtual_pool"]},{"name":"escrow","writable":true},{"name":"escrow_token","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"token_program"},{"name":"locker_program","address":"LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn"},{"name":"locker_event_authority"},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_operator_account","discriminator":[221,64,246,149,240,153,229,163],"accounts":[{"name":"operator","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,111,114]},{"kind":"account","path":"whitelisted_address"}]}},{"name":"whitelisted_address"},{"name":"signer","signer":true},{"name":"payer","writable":true,"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":"permission","type":"u128"}]},{"name":"create_partner_metadata","docs":["PARTNER FUNCTIONS ///"],"discriminator":[192,168,234,191,188,226,227,255],"accounts":[{"name":"partner_metadata","docs":["Partner metadata"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,109,101,116,97,100,97,116,97]},{"kind":"account","path":"fee_claimer"}]}},{"name":"payer","docs":["Payer of the partner metadata."],"writable":true,"signer":true},{"name":"fee_claimer","docs":["Fee claimer for partner"],"signer":true},{"name":"system_program","docs":["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":"metadata","type":{"defined":{"name":"CreatePartnerMetadataParameters"}}}]},{"name":"create_virtual_pool_metadata","discriminator":[45,97,187,103,254,109,124,134],"accounts":[{"name":"virtual_pool","writable":true},{"name":"virtual_pool_metadata","docs":["Virtual pool metadata"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[118,105,114,116,117,97,108,95,112,111,111,108,95,109,101,116,97,100,97,116,97]},{"kind":"account","path":"virtual_pool"}]}},{"name":"creator","signer":true},{"name":"payer","docs":["Payer of the virtual pool metadata."],"writable":true,"signer":true},{"name":"system_program","docs":["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":"metadata","type":{"defined":{"name":"CreateVirtualPoolMetadataParameters"}}}]},{"name":"creator_withdraw_surplus","discriminator":[165,3,137,7,28,134,76,80],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["virtual_pool"]},{"name":"virtual_pool","writable":true},{"name":"token_quote_account","docs":["The receiver token account"],"writable":true},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["virtual_pool"]},{"name":"quote_mint","docs":["The mint of quote token"],"relations":["config"]},{"name":"creator","signer":true},{"name":"token_quote_program","docs":["Token b 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":"initialize_virtual_pool_with_spl_token","docs":["POOL CREATOR FUNCTIONS ////"],"discriminator":[140,85,215,176,102,54,104,79],"accounts":[{"name":"config","docs":["Which config the pool belongs to."]},{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"creator","signer":true},{"name":"base_mint","writable":true,"signer":true},{"name":"quote_mint","relations":["config"]},{"name":"pool","docs":["Initialize an account to store the pool state"],"writable":true},{"name":"base_vault","docs":["Token a vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"pool"}]}},{"name":"quote_vault","docs":["Token b vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"},{"kind":"account","path":"pool"}]}},{"name":"mint_metadata","writable":true},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"token_quote_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"InitializePoolParameters"}}}]},{"name":"initialize_virtual_pool_with_token2022","discriminator":[169,118,51,78,145,110,220,155],"accounts":[{"name":"config","docs":["Which config the pool belongs to."]},{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"creator","signer":true},{"name":"base_mint","docs":["Unique token mint address, initialize in contract"],"writable":true,"signer":true},{"name":"quote_mint","relations":["config"]},{"name":"pool","docs":["Initialize an account to store the pool state"],"writable":true},{"name":"base_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"pool"}]}},{"name":"quote_vault","docs":["Token quote vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"},{"kind":"account","path":"pool"}]}},{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"token_quote_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_program","docs":["token program for base mint"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"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":"params","type":{"defined":{"name":"InitializePoolParameters"}}}]},{"name":"migrate_meteora_damm","discriminator":[27,1,48,22,180,63,118,217],"accounts":[{"name":"virtual_pool","docs":["virtual pool"],"writable":true,"relations":["migration_metadata"]},{"name":"migration_metadata","writable":true},{"name":"config","relations":["virtual_pool"]},{"name":"pool_authority","writable":true,"address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"pool","writable":true},{"name":"damm_config","docs":["pool config"]},{"name":"lp_mint","writable":true},{"name":"token_a_mint","writable":true},{"name":"token_b_mint"},{"name":"a_vault","writable":true},{"name":"b_vault","writable":true},{"name":"a_token_vault","writable":true},{"name":"b_token_vault","writable":true},{"name":"a_vault_lp_mint","writable":true},{"name":"b_vault_lp_mint","writable":true},{"name":"a_vault_lp","writable":true},{"name":"b_vault_lp","writable":true},{"name":"base_vault","writable":true,"relations":["virtual_pool"]},{"name":"quote_vault","writable":true,"relations":["virtual_pool"]},{"name":"virtual_pool_lp","writable":true},{"name":"protocol_token_a_fee","writable":true},{"name":"protocol_token_b_fee","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"rent"},{"name":"mint_metadata","writable":true},{"name":"metadata_program"},{"name":"amm_program","address":"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"},{"name":"vault_program"},{"name":"token_program","docs":["token_program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program"},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"migrate_meteora_damm_claim_lp_token","discriminator":[139,133,2,30,91,145,127,154],"accounts":[{"name":"virtual_pool","relations":["migration_metadata"]},{"name":"migration_metadata","docs":["migration metadata"],"writable":true},{"name":"pool_authority","writable":true,"address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"lp_mint","relations":["migration_metadata"]},{"name":"source_token","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"migration_metadata"}],"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":"destination_token","writable":true,"pda":{"seeds":[{"kind":"account","path":"owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"migration_metadata"}],"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":"owner"},{"name":"sender","signer":true},{"name":"token_program","docs":["token_program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"migrate_meteora_damm_lock_lp_token","discriminator":[177,55,238,157,251,88,165,42],"accounts":[{"name":"virtual_pool","relations":["migration_metadata"]},{"name":"migration_metadata","docs":["migration_metadata"],"writable":true},{"name":"pool_authority","writable":true,"address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"pool","writable":true,"relations":["lock_escrow"]},{"name":"lp_mint","relations":["migration_metadata"]},{"name":"lock_escrow","writable":true},{"name":"owner","relations":["lock_escrow"]},{"name":"source_tokens","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"migration_metadata"}],"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":"escrow_vault","writable":true},{"name":"amm_program","address":"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"},{"name":"a_vault"},{"name":"b_vault"},{"name":"a_vault_lp"},{"name":"b_vault_lp"},{"name":"a_vault_lp_mint"},{"name":"b_vault_lp_mint"},{"name":"token_program","docs":["token_program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"migration_damm_v2","discriminator":[156,169,230,103,53,228,80,64],"accounts":[{"name":"virtual_pool","docs":["virtual pool"],"writable":true},{"name":"migration_metadata"},{"name":"config","docs":["virtual pool config key"],"relations":["virtual_pool"]},{"name":"pool_authority","writable":true,"address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"pool","writable":true},{"name":"first_position_nft_mint","writable":true,"signer":true},{"name":"first_position_nft_account","writable":true},{"name":"first_position","writable":true},{"name":"second_position_nft_mint","writable":true,"signer":true,"optional":true},{"name":"second_position_nft_account","writable":true,"optional":true},{"name":"second_position","writable":true,"optional":true},{"name":"damm_pool_authority"},{"name":"amm_program","address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"base_mint","writable":true},{"name":"quote_mint","writable":true},{"name":"token_a_vault","writable":true},{"name":"token_b_vault","writable":true},{"name":"base_vault","writable":true,"relations":["virtual_pool"]},{"name":"quote_vault","writable":true,"relations":["virtual_pool"]},{"name":"payer","writable":true,"signer":true},{"name":"token_base_program"},{"name":"token_quote_program"},{"name":"token_2022_program"},{"name":"damm_event_authority"},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"migration_damm_v2_create_metadata","discriminator":[109,189,19,36,195,183,222,82],"accounts":[{"name":"virtual_pool"},{"name":"config"},{"name":"migration_metadata"},{"name":"payer"},{"name":"system_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":"migration_meteora_damm_create_metadata","docs":["migrate damm v1"],"discriminator":[47,94,126,115,221,226,194,133],"accounts":[{"name":"virtual_pool"},{"name":"config","relations":["virtual_pool"]},{"name":"migration_metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,101,111,114,97]},{"kind":"account","path":"virtual_pool"}]}},{"name":"payer","writable":true,"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":"partner_withdraw_surplus","discriminator":[168,173,72,100,201,98,38,92],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["virtual_pool"]},{"name":"virtual_pool","writable":true},{"name":"token_quote_account","docs":["The receiver token account"],"writable":true},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["virtual_pool"]},{"name":"quote_mint","docs":["The mint of quote token"],"relations":["config"]},{"name":"fee_claimer","signer":true},{"name":"token_quote_program","docs":["Token b 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":"swap","docs":["TRADING BOTS FUNCTIONS ////"],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","docs":["config key"],"relations":["pool"]},{"name":"pool","docs":["Pool account"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"base_vault","docs":["The vault token account for base token"],"writable":true,"relations":["pool"]},{"name":"quote_vault","docs":["The vault token account for quote token"],"writable":true,"relations":["pool"]},{"name":"base_mint","docs":["The mint of base token"]},{"name":"quote_mint","docs":["The mint of quote token"]},{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"token_base_program","docs":["Token base program"]},{"name":"token_quote_program","docs":["Token quote program"]},{"name":"referral_token_account","docs":["referral token account"],"writable":true,"optional":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":"params","type":{"defined":{"name":"SwapParameters"}}}]},{"name":"swap2","discriminator":[65,75,63,76,235,91,91,136],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","docs":["config key"],"relations":["pool"]},{"name":"pool","docs":["Pool account"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"base_vault","docs":["The vault token account for base token"],"writable":true,"relations":["pool"]},{"name":"quote_vault","docs":["The vault token account for quote token"],"writable":true,"relations":["pool"]},{"name":"base_mint","docs":["The mint of base token"]},{"name":"quote_mint","docs":["The mint of quote token"]},{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"token_base_program","docs":["Token base program"]},{"name":"token_quote_program","docs":["Token quote program"]},{"name":"referral_token_account","docs":["referral token account"],"writable":true,"optional":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":"params","type":{"defined":{"name":"SwapParameters2"}}}]},{"name":"transfer_pool_creator","discriminator":[20,7,169,33,58,147,166,33],"accounts":[{"name":"virtual_pool","writable":true},{"name":"config","relations":["virtual_pool"]},{"name":"creator","signer":true},{"name":"new_creator"},{"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":"withdraw_leftover","discriminator":[20,198,202,237,235,243,183,66],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["virtual_pool"]},{"name":"virtual_pool","writable":true},{"name":"token_base_account","docs":["The receiver token account, withdraw to ATA"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"leftover_receiver"},{"kind":"account","path":"token_base_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":"base_vault","docs":["The vault token account for output token"],"writable":true,"relations":["virtual_pool"]},{"name":"base_mint","docs":["The mint of quote token"],"relations":["virtual_pool"]},{"name":"leftover_receiver","relations":["config"]},{"name":"token_base_program","docs":["Token base 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":"withdraw_migration_fee","docs":["BOTH partner and creator FUNCTIONS ///"],"discriminator":[237,142,45,23,129,6,222,162],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["virtual_pool"]},{"name":"virtual_pool","writable":true},{"name":"token_quote_account","docs":["The receiver token account"],"writable":true},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["virtual_pool"]},{"name":"quote_mint","docs":["The mint of quote token"],"relations":["config"]},{"name":"sender","signer":true},{"name":"token_quote_program","docs":["Token b 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":"flag","type":"u8"}]},{"name":"zap_protocol_fee","discriminator":[213,155,187,34,56,182,91,240],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["pool"]},{"name":"pool","writable":true},{"name":"token_vault","writable":true},{"name":"token_mint"},{"name":"receiver_token","writable":true},{"name":"operator","docs":["zap claim fee operator"]},{"name":"signer","docs":["Operator"],"signer":true},{"name":"token_program","docs":["Token program"]},{"name":"sysvar_instructions","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"max_amount","type":"u64"}]}],"accounts":[{"name":"ClaimFeeOperator","discriminator":[166,48,134,86,34,200,188,150]},{"name":"Config","discriminator":[155,12,170,224,30,250,204,130]},{"name":"LockEscrow","discriminator":[190,106,121,6,200,182,21,75]},{"name":"MeteoraDammMigrationMetadata","discriminator":[17,155,141,215,207,4,133,156]},{"name":"Operator","discriminator":[219,31,188,145,69,139,204,117]},{"name":"PartnerMetadata","discriminator":[68,68,130,19,16,209,98,156]},{"name":"PoolConfig","discriminator":[26,108,14,123,116,230,129,43]},{"name":"VirtualPool","discriminator":[213,224,5,209,98,69,119,92]},{"name":"VirtualPoolMetadata","discriminator":[217,37,82,250,43,47,228,254]}],"events":[{"name":"EvtClaimCreatorTradingFee","discriminator":[154,228,215,202,133,155,214,138]},{"name":"EvtClaimPoolCreationFee","discriminator":[149,111,149,44,136,64,175,62]},{"name":"EvtClaimProtocolFee","discriminator":[186,244,75,251,188,13,25,33]},{"name":"EvtClaimProtocolLiquidityMigrationFee","discriminator":[81,168,116,31,161,86,27,35]},{"name":"EvtClaimTradingFee","discriminator":[26,83,117,240,92,202,112,254]},{"name":"EvtCloseClaimFeeOperator","discriminator":[111,39,37,55,110,216,194,23]},{"name":"EvtCreateClaimFeeOperator","discriminator":[21,6,153,120,68,116,28,177]},{"name":"EvtCreateConfig","discriminator":[131,207,180,174,180,73,165,54]},{"name":"EvtCreateConfigV2","discriminator":[163,74,66,187,119,195,26,144]},{"name":"EvtCreateMeteoraMigrationMetadata","discriminator":[99,167,133,63,214,143,175,139]},{"name":"EvtCreatorWithdrawSurplus","discriminator":[152,73,21,15,66,87,53,157]},{"name":"EvtCurveComplete","discriminator":[229,231,86,84,156,134,75,24]},{"name":"EvtInitializePool","discriminator":[228,50,246,85,203,66,134,37]},{"name":"EvtPartnerClaimPoolCreationFee","discriminator":[174,223,44,150,145,98,89,195]},{"name":"EvtPartnerMetadata","discriminator":[200,127,6,55,13,32,8,150]},{"name":"EvtPartnerWithdrawMigrationFee","discriminator":[181,105,127,67,8,187,120,57]},{"name":"EvtPartnerWithdrawSurplus","discriminator":[195,56,152,9,232,72,35,22]},{"name":"EvtSwap","discriminator":[27,60,21,213,138,170,187,147]},{"name":"EvtSwap2","discriminator":[189,66,51,168,38,80,117,153]},{"name":"EvtUpdatePoolCreator","discriminator":[107,225,165,237,91,158,213,220]},{"name":"EvtVirtualPoolMetadata","discriminator":[188,18,72,76,195,91,38,74]},{"name":"EvtWithdrawLeftover","discriminator":[191,189,104,143,111,156,94,229]},{"name":"EvtWithdrawMigrationFee","discriminator":[26,203,84,85,161,23,100,214]}],"errors":[{"code":6000,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6001,"name":"InvalidFee","msg":"Invalid fee setup"},{"code":6002,"name":"ExceededSlippage","msg":"Exceeded slippage tolerance"},{"code":6003,"name":"ExceedMaxFeeBps","msg":"Exceeded max fee bps"},{"code":6004,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6005,"name":"AmountIsZero","msg":"Amount is zero"},{"code":6006,"name":"TypeCastFailed","msg":"Type cast error"},{"code":6007,"name":"InvalidActivationType","msg":"Invalid activation type"},{"code":6008,"name":"InvalidQuoteMint","msg":"Invalid quote mint"},{"code":6009,"name":"InvalidCollectFeeMode","msg":"Invalid collect fee mode"},{"code":6010,"name":"InvalidMigrationFeeOption","msg":"Invalid migration fee option"},{"code":6011,"name":"InvalidInput","msg":"Invalid input"},{"code":6012,"name":"NotEnoughLiquidity","msg":"Not enough liquidity"},{"code":6013,"name":"PoolIsCompleted","msg":"Pool is completed"},{"code":6014,"name":"PoolIsIncompleted","msg":"Pool is incompleted"},{"code":6015,"name":"InvalidMigrationOption","msg":"Invalid migration option"},{"code":6016,"name":"InvalidTokenDecimals","msg":"Invalid token decimals"},{"code":6017,"name":"InvalidTokenType","msg":"Invalid token type"},{"code":6018,"name":"InvalidFeePercentage","msg":"Invalid fee percentage"},{"code":6019,"name":"InvalidQuoteThreshold","msg":"Invalid quote threshold"},{"code":6020,"name":"InvalidTokenSupply","msg":"Invalid token supply"},{"code":6021,"name":"InvalidCurve","msg":"Invalid curve"},{"code":6022,"name":"NotPermitToDoThisAction","msg":"Not permit to do this action"},{"code":6023,"name":"InvalidOwnerAccount","msg":"Invalid owner account"},{"code":6024,"name":"InvalidConfigAccount","msg":"Invalid config account"},{"code":6025,"name":"SurplusHasBeenWithdraw","msg":"Surplus has been withdraw"},{"code":6026,"name":"LeftoverHasBeenWithdraw","msg":"Leftover has been withdraw"},{"code":6027,"name":"TotalBaseTokenExceedMaxSupply","msg":"Total base token is exceeded max supply"},{"code":6028,"name":"UnsupportNativeMintToken2022","msg":"Unsupport native mint token 2022"},{"code":6029,"name":"InsufficientLiquidityForMigration","msg":"Insufficient liquidity for migration"},{"code":6030,"name":"MissingPoolConfigInRemainingAccount","msg":"Missing pool config in remaining account"},{"code":6031,"name":"InvalidVestingParameters","msg":"Invalid vesting parameters"},{"code":6032,"name":"InvalidLeftoverAddress","msg":"Invalid leftover address"},{"code":6033,"name":"InsufficientLiquidity","msg":"Liquidity in bonding curve is insufficient"},{"code":6034,"name":"InvalidFeeScheduler","msg":"Invalid fee scheduler"},{"code":6035,"name":"InvalidCreatorTradingFeePercentage","msg":"Invalid creator trading fee percentage"},{"code":6036,"name":"InvalidNewCreator","msg":"Invalid new creator"},{"code":6037,"name":"InvalidTokenAuthorityOption","msg":"Invalid token authority option"},{"code":6038,"name":"InvalidAccount","msg":"Invalid account for the instruction"},{"code":6039,"name":"InvalidMigratorFeePercentage","msg":"Invalid migrator fee percentage"},{"code":6040,"name":"MigrationFeeHasBeenWithdraw","msg":"Migration fee has been withdraw"},{"code":6041,"name":"InvalidBaseFeeMode","msg":"Invalid base fee mode"},{"code":6042,"name":"InvalidFeeRateLimiter","msg":"Invalid fee rate limiter"},{"code":6043,"name":"FailToValidateSingleSwapInstruction","msg":"Fail to validate single swap instruction in rate limiter"},{"code":6044,"name":"InvalidMigratedPoolFee","msg":"Invalid migrated pool fee params"},{"code":6045,"name":"UndeterminedError","msg":"Undertermined error"},{"code":6046,"name":"RateLimiterNotSupported","msg":"Rate limiter not supported"},{"code":6047,"name":"AmountLeftIsNotZero","msg":"Amount left is not zero"},{"code":6048,"name":"NextSqrtPriceIsSmallerThanStartSqrtPrice","msg":"Next sqrt price is smaller than start sqrt price"},{"code":6049,"name":"InvalidMinBaseFee","msg":"Invalid min base fee"},{"code":6050,"name":"AccountInvariantViolation","msg":"Account invariant violation"},{"code":6051,"name":"InvalidPoolCreationFee","msg":"Invalid pool creation fee"},{"code":6052,"name":"PoolCreationFeeHasBeenClaimed","msg":"Pool creation fee has been claimed"},{"code":6053,"name":"Unauthorized","msg":"Not permit to do this action"},{"code":6054,"name":"ZeroPoolCreationFee","msg":"Pool creation fee is zero"},{"code":6055,"name":"InvalidMigrationLockedLiquidity","msg":"Invalid migration locked liquidity"},{"code":6056,"name":"InvalidFeeMarketCapScheduler","msg":"Invalid fee market cap scheduler"},{"code":6057,"name":"FirstSwapValidationFailed","msg":"Fail to validate first swap with minimum fee"},{"code":6058,"name":"IncorrectATA","msg":"Incorrect ATA"},{"code":6059,"name":"InsufficientPoolLamports","msg":"Pool has insufficient lamports to perform the operation"},{"code":6060,"name":"InvalidPermission","msg":"Invalid permission"},{"code":6061,"name":"InvalidWithdrawProtocolFeeZapAccounts","msg":"Invalid withdraw protocol fee zap accounts"},{"code":6062,"name":"MintRestrictedFromZap","msg":"SOL,USDC protocol fee cannot be withdrawn via zap"},{"code":6063,"name":"InvalidZapOutParameters","msg":"Invalid zap out parameters"},{"code":6064,"name":"CpiDisabled","msg":"CPI disabled"},{"code":6065,"name":"MissingZapOutInstruction","msg":"Missing zap out instruction"},{"code":6066,"name":"InvalidZapAccounts","msg":"Invalid zap accounts"},{"code":6067,"name":"InvalidCompoundingParameters","msg":"Invalid compounding parameters"}],"types":[{"name":"BaseFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"second_factor","type":"u64"},{"name":"third_factor","type":"u64"},{"name":"first_factor","type":"u16"},{"name":"base_fee_mode","type":"u8"},{"name":"padding_0","type":{"array":["u8",5]}}]}},{"name":"BaseFeeParameters","type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"first_factor","type":"u16"},{"name":"second_factor","type":"u64"},{"name":"third_factor","type":"u64"},{"name":"base_fee_mode","type":"u8"}]}},{"name":"ClaimFeeOperator","docs":["Parameter that set by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"operator","docs":["operator"],"type":"pubkey"},{"name":"_padding","docs":["Reserve"],"type":{"array":["u8",128]}}]}},{"name":"Config","type":{"kind":"struct","fields":[{"name":"pool_fees","type":{"defined":{"name":"PoolFees"}}},{"name":"activation_duration","type":"u64"},{"name":"vault_config_key","type":"pubkey"},{"name":"pool_creator_authority","type":"pubkey"},{"name":"activation_type","type":"u8"},{"name":"partner_fee_numerator","type":"u64"},{"name":"padding","type":{"array":["u8",219]}}]}},{"name":"ConfigParameters","type":{"kind":"struct","fields":[{"name":"pool_fees","type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"collect_fee_mode","type":"u8"},{"name":"migration_option","type":"u8"},{"name":"activation_type","type":"u8"},{"name":"token_type","type":"u8"},{"name":"token_decimal","type":"u8"},{"name":"partner_liquidity_percentage","type":"u8"},{"name":"partner_permanent_locked_liquidity_percentage","type":"u8"},{"name":"creator_liquidity_percentage","type":"u8"},{"name":"creator_permanent_locked_liquidity_percentage","type":"u8"},{"name":"migration_quote_threshold","type":"u64"},{"name":"sqrt_start_price","type":"u128"},{"name":"locked_vesting","type":{"defined":{"name":"LockedVestingParams"}}},{"name":"migration_fee_option","type":"u8"},{"name":"token_supply","type":{"option":{"defined":{"name":"TokenSupplyParams"}}}},{"name":"creator_trading_fee_percentage","type":"u8"},{"name":"token_update_authority","type":"u8"},{"name":"migration_fee","type":{"defined":{"name":"MigrationFee"}}},{"name":"migrated_pool_fee","type":{"defined":{"name":"MigratedPoolFee"}}},{"name":"pool_creation_fee","docs":["pool creation fee in SOL lamports value"],"type":"u64"},{"name":"partner_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfoParams"}}},{"name":"creator_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfoParams"}}},{"name":"migrated_pool_base_fee_mode","type":"u8"},{"name":"migrated_pool_market_cap_fee_scheduler_params","type":{"defined":{"name":"MigratedPoolMarketCapFeeSchedulerParams"}}},{"name":"enable_first_swap_with_min_fee","type":"bool"},{"name":"compounding_fee_bps","type":"u16"},{"name":"padding","docs":["padding for future use"],"type":{"array":["u8",2]}},{"name":"curve","type":{"vec":{"defined":{"name":"LiquidityDistributionParameters"}}}}]}},{"name":"CreatePartnerMetadataParameters","type":{"kind":"struct","fields":[{"name":"padding","type":{"array":["u8",96]}},{"name":"name","type":"string"},{"name":"website","type":"string"},{"name":"logo","type":"string"}]}},{"name":"CreateVirtualPoolMetadataParameters","type":{"kind":"struct","fields":[{"name":"padding","type":{"array":["u8",96]}},{"name":"name","type":"string"},{"name":"website","type":"string"},{"name":"logo","type":"string"}]}},{"name":"DynamicFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","type":"u8"},{"name":"padding","type":{"array":["u8",7]}},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"},{"name":"bin_step","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"padding2","type":{"array":["u8",8]}},{"name":"bin_step_u128","type":"u128"}]}},{"name":"DynamicFeeParameters","type":{"kind":"struct","fields":[{"name":"bin_step","type":"u16"},{"name":"bin_step_u128","type":"u128"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"}]}},{"name":"EvtClaimCreatorTradingFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_base_amount","type":"u64"},{"name":"token_quote_amount","type":"u64"}]}},{"name":"EvtClaimPoolCreationFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"receiver","type":"pubkey"},{"name":"creation_fee","type":"u64"}]}},{"name":"EvtClaimProtocolFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_base_amount","type":"u64"},{"name":"token_quote_amount","type":"u64"}]}},{"name":"EvtClaimProtocolLiquidityMigrationFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_base_amount","type":"u64"},{"name":"token_quote_amount","type":"u64"}]}},{"name":"EvtClaimTradingFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_base_amount","type":"u64"},{"name":"token_quote_amount","type":"u64"}]}},{"name":"EvtCloseClaimFeeOperator","docs":["Close claim fee operator"],"type":{"kind":"struct","fields":[{"name":"claim_fee_operator","type":"pubkey"},{"name":"operator","type":"pubkey"}]}},{"name":"EvtCreateClaimFeeOperator","docs":["Create claim fee operator"],"type":{"kind":"struct","fields":[{"name":"operator","type":"pubkey"}]}},{"name":"EvtCreateConfig","docs":["Create config"],"type":{"kind":"struct","fields":[{"name":"config","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"fee_claimer","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"pool_fees","type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"collect_fee_mode","type":"u8"},{"name":"migration_option","type":"u8"},{"name":"activation_type","type":"u8"},{"name":"token_decimal","type":"u8"},{"name":"token_type","type":"u8"},{"name":"partner_permanent_locked_liquidity_percentage","type":"u8"},{"name":"partner_liquidity_percentage","type":"u8"},{"name":"creator_permanent_locked_liquidity_percentage","type":"u8"},{"name":"creator_liquidity_percentage","type":"u8"},{"name":"swap_base_amount","type":"u64"},{"name":"migration_quote_threshold","type":"u64"},{"name":"migration_base_amount","type":"u64"},{"name":"sqrt_start_price","type":"u128"},{"name":"locked_vesting","type":{"defined":{"name":"LockedVestingParams"}}},{"name":"migration_fee_option","type":"u8"},{"name":"fixed_token_supply_flag","type":"u8"},{"name":"pre_migration_token_supply","type":"u64"},{"name":"post_migration_token_supply","type":"u64"},{"name":"curve","type":{"vec":{"defined":{"name":"LiquidityDistributionParameters"}}}}]}},{"name":"EvtCreateConfigV2","type":{"kind":"struct","fields":[{"name":"config","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"fee_claimer","type":"pubkey"},{"name":"leftover_receiver","type":"pubkey"},{"name":"config_parameters","type":{"defined":{"name":"ConfigParameters"}}}]}},{"name":"EvtCreateMeteoraMigrationMetadata","type":{"kind":"struct","fields":[{"name":"virtual_pool","type":"pubkey"}]}},{"name":"EvtCreatorWithdrawSurplus","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"surplus_amount","type":"u64"}]}},{"name":"EvtCurveComplete","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"config","type":"pubkey"},{"name":"base_reserve","type":"u64"},{"name":"quote_reserve","type":"u64"}]}},{"name":"EvtInitializePool","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"config","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"pool_type","type":"u8"},{"name":"activation_point","type":"u64"}]}},{"name":"EvtPartnerClaimPoolCreationFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"partner","type":"pubkey"},{"name":"creation_fee","type":"u64"},{"name":"fee_receiver","type":"pubkey"}]}},{"name":"EvtPartnerMetadata","docs":["Create partner metadata"],"type":{"kind":"struct","fields":[{"name":"partner_metadata","type":"pubkey"},{"name":"fee_claimer","type":"pubkey"}]}},{"name":"EvtPartnerWithdrawMigrationFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"fee","type":"u64"}]}},{"name":"EvtPartnerWithdrawSurplus","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"surplus_amount","type":"u64"}]}},{"name":"EvtSwap","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"config","type":"pubkey"},{"name":"trade_direction","type":"u8"},{"name":"has_referral","type":"bool"},{"name":"params","type":{"defined":{"name":"SwapParameters"}}},{"name":"swap_result","type":{"defined":{"name":"SwapResult"}}},{"name":"amount_in","type":"u64"},{"name":"current_timestamp","type":"u64"}]}},{"name":"EvtSwap2","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"config","type":"pubkey"},{"name":"trade_direction","type":"u8"},{"name":"has_referral","type":"bool"},{"name":"swap_parameters","type":{"defined":{"name":"SwapParameters2"}}},{"name":"swap_result","type":{"defined":{"name":"SwapResult2"}}},{"name":"quote_reserve_amount","type":"u64"},{"name":"migration_threshold","type":"u64"},{"name":"current_timestamp","type":"u64"}]}},{"name":"EvtUpdatePoolCreator","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"new_creator","type":"pubkey"}]}},{"name":"EvtVirtualPoolMetadata","docs":["Create virtual pool metadata"],"type":{"kind":"struct","fields":[{"name":"virtual_pool_metadata","type":"pubkey"},{"name":"virtual_pool","type":"pubkey"}]}},{"name":"EvtWithdrawLeftover","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"leftover_receiver","type":"pubkey"},{"name":"leftover_amount","type":"u64"}]}},{"name":"EvtWithdrawMigrationFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"fee","type":"u64"},{"name":"flag","type":"u8"}]}},{"name":"InitializePoolParameters","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"LiquidityDistributionConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"sqrt_price","type":"u128"},{"name":"liquidity","type":"u128"}]}},{"name":"LiquidityDistributionParameters","type":{"kind":"struct","fields":[{"name":"sqrt_price","type":"u128"},{"name":"liquidity","type":"u128"}]}},{"name":"LiquidityVestingInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"is_initialized","type":"u8"},{"name":"vesting_percentage","type":"u8"},{"name":"_padding","type":{"array":["u8",2]}},{"name":"bps_per_period","type":"u16"},{"name":"number_of_periods","type":"u16"},{"name":"frequency","type":"u32"},{"name":"cliff_duration_from_migration_time","type":"u32"}]}},{"name":"LiquidityVestingInfoParams","type":{"kind":"struct","fields":[{"name":"vesting_percentage","type":"u8"},{"name":"bps_per_period","type":"u16"},{"name":"number_of_periods","type":"u16"},{"name":"cliff_duration_from_migration_time","type":"u32"},{"name":"frequency","type":"u32"}]}},{"name":"LockEscrow","docs":["State of lock escrow account"],"type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"escrow_vault","type":"pubkey"},{"name":"bump","type":"u8"},{"name":"total_locked_amount","type":"u64"},{"name":"lp_per_token","type":"u128"},{"name":"unclaimed_fee_pending","type":"u64"},{"name":"a_fee","type":"u64"},{"name":"b_fee","type":"u64"}]}},{"name":"LockedVestingConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount_per_period","type":"u64"},{"name":"cliff_duration_from_migration_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"_padding","type":"u64"}]}},{"name":"LockedVestingParams","type":{"kind":"struct","fields":[{"name":"amount_per_period","type":"u64"},{"name":"cliff_duration_from_migration_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"}]}},{"name":"MeteoraDammMigrationMetadata","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"virtual_pool","docs":["pool"],"type":"pubkey"},{"name":"padding_0","docs":["!!! BE CAREFUL to use tombstone field, previous is pool creator"],"type":{"array":["u8",32]}},{"name":"partner","docs":["partner"],"type":"pubkey"},{"name":"lp_mint","docs":["lp mint"],"type":"pubkey"},{"name":"partner_locked_liquidity","docs":["partner locked liquidity"],"type":"u64"},{"name":"partner_liquidity","docs":["partner liquidity"],"type":"u64"},{"name":"creator_locked_liquidity","docs":["creator locked liquidity"],"type":"u64"},{"name":"creator_liquidity","docs":["creator liquidity"],"type":"u64"},{"name":"_padding_0","docs":["padding"],"type":"u8"},{"name":"creator_locked_status","docs":["flag to check whether liquidity token is locked for creator"],"type":"u8"},{"name":"partner_locked_status","docs":["flag to check whether liquidity token is locked for partner"],"type":"u8"},{"name":"creator_claim_status","docs":["flag to check whether creator has claimed liquidity token"],"type":"u8"},{"name":"partner_claim_status","docs":["flag to check whether partner has claimed liquidity token"],"type":"u8"},{"name":"_padding","docs":["Reserve"],"type":{"array":["u8",107]}}]}},{"name":"MigratedPoolFee","type":{"kind":"struct","fields":[{"name":"collect_fee_mode","type":"u8"},{"name":"dynamic_fee","type":"u8"},{"name":"pool_fee_bps","type":"u16"}]}},{"name":"MigratedPoolMarketCapFeeSchedulerParams","type":{"kind":"struct","fields":[{"name":"number_of_period","type":"u16"},{"name":"sqrt_price_step_bps","type":"u16"},{"name":"scheduler_expiration_duration","type":"u32"},{"name":"reduction_factor","type":"u64"}]}},{"name":"MigrationFee","type":{"kind":"struct","fields":[{"name":"fee_percentage","type":"u8"},{"name":"creator_fee_percentage","type":"u8"}]}},{"name":"Operator","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"whitelisted_address","type":"pubkey"},{"name":"permission","type":"u128"},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"PartnerMetadata","docs":["Metadata for a partner."],"type":{"kind":"struct","fields":[{"name":"fee_claimer","docs":["fee claimer"],"type":"pubkey"},{"name":"padding","docs":["padding for future use"],"type":{"array":["u128",6]}},{"name":"name","docs":["Name of partner."],"type":"string"},{"name":"website","docs":["Website of partner."],"type":"string"},{"name":"logo","docs":["Logo of partner"],"type":"string"}]}},{"name":"PoolConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"quote_mint","docs":["quote mint"],"type":"pubkey"},{"name":"fee_claimer","docs":["Address to get the fee"],"type":"pubkey"},{"name":"leftover_receiver","docs":["Address to receive extra base token after migration, in case token is fixed supply"],"type":"pubkey"},{"name":"pool_fees","docs":["Pool fee"],"type":{"defined":{"name":"PoolFeesConfig"}}},{"name":"partner_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfo"}}},{"name":"creator_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfo"}}},{"name":"padding_0","docs":["Padding for future use"],"type":{"array":["u8",14]}},{"name":"padding_1","docs":["Previously was protocol and referral fee percent. Beware of tombstone."],"type":"u16"},{"name":"collect_fee_mode","docs":["Collect fee mode"],"type":"u8"},{"name":"migration_option","docs":["migration option"],"type":"u8"},{"name":"activation_type","docs":["whether mode slot or timestamp"],"type":"u8"},{"name":"token_decimal","docs":["token decimals"],"type":"u8"},{"name":"version","docs":["version"],"type":"u8"},{"name":"token_type","docs":["token type of base token"],"type":"u8"},{"name":"quote_token_flag","docs":["quote token flag"],"type":"u8"},{"name":"partner_permanent_locked_liquidity_percentage","docs":["partner locked liquidity percentage"],"type":"u8"},{"name":"partner_liquidity_percentage","docs":["partner liquidity percentage"],"type":"u8"},{"name":"creator_permanent_locked_liquidity_percentage","docs":["creator post migration fee percentage"],"type":"u8"},{"name":"creator_liquidity_percentage","docs":["creator liquidity percentage"],"type":"u8"},{"name":"migration_fee_option","docs":["migration fee option"],"type":"u8"},{"name":"fixed_token_supply_flag","docs":["flag to indicate whether token is dynamic supply (0) or fixed supply (1)"],"type":"u8"},{"name":"creator_trading_fee_percentage","docs":["creator trading fee percentage"],"type":"u8"},{"name":"token_update_authority","docs":["token update authority"],"type":"u8"},{"name":"migration_fee_percentage","docs":["migration fee percentage"],"type":"u8"},{"name":"creator_migration_fee_percentage","docs":["creator migration fee percentage"],"type":"u8"},{"name":"padding_2","type":{"array":["u8",7]}},{"name":"swap_base_amount","docs":["swap base amount"],"type":"u64"},{"name":"migration_quote_threshold","docs":["migration quote threshold (in quote token)"],"type":"u64"},{"name":"migration_base_threshold","docs":["migration base threshold (in base token)"],"type":"u64"},{"name":"migration_sqrt_price","docs":["migration sqrt price"],"type":"u128"},{"name":"locked_vesting_config","docs":["locked vesting config"],"type":{"defined":{"name":"LockedVestingConfig"}}},{"name":"pre_migration_token_supply","docs":["pre migration token supply"],"type":"u64"},{"name":"post_migration_token_supply","docs":["post migration token supply"],"type":"u64"},{"name":"migrated_collect_fee_mode","docs":["migrated pool collect fee mode"],"type":"u8"},{"name":"migrated_dynamic_fee","docs":["migrated dynamic fee option."],"type":"u8"},{"name":"migrated_pool_fee_bps","docs":["migrated pool fee in bps"],"type":"u16"},{"name":"migrated_pool_base_fee_mode","type":"u8"},{"name":"enable_first_swap_with_min_fee","type":"u8"},{"name":"migrated_compounding_fee_bps","docs":["compounding fee bps for migrated DAMM v2 pool, should only be non-zero if migrated_collect_fee_mode is 2 (Compounding)"],"type":"u16"},{"name":"pool_creation_fee","docs":["pool creation fee in lamports value"],"type":"u64"},{"name":"migrated_pool_base_fee_bytes","docs":["serialized MigratedPoolMarketCapFeeSchedulerParams, only used when migrated_pool_base_fee_mode is market cap scheduler"],"type":{"array":["u8",16]}},{"name":"sqrt_start_price","docs":["minimum price"],"type":"u128"},{"name":"curve","docs":["curve, only use 20 point firstly, we can extend that latter"],"type":{"array":[{"defined":{"name":"LiquidityDistributionConfig"}},20]}}]}},{"name":"PoolFeeParameters","docs":["Information regarding fee charges"],"type":{"kind":"struct","fields":[{"name":"base_fee","docs":["Base fee"],"type":{"defined":{"name":"BaseFeeParameters"}}},{"name":"dynamic_fee","docs":["dynamic fee"],"type":{"option":{"defined":{"name":"DynamicFeeParameters"}}}}]}},{"name":"PoolFees","docs":["Information regarding fee charges"],"type":{"kind":"struct","fields":[{"name":"trade_fee_numerator","type":"u64"},{"name":"trade_fee_denominator","type":"u64"},{"name":"protocol_trade_fee_numerator","type":"u64"},{"name":"protocol_trade_fee_denominator","type":"u64"}]}},{"name":"PoolFeesConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee","type":{"defined":{"name":"BaseFeeConfig"}}},{"name":"dynamic_fee","type":{"defined":{"name":"DynamicFeeConfig"}}}]}},{"name":"PoolMetrics","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"total_protocol_base_fee","type":"u64"},{"name":"total_protocol_quote_fee","type":"u64"},{"name":"total_trading_base_fee","type":"u64"},{"name":"total_trading_quote_fee","type":"u64"}]}},{"name":"SwapParameters","type":{"kind":"struct","fields":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]}},{"name":"SwapParameters2","type":{"kind":"struct","fields":[{"name":"amount_0","docs":["When it's exact in, partial fill, this will be amount_in. When it's exact out, this will be amount_out"],"type":"u64"},{"name":"amount_1","docs":["When it's exact in, partial fill, this will be minimum_amount_out. When it's exact out, this will be maximum_amount_in"],"type":"u64"},{"name":"swap_mode","docs":["Swap mode, refer [SwapMode]"],"type":"u8"}]}},{"name":"SwapResult","docs":["Encodes all results of swapping"],"type":{"kind":"struct","fields":[{"name":"actual_input_amount","type":"u64"},{"name":"output_amount","type":"u64"},{"name":"next_sqrt_price","type":"u128"},{"name":"trading_fee","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"referral_fee","type":"u64"}]}},{"name":"SwapResult2","type":{"kind":"struct","fields":[{"name":"included_fee_input_amount","type":"u64"},{"name":"excluded_fee_input_amount","type":"u64"},{"name":"amount_left","type":"u64"},{"name":"output_amount","type":"u64"},{"name":"next_sqrt_price","type":"u128"},{"name":"trading_fee","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"referral_fee","type":"u64"}]}},{"name":"TokenSupplyParams","type":{"kind":"struct","fields":[{"name":"pre_migration_token_supply","docs":["pre migration token supply"],"type":"u64"},{"name":"post_migration_token_supply","docs":["post migration token supply","because DBC allow user to swap over the migration quote threshold, so in extreme case user may swap more than allowed buffer on curve","that result the total supply in post migration may be increased a bit (between pre_migration_token_supply and post_migration_token_supply)"],"type":"u64"}]}},{"name":"VirtualPool","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"volatility_tracker","docs":["volatility tracker"],"type":{"defined":{"name":"VolatilityTracker"}}},{"name":"config","docs":["config key"],"type":"pubkey"},{"name":"creator","docs":["creator"],"type":"pubkey"},{"name":"base_mint","docs":["base mint"],"type":"pubkey"},{"name":"base_vault","docs":["base vault"],"type":"pubkey"},{"name":"quote_vault","docs":["quote vault"],"type":"pubkey"},{"name":"base_reserve","docs":["base reserve"],"type":"u64"},{"name":"quote_reserve","docs":["quote reserve"],"type":"u64"},{"name":"protocol_base_fee","docs":["protocol base fee"],"type":"u64"},{"name":"protocol_quote_fee","docs":["protocol quote fee"],"type":"u64"},{"name":"partner_base_fee","docs":["partner base fee"],"type":"u64"},{"name":"partner_quote_fee","docs":["trading quote fee"],"type":"u64"},{"name":"sqrt_price","docs":["current price"],"type":"u128"},{"name":"activation_point","docs":["Activation point"],"type":"u64"},{"name":"pool_type","docs":["pool type, spl token or token2022"],"type":"u8"},{"name":"is_migrated","docs":["is migrated"],"type":"u8"},{"name":"is_partner_withdraw_surplus","docs":["is partner withdraw surplus"],"type":"u8"},{"name":"is_protocol_withdraw_surplus","docs":["is protocol withdraw surplus"],"type":"u8"},{"name":"migration_progress","docs":["migration progress"],"type":"u8"},{"name":"is_withdraw_leftover","docs":["is withdraw leftover"],"type":"u8"},{"name":"is_creator_withdraw_surplus","docs":["is creator withdraw surplus"],"type":"u8"},{"name":"migration_fee_withdraw_status","docs":["migration fee withdraw status","bit 1 (0b010) creator","bit 2 (0b100) partner"],"type":"u8"},{"name":"metrics","docs":["pool metrics"],"type":{"defined":{"name":"PoolMetrics"}}},{"name":"finish_curve_timestamp","docs":["The time curve is finished"],"type":"u64"},{"name":"creator_base_fee","docs":["creator base fee"],"type":"u64"},{"name":"creator_quote_fee","docs":["creator quote fee"],"type":"u64"},{"name":"legacy_creation_fee_bits","docs":["legacy creation fee bits, we dont use this now"],"type":"u8"},{"name":"creation_fee_bits","docs":["pool creation fee claim status"],"type":"u8"},{"name":"has_swap","docs":["Cached flag"],"type":"u8"},{"name":"_padding_0","docs":["Padding for further use"],"type":{"array":["u8",5]}},{"name":"protocol_liquidity_migration_fee_bps","type":"u16"},{"name":"_padding_1","type":{"array":["u8",6]}},{"name":"protocol_migration_base_fee_amount","type":"u64"},{"name":"protocol_migration_quote_fee_amount","type":"u64"},{"name":"_padding_2","docs":["Padding for further use"],"type":{"array":["u64",3]}}]}},{"name":"VirtualPoolMetadata","docs":["Metadata for a virtual pool."],"type":{"kind":"struct","fields":[{"name":"virtual_pool","docs":["virtual pool"],"type":"pubkey"},{"name":"padding","docs":["padding for future use"],"type":{"array":["u128",6]}},{"name":"name","docs":["Name of project."],"type":"string"},{"name":"website","docs":["Website of project."],"type":"string"},{"name":"logo","docs":["Logo of project"],"type":"string"}]}},{"name":"VolatilityTracker","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"last_update_timestamp","type":"u64"},{"name":"padding","type":{"array":["u8",8]}},{"name":"sqrt_price_reference","type":"u128"},{"name":"volatility_accumulator","type":"u128"},{"name":"volatility_reference","type":"u128"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/meteora_dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.json b/olddocs/archivekbot2/idls/meteora_dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.json new file mode 100644 index 0000000..31fdbda --- /dev/null +++ b/olddocs/archivekbot2/idls/meteora_dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.json @@ -0,0 +1 @@ +{"address":"LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo","metadata":{"name":"lb_clmm","version":"0.12.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_liquidity","discriminator":[181,157,89,67,143,182,52,72],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameter"}}}]},{"name":"add_liquidity2","discriminator":[228,162,78,28,70,219,116,115],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"sender","signer":true},{"name":"token_x_program"},{"name":"token_y_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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameter"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"add_liquidity_by_strategy","discriminator":[7,3,150,127,148,40,61,200],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameterByStrategy"}}}]},{"name":"add_liquidity_by_strategy2","discriminator":[3,221,149,218,111,141,118,213],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"sender","signer":true},{"name":"token_x_program"},{"name":"token_y_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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameterByStrategy"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"add_liquidity_by_strategy_one_side","discriminator":[41,5,238,175,100,225,6,205],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token","writable":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameterByStrategyOneSide"}}}]},{"name":"add_liquidity_by_weight","discriminator":[28,140,238,99,231,162,21,149],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameterByWeight"}}}]},{"name":"add_liquidity_by_weight2","discriminator":[209,59,63,91,111,200,153,228],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"sender","signer":true},{"name":"token_x_program"},{"name":"token_y_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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameterByWeight"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"add_liquidity_one_side","discriminator":[94,155,103,151,70,95,220,165],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token","writable":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityOneSideParameter"}}}]},{"name":"add_liquidity_one_side_precise","discriminator":[161,194,103,84,171,71,250,154],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token","writable":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"parameter","type":{"defined":{"name":"AddLiquiditySingleSidePreciseParameter"}}}]},{"name":"add_liquidity_one_side_precise2","discriminator":[33,51,163,201,117,98,125,231],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token","writable":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"sender","signer":true},{"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":"liquidity_parameter","type":{"defined":{"name":"AddLiquiditySingleSidePreciseParameter2"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"cancel_limit_order","discriminator":[132,156,132,31,67,40,232,97],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension","limit_order"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"limit_order","writable":true},{"name":"owner_token_x","docs":["When dont set it tokenAccount to prevent unnecessary create token account (rent fee) when user only withdraw token y"],"writable":true},{"name":"owner_token_y","writable":true},{"name":"owner","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"bins","type":{"vec":"i32"}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"claim_fee","discriminator":[169,32,79,137,136,232,70,137],"accounts":[{"name":"lb_pair","writable":true,"relations":["position","bin_array_lower","bin_array_upper"]},{"name":"position","writable":true},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"claim_fee2","discriminator":[112,191,101,171,28,144,127,187],"accounts":[{"name":"lb_pair","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"sender","signer":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"token_program_x"},{"name":"token_program_y"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"min_bin_id","type":"i32"},{"name":"max_bin_id","type":"i32"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"claim_reward","discriminator":[149,95,181,242,94,90,158,162],"accounts":[{"name":"lb_pair","writable":true,"relations":["position","bin_array_lower","bin_array_upper"]},{"name":"position","writable":true},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"user_token_account","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"reward_index","type":"u64"}]},{"name":"claim_reward2","discriminator":[190,3,127,119,178,87,157,183],"accounts":[{"name":"lb_pair","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"sender","signer":true},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"user_token_account","writable":true},{"name":"token_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"reward_index","type":"u64"},{"name":"min_bin_id","type":"i32"},{"name":"max_bin_id","type":"i32"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"close_bin_array","discriminator":[68,174,88,80,181,204,19,224],"accounts":[{"name":"lb_pair","relations":["bin_array"]},{"name":"bin_array","writable":true},{"name":"rent_receiver","writable":true,"signer":true},{"name":"signer","signer":true}],"args":[]},{"name":"close_claim_fee_operator_account","discriminator":[184,213,88,31,179,101,130,36],"accounts":[{"name":"claim_fee_operator","writable":true},{"name":"rent_receiver","writable":true},{"name":"signer","signer":true}],"args":[]},{"name":"close_limit_order_if_empty","discriminator":[57,124,36,155,126,249,93,171],"accounts":[{"name":"limit_order","writable":true},{"name":"owner","signer":true},{"name":"rent_receiver","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":"close_operator_account","discriminator":[171,9,213,74,120,23,3,29],"accounts":[{"name":"operator","writable":true},{"name":"signer","signer":true},{"name":"rent_receiver","writable":true}],"args":[]},{"name":"close_position","discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"rent_receiver","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":"close_position2","discriminator":[174,90,35,115,186,40,147,226],"accounts":[{"name":"position","writable":true},{"name":"sender","signer":true},{"name":"rent_receiver","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":"close_position_if_empty","discriminator":[59,124,212,118,91,152,110,157],"accounts":[{"name":"position","writable":true},{"name":"sender","signer":true},{"name":"rent_receiver","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":"close_preset_parameter","discriminator":[4,148,145,100,134,26,181,61],"accounts":[{"name":"preset_parameter","writable":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"rent_receiver","writable":true}],"args":[]},{"name":"close_preset_parameter2","discriminator":[39,25,95,107,116,17,115,28],"accounts":[{"name":"preset_parameter","writable":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"rent_receiver","writable":true}],"args":[]},{"name":"close_token_badge","discriminator":[108,146,86,110,179,254,10,104],"accounts":[{"name":"token_badge","writable":true},{"name":"rent_receiver","writable":true},{"name":"operator"},{"name":"signer","signer":true}],"args":[]},{"name":"create_operator_account","discriminator":[221,64,246,149,240,153,229,163],"accounts":[{"name":"operator","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,111,114]},{"kind":"account","path":"whitelisted_signer"}]}},{"name":"whitelisted_signer"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"permission","type":"u128"}]},{"name":"decrease_position_length","discriminator":[194,219,136,32,25,96,105,37],"accounts":[{"name":"rent_receiver","writable":true},{"name":"position","writable":true},{"name":"owner","signer":true,"relations":["position"]},{"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":"length_to_remove","type":"u16"},{"name":"side","type":"u8"}]},{"name":"for_idl_type_generation_do_not_call","discriminator":[180,105,69,80,95,50,73,108],"accounts":[{"name":"dummy_zc_account"}],"args":[{"name":"_ix","type":{"defined":{"name":"DummyIx"}}}]},{"name":"fund_reward","discriminator":[188,50,249,165,93,151,38,63],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array"]},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"funder_token_account","writable":true},{"name":"funder","signer":true},{"name":"bin_array","writable":true},{"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":"reward_index","type":"u64"},{"name":"amount","type":"u64"},{"name":"carry_forward","type":"bool"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"go_to_a_bin","discriminator":[146,72,174,224,40,253,84,174],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension","from_bin_array","to_bin_array"]},{"name":"bin_array_bitmap_extension","optional":true},{"name":"from_bin_array","optional":true},{"name":"to_bin_array","optional":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":"bin_id","type":"i32"}]},{"name":"increase_oracle_length","discriminator":[190,61,125,87,103,79,158,173],"accounts":[{"name":"oracle","writable":true},{"name":"funder","writable":true,"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":"length_to_add","type":"u64"}]},{"name":"increase_position_length","discriminator":[80,83,117,211,66,13,33,149],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"lb_pair","relations":["position"]},{"name":"position","writable":true},{"name":"owner","signer":true,"relations":["position"]},{"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":"length_to_add","type":"u16"},{"name":"side","type":"u8"}]},{"name":"increase_position_length2","discriminator":[255,210,204,71,115,137,225,113],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"lb_pair","relations":["position"]},{"name":"position","writable":true},{"name":"owner","signer":true,"relations":["position"]},{"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":"minimum_upper_bin_id","type":"i32"}]},{"name":"initialize_bin_array","discriminator":[35,86,19,185,78,212,75,211],"accounts":[{"name":"lb_pair"},{"name":"bin_array","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,105,110,95,97,114,114,97,121]},{"kind":"account","path":"lb_pair"},{"kind":"arg","path":"index"}]}},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"i64"}]},{"name":"initialize_bin_array_bitmap_extension","discriminator":[47,157,226,180,12,240,33,71],"accounts":[{"name":"lb_pair"},{"name":"bin_array_bitmap_extension","docs":["Initialize an account to store if a bin array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent"}],"args":[]},{"name":"initialize_customizable_permissionless_lb_pair","discriminator":[46,39,41,135,111,183,200,64],"accounts":[{"name":"lb_pair","writable":true},{"name":"bin_array_bitmap_extension","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"token_mint_x"},{"name":"token_mint_y"},{"name":"reserve_x","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_x"}]}},{"name":"reserve_y","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_y"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"lb_pair"}]}},{"name":"user_token_x"},{"name":"funder","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_y"},{"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":"params","type":{"defined":{"name":"CustomizableParams"}}}]},{"name":"initialize_customizable_permissionless_lb_pair2","discriminator":[243,73,129,126,51,19,241,107],"accounts":[{"name":"lb_pair","writable":true},{"name":"bin_array_bitmap_extension","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"token_mint_x"},{"name":"token_mint_y"},{"name":"reserve_x","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_x"}]}},{"name":"reserve_y","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_y"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"lb_pair"}]}},{"name":"user_token_x"},{"name":"funder","writable":true,"signer":true},{"name":"token_badge_x","optional":true},{"name":"token_badge_y","optional":true},{"name":"token_program_x"},{"name":"token_program_y"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_y"},{"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":"params","type":{"defined":{"name":"CustomizableParams"}}}]},{"name":"initialize_lb_pair","discriminator":[45,154,237,210,221,15,166,92],"accounts":[{"name":"lb_pair","writable":true},{"name":"bin_array_bitmap_extension","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"token_mint_x"},{"name":"token_mint_y"},{"name":"reserve_x","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_x"}]}},{"name":"reserve_y","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_y"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"lb_pair"}]}},{"name":"preset_parameter"},{"name":"funder","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent"},{"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":"active_id","type":"i32"},{"name":"bin_step","type":"u16"}]},{"name":"initialize_lb_pair2","discriminator":[73,59,36,120,237,83,108,198],"accounts":[{"name":"lb_pair","writable":true},{"name":"bin_array_bitmap_extension","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"token_mint_x"},{"name":"token_mint_y"},{"name":"reserve_x","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_x"}]}},{"name":"reserve_y","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_y"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"lb_pair"}]}},{"name":"preset_parameter"},{"name":"funder","writable":true,"signer":true},{"name":"token_badge_x","optional":true},{"name":"token_badge_y","optional":true},{"name":"token_program_x"},{"name":"token_program_y"},{"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":"params","type":{"defined":{"name":"InitializeLbPair2Params"}}}]},{"name":"initialize_permission_lb_pair","discriminator":[108,102,213,85,251,3,53,21],"accounts":[{"name":"base","signer":true},{"name":"lb_pair","writable":true},{"name":"bin_array_bitmap_extension","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"token_mint_x"},{"name":"token_mint_y"},{"name":"reserve_x","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_x"}]}},{"name":"reserve_y","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_y"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"lb_pair"}]}},{"name":"payer","writable":true,"signer":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"token_badge_x","optional":true},{"name":"token_badge_y","optional":true},{"name":"token_program_x"},{"name":"token_program_y"},{"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":"ix_data","type":{"defined":{"name":"InitPermissionPairIx"}}}]},{"name":"initialize_position","discriminator":[219,192,234,71,190,191,102,80],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"position","writable":true,"signer":true},{"name":"lb_pair"},{"name":"owner","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent"},{"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":"lower_bin_id","type":"i32"},{"name":"width","type":"i32"}]},{"name":"initialize_position2","discriminator":[143,19,242,145,213,15,104,115],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"position","writable":true,"signer":true},{"name":"lb_pair"},{"name":"owner","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":"lower_bin_id","type":"i32"},{"name":"width","type":"i32"}]},{"name":"initialize_position_by_operator","discriminator":[251,189,190,244,117,254,35,148],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"base","signer":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"lb_pair"},{"kind":"account","path":"base"},{"kind":"arg","path":"lower_bin_id"},{"kind":"arg","path":"width"}]}},{"name":"lb_pair"},{"name":"owner"},{"name":"operator","docs":["operator"],"signer":true},{"name":"operator_token_x"},{"name":"owner_token_x"},{"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":"lower_bin_id","type":"i32"},{"name":"width","type":"i32"},{"name":"fee_owner","type":"pubkey"},{"name":"lock_release_point","type":"u64"}]},{"name":"initialize_position_pda","discriminator":[46,82,125,146,85,141,228,153],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"base","signer":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"lb_pair"},{"kind":"account","path":"base"},{"kind":"arg","path":"lower_bin_id"},{"kind":"arg","path":"width"}]}},{"name":"lb_pair"},{"name":"owner","docs":["owner"],"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent"},{"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":"lower_bin_id","type":"i32"},{"name":"width","type":"i32"}]},{"name":"initialize_preset_parameter","discriminator":[66,188,71,211,98,109,14,186],"accounts":[{"name":"preset_parameter","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,101,115,101,116,95,112,97,114,97,109,101,116,101,114,50]},{"kind":"arg","path":"ix.index"}]}},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"ix","type":{"defined":{"name":"InitPresetParametersIx"}}}]},{"name":"initialize_reward","discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"lb_pair","writable":true},{"name":"reward_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"arg","path":"reward_index"}]}},{"name":"reward_mint"},{"name":"token_badge","optional":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"token_program"},{"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":"reward_index","type":"u64"},{"name":"reward_duration","type":"u64"},{"name":"funder","type":"pubkey"}]},{"name":"initialize_token_badge","discriminator":[253,77,205,95,27,224,89,223],"accounts":[{"name":"token_mint"},{"name":"token_badge","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"token_mint"}]}},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"place_limit_order","discriminator":[108,176,33,186,146,229,1,197],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"limit_order","writable":true,"signer":true},{"name":"payer","writable":true,"signer":true},{"name":"owner"},{"name":"user_token","writable":true},{"name":"sender","signer":true},{"name":"token_program"},{"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":"params","type":{"defined":{"name":"PlaceLimitOrderParams"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"rebalance_liquidity","discriminator":[92,4,176,193,119,185,83,9],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"owner","signer":true,"relations":["position"]},{"name":"rent_payer","writable":true,"signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"params","type":{"defined":{"name":"RebalanceLiquidityParams"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"remove_all_liquidity","discriminator":[10,51,61,35,112,105,24,85],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"remove_liquidity","discriminator":[80,85,209,72,24,206,177,108],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"bin_liquidity_removal","type":{"vec":{"defined":{"name":"BinLiquidityReduction"}}}}]},{"name":"remove_liquidity2","discriminator":[230,215,82,127,241,101,227,146],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"sender","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"bin_liquidity_removal","type":{"vec":{"defined":{"name":"BinLiquidityReduction"}}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"remove_liquidity_by_range","discriminator":[26,82,102,152,240,74,105,26],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"from_bin_id","type":"i32"},{"name":"to_bin_id","type":"i32"},{"name":"bps_to_remove","type":"u16"}]},{"name":"remove_liquidity_by_range2","discriminator":[204,2,195,145,53,145,145,205],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"sender","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"from_bin_id","type":"i32"},{"name":"to_bin_id","type":"i32"},{"name":"bps_to_remove","type":"u16"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"set_activation_point","discriminator":[91,249,15,165,26,129,254,125],"accounts":[{"name":"lb_pair","writable":true},{"name":"signer","signer":true}],"args":[{"name":"activation_point","type":"u64"}]},{"name":"set_pair_status","discriminator":[67,248,231,137,154,149,217,174],"accounts":[{"name":"lb_pair","writable":true},{"name":"operator"},{"name":"signer","signer":true}],"args":[{"name":"status","type":"u8"}]},{"name":"set_pair_status_permissionless","discriminator":[78,59,152,211,70,183,46,208],"accounts":[{"name":"lb_pair","writable":true},{"name":"signer","signer":true}],"args":[{"name":"status","type":"u8"}]},{"name":"set_permissionless_operation_bits","discriminator":[84,58,203,139,163,81,190,186],"accounts":[{"name":"position","writable":true},{"name":"owner","signer":true,"relations":["position"]},{"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":"bits","type":"u8"}]},{"name":"set_pre_activation_duration","discriminator":[165,61,201,244,130,159,22,100],"accounts":[{"name":"lb_pair","writable":true},{"name":"signer","signer":true}],"args":[{"name":"pre_activation_duration","type":"u64"}]},{"name":"set_pre_activation_swap_address","discriminator":[57,139,47,123,216,80,223,10],"accounts":[{"name":"lb_pair","writable":true},{"name":"signer","signer":true}],"args":[{"name":"pre_activation_swap_address","type":"pubkey"}]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_in","type":"u64"},{"name":"min_amount_out","type":"u64"}]},{"name":"swap2","discriminator":[65,75,63,76,235,91,91,136],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"amount_in","type":"u64"},{"name":"min_amount_out","type":"u64"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"swap_exact_out","discriminator":[250,73,101,33,38,207,75,184],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"max_in_amount","type":"u64"},{"name":"out_amount","type":"u64"}]},{"name":"swap_exact_out2","discriminator":[43,215,247,132,137,60,243,81],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"max_in_amount","type":"u64"},{"name":"out_amount","type":"u64"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"swap_with_price_impact","discriminator":[56,173,230,208,173,228,156,205],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_in","type":"u64"},{"name":"active_id","type":{"option":"i32"}},{"name":"max_price_impact_bps","type":"u16"}]},{"name":"swap_with_price_impact2","discriminator":[74,98,192,214,177,51,75,51],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"amount_in","type":"u64"},{"name":"active_id","type":{"option":"i32"}},{"name":"max_price_impact_bps","type":"u16"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"update_base_fee_parameters","discriminator":[75,168,223,161,16,195,3,47],"accounts":[{"name":"lb_pair","writable":true},{"name":"operator"},{"name":"signer","signer":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":"fee_parameter","type":{"defined":{"name":"BaseFeeParameter"}}}]},{"name":"update_dynamic_fee_parameters","discriminator":[92,161,46,246,255,189,22,22],"accounts":[{"name":"lb_pair","writable":true},{"name":"operator"},{"name":"signer","signer":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":"fee_parameter","type":{"defined":{"name":"DynamicFeeParameter"}}}]},{"name":"update_fees_and_reward2","discriminator":[32,142,184,154,103,65,184,88],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position"]},{"name":"owner","signer":true}],"args":[{"name":"min_bin_id","type":"i32"},{"name":"max_bin_id","type":"i32"}]},{"name":"update_fees_and_rewards","discriminator":[154,230,250,13,236,209,75,223],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_lower","bin_array_upper"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"owner","signer":true}],"args":[]},{"name":"update_position_operator","discriminator":[202,184,103,143,180,191,116,217],"accounts":[{"name":"position","writable":true},{"name":"owner","signer":true,"relations":["position"]},{"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":"operator","type":"pubkey"}]},{"name":"update_reward_duration","discriminator":[138,174,196,169,213,235,254,107],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array"]},{"name":"operator"},{"name":"signer","signer":true},{"name":"bin_array","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":"reward_index","type":"u64"},{"name":"new_duration","type":"u64"}]},{"name":"update_reward_funder","discriminator":[211,28,48,32,215,160,35,23],"accounts":[{"name":"lb_pair","writable":true},{"name":"operator"},{"name":"signer","signer":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":"reward_index","type":"u64"},{"name":"new_funder","type":"pubkey"}]},{"name":"withdraw_ineligible_reward","discriminator":[148,206,42,195,247,49,103,8],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array"]},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"funder_token_account","writable":true},{"name":"funder","signer":true},{"name":"bin_array","writable":true},{"name":"token_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"reward_index","type":"u64"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"withdraw_protocol_fee","discriminator":[158,201,158,189,33,93,162,103],"accounts":[{"name":"lb_pair","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"receiver_token_x","writable":true},{"name":"receiver_token_y","writable":true},{"name":"operator"},{"name":"signer","docs":["operator"],"signer":true},{"name":"token_x_program"},{"name":"token_y_program"}],"args":[{"name":"max_amount_x","type":"u64"},{"name":"max_amount_y","type":"u64"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"zap_protocol_fee","discriminator":[213,155,187,34,56,182,91,240],"accounts":[{"name":"lb_pair","writable":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"receiver_token","writable":true},{"name":"operator"},{"name":"signer","docs":["operator"],"signer":true},{"name":"token_program"},{"name":"sysvar_instructions","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"max_amount","type":"u64"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]}],"accounts":[{"name":"BinArray","discriminator":[92,142,92,220,5,148,70,181]},{"name":"BinArrayBitmapExtension","discriminator":[80,111,124,113,55,237,18,5]},{"name":"ClaimFeeOperator","discriminator":[166,48,134,86,34,200,188,150]},{"name":"DummyZcAccount","discriminator":[94,107,238,80,208,48,180,8]},{"name":"LbPair","discriminator":[33,11,49,98,181,101,177,13]},{"name":"LimitOrder","discriminator":[137,183,212,91,115,29,141,227]},{"name":"Operator","discriminator":[219,31,188,145,69,139,204,117]},{"name":"Oracle","discriminator":[139,194,131,179,140,179,229,244]},{"name":"PositionV2","discriminator":[117,176,212,199,245,180,133,182]},{"name":"PresetParameter","discriminator":[242,62,244,34,181,112,58,170]},{"name":"PresetParameter2","discriminator":[171,236,148,115,162,113,222,174]},{"name":"TokenBadge","discriminator":[116,219,204,229,249,116,255,150]}],"events":[{"name":"AddLiquidity","discriminator":[31,94,125,90,227,52,61,186]},{"name":"CancelLimitOrderEvt","discriminator":[131,234,194,133,9,14,189,209]},{"name":"ClaimFee","discriminator":[75,122,154,48,140,74,123,163]},{"name":"ClaimFee2","discriminator":[232,171,242,97,58,77,35,45]},{"name":"ClaimReward","discriminator":[148,116,134,204,22,171,85,95]},{"name":"ClaimReward2","discriminator":[27,143,244,33,80,43,110,146]},{"name":"CloseLimitOrderEvt","discriminator":[142,135,8,76,92,63,118,83]},{"name":"CompositionFee","discriminator":[128,151,123,106,17,102,113,142]},{"name":"DecreasePositionLength","discriminator":[52,118,235,85,172,169,15,128]},{"name":"DynamicFeeParameterUpdate","discriminator":[88,88,178,135,194,146,91,243]},{"name":"FeeParameterUpdate","discriminator":[48,76,241,117,144,215,242,44]},{"name":"FundReward","discriminator":[246,228,58,130,145,170,79,204]},{"name":"GoToABin","discriminator":[59,138,76,68,138,131,176,67]},{"name":"IncreaseObservation","discriminator":[99,249,17,121,166,156,207,215]},{"name":"IncreasePositionLength","discriminator":[157,239,42,204,30,56,223,46]},{"name":"InitializeReward","discriminator":[211,153,88,62,149,60,177,70]},{"name":"LbPairCreate","discriminator":[185,74,252,125,27,215,188,111]},{"name":"PlaceLimitOrderEvt","discriminator":[43,79,27,169,244,28,225,63]},{"name":"PositionClose","discriminator":[255,196,16,107,28,202,53,128]},{"name":"PositionCreate","discriminator":[144,142,252,84,157,53,37,121]},{"name":"Rebalancing","discriminator":[0,109,117,179,61,91,199,200]},{"name":"RemoveLiquidity","discriminator":[116,244,97,232,103,31,152,58]},{"name":"SetPositionPermissionlessOperationBitsEvt","discriminator":[195,229,147,245,29,125,48,168]},{"name":"Swap","discriminator":[81,108,227,190,205,208,10,196]},{"name":"Swap2Evt","discriminator":[46,116,82,215,148,27,84,77]},{"name":"UpdatePositionLockReleasePoint","discriminator":[133,214,66,224,64,12,7,191]},{"name":"UpdatePositionOperator","discriminator":[39,115,48,204,246,47,66,57]},{"name":"UpdateRewardDuration","discriminator":[223,245,224,153,49,29,163,172]},{"name":"UpdateRewardFunder","discriminator":[224,178,174,74,252,165,85,180]},{"name":"WithdrawIneligibleReward","discriminator":[231,189,65,149,102,215,154,244]}],"errors":[{"code":6000,"name":"InvalidStartBinIndex","msg":"Invalid start bin index"},{"code":6001,"name":"InvalidBinId","msg":"Invalid bin id"},{"code":6002,"name":"InvalidInput","msg":"Invalid input data"},{"code":6003,"name":"ExceededAmountSlippageTolerance","msg":"Exceeded amount slippage tolerance"},{"code":6004,"name":"ExceededBinSlippageTolerance","msg":"Exceeded bin slippage tolerance"},{"code":6005,"name":"CompositionFactorFlawed","msg":"Composition factor flawed"},{"code":6006,"name":"NonPresetBinStep","msg":"Non preset bin step"},{"code":6007,"name":"ZeroLiquidity","msg":"Zero liquidity"},{"code":6008,"name":"InvalidPosition","msg":"Invalid position"},{"code":6009,"name":"BinArrayNotFound","msg":"Bin array not found"},{"code":6010,"name":"InvalidTokenMint","msg":"Invalid token mint"},{"code":6011,"name":"InvalidAccountForSingleDeposit","msg":"Invalid account for single deposit"},{"code":6012,"name":"PairInsufficientLiquidity","msg":"Pair insufficient liquidity"},{"code":6013,"name":"InvalidFeeOwner","msg":"Invalid fee owner"},{"code":6014,"name":"InvalidFeeWithdrawAmount","msg":"Invalid fee withdraw amount"},{"code":6015,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6016,"name":"IdenticalFeeOwner","msg":"Identical fee owner"},{"code":6017,"name":"InvalidBps","msg":"Invalid basis point"},{"code":6018,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6019,"name":"TypeCastFailed","msg":"Type cast error"},{"code":6020,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6021,"name":"InvalidRewardDuration","msg":"Invalid reward duration"},{"code":6022,"name":"RewardInitialized","msg":"Reward already initialized"},{"code":6023,"name":"RewardUninitialized","msg":"Reward not initialized"},{"code":6024,"name":"IdenticalFunder","msg":"Identical funder"},{"code":6025,"name":"RewardCampaignInProgress","msg":"Reward campaign in progress"},{"code":6026,"name":"IdenticalRewardDuration","msg":"Reward duration is the same"},{"code":6027,"name":"InvalidBinArray","msg":"Invalid bin array"},{"code":6028,"name":"NonContinuousBinArrays","msg":"Bin arrays must be continuous"},{"code":6029,"name":"InvalidRewardVault","msg":"Invalid reward vault"},{"code":6030,"name":"NonEmptyPosition","msg":"Position is not empty"},{"code":6031,"name":"UnauthorizedAccess","msg":"Unauthorized access"},{"code":6032,"name":"InvalidFeeParameter","msg":"Invalid fee parameter"},{"code":6033,"name":"MissingOracle","msg":"Missing oracle account"},{"code":6034,"name":"InsufficientSample","msg":"Insufficient observation sample"},{"code":6035,"name":"InvalidLookupTimestamp","msg":"Invalid lookup timestamp"},{"code":6036,"name":"BitmapExtensionAccountIsNotProvided","msg":"Bitmap extension account is not provided"},{"code":6037,"name":"CannotFindNonZeroLiquidityBinArrayId","msg":"Cannot find non-zero liquidity binArrayId"},{"code":6038,"name":"BinIdOutOfBound","msg":"Bin id out of bound"},{"code":6039,"name":"InsufficientOutAmount","msg":"Insufficient amount in for minimum out"},{"code":6040,"name":"InvalidPositionWidth","msg":"Invalid position width"},{"code":6041,"name":"ExcessiveFeeUpdate","msg":"Excessive fee update"},{"code":6042,"name":"PoolDisabled","msg":"Pool disabled"},{"code":6043,"name":"InvalidPoolType","msg":"Invalid pool type"},{"code":6044,"name":"ExceedMaxWhitelist","msg":"Whitelist for wallet is full"},{"code":6045,"name":"InvalidIndex","msg":"Invalid index"},{"code":6046,"name":"RewardNotEnded","msg":"Reward not ended"},{"code":6047,"name":"MustWithdrawnIneligibleReward","msg":"Must withdraw ineligible reward"},{"code":6048,"name":"UnauthorizedAddress","msg":"Unauthorized address"},{"code":6049,"name":"OperatorsAreTheSame","msg":"Cannot update because operators are the same"},{"code":6050,"name":"WithdrawToWrongTokenAccount","msg":"Withdraw to wrong token account"},{"code":6051,"name":"WrongRentReceiver","msg":"Wrong rent receiver"},{"code":6052,"name":"AlreadyPassActivationPoint","msg":"Already activated"},{"code":6053,"name":"ExceedMaxSwappedAmount","msg":"Swapped amount is exceeded max swapped amount"},{"code":6054,"name":"InvalidStrategyParameters","msg":"Invalid strategy parameters"},{"code":6055,"name":"LiquidityLocked","msg":"Liquidity locked"},{"code":6056,"name":"BinRangeIsNotEmpty","msg":"Bin range is not empty"},{"code":6057,"name":"NotExactAmountOut","msg":"Amount out is not matched with exact amount out"},{"code":6058,"name":"InvalidActivationType","msg":"Invalid activation type"},{"code":6059,"name":"InvalidActivationDuration","msg":"Invalid activation duration"},{"code":6060,"name":"MissingTokenAmountAsTokenLaunchProof","msg":"Missing token amount as token launch owner proof"},{"code":6061,"name":"InvalidQuoteToken","msg":"Quote token must be SOL or USDC"},{"code":6062,"name":"InvalidBinStep","msg":"Invalid bin step"},{"code":6063,"name":"InvalidBaseFee","msg":"Invalid base fee"},{"code":6064,"name":"InvalidPreActivationDuration","msg":"Invalid pre-activation duration"},{"code":6065,"name":"AlreadyPassPreActivationSwapPoint","msg":"Already pass pre-activation swap point"},{"code":6066,"name":"InvalidStatus","msg":"Invalid status"},{"code":6067,"name":"ExceededMaxOracleLength","msg":"Exceed max oracle length"},{"code":6068,"name":"InvalidMinimumLiquidity","msg":"Invalid minimum liquidity"},{"code":6069,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6070,"name":"UnsupportedMintExtension","msg":"Unsupported mint extension"},{"code":6071,"name":"UnsupportNativeMintToken2022","msg":"Unsupported native mint token2022"},{"code":6072,"name":"UnmatchTokenMint","msg":"Unmatch token mint"},{"code":6073,"name":"UnsupportedTokenMint","msg":"Unsupported token mint"},{"code":6074,"name":"InsufficientRemainingAccounts","msg":"Insufficient remaining accounts"},{"code":6075,"name":"InvalidRemainingAccountSlice","msg":"Invalid remaining account slice"},{"code":6076,"name":"DuplicatedRemainingAccountTypes","msg":"Duplicated remaining account types"},{"code":6077,"name":"MissingRemainingAccountForTransferHook","msg":"Missing remaining account for transfer hook"},{"code":6078,"name":"NoTransferHookProgram","msg":"Remaining account was passed for transfer hook but there's no hook program"},{"code":6079,"name":"ZeroFundedAmount","msg":"Zero funded amount"},{"code":6080,"name":"InvalidSide","msg":"Invalid side"},{"code":6081,"name":"InvalidResizeLength","msg":"Invalid resize length"},{"code":6082,"name":"NotSupportAtTheMoment","msg":"Not support at the moment"},{"code":6083,"name":"InvalidRebalanceParameters","msg":"Invalid rebalance parameters"},{"code":6084,"name":"InvalidRewardAccounts","msg":"Invalid reward accounts"},{"code":6085,"name":"UndeterminedError","msg":"Undetermined error"},{"code":6086,"name":"ReallocExceedMaxLengthPerInstruction","msg":"Realloc exceed max length per instruction"},{"code":6087,"name":"InvalidBaseFeeMantissa","msg":"Mantissa cannot more than two significant digits"},{"code":6088,"name":"InvalidPositionOwner","msg":"Invalid position owner"},{"code":6089,"name":"InvalidPoolAddress","msg":"Invalid pool address"},{"code":6090,"name":"InvalidTokenBadgeType","msg":"Invalid token badge type"},{"code":6091,"name":"InvalidTransferHookAuthority","msg":"Invalid transfer hook authority"},{"code":6092,"name":"AmountXIsNegative","msg":"Amount x is negative"},{"code":6093,"name":"AmountYIsNegative","msg":"Amount y is negative"},{"code":6094,"name":"InvalidPoolCreator","msg":"Invalid pool creator"},{"code":6095,"name":"InvalidFunctionType","msg":"Invalid function type"},{"code":6096,"name":"InvalidPermission","msg":"Invalid permission"},{"code":6097,"name":"IncorrectATA","msg":"Incorrect ATA"},{"code":6098,"name":"InvalidWithdrawProtocolFeeZapAccounts","msg":"Invalid withdraw protocol fee zap accounts"},{"code":6099,"name":"MintRestrictedFromZap","msg":"SOL,USDC protocol fee cannot be withdrawn via zap"},{"code":6100,"name":"CpiDisabled","msg":"CPI disabled"},{"code":6101,"name":"MissingZapOutInstruction","msg":"Missing zap out instruction"},{"code":6102,"name":"InvalidZapAccounts","msg":"Invalid zap accounts"},{"code":6103,"name":"InvalidZapOutParameters","msg":"Invalid zap out parameters"},{"code":6104,"name":"InsufficientInAmount","msg":"Insufficient in amount"},{"code":6105,"name":"InvalidPlaceLimitOrderParameters","msg":"Invalid place limit order parameters"},{"code":6106,"name":"InvalidLimitOrderOwner","msg":"Invalid limit order owner"},{"code":6107,"name":"InvalidCancelLimitOrderParameters","msg":"Invalid cancel limit order parameters"},{"code":6108,"name":"CannotFindLimitOrderByBinId","msg":"Cannot find limit order by bin id"},{"code":6109,"name":"CancelNonEmptyLimitOrder","msg":"Cannot cancel non-empty limit order"},{"code":6110,"name":"InvalidCollectFeeMode","msg":"Invalid collect fee mode"}],"types":[{"name":"AccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookX"},{"name":"TransferHookY"},{"name":"TransferHookReward"},{"name":"TransferHookMultiReward","fields":["u8"]},{"name":"TransferHookReferral"}]}},{"name":"ActivationType","docs":["Type of the activation"],"repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Slot"},{"name":"Timestamp"}]}},{"name":"AddLiquidity","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"amounts","type":{"array":["u64",2]}},{"name":"active_bin_id","type":"i32"}]}},{"name":"AddLiquidityParams","type":{"kind":"struct","fields":[{"name":"min_delta_id","type":"i32"},{"name":"max_delta_id","type":"i32"},{"name":"x0","type":"u64"},{"name":"y0","type":"u64"},{"name":"delta_x","type":"u64"},{"name":"delta_y","type":"u64"},{"name":"bit_flag","type":"u8"},{"name":"favor_x_in_active_id","type":"bool"},{"name":"padding","type":{"array":["u8",16]}}]}},{"name":"AddLiquiditySingleSidePreciseParameter","type":{"kind":"struct","fields":[{"name":"bins","type":{"vec":{"defined":{"name":"CompressedBinDepositAmount"}}}},{"name":"decompress_multiplier","type":"u64"}]}},{"name":"AddLiquiditySingleSidePreciseParameter2","type":{"kind":"struct","fields":[{"name":"bins","type":{"vec":{"defined":{"name":"CompressedBinDepositAmount"}}}},{"name":"decompress_multiplier","type":"u64"},{"name":"max_amount","type":"u64"}]}},{"name":"BaseFeeParameter","type":{"kind":"struct","fields":[{"name":"protocol_share","docs":["Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"],"type":"u16"},{"name":"base_factor","docs":["Base factor for base fee rate"],"type":"u16"},{"name":"base_fee_power_factor","docs":["Base fee power factor"],"type":"u8"}]}},{"name":"Bin","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount_x","docs":["Amount of token X in the bin for market making. This already excluded protocol fees."],"type":"u64"},{"name":"amount_y","docs":["Amount of token Y in the bin for market making. This already excluded protocol fees."],"type":"u64"},{"name":"price","docs":["Bin price"],"type":"u128"},{"name":"liquidity_supply","docs":["Bin MM liquidity supply."],"type":"u128"},{"name":"fulfilled_order_amount_x","docs":["Total fulfilled order amount x"],"type":"u64"},{"name":"fulfilled_order_amount_y","docs":["Total fulfilled order amount y"],"type":"u64"},{"name":"limit_order_fee_ask_side","docs":["Limit order fee collected by ask side orders"],"type":"u64"},{"name":"limit_order_fee_bid_side","docs":["Limit order fee collected by bid side orders"],"type":"u64"},{"name":"fee_amount_x_per_token_stored","docs":["Swap fee amount of token X per liquidity deposited."],"type":"u128"},{"name":"fee_amount_y_per_token_stored","docs":["Swap fee amount of token Y per liquidity deposited."],"type":"u128"},{"name":"open_order_amount","docs":["Pending open limit orders amount in the bin."],"type":"u64"},{"name":"total_processing_order_amount","docs":["Total processing order amount"],"type":"u64"},{"name":"processed_order_remaining_amount","docs":["Remaining in processing open limit orders amount in the bin."],"type":"u64"},{"name":"order_age","docs":["Age"],"type":"u32"},{"name":"limit_order_ask_side","docs":["limit order flag"],"type":"u8"},{"name":"_padding_1","docs":["padding"],"type":{"array":["u8",3]}}]}},{"name":"BinArray","docs":["An account to contain a range of bin. For example: Bin 100 <-> 200.","For example:","BinArray index: 0 contains bin 0 <-> 599","index: 2 contains bin 600 <-> 1199, ..."],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"index","type":"i64"},{"name":"version","type":"u8"},{"name":"_padding_1","type":{"array":["u8",7]}},{"name":"lb_pair","type":"pubkey"},{"name":"bins","type":{"array":[{"defined":{"name":"Bin"}},70]}}]}},{"name":"BinArrayBitmapExtension","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"positive_bin_array_bitmap","docs":["Packed initialized bin array state for start_bin_index is positive"],"type":{"array":[{"array":["u64",8]},12]}},{"name":"negative_bin_array_bitmap","docs":["Packed initialized bin array state for start_bin_index is negative"],"type":{"array":[{"array":["u64",8]},12]}}]}},{"name":"BinLimitOrderAmount","type":{"kind":"struct","fields":[{"name":"id","type":"i32"},{"name":"amount","type":"u64"}]}},{"name":"BinLiquidityDistribution","type":{"kind":"struct","fields":[{"name":"bin_id","docs":["Define the bin ID wish to deposit to."],"type":"i32"},{"name":"distribution_x","docs":["DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin."],"type":"u16"},{"name":"distribution_y","docs":["DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin."],"type":"u16"}]}},{"name":"BinLiquidityDistributionByWeight","type":{"kind":"struct","fields":[{"name":"bin_id","docs":["Define the bin ID wish to deposit to."],"type":"i32"},{"name":"weight","docs":["weight of liquidity distributed for this bin id"],"type":"u16"}]}},{"name":"BinLiquidityReduction","type":{"kind":"struct","fields":[{"name":"bin_id","type":"i32"},{"name":"bps_to_remove","type":"u16"}]}},{"name":"CancelLimitOrderEvt","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from","type":"pubkey"},{"name":"limit_order","type":"pubkey"},{"name":"amounts","type":{"array":["u64",2]}},{"name":"active_id","type":"i32"},{"name":"bins","type":{"vec":"i32"}}]}},{"name":"ClaimFee","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"fee_x","type":"u64"},{"name":"fee_y","type":"u64"}]}},{"name":"ClaimFee2","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"fee_x","type":"u64"},{"name":"fee_y","type":"u64"},{"name":"active_bin_id","type":"i32"}]}},{"name":"ClaimFeeOperator","docs":["Parameter that set by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"operator","docs":["operator"],"type":"pubkey"},{"name":"_padding","docs":["Reserve"],"type":{"array":["u8",128]}}]}},{"name":"ClaimReward","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"total_reward","type":"u64"}]}},{"name":"ClaimReward2","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"total_reward","type":"u64"},{"name":"active_bin_id","type":"i32"}]}},{"name":"CloseLimitOrderEvt","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"limit_order","type":"pubkey"}]}},{"name":"CompositionFee","type":{"kind":"struct","fields":[{"name":"from","type":"pubkey"},{"name":"bin_id","type":"i16"},{"name":"token_x_fee_amount","type":"u64"},{"name":"token_y_fee_amount","type":"u64"},{"name":"protocol_token_x_fee_amount","type":"u64"},{"name":"protocol_token_y_fee_amount","type":"u64"}]}},{"name":"CompressedBinDepositAmount","type":{"kind":"struct","fields":[{"name":"bin_id","type":"i32"},{"name":"amount","type":"u32"}]}},{"name":"CustomizableParams","type":{"kind":"struct","fields":[{"name":"active_id","docs":["Pool price"],"type":"i32"},{"name":"bin_step","docs":["Bin step"],"type":"u16"},{"name":"base_factor","docs":["Base factor"],"type":"u16"},{"name":"activation_type","docs":["Activation type. 0 = Slot, 1 = Time. Check ActivationType enum"],"type":"u8"},{"name":"has_alpha_vault","docs":["Whether the pool has an alpha vault"],"type":"bool"},{"name":"activation_point","docs":["Decide when does the pool start trade. None = Now"],"type":{"option":"u64"}},{"name":"creator_pool_on_off_control","docs":["Pool creator have permission to enable/disable pool with restricted program validation. Only applicable for customizable permissionless pool."],"type":"bool"},{"name":"base_fee_power_factor","docs":["Base fee power factor"],"type":"u8"},{"name":"concrete_function_type","docs":["Concrete function type"],"type":"u8"},{"name":"collect_fee_mode","docs":["Collect fee mode"],"type":"u8"},{"name":"padding","docs":["Padding, for future use"],"type":{"array":["u8",60]}}]}},{"name":"DecreasePositionLength","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"length_to_remove","type":"u16"},{"name":"side","type":"u8"}]}},{"name":"DummyIx","type":{"kind":"struct","fields":[{"name":"_pair_status","type":{"defined":{"name":"PairStatus"}}},{"name":"_pair_type","type":{"defined":{"name":"PairType"}}},{"name":"_activation_type","type":{"defined":{"name":"ActivationType"}}},{"name":"_token_program_flag","type":{"defined":{"name":"TokenProgramFlags"}}},{"name":"_resize_side","type":{"defined":{"name":"ResizeSide"}}},{"name":"_rounding","type":{"defined":{"name":"Rounding"}}}]}},{"name":"DummyZcAccount","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"position_bin_data","type":{"defined":{"name":"PositionBinData"}}}]}},{"name":"DynamicFeeParameter","type":{"kind":"struct","fields":[{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"}]}},{"name":"DynamicFeeParameterUpdate","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"}]}},{"name":"FeeInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"fee_x_per_token_complete","type":"u128"},{"name":"fee_y_per_token_complete","type":"u128"},{"name":"fee_x_pending","type":"u64"},{"name":"fee_y_pending","type":"u64"}]}},{"name":"FeeParameterUpdate","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"protocol_share","type":"u16"},{"name":"base_factor","type":"u16"},{"name":"base_fee_power_factor","type":"u8"}]}},{"name":"FundReward","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"funder","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"amount","type":"u64"}]}},{"name":"GoToABin","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from_bin_id","type":"i32"},{"name":"to_bin_id","type":"i32"}]}},{"name":"IncreaseObservation","type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"new_observation_length","type":"u64"}]}},{"name":"IncreasePositionLength","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"length_to_add","type":"u16"},{"name":"side","type":"u8"}]}},{"name":"InitPermissionPairIx","type":{"kind":"struct","fields":[{"name":"active_id","type":"i32"},{"name":"bin_step","type":"u16"},{"name":"base_factor","type":"u16"},{"name":"base_fee_power_factor","type":"u8"},{"name":"activation_type","type":"u8"},{"name":"padding0","type":"u16"},{"name":"concrete_function_type","type":"u8"},{"name":"collect_fee_mode","type":"u8"}]}},{"name":"InitPresetParametersIx","type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"bin_step","docs":["Bin step. Represent the price increment / decrement."],"type":"u16"},{"name":"base_factor","docs":["Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"],"type":"u16"},{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"},{"name":"protocol_share","docs":["Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"],"type":"u16"},{"name":"base_fee_power_factor","docs":["Base fee power factor"],"type":"u8"},{"name":"concrete_function_type","docs":["function type"],"type":"u8"},{"name":"collect_fee_mode","docs":["collect fee mode"],"type":"u8"}]}},{"name":"InitializeLbPair2Params","type":{"kind":"struct","fields":[{"name":"active_id","docs":["Pool price"],"type":"i32"},{"name":"padding","docs":["Padding, for future use"],"type":{"array":["u8",96]}}]}},{"name":"InitializeReward","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"reward_mint","type":"pubkey"},{"name":"funder","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"reward_duration","type":"u64"}]}},{"name":"LbPair","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"parameters","type":{"defined":{"name":"StaticParameters"}}},{"name":"v_parameters","type":{"defined":{"name":"VariableParameters"}}},{"name":"bump_seed","type":{"array":["u8",1]}},{"name":"bin_step_seed","docs":["Bin step signer seed"],"type":{"array":["u8",2]}},{"name":"pair_type","docs":["Type of the pair"],"type":"u8"},{"name":"active_id","docs":["Active bin id"],"type":"i32"},{"name":"bin_step","docs":["Bin step. Represent the price increment / decrement."],"type":"u16"},{"name":"status","docs":["Status of the pair. Check PairStatus enum."],"type":"u8"},{"name":"require_base_factor_seed","docs":["Require base factor seed"],"type":"u8"},{"name":"base_factor_seed","docs":["Base factor seed"],"type":{"array":["u8",2]}},{"name":"activation_type","docs":["Activation type"],"type":"u8"},{"name":"creator_pool_on_off_control","docs":["Allow pool creator to enable/disable pool with restricted validation. Only applicable for customizable permissionless pair type."],"type":"u8"},{"name":"token_x_mint","docs":["Token X mint"],"type":"pubkey"},{"name":"token_y_mint","docs":["Token Y mint"],"type":"pubkey"},{"name":"reserve_x","docs":["LB token X vault"],"type":"pubkey"},{"name":"reserve_y","docs":["LB token Y vault"],"type":"pubkey"},{"name":"protocol_fee","docs":["Uncollected protocol fee"],"type":{"defined":{"name":"ProtocolFee"}}},{"name":"_padding_1","docs":["padding 1"],"type":{"array":["u8",32]}},{"name":"reward_infos","docs":["Farming reward information"],"type":{"array":[{"defined":{"name":"RewardInfo"}},2]}},{"name":"oracle","docs":["Oracle pubkey"],"type":"pubkey"},{"name":"bin_array_bitmap","docs":["Packed initialized bin array state"],"type":{"array":["u64",16]}},{"name":"last_updated_at","docs":["Last time the pool fee parameter was updated"],"type":"i64"},{"name":"_padding_2","docs":["_padding_2"],"type":{"array":["u8",32]}},{"name":"pre_activation_swap_address","docs":["Address allowed to swap when the current point is greater than or equal to the pre-activation point. The pre-activation point is calculated as `activation_point - pre_activation_duration`."],"type":"pubkey"},{"name":"base_key","docs":["Base keypair. Only required for permission pair"],"type":"pubkey"},{"name":"activation_point","docs":["Time point to enable the pair. Only applicable for permission pair."],"type":"u64"},{"name":"pre_activation_duration","docs":["Duration before activation activation_point. Used to calculate pre-activation time point for pre_activation_swap_address"],"type":"u64"},{"name":"_padding_3","docs":["_padding 3"],"type":{"array":["u8",8]}},{"name":"_padding_4","docs":["_padding_4"],"type":"u64"},{"name":"creator","docs":["Pool creator"],"type":"pubkey"},{"name":"token_mint_x_program_flag","docs":["token_mint_x_program_flag"],"type":"u8"},{"name":"token_mint_y_program_flag","docs":["token_mint_y_program_flag"],"type":"u8"},{"name":"version","docs":["version to know whether we have reset tombstone fields"],"type":"u8"},{"name":"_reserved","docs":["Reserved space for future use"],"type":{"array":["u8",21]}}]}},{"name":"LbPairCreate","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"bin_step","type":"u16"},{"name":"token_x","type":"pubkey"},{"name":"token_y","type":"pubkey"}]}},{"name":"LimitOrder","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"lb_pair","docs":["The LB pair of this LO"],"type":"pubkey"},{"name":"owner","docs":["Owner of the LO. Client rely on this to to fetch their LOs."],"type":"pubkey"},{"name":"bin_count","docs":["Bin count"],"type":"u16"},{"name":"_padding_0","docs":["Padding"],"type":{"array":["u8",14]}},{"name":"padding_1","docs":["Reserved space for future use"],"type":{"array":["u64",4]}}]}},{"name":"LiquidityOneSideParameter","type":{"kind":"struct","fields":[{"name":"amount","docs":["Amount of X token or Y token to deposit"],"type":"u64"},{"name":"active_id","docs":["Active bin that integrator observe off-chain"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"i32"},{"name":"bin_liquidity_dist","docs":["Liquidity distribution to each bins"],"type":{"vec":{"defined":{"name":"BinLiquidityDistributionByWeight"}}}}]}},{"name":"LiquidityParameter","type":{"kind":"struct","fields":[{"name":"amount_x","docs":["Amount of X token to deposit"],"type":"u64"},{"name":"amount_y","docs":["Amount of Y token to deposit"],"type":"u64"},{"name":"bin_liquidity_dist","docs":["Liquidity distribution to each bins"],"type":{"vec":{"defined":{"name":"BinLiquidityDistribution"}}}}]}},{"name":"LiquidityParameterByStrategy","type":{"kind":"struct","fields":[{"name":"amount_x","docs":["Amount of X token to deposit"],"type":"u64"},{"name":"amount_y","docs":["Amount of Y token to deposit"],"type":"u64"},{"name":"active_id","docs":["Active bin that integrator observe off-chain"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"i32"},{"name":"strategy_parameters","docs":["strategy parameters"],"type":{"defined":{"name":"StrategyParameters"}}}]}},{"name":"LiquidityParameterByStrategyOneSide","type":{"kind":"struct","fields":[{"name":"amount","docs":["Amount of X token or Y token to deposit"],"type":"u64"},{"name":"active_id","docs":["Active bin that integrator observe off-chain"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"i32"},{"name":"strategy_parameters","docs":["strategy parameters"],"type":{"defined":{"name":"StrategyParameters"}}}]}},{"name":"LiquidityParameterByWeight","type":{"kind":"struct","fields":[{"name":"amount_x","docs":["Amount of X token to deposit"],"type":"u64"},{"name":"amount_y","docs":["Amount of Y token to deposit"],"type":"u64"},{"name":"active_id","docs":["Active bin that integrator observe off-chain"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"i32"},{"name":"bin_liquidity_dist","docs":["Liquidity distribution to each bins"],"type":{"vec":{"defined":{"name":"BinLiquidityDistributionByWeight"}}}}]}},{"name":"Operator","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"signer","type":"pubkey"},{"name":"permission","type":"u128"},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"Oracle","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"idx","docs":["Index of latest observation"],"type":"u64"},{"name":"active_size","docs":["Size of active sample. Active sample is initialized observation."],"type":"u64"},{"name":"length","docs":["Number of observations"],"type":"u64"}]}},{"name":"PairStatus","docs":["Pair status. 0 = Enabled, 1 = Disabled. Putting 0 as enabled for backward compatibility."],"repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Enabled"},{"name":"Disabled"}]}},{"name":"PairType","docs":["Type of the Pair. 0 = Permissionless, 1 = Permission, 2 = CustomizablePermissionless. Putting 0 as permissionless for backward compatibility."],"repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Permissionless"},{"name":"Permission"},{"name":"CustomizablePermissionless"},{"name":"PermissionlessV2"}]}},{"name":"PlaceLimitOrderEvt","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"sender","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"limit_order","type":"pubkey"},{"name":"active_id","type":"i32"},{"name":"params","type":{"defined":{"name":"PlaceLimitOrderParams"}}}]}},{"name":"PlaceLimitOrderParams","type":{"kind":"struct","fields":[{"name":"is_ask_side","type":"bool"},{"name":"padding","type":{"array":["u8",16]}},{"name":"relative_bin","type":{"option":{"defined":{"name":"RelativeBin"}}}},{"name":"bins","type":{"vec":{"defined":{"name":"BinLimitOrderAmount"}}}}]}},{"name":"PositionBinData","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"liquidity_share","type":"u128"},{"name":"reward_info","type":{"defined":{"name":"UserRewardInfo"}}},{"name":"fee_info","type":{"defined":{"name":"FeeInfo"}}}]}},{"name":"PositionClose","type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"}]}},{"name":"PositionCreate","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"}]}},{"name":"PositionV2","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"lb_pair","docs":["The LB pair of this position"],"type":"pubkey"},{"name":"owner","docs":["Owner of the position. Client rely on this to to fetch their positions."],"type":"pubkey"},{"name":"liquidity_shares","docs":["Liquidity shares of this position in bins (lower_bin_id <-> upper_bin_id). This is the same as LP concept."],"type":{"array":["u128",70]}},{"name":"reward_infos","docs":["Farming reward information"],"type":{"array":[{"defined":{"name":"UserRewardInfo"}},70]}},{"name":"fee_infos","docs":["Swap fee to claim information"],"type":{"array":[{"defined":{"name":"FeeInfo"}},70]}},{"name":"lower_bin_id","docs":["Lower bin ID"],"type":"i32"},{"name":"upper_bin_id","docs":["Upper bin ID"],"type":"i32"},{"name":"last_updated_at","docs":["Last updated timestamp"],"type":"i64"},{"name":"total_claimed_fee_x_amount","docs":["Total claimed token fee X"],"type":"u64"},{"name":"total_claimed_fee_y_amount","docs":["Total claimed token fee Y"],"type":"u64"},{"name":"total_claimed_rewards","docs":["Total claimed rewards"],"type":{"array":["u64",2]}},{"name":"operator","docs":["Operator of position"],"type":"pubkey"},{"name":"lock_release_point","docs":["Time point which the locked liquidity can be withdraw"],"type":"u64"},{"name":"_padding_0","docs":["_padding_0, previous subjected_to_bootstrap_liquidity_locking, BE CAREFUL FOR TOMBSTONE WHEN REUSE !!"],"type":"u8"},{"name":"fee_owner","docs":["Address is able to claim fee in this position, only valid for bootstrap_liquidity_position"],"type":"pubkey"},{"name":"version","docs":["version to know whether we have reset tombstone fields"],"type":"u8"},{"name":"permissionless_operation_bits","type":"u8"},{"name":"_reserved","docs":["Reserved space for future use"],"type":{"array":["u8",85]}}]}},{"name":"PresetParameter","type":{"kind":"struct","fields":[{"name":"bin_step","docs":["Bin step. Represent the price increment / decrement."],"type":"u16"},{"name":"base_factor","docs":["Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"],"type":"u16"},{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"},{"name":"min_bin_id","docs":["Min bin id supported by the pool based on the configured bin step."],"type":"i32"},{"name":"max_bin_id","docs":["Max bin id supported by the pool based on the configured bin step."],"type":"i32"},{"name":"protocol_share","docs":["Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"],"type":"u16"}]}},{"name":"PresetParameter2","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"bin_step","docs":["Bin step. Represent the price increment / decrement."],"type":"u16"},{"name":"base_factor","docs":["Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"],"type":"u16"},{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"protocol_share","docs":["Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"],"type":"u16"},{"name":"index","docs":["index"],"type":"u16"},{"name":"base_fee_power_factor","docs":["Base fee power factor"],"type":"u8"},{"name":"concrete_function_type","docs":["function type, to check whether the pool should have LM farming or other functions in the future, refer ConcreteFunctionType"],"type":"u8"},{"name":"collect_fee_mode","docs":["collect fee mode"],"type":"u8"},{"name":"padding_0","type":{"array":["u8",7]}},{"name":"padding_1","docs":["Padding 1 for future use"],"type":{"array":["u64",19]}}]}},{"name":"ProtocolFee","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount_x","type":"u64"},{"name":"amount_y","type":"u64"}]}},{"name":"RebalanceLiquidityParams","type":{"kind":"struct","fields":[{"name":"active_id","docs":["active id"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"u16"},{"name":"should_claim_fee","docs":["a flag to indicate that whether fee should be harvested"],"type":"bool"},{"name":"should_claim_reward","docs":["a flag to indicate that whether rewards should be harvested"],"type":"bool"},{"name":"min_withdraw_x_amount","docs":["threshold for withdraw token x"],"type":"u64"},{"name":"max_deposit_x_amount","docs":["threshold for deposit token x"],"type":"u64"},{"name":"min_withdraw_y_amount","docs":["threshold for withdraw token y"],"type":"u64"},{"name":"max_deposit_y_amount","docs":["threshold for deposit token y"],"type":"u64"},{"name":"shrink_mode","docs":["shrink mode"],"type":"u8"},{"name":"padding","docs":["padding 32 bytes for future usage"],"type":{"array":["u8",31]}},{"name":"removes","docs":["removes"],"type":{"vec":{"defined":{"name":"RemoveLiquidityParams"}}}},{"name":"adds","docs":["adds"],"type":{"vec":{"defined":{"name":"AddLiquidityParams"}}}}]}},{"name":"Rebalancing","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"active_bin_id","type":"i32"},{"name":"x_withdrawn_amount","type":"u64"},{"name":"x_added_amount","type":"u64"},{"name":"y_withdrawn_amount","type":"u64"},{"name":"y_added_amount","type":"u64"},{"name":"x_fee_amount","type":"u64"},{"name":"y_fee_amount","type":"u64"},{"name":"old_min_id","type":"i32"},{"name":"old_max_id","type":"i32"},{"name":"new_min_id","type":"i32"},{"name":"new_max_id","type":"i32"},{"name":"rewards","type":{"array":["u64",2]}}]}},{"name":"RelativeBin","type":{"kind":"struct","fields":[{"name":"active_id","docs":["Active bin that integrator observe off-chain"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"i32"}]}},{"name":"RemainingAccountsInfo","type":{"kind":"struct","fields":[{"name":"slices","type":{"vec":{"defined":{"name":"RemainingAccountsSlice"}}}}]}},{"name":"RemainingAccountsSlice","type":{"kind":"struct","fields":[{"name":"accounts_type","type":{"defined":{"name":"AccountsType"}}},{"name":"length","type":"u8"}]}},{"name":"RemoveLiquidity","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"amounts","type":{"array":["u64",2]}},{"name":"active_bin_id","type":"i32"}]}},{"name":"RemoveLiquidityParams","type":{"kind":"struct","fields":[{"name":"min_bin_id","type":{"option":"i32"}},{"name":"max_bin_id","type":{"option":"i32"}},{"name":"bps","type":"u16"},{"name":"padding","type":{"array":["u8",16]}}]}},{"name":"ResizeSide","docs":["Side of resize, 0 for lower and 1 for upper"],"repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Lower"},{"name":"Upper"}]}},{"name":"RewardInfo","docs":["Stores the state relevant for tracking liquidity mining rewards"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"funder","docs":["Authority account that allows to fund rewards"],"type":"pubkey"},{"name":"reward_duration","docs":["LM reward duration in seconds."],"type":"u64"},{"name":"reward_duration_end","docs":["LM reward duration end time."],"type":"u64"},{"name":"reward_rate","docs":["LM reward rate"],"type":"u128"},{"name":"last_update_time","docs":["The last time reward states were updated."],"type":"u64"},{"name":"cumulative_seconds_with_empty_liquidity_reward","docs":["Accumulated seconds where when farm distribute rewards, but the bin is empty. The reward will be accumulated for next reward time window."],"type":"u64"}]}},{"name":"Rounding","type":{"kind":"enum","variants":[{"name":"Up"},{"name":"Down"}]}},{"name":"SetPositionPermissionlessOperationBitsEvt","type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"old_bits","type":"u8"},{"name":"new_bits","type":"u8"}]}},{"name":"StaticParameters","docs":["Parameter that set by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_factor","docs":["Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"],"type":"u16"},{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"},{"name":"min_bin_id","docs":["Min bin id supported by the pool based on the configured bin step."],"type":"i32"},{"name":"max_bin_id","docs":["Max bin id supported by the pool based on the configured bin step."],"type":"i32"},{"name":"protocol_share","docs":["Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"],"type":"u16"},{"name":"base_fee_power_factor","docs":["Base fee power factor"],"type":"u8"},{"name":"function_type","docs":["function type"],"type":"u8"},{"name":"collect_fee_mode","docs":["Collect fee mode"],"type":"u8"},{"name":"_padding","docs":["Padding for bytemuck safe alignment"],"type":{"array":["u8",3]}}]}},{"name":"StrategyParameters","type":{"kind":"struct","fields":[{"name":"min_bin_id","docs":["min bin id"],"type":"i32"},{"name":"max_bin_id","docs":["max bin id"],"type":"i32"},{"name":"strategy_type","docs":["strategy type"],"type":{"defined":{"name":"StrategyType"}}},{"name":"parameteres","docs":["parameters"],"type":{"array":["u8",64]}}]}},{"name":"StrategyType","type":{"kind":"enum","variants":[{"name":"SpotOneSide"},{"name":"CurveOneSide"},{"name":"BidAskOneSide"},{"name":"SpotBalanced"},{"name":"CurveBalanced"},{"name":"BidAskBalanced"},{"name":"SpotImBalanced"},{"name":"CurveImBalanced"},{"name":"BidAskImBalanced"}]}},{"name":"Swap","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from","type":"pubkey"},{"name":"start_bin_id","type":"i32"},{"name":"end_bin_id","type":"i32"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"swap_for_y","type":"bool"},{"name":"fee","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"fee_bps","type":"u128"},{"name":"host_fee","type":"u64"}]}},{"name":"Swap2Evt","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from","type":"pubkey"},{"name":"start_bin_id","type":"i32"},{"name":"end_bin_id","type":"i32"},{"name":"swap_for_y","type":"bool"},{"name":"fee_bps","type":"u128"},{"name":"amount_in","docs":["Total amount, user transfer out"],"type":"u64"},{"name":"amount_left","docs":["Leftover amount"],"type":"u64"},{"name":"amount_out","docs":["Total amount transfer to user, including transfer fee"],"type":"u64"},{"name":"mm_fee","docs":["Market maker fee"],"type":"u64"},{"name":"protocol_fee","docs":["Total protocol fee"],"type":"u64"},{"name":"limit_order_fee","docs":["Total limit order fee"],"type":"u64"},{"name":"host_fee","docs":["Total host fee"],"type":"u64"},{"name":"fees_on_input","docs":["check if fees on input"],"type":"bool"},{"name":"fees_on_token_x","docs":["check if fees is on token x"],"type":"bool"}]}},{"name":"TokenBadge","docs":["Parameter that set by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"token_mint","docs":["token mint"],"type":"pubkey"},{"name":"_padding","docs":["Reserve"],"type":{"array":["u8",128]}}]}},{"name":"TokenProgramFlags","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"TokenProgram"},{"name":"TokenProgram2022"}]}},{"name":"UpdatePositionLockReleasePoint","type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"current_point","type":"u64"},{"name":"new_lock_release_point","type":"u64"},{"name":"old_lock_release_point","type":"u64"},{"name":"sender","type":"pubkey"}]}},{"name":"UpdatePositionOperator","type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"old_operator","type":"pubkey"},{"name":"new_operator","type":"pubkey"}]}},{"name":"UpdateRewardDuration","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"old_reward_duration","type":"u64"},{"name":"new_reward_duration","type":"u64"}]}},{"name":"UpdateRewardFunder","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"old_funder","type":"pubkey"},{"name":"new_funder","type":"pubkey"}]}},{"name":"UserRewardInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"reward_per_token_completes","type":{"array":["u128",2]}},{"name":"reward_pendings","type":{"array":["u64",2]}}]}},{"name":"VariableParameters","docs":["Parameters that changes based on dynamic of the market"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"volatility_accumulator","docs":["Volatility accumulator measure the number of bin crossed since reference bin ID. Normally (without filter period taken into consideration), reference bin ID is the active bin of last swap.","It affects the variable fee rate"],"type":"u32"},{"name":"volatility_reference","docs":["Volatility reference is decayed volatility accumulator. It is always <= volatility_accumulator"],"type":"u32"},{"name":"index_reference","docs":["Active bin id of last swap."],"type":"i32"},{"name":"_padding","docs":["Padding for bytemuck safe alignment"],"type":{"array":["u8",4]}},{"name":"last_update_timestamp","docs":["Last timestamp the variable parameters was updated"],"type":"i64"},{"name":"_padding_1","docs":["Padding for bytemuck safe alignment"],"type":{"array":["u8",8]}}]}},{"name":"WithdrawIneligibleReward","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"reward_mint","type":"pubkey"},{"name":"amount","type":"u64"}]}}],"constants":[{"name":"BASIS_POINT_MAX","type":"u16","value":"10000"},{"name":"BIN_ARRAY","type":"bytes","value":"[98, 105, 110, 95, 97, 114, 114, 97, 121]"},{"name":"BIN_ARRAY_BITMAP_SEED","type":"bytes","value":"[98, 105, 116, 109, 97, 112]"},{"name":"BIN_ARRAY_BITMAP_SIZE","type":"i32","value":"512"},{"name":"CLAIM_PROTOCOL_FEE_OPERATOR","type":"bytes","value":"[99, 102, 95, 111, 112, 101, 114, 97, 116, 111, 114]"},{"name":"DEFAULT_BIN_PER_POSITION","type":"u64","value":"70"},{"name":"EXTENSION_BINARRAY_BITMAP_SIZE","type":"u64","value":"12"},{"name":"FEE_DENOMINATOR","type":"u64","value":"1000000000"},{"name":"HOST_FEE_BPS","docs":["Host fee. 20%"],"type":"u16","value":"2000"},{"name":"ILM_PROTOCOL_SHARE","type":"u16","value":"2000"},{"name":"LIMIT_ORDER_FEE_SHARE","type":"u16","value":"5000"},{"name":"MAX_BASE_FEE","docs":["Maximum base fee, base_fee / 10^9 = fee_in_percentage"],"type":"u128","value":"100000000"},{"name":"MAX_BIN_ID_PER_BIN_STEP","docs":["Maximum bin ID per bin step. Computed based on 1 bps. Used for bin id bound estimation."],"type":"i32","value":"351639"},{"name":"MAX_BIN_PER_ARRAY","type":"u64","value":"70"},{"name":"MAX_BIN_PER_LIMIT_ORDER","type":"u64","value":"50"},{"name":"MAX_BIN_STEP","docs":["Maximum bin step"],"type":"u16","value":"400"},{"name":"MAX_FEE_RATE","docs":["Maximum fee rate. 10%"],"type":"u64","value":"100000000"},{"name":"MAX_PROTOCOL_SHARE","docs":["Maximum protocol share of the fee. 25%"],"type":"u16","value":"2500"},{"name":"MAX_RESIZE_LENGTH","type":"u64","value":"91"},{"name":"MAX_REWARD_BIN_SPLIT","type":"u64","value":"15"},{"name":"MAX_REWARD_DURATION","type":"u64","value":"31536000"},{"name":"MINIMUM_LIQUIDITY","type":"u128","value":"1000000"},{"name":"MIN_BASE_FEE","docs":["Minimum base fee"],"type":"u128","value":"100000"},{"name":"MIN_REWARD_DURATION","type":"u64","value":"1"},{"name":"NUM_REWARDS","type":"u64","value":"2"},{"name":"OPERATOR_PREFIX","type":"bytes","value":"[111, 112, 101, 114, 97, 116, 111, 114]"},{"name":"ORACLE","type":"bytes","value":"[111, 114, 97, 99, 108, 101]"},{"name":"POSITION","type":"bytes","value":"[112, 111, 115, 105, 116, 105, 111, 110]"},{"name":"POSITION_MAX_LENGTH","type":"u64","value":"1400"},{"name":"PRESET_PARAMETER","type":"bytes","value":"[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114]"},{"name":"PRESET_PARAMETER2","type":"bytes","value":"[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114, 50]"},{"name":"PROTOCOL_SHARE","type":"u16","value":"500"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/meteora_pools_amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.json b/olddocs/archivekbot2/idls/meteora_pools_amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.json new file mode 100644 index 0000000..3c1bd2d --- /dev/null +++ b/olddocs/archivekbot2/idls/meteora_pools_amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.json @@ -0,0 +1 @@ +{"version":"0.5.2","name":"amm","docs":["Program for AMM"],"instructions":[{"name":"initializePermissionedPool","docs":["Initialize a new permissioned pool."],"accounts":[{"name":"pool","isMut":true,"isSigner":true,"docs":["Pool account (arbitrary address)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"adminTokenA","isMut":true,"isSigner":false,"docs":["Admin token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"adminTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"adminPoolLp","isMut":true,"isSigner":false,"docs":["Admin pool LP token account. Used to receive LP during first deposit (initialize pool)","Admin pool LP token account. Used to receive LP during first deposit (initialize pool)"]},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"admin","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"feeOwner","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"curveType","type":{"defined":"CurveType"}}]},{"name":"initializePermissionlessPool","docs":["Initialize a new permissionless pool."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA address)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"payerTokenA","isMut":true,"isSigner":false,"docs":["Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerPoolLp","isMut":true,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"feeOwner","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"curveType","type":{"defined":"CurveType"}},{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"}]},{"name":"initializePermissionlessPoolWithFeeTier","docs":["Initialize a new permissionless pool with customized fee tier"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA address)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"payerTokenA","isMut":true,"isSigner":false,"docs":["Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerPoolLp","isMut":true,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"feeOwner","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"curveType","type":{"defined":"CurveType"}},{"name":"tradeFeeBps","type":"u64"},{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"}]},{"name":"enableOrDisablePool","docs":["Enable or disable a pool. A disabled pool allow only remove balanced liquidity operation."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["Admin account. Must be owner of the pool."]}],"args":[{"name":"enable","type":"bool"}]},{"name":"swap","docs":["Swap token A to B, or vice versa. An amount of trading fee will be charged for liquidity provider, and the admin of the pool."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"userSourceToken","isMut":true,"isSigner":false,"docs":["User token account. Token from this account will be transfer into the vault by the pool in exchange for another token of the pool."]},{"name":"userDestinationToken","isMut":true,"isSigner":false,"docs":["User token account. The exchanged token will be transfer into this account from the pool."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["Lp token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["Lp token mint of vault b"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"protocolTokenFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account. Used to receive trading fee. It's mint field must matched with user_source_token mint field."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of user_source_token."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"inAmount","type":"u64"},{"name":"minimumOutAmount","type":"u64"}]},{"name":"removeLiquiditySingleSide","docs":["Withdraw only single token from the pool. Only supported by pool with stable swap curve."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"userPoolLp","isMut":true,"isSigner":false,"docs":["User pool lp token account. LP will be burned from this account upon success liquidity removal."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"userDestinationToken","isMut":true,"isSigner":false,"docs":["User token account to receive token upon success liquidity removal."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of the user_pool_lp account."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"poolTokenAmount","type":"u64"},{"name":"minimumOutAmount","type":"u64"}]},{"name":"addImbalanceLiquidity","docs":["Deposit tokens to the pool in an imbalance ratio. Only supported by pool with stable swap curve."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"userPoolLp","isMut":true,"isSigner":false,"docs":["user pool lp token account. lp will be burned from this account upon success liquidity removal."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault b"]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"userAToken","isMut":true,"isSigner":false,"docs":["User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"userBToken","isMut":true,"isSigner":false,"docs":["User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of user_a_token, and user_b_token."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"minimumPoolTokenAmount","type":"u64"},{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"}]},{"name":"removeBalanceLiquidity","docs":["Withdraw tokens from the pool in a balanced ratio. User will still able to withdraw from pool even the pool is disabled. This allow user to exit their liquidity when there's some unforeseen event happen."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"userPoolLp","isMut":true,"isSigner":false,"docs":["user pool lp token account. lp will be burned from this account upon success liquidity removal."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault b"]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"userAToken","isMut":true,"isSigner":false,"docs":["User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"userBToken","isMut":true,"isSigner":false,"docs":["User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of user_a_token, and user_b_token."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"poolTokenAmount","type":"u64"},{"name":"minimumATokenOut","type":"u64"},{"name":"minimumBTokenOut","type":"u64"}]},{"name":"addBalanceLiquidity","docs":["Deposit tokens to the pool in a balanced ratio."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"userPoolLp","isMut":true,"isSigner":false,"docs":["user pool lp token account. lp will be burned from this account upon success liquidity removal."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault b"]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"userAToken","isMut":true,"isSigner":false,"docs":["User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"userBToken","isMut":true,"isSigner":false,"docs":["User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of user_a_token, and user_b_token."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"poolTokenAmount","type":"u64"},{"name":"maximumTokenAAmount","type":"u64"},{"name":"maximumTokenBAmount","type":"u64"}]},{"name":"setPoolFees","docs":["Update trading fee charged for liquidity provider, and admin."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"feeOperator","isMut":false,"isSigner":true,"docs":["Fee operator account"]}],"args":[{"name":"fees","type":{"defined":"PoolFees"}},{"name":"newPartnerFeeNumerator","type":"u64"}]},{"name":"overrideCurveParam","docs":["Update swap curve parameters. This function do not allow update of curve type. For example: stable swap curve to constant product curve. Only supported by pool with stable swap curve.","Only amp is allowed to be override. The other attributes of stable swap curve will be ignored."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["Admin account."]}],"args":[{"name":"curveType","type":{"defined":"CurveType"}}]},{"name":"getPoolInfo","docs":["Get the general information of the pool."],"accounts":[{"name":"pool","isMut":false,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":false,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"aVaultLp","isMut":false,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":false,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":false,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":false,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":false,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":false,"isSigner":false,"docs":["LP token mint of vault b"]}],"args":[]},{"name":"bootstrapLiquidity","docs":["Bootstrap the pool when liquidity is depleted."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"userPoolLp","isMut":true,"isSigner":false,"docs":["user pool lp token account. lp will be burned from this account upon success liquidity removal."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault b"]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"userAToken","isMut":true,"isSigner":false,"docs":["User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"userBToken","isMut":true,"isSigner":false,"docs":["User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of user_a_token, and user_b_token."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"}]},{"name":"createMintMetadata","docs":["Create mint metadata account for old pools"],"accounts":[{"name":"pool","isMut":false,"isSigner":false,"docs":["Pool account"]},{"name":"lpMint","isMut":false,"isSigner":false,"docs":["LP mint account of the pool"]},{"name":"aVaultLp","isMut":false,"isSigner":false,"docs":["Vault A LP account of the pool"]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Payer"]}],"args":[]},{"name":"createLockEscrow","docs":["Create lock account"],"accounts":[{"name":"pool","isMut":false,"isSigner":false,"docs":["Pool account"]},{"name":"lockEscrow","isMut":true,"isSigner":false,"docs":["Lock account"]},{"name":"owner","isMut":false,"isSigner":false},{"name":"lpMint","isMut":false,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Payer account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[]},{"name":"lock","docs":["Lock Lp token"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account"]},{"name":"lpMint","isMut":false,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"lockEscrow","isMut":true,"isSigner":false,"docs":["Lock account"]},{"name":"owner","isMut":true,"isSigner":true,"docs":["Can be anyone"]},{"name":"sourceTokens","isMut":true,"isSigner":false,"docs":["owner lp token account"]},{"name":"escrowVault","isMut":true,"isSigner":false,"docs":["Escrow vault"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"aVault","isMut":false,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":false,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLp","isMut":false,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":false,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVaultLpMint","isMut":false,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":false,"isSigner":false,"docs":["LP token mint of vault b"]}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"claimFee","docs":["Claim fee"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"lockEscrow","isMut":true,"isSigner":false,"docs":["Lock account"]},{"name":"owner","isMut":true,"isSigner":true,"docs":["Owner of lock account"]},{"name":"sourceTokens","isMut":true,"isSigner":false,"docs":["owner lp token account"]},{"name":"escrowVault","isMut":true,"isSigner":false,"docs":["Escrow vault"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault b"]},{"name":"userAToken","isMut":true,"isSigner":false,"docs":["User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"userBToken","isMut":true,"isSigner":false,"docs":["User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"createConfig","docs":["Create config"],"accounts":[{"name":"config","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"configParameters","type":{"defined":"ConfigParameters"}}]},{"name":"closeConfig","docs":["Close config"],"accounts":[{"name":"config","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"rentReceiver","isMut":true,"isSigner":false}],"args":[]},{"name":"initializePermissionlessConstantProductPoolWithConfig","docs":["Initialize permissionless pool with config"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA address)"]},{"name":"config","isMut":false,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"payerTokenA","isMut":true,"isSigner":false,"docs":["Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerPoolLp","isMut":true,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"}]},{"name":"initializePermissionlessConstantProductPoolWithConfig2","docs":["Initialize permissionless pool with config 2"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA address)"]},{"name":"config","isMut":false,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"payerTokenA","isMut":true,"isSigner":false,"docs":["Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerPoolLp","isMut":true,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"},{"name":"activationPoint","type":{"option":"u64"}}]},{"name":"initializeCustomizablePermissionlessConstantProductPool","docs":["Initialize permissionless pool with customizable params"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA address)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"payerTokenA","isMut":true,"isSigner":false,"docs":["Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerPoolLp","isMut":true,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"},{"name":"params","type":{"defined":"CustomizableParams"}}]},{"name":"updateActivationPoint","docs":["Update activation slot"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["Admin account."]}],"args":[{"name":"newActivationPoint","type":"u64"}]},{"name":"withdrawProtocolFees","docs":["Withdraw protocol fee"],"accounts":[{"name":"pool","isMut":false,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"aVaultLp","isMut":false,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false},{"name":"protocolTokenBFee","isMut":true,"isSigner":false},{"name":"treasuryTokenA","isMut":true,"isSigner":false},{"name":"treasuryTokenB","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"setWhitelistedVault","docs":["Set whitelisted vault"],"accounts":[{"name":"pool","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"whitelistedVault","type":"publicKey"}]},{"name":"partnerClaimFee","docs":["Partner claim fee"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"aVaultLp","isMut":false,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false},{"name":"protocolTokenBFee","isMut":true,"isSigner":false},{"name":"partnerTokenA","isMut":true,"isSigner":false},{"name":"partnerTokenB","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"partnerAuthority","isMut":false,"isSigner":true}],"args":[{"name":"maxAmountA","type":"u64"},{"name":"maxAmountB","type":"u64"}]}],"accounts":[{"name":"Config","type":{"kind":"struct","fields":[{"name":"poolFees","type":{"defined":"PoolFees"}},{"name":"activationDuration","type":"u64"},{"name":"vaultConfigKey","type":"publicKey"},{"name":"poolCreatorAuthority","docs":["Only pool_creator_authority can use the current config to initialize new pool. When it's Pubkey::default, it's a public config."],"type":"publicKey"},{"name":"activationType","docs":["Activation type"],"type":"u8"},{"name":"partnerFeeNumerator","type":"u64"},{"name":"padding","type":{"array":["u8",219]}}]}},{"name":"LockEscrow","docs":["State of lock escrow account"],"type":{"kind":"struct","fields":[{"name":"pool","docs":["Pool address"],"type":"publicKey"},{"name":"owner","docs":["Owner address"],"type":"publicKey"},{"name":"escrowVault","docs":["Vault address, store the lock user lock"],"type":"publicKey"},{"name":"bump","docs":["bump, used to sign"],"type":"u8"},{"name":"totalLockedAmount","docs":["Total locked amount"],"type":"u64"},{"name":"lpPerToken","docs":["Lp per token, virtual price of lp token"],"type":"u128"},{"name":"unclaimedFeePending","docs":["Unclaimed fee pending"],"type":"u64"},{"name":"aFee","docs":["Total a fee claimed so far"],"type":"u64"},{"name":"bFee","docs":["Total b fee claimed so far"],"type":"u64"}]}},{"name":"Pool","docs":["State of pool account"],"type":{"kind":"struct","fields":[{"name":"lpMint","docs":["LP token mint of the pool"],"type":"publicKey"},{"name":"tokenAMint","docs":["Token A mint of the pool. Eg: USDT"],"type":"publicKey"},{"name":"tokenBMint","docs":["Token B mint of the pool. Eg: USDC"],"type":"publicKey"},{"name":"aVault","docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."],"type":"publicKey"},{"name":"bVault","docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."],"type":"publicKey"},{"name":"aVaultLp","docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."],"type":"publicKey"},{"name":"bVaultLp","docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."],"type":"publicKey"},{"name":"aVaultLpBump","docs":["\"A\" vault lp bump. Used to create signer seeds."],"type":"u8"},{"name":"enabled","docs":["Flag to determine whether the pool is enabled, or disabled."],"type":"bool"},{"name":"protocolTokenAFee","docs":["Protocol fee token account for token A. Used to receive trading fee."],"type":"publicKey"},{"name":"protocolTokenBFee","docs":["Protocol fee token account for token B. Used to receive trading fee."],"type":"publicKey"},{"name":"feeLastUpdatedAt","docs":["Fee last updated timestamp"],"type":"u64"},{"name":"padding0","type":{"array":["u8",24]}},{"name":"fees","docs":["Store the fee charges setting."],"type":{"defined":"PoolFees"}},{"name":"poolType","docs":["Pool type"],"type":{"defined":"PoolType"}},{"name":"stake","docs":["Stake pubkey of SPL stake pool"],"type":"publicKey"},{"name":"totalLockedLp","docs":["Total locked lp token"],"type":"u64"},{"name":"bootstrapping","docs":["bootstrapping config"],"type":{"defined":"Bootstrapping"}},{"name":"partnerInfo","type":{"defined":"PartnerInfo"}},{"name":"padding","docs":["Padding for future pool field"],"type":{"defined":"Padding"}},{"name":"curveType","docs":["The type of the swap curve supported by the pool."],"type":{"defined":"CurveType"}}]}}],"types":[{"name":"TokenMultiplier","docs":["Multiplier for the pool token. Used to normalized token with different decimal into the same precision."],"type":{"kind":"struct","fields":[{"name":"tokenAMultiplier","docs":["Multiplier for token A of the pool."],"type":"u64"},{"name":"tokenBMultiplier","docs":["Multiplier for token B of the pool."],"type":"u64"},{"name":"precisionFactor","docs":["Record the highest token decimal in the pool. For example, Token A is 6 decimal, token B is 9 decimal. This will save value of 9."],"type":"u8"}]}},{"name":"PoolFees","docs":["Information regarding fee charges"],"type":{"kind":"struct","fields":[{"name":"tradeFeeNumerator","docs":["Trade fees are extra token amounts that are held inside the token","accounts during a trade, making the value of liquidity tokens rise.","Trade fee numerator"],"type":"u64"},{"name":"tradeFeeDenominator","docs":["Trade fee denominator"],"type":"u64"},{"name":"protocolTradeFeeNumerator","docs":["Protocol trading fees are extra token amounts that are held inside the token","accounts during a trade, with the equivalent in pool tokens minted to","the protocol of the program.","Protocol trade fee numerator"],"type":"u64"},{"name":"protocolTradeFeeDenominator","docs":["Protocol trade fee denominator"],"type":"u64"}]}},{"name":"Depeg","docs":["Contains information for depeg pool"],"type":{"kind":"struct","fields":[{"name":"baseVirtualPrice","docs":["The virtual price of staking / interest bearing token"],"type":"u64"},{"name":"baseCacheUpdated","docs":["The last time base_virtual_price is updated"],"type":"u64"},{"name":"depegType","docs":["Type of the depeg pool"],"type":{"defined":"DepegType"}}]}},{"name":"ConfigParameters","type":{"kind":"struct","fields":[{"name":"tradeFeeNumerator","type":"u64"},{"name":"protocolTradeFeeNumerator","type":"u64"},{"name":"activationDuration","type":"u64"},{"name":"vaultConfigKey","type":"publicKey"},{"name":"poolCreatorAuthority","type":"publicKey"},{"name":"activationType","type":"u8"},{"name":"index","type":"u64"},{"name":"partnerFeeNumerator","type":"u64"}]}},{"name":"CustomizableParams","type":{"kind":"struct","fields":[{"name":"tradeFeeNumerator","docs":["Trading fee."],"type":"u32"},{"name":"activationPoint","docs":["The pool start trading."],"type":{"option":"u64"}},{"name":"hasAlphaVault","docs":["Whether the pool support alpha vault"],"type":"bool"},{"name":"activationType","docs":["Activation type"],"type":"u8"},{"name":"padding","docs":["Padding"],"type":{"array":["u8",90]}}]}},{"name":"Padding","docs":["Padding for future pool fields"],"type":{"kind":"struct","fields":[{"name":"padding0","docs":["Padding 0"],"type":{"array":["u8",6]}},{"name":"padding1","docs":["Padding 1"],"type":{"array":["u64",21]}},{"name":"padding2","docs":["Padding 2"],"type":{"array":["u64",21]}}]}},{"name":"PartnerInfo","type":{"kind":"struct","fields":[{"name":"feeNumerator","type":"u64"},{"name":"partnerAuthority","type":"publicKey"},{"name":"pendingFeeA","type":"u64"},{"name":"pendingFeeB","type":"u64"}]}},{"name":"Bootstrapping","type":{"kind":"struct","fields":[{"name":"activationPoint","docs":["Activation point, can be slot or timestamp"],"type":"u64"},{"name":"whitelistedVault","docs":["Whitelisted vault to be able to buy pool before activation_point"],"type":"publicKey"},{"name":"poolCreator","docs":["Need to store pool creator in lauch pool, so they can modify liquidity before activation_point"],"type":"publicKey"},{"name":"activationType","docs":["Activation type, 0 means by slot, 1 means by timestamp"],"type":"u8"}]}},{"name":"ActivationType","docs":["Type of the activation"],"type":{"kind":"enum","variants":[{"name":"Slot"},{"name":"Timestamp"}]}},{"name":"RoundDirection","docs":["Rounding direction"],"type":{"kind":"enum","variants":[{"name":"Floor"},{"name":"Ceiling"}]}},{"name":"TradeDirection","docs":["Trade (swap) direction"],"type":{"kind":"enum","variants":[{"name":"AtoB"},{"name":"BtoA"}]}},{"name":"NewCurveType","docs":["Type of the swap curve"],"type":{"kind":"enum","variants":[{"name":"ConstantProduct"},{"name":"Stable","fields":[{"name":"amp","docs":["Amplification coefficient"],"type":"u64"},{"name":"token_multiplier","docs":["Multiplier for the pool token. Used to normalized token with different decimal into the same precision."],"type":{"defined":"TokenMultiplier"}},{"name":"depeg","docs":["Depeg pool information. Contains functions to allow token amount to be repeg using stake / interest bearing token virtual price"],"type":{"defined":"Depeg"}},{"name":"last_amp_updated_timestamp","docs":["The last amp updated timestamp. Used to prevent update_curve_info called infinitely many times within a short period"],"type":"u64"}]},{"name":"NewCurve","fields":[{"name":"field_one","type":"u64"},{"name":"field_two","type":"u64"}]}]}},{"name":"CurveType","docs":["Type of the swap curve"],"type":{"kind":"enum","variants":[{"name":"ConstantProduct"},{"name":"Stable","fields":[{"name":"amp","docs":["Amplification coefficient"],"type":"u64"},{"name":"token_multiplier","docs":["Multiplier for the pool token. Used to normalized token with different decimal into the same precision."],"type":{"defined":"TokenMultiplier"}},{"name":"depeg","docs":["Depeg pool information. Contains functions to allow token amount to be repeg using stake / interest bearing token virtual price"],"type":{"defined":"Depeg"}},{"name":"last_amp_updated_timestamp","docs":["The last amp updated timestamp. Used to prevent update_curve_info called infinitely many times within a short period"],"type":"u64"}]}]}},{"name":"DepegType","docs":["Type of depeg pool"],"type":{"kind":"enum","variants":[{"name":"None"},{"name":"Marinade"},{"name":"Lido"},{"name":"SplStake"}]}},{"name":"Rounding","docs":["Round up, down"],"type":{"kind":"enum","variants":[{"name":"Up"},{"name":"Down"}]}},{"name":"PoolType","docs":["Pool type"],"type":{"kind":"enum","variants":[{"name":"Permissioned"},{"name":"Permissionless"}]}}],"events":[{"name":"AddLiquidity","fields":[{"name":"lpMintAmount","type":"u64","index":false},{"name":"tokenAAmount","type":"u64","index":false},{"name":"tokenBAmount","type":"u64","index":false}]},{"name":"RemoveLiquidity","fields":[{"name":"lpUnmintAmount","type":"u64","index":false},{"name":"tokenAOutAmount","type":"u64","index":false},{"name":"tokenBOutAmount","type":"u64","index":false}]},{"name":"BootstrapLiquidity","fields":[{"name":"lpMintAmount","type":"u64","index":false},{"name":"tokenAAmount","type":"u64","index":false},{"name":"tokenBAmount","type":"u64","index":false},{"name":"pool","type":"publicKey","index":false}]},{"name":"Swap","fields":[{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false},{"name":"tradeFee","type":"u64","index":false},{"name":"protocolFee","type":"u64","index":false},{"name":"hostFee","type":"u64","index":false}]},{"name":"SetPoolFees","fields":[{"name":"tradeFeeNumerator","type":"u64","index":false},{"name":"tradeFeeDenominator","type":"u64","index":false},{"name":"protocolTradeFeeNumerator","type":"u64","index":false},{"name":"protocolTradeFeeDenominator","type":"u64","index":false},{"name":"pool","type":"publicKey","index":false}]},{"name":"PoolInfo","fields":[{"name":"tokenAAmount","type":"u64","index":false},{"name":"tokenBAmount","type":"u64","index":false},{"name":"virtualPrice","type":"f64","index":false},{"name":"currentTimestamp","type":"u64","index":false}]},{"name":"TransferAdmin","fields":[{"name":"admin","type":"publicKey","index":false},{"name":"newAdmin","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false}]},{"name":"OverrideCurveParam","fields":[{"name":"newAmp","type":"u64","index":false},{"name":"updatedTimestamp","type":"u64","index":false},{"name":"pool","type":"publicKey","index":false}]},{"name":"PoolCreated","fields":[{"name":"lpMint","type":"publicKey","index":false},{"name":"tokenAMint","type":"publicKey","index":false},{"name":"tokenBMint","type":"publicKey","index":false},{"name":"poolType","type":{"defined":"PoolType"},"index":false},{"name":"pool","type":"publicKey","index":false}]},{"name":"PoolEnabled","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"enabled","type":"bool","index":false}]},{"name":"MigrateFeeAccount","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"newAdminTokenAFee","type":"publicKey","index":false},{"name":"newAdminTokenBFee","type":"publicKey","index":false},{"name":"tokenAAmount","type":"u64","index":false},{"name":"tokenBAmount","type":"u64","index":false}]},{"name":"CreateLockEscrow","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"owner","type":"publicKey","index":false}]},{"name":"Lock","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"ClaimFee","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"aFee","type":"u64","index":false},{"name":"bFee","type":"u64","index":false}]},{"name":"CreateConfig","fields":[{"name":"tradeFeeNumerator","type":"u64","index":false},{"name":"protocolTradeFeeNumerator","type":"u64","index":false},{"name":"config","type":"publicKey","index":false}]},{"name":"CloseConfig","fields":[{"name":"config","type":"publicKey","index":false}]},{"name":"WithdrawProtocolFees","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"protocolAFee","type":"u64","index":false},{"name":"protocolBFee","type":"u64","index":false},{"name":"protocolAFeeOwner","type":"publicKey","index":false},{"name":"protocolBFeeOwner","type":"publicKey","index":false}]},{"name":"PartnerClaimFees","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"feeA","type":"u64","index":false},{"name":"feeB","type":"u64","index":false},{"name":"partner","type":"publicKey","index":false}]}],"errors":[{"code":6000,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6001,"name":"InvalidFee","msg":"Invalid fee setup"},{"code":6002,"name":"InvalidInvariant","msg":"Invalid invariant d"},{"code":6003,"name":"FeeCalculationFailure","msg":"Fee calculation failure"},{"code":6004,"name":"ExceededSlippage","msg":"Exceeded slippage tolerance"},{"code":6005,"name":"InvalidCalculation","msg":"Invalid curve calculation"},{"code":6006,"name":"ZeroTradingTokens","msg":"Given pool token amount results in zero trading tokens"},{"code":6007,"name":"ConversionError","msg":"Math conversion overflow"},{"code":6008,"name":"FaultyLpMint","msg":"LP mint authority must be 'A' vault lp, without freeze authority, and 0 supply"},{"code":6009,"name":"MismatchedTokenMint","msg":"Token mint mismatched"},{"code":6010,"name":"MismatchedLpMint","msg":"LP mint mismatched"},{"code":6011,"name":"MismatchedOwner","msg":"Invalid lp token owner"},{"code":6012,"name":"InvalidVaultAccount","msg":"Invalid vault account"},{"code":6013,"name":"InvalidVaultLpAccount","msg":"Invalid vault lp account"},{"code":6014,"name":"InvalidPoolLpMintAccount","msg":"Invalid pool lp mint account"},{"code":6015,"name":"PoolDisabled","msg":"Pool disabled"},{"code":6016,"name":"InvalidAdminAccount","msg":"Invalid admin account"},{"code":6017,"name":"InvalidProtocolFeeAccount","msg":"Invalid protocol fee account"},{"code":6018,"name":"SameAdminAccount","msg":"Same admin account"},{"code":6019,"name":"IdenticalSourceDestination","msg":"Identical user source and destination token account"},{"code":6020,"name":"ApyCalculationError","msg":"Apy calculation error"},{"code":6021,"name":"InsufficientSnapshot","msg":"Insufficient virtual price snapshot"},{"code":6022,"name":"NonUpdatableCurve","msg":"Current curve is non-updatable"},{"code":6023,"name":"MisMatchedCurve","msg":"New curve is mismatched with old curve"},{"code":6024,"name":"InvalidAmplification","msg":"Amplification is invalid"},{"code":6025,"name":"UnsupportedOperation","msg":"Operation is not supported"},{"code":6026,"name":"ExceedMaxAChanges","msg":"Exceed max amplification changes"},{"code":6027,"name":"InvalidRemainingAccountsLen","msg":"Invalid remaining accounts length"},{"code":6028,"name":"InvalidRemainingAccounts","msg":"Invalid remaining account"},{"code":6029,"name":"MismatchedDepegMint","msg":"Token mint B doesn't matches depeg type token mint"},{"code":6030,"name":"InvalidApyAccount","msg":"Invalid APY account"},{"code":6031,"name":"InvalidTokenMultiplier","msg":"Invalid token multiplier"},{"code":6032,"name":"InvalidDepegInformation","msg":"Invalid depeg information"},{"code":6033,"name":"UpdateTimeConstraint","msg":"Update time constraint violated"},{"code":6034,"name":"ExceedMaxFeeBps","msg":"Exceeded max fee bps"},{"code":6035,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6036,"name":"PoolIsNotPermissioned","msg":"Pool is not permissioned"},{"code":6037,"name":"InvalidDepositAmount","msg":"Invalid deposit amount"},{"code":6038,"name":"InvalidFeeOwner","msg":"Invalid fee owner"},{"code":6039,"name":"NonDepletedPool","msg":"Pool is not depleted"},{"code":6040,"name":"AmountNotPeg","msg":"Token amount is not 1:1"},{"code":6041,"name":"AmountIsZero","msg":"Amount is zero"},{"code":6042,"name":"TypeCastFailed","msg":"Type cast error"},{"code":6043,"name":"AmountIsNotEnough","msg":"Amount is not enough"},{"code":6044,"name":"InvalidActivationDuration","msg":"Invalid activation duration"},{"code":6045,"name":"PoolIsNotLaunchPool","msg":"Pool is not launch pool"},{"code":6046,"name":"UnableToModifyActivationPoint","msg":"Unable to modify activation point"},{"code":6047,"name":"InvalidAuthorityToCreateThePool","msg":"Invalid authority to create the pool"},{"code":6048,"name":"InvalidActivationType","msg":"Invalid activation type"},{"code":6049,"name":"InvalidActivationPoint","msg":"Invalid activation point"},{"code":6050,"name":"PreActivationSwapStarted","msg":"Pre activation swap window started"},{"code":6051,"name":"InvalidPoolType","msg":"Invalid pool type"},{"code":6052,"name":"InvalidQuoteMint","msg":"Quote token must be SOL,USDC"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/meteora_vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.json b/olddocs/archivekbot2/idls/meteora_vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.json new file mode 100644 index 0000000..61034fa --- /dev/null +++ b/olddocs/archivekbot2/idls/meteora_vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.json @@ -0,0 +1 @@ +{"version":"0.7.2","name":"vault","docs":["Program for vault"],"instructions":[{"name":"initialize","docs":["initialize new vault"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["This is base account for all vault","No need base key now because we only allow 1 vault per token now","Vault account"]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Payer can be anyone"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["Token vault account"]},{"name":"tokenMint","isMut":false,"isSigner":false,"docs":["Token mint account"]},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false,"docs":["rent"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["system_program"]}],"args":[]},{"name":"enableVault","docs":["enable vault"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["Vault account"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["Admin account"]}],"args":[{"name":"enabled","type":"u8"}]},{"name":"setOperator","docs":["set new operator"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["Vault account"]},{"name":"operator","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true,"docs":["admin"]}],"args":[]},{"name":"initializeStrategy","docs":["Initialize a strategy and add strategy to vault.strategies index"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["Vault account"]},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false,"docs":["Strategy account"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["Collateral vault account"]},{"name":"collateralMint","isMut":false,"isSigner":false,"docs":["Collateral mint account"]},{"name":"admin","isMut":true,"isSigner":true,"docs":["Admin account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program account"]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program account"]}],"args":[{"name":"bumps","type":{"defined":"StrategyBumps"}},{"name":"strategyType","type":{"defined":"StrategyType"}}]},{"name":"removeStrategy","docs":["remove a strategy"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["Vault account"]},{"name":"strategy","isMut":true,"isSigner":false,"docs":["Strategy account"]},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["Collateral vault account"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"feeVault","isMut":true,"isSigner":false,"docs":["fee_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["admin"]}],"args":[]},{"name":"removeStrategy2","docs":["remove a strategy by advance payment"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["Vault account"]},{"name":"strategy","isMut":true,"isSigner":false,"docs":["Strategy account"]},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["Collateral vault account"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"tokenAdminAdvancePayment","isMut":true,"isSigner":false,"docs":["token_advance_payemnt","the owner of token_advance_payment must be admin"]},{"name":"tokenVaultAdvancePayment","isMut":true,"isSigner":false,"docs":["token_vault_advance_payment","the account must be different from token_vault","the owner of token_advance_payment must be vault"]},{"name":"feeVault","isMut":true,"isSigner":false,"docs":["fee_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["admin"]}],"args":[{"name":"maxAdminPayAmount","type":"u64"}]},{"name":"collectDust","docs":["collect token, that someone send wrongly","also help in case Mango reimbursement"],"accounts":[{"name":"vault","isMut":false,"isSigner":false,"docs":["vault"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["Token vault, must be different from vault.token_vault"]},{"name":"tokenAdmin","isMut":true,"isSigner":false,"docs":["token admin, enforce owner is admin to avoid mistake"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["admin"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]}],"args":[]},{"name":"addStrategy","docs":["add a strategy"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"strategy","isMut":false,"isSigner":false,"docs":["strategy"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["admin"]}],"args":[]},{"name":"depositStrategy","docs":["deposit liquidity to a strategy"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"strategy","isMut":true,"isSigner":false,"docs":["strategy"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"feeVault","isMut":true,"isSigner":false,"docs":["fee_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["collateral_vault"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]},{"name":"operator","isMut":false,"isSigner":true,"docs":["operator"]}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawStrategy","docs":["withdraw liquidity from a strategy"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"strategy","isMut":true,"isSigner":false,"docs":["strategy"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"feeVault","isMut":true,"isSigner":false,"docs":["fee_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["collateral_vault"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]},{"name":"operator","isMut":false,"isSigner":true,"docs":["operator"]}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdraw2","docs":["Withdraw v2. Withdraw from token vault if no remaining accounts are available. Else, it will attempt to withdraw from strategy and token vault. This method just proxy between 2 methods. Protocol integration should be using withdraw instead of this function."],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"userToken","isMut":true,"isSigner":false,"docs":["user_token"]},{"name":"userLp","isMut":true,"isSigner":false,"docs":["user_lp"]},{"name":"user","isMut":false,"isSigner":true,"docs":["user"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]}],"args":[{"name":"unmintAmount","type":"u64"},{"name":"minOutAmount","type":"u64"}]},{"name":"deposit","docs":["user deposit liquidity to vault"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"userToken","isMut":true,"isSigner":false,"docs":["user_token"]},{"name":"userLp","isMut":true,"isSigner":false,"docs":["user_lp"]},{"name":"user","isMut":false,"isSigner":true,"docs":["user"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]}],"args":[{"name":"tokenAmount","type":"u64"},{"name":"minimumLpTokenAmount","type":"u64"}]},{"name":"withdraw","docs":["user withdraw liquidity from vault"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"userToken","isMut":true,"isSigner":false,"docs":["user_token"]},{"name":"userLp","isMut":true,"isSigner":false,"docs":["user_lp"]},{"name":"user","isMut":false,"isSigner":true,"docs":["user"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]}],"args":[{"name":"unmintAmount","type":"u64"},{"name":"minOutAmount","type":"u64"}]},{"name":"withdrawDirectlyFromStrategy","docs":["user withdraw liquidity from vault, if vault reserve doesn't have enough liquidity, it will withdraw from the strategy firstly"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"strategy","isMut":true,"isSigner":false,"docs":["strategy"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["collateral_vault"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"feeVault","isMut":true,"isSigner":false,"docs":["fee_vault"]},{"name":"userToken","isMut":true,"isSigner":false,"docs":["user_token"]},{"name":"userLp","isMut":true,"isSigner":false,"docs":["user_lp"]},{"name":"user","isMut":false,"isSigner":true,"docs":["user"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]}],"args":[{"name":"unmintAmount","type":"u64"},{"name":"minOutAmount","type":"u64"}]}],"accounts":[{"name":"Vault","docs":["Vault struct"],"type":{"kind":"struct","fields":[{"name":"enabled","docs":["The flag, if admin set enable = false, then the user can only withdraw and cannot deposit in the vault."],"type":"u8"},{"name":"bumps","docs":["Vault nonce, to create vault seeds"],"type":{"defined":"VaultBumps"}},{"name":"totalAmount","docs":["The total liquidity of the vault, including remaining tokens in token_vault and the liquidity in all strategies."],"type":"u64"},{"name":"tokenVault","docs":["Token account, hold liquidity in vault reserve"],"type":"publicKey"},{"name":"feeVault","docs":["Hold lp token of vault, each time rebalance crank is called, vault calculate performance fee and mint corresponding lp token amount to fee_vault. fee_vault is owned by treasury address"],"type":"publicKey"},{"name":"tokenMint","docs":["Token mint that vault supports"],"type":"publicKey"},{"name":"lpMint","docs":["Lp mint of vault"],"type":"publicKey"},{"name":"strategies","docs":["The list of strategy addresses that vault supports, vault can support up to MAX_STRATEGY strategies at the same time."],"type":{"array":["publicKey",30]}},{"name":"base","docs":["The base address to create vault seeds"],"type":"publicKey"},{"name":"admin","docs":["Admin of vault"],"type":"publicKey"},{"name":"operator","docs":["Person who can send the crank. Operator can only send liquidity to strategies that admin defined, and claim reward to account of treasury address"],"type":"publicKey"},{"name":"lockedProfitTracker","docs":["Stores information for locked profit."],"type":{"defined":"LockedProfitTracker"}}]}},{"name":"Strategy","docs":["Strategy struct"],"type":{"kind":"struct","fields":[{"name":"reserve","docs":["Lending pool address, that the strategy will deposit/withdraw balance"],"type":"publicKey"},{"name":"collateralVault","docs":["The token account, that holds the collateral token"],"type":"publicKey"},{"name":"strategyType","docs":["Specify type of strategy"],"type":{"defined":"StrategyType"}},{"name":"currentLiquidity","docs":["The liquidity in strategy at the time vault deposit/withdraw from a lending protocol"],"type":"u64"},{"name":"bumps","docs":["Hold some bumps, in case the strategy needs to use other seeds to sign a CPI call."],"type":{"array":["u8",10]}},{"name":"vault","docs":["Vault address, that the strategy belongs"],"type":"publicKey"},{"name":"isDisable","docs":["If we remove strategy by remove_strategy2 endpoint, this account will be never added again"],"type":"u8"}]}}],"types":[{"name":"VaultBumps","docs":["Vault bumps struct"],"type":{"kind":"struct","fields":[{"name":"vaultBump","docs":["vault_bump"],"type":"u8"},{"name":"tokenVaultBump","docs":["token_vault_bump"],"type":"u8"}]}},{"name":"StrategyBumps","docs":["Strategy bumps struct"],"type":{"kind":"struct","fields":[{"name":"strategyIndex","docs":["strategy_index"],"type":"u8"},{"name":"otherBumps","docs":["Bumps of PDAs for the integrated protocol."],"type":{"array":["u8",10]}}]}},{"name":"LockedProfitTracker","docs":["LockedProfitTracker struct"],"type":{"kind":"struct","fields":[{"name":"lastUpdatedLockedProfit","docs":["The total locked profit from the last report"],"type":"u64"},{"name":"lastReport","docs":["The last timestamp (in seconds) rebalancing"],"type":"u64"},{"name":"lockedProfitDegradation","docs":["Rate per second of degradation"],"type":"u64"}]}},{"name":"StrategyType","docs":["StrategyType struct"],"type":{"kind":"enum","variants":[{"name":"PortFinanceWithoutLM"},{"name":"PortFinanceWithLM"},{"name":"SolendWithoutLM"},{"name":"Mango"},{"name":"SolendWithLM"},{"name":"ApricotWithoutLM"},{"name":"Francium"},{"name":"Tulip"},{"name":"Vault"},{"name":"Drift"},{"name":"Frakt"},{"name":"Marginfi"}]}}],"events":[{"name":"AddLiquidity","fields":[{"name":"lpMintAmount","type":"u64","index":false},{"name":"tokenAmount","type":"u64","index":false}]},{"name":"RemoveLiquidity","fields":[{"name":"lpUnmintAmount","type":"u64","index":false},{"name":"tokenAmount","type":"u64","index":false}]},{"name":"StrategyDeposit","fields":[{"name":"strategyType","type":{"defined":"StrategyType"},"index":false},{"name":"tokenAmount","type":"u64","index":false}]},{"name":"StrategyWithdraw","fields":[{"name":"strategyType","type":{"defined":"StrategyType"},"index":false},{"name":"collateralAmount","type":"u64","index":false},{"name":"estimatedTokenAmount","type":"u64","index":false}]},{"name":"ClaimReward","fields":[{"name":"strategyType","type":{"defined":"StrategyType"},"index":false},{"name":"tokenAmount","type":"u64","index":false},{"name":"mintAccount","type":"publicKey","index":false}]},{"name":"PerformanceFee","fields":[{"name":"lpMintMore","type":"u64","index":false}]},{"name":"ReportLoss","fields":[{"name":"strategy","type":"publicKey","index":false},{"name":"loss","type":"u64","index":false}]},{"name":"TotalAmount","fields":[{"name":"totalAmount","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"VaultIsDisabled","msg":"Vault is disabled"},{"code":6001,"name":"ExceededSlippage","msg":"Exceeded slippage tolerance"},{"code":6002,"name":"StrategyIsNotExisted","msg":"Strategy is not existed"},{"code":6003,"name":"UnAuthorized","msg":"UnAuthorized"},{"code":6004,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6005,"name":"ProtocolIsNotSupported","msg":"Protocol is not supported"},{"code":6006,"name":"UnMatchReserve","msg":"Reserve does not support token mint"},{"code":6007,"name":"InvalidLockedProfitDegradation","msg":"lockedProfitDegradation is invalid"},{"code":6008,"name":"MaxStrategyReached","msg":"Maximum number of strategies have been reached"},{"code":6009,"name":"StrategyExisted","msg":"Strategy existed"},{"code":6010,"name":"InvalidUnmintAmount","msg":"Invalid unmint amount"},{"code":6011,"name":"InvalidAccountsForStrategy","msg":"Invalid accounts for strategy"},{"code":6012,"name":"InvalidBump","msg":"Invalid bump"},{"code":6013,"name":"AmountMustGreaterThanZero","msg":"Amount must be greater than 0"},{"code":6014,"name":"MangoIsNotSupportedAnymore","msg":"Mango is not supported anymore"},{"code":6015,"name":"StrategyIsNotSupported","msg":"Strategy is not supported"},{"code":6016,"name":"PayAmountIsExeeced","msg":"Pay amount is exceeded"},{"code":6017,"name":"FeeVaultIsNotSet","msg":"Fee vault is not set"},{"code":6018,"name":"LendingAssertionViolation","msg":"deposit amount in lending is not matched"},{"code":6019,"name":"HaveMoneyInLending","msg":"Cannot remove strategy becase we have some in lending"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/moonit.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.json b/olddocs/archivekbot2/idls/moonit.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.json new file mode 100644 index 0000000..8f66db1 --- /dev/null +++ b/olddocs/archivekbot2/idls/moonit.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"token_launchpad","instructions":[{"name":"tokenMint","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"backendAuthority","isMut":false,"isSigner":true},{"name":"curveAccount","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":true},{"name":"mintMetadata","isMut":true,"isSigner":false,"docs":["Type validating that the account is owned by the System Program = uninitialized","seeds should ensure that the address is correct"]},{"name":"curveTokenAccount","isMut":true,"isSigner":false},{"name":"configAccount","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"mplTokenMetadata","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"mintParams","type":{"defined":"TokenMintParams"}}]},{"name":"buy","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokenAccount","isMut":true,"isSigner":false},{"name":"curveAccount","isMut":true,"isSigner":false},{"name":"curveTokenAccount","isMut":true,"isSigner":false},{"name":"dexFee","isMut":true,"isSigner":false},{"name":"helioFee","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"configAccount","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"data","type":{"defined":"TradeParams"}}]},{"name":"sell","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokenAccount","isMut":true,"isSigner":false},{"name":"curveAccount","isMut":true,"isSigner":false},{"name":"curveTokenAccount","isMut":true,"isSigner":false},{"name":"dexFee","isMut":true,"isSigner":false},{"name":"helioFee","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"configAccount","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"data","type":{"defined":"TradeParams"}}]},{"name":"migrateFunds","accounts":[{"name":"backendAuthority","isMut":false,"isSigner":true,"docs":["BE Authority"]},{"name":"migrationAuthority","isMut":true,"isSigner":true,"docs":["Migration Authority","Owner and Payer over Token Accounts, needs to be mutable"]},{"name":"curveAccount","isMut":true,"isSigner":false,"docs":["Curve Account","The account is closed after this instruction"]},{"name":"curveTokenAccount","isMut":true,"isSigner":false,"docs":["Curve Token Account","The account is closed after this instruction"]},{"name":"migrationAuthorityTokenAccount","isMut":true,"isSigner":false,"docs":["Authority token Account","Init on demand"]},{"name":"mint","isMut":true,"isSigner":false,"docs":["InterfaceAccount: checks program ownership + deserialize into Mint"]},{"name":"dexFeeAccount","isMut":true,"isSigner":false},{"name":"helioFeeAccount","isMut":true,"isSigner":false},{"name":"configAccount","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"configInit","accounts":[{"name":"configAuthority","isMut":true,"isSigner":true},{"name":"configAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"data","type":{"defined":"ConfigParams"}}]},{"name":"configUpdate","accounts":[{"name":"configAuthority","isMut":false,"isSigner":true},{"name":"configAccount","isMut":true,"isSigner":false}],"args":[{"name":"data","type":{"defined":"ConfigParams"}}]}],"accounts":[{"name":"ConfigAccount","type":{"kind":"struct","fields":[{"name":"migrationAuthority","type":"publicKey"},{"name":"backendAuthority","type":"publicKey"},{"name":"configAuthority","type":"publicKey"},{"name":"helioFee","type":"publicKey"},{"name":"dexFee","type":"publicKey"},{"name":"feeBps","type":"u16"},{"name":"dexFeeShare","type":"u8"},{"name":"migrationFee","type":"u64"},{"name":"marketcapThreshold","type":"u64"},{"name":"marketcapCurrency","type":{"defined":"Currency"}},{"name":"minSupportedDecimalPlaces","type":"u8"},{"name":"maxSupportedDecimalPlaces","type":"u8"},{"name":"minSupportedTokenSupply","type":"u64"},{"name":"maxSupportedTokenSupply","type":"u64"},{"name":"bump","type":"u8"},{"name":"coefB","type":"u32"}]}},{"name":"CurveAccount","type":{"kind":"struct","fields":[{"name":"totalSupply","type":"u64"},{"name":"curveAmount","type":"u64"},{"name":"mint","type":"publicKey"},{"name":"decimals","type":"u8"},{"name":"collateralCurrency","type":{"defined":"Currency"}},{"name":"curveType","type":{"defined":"CurveType"}},{"name":"marketcapThreshold","type":"u64"},{"name":"marketcapCurrency","type":{"defined":"Currency"}},{"name":"migrationFee","type":"u64"},{"name":"coefB","type":"u32"},{"name":"bump","type":"u8"},{"name":"migrationTarget","type":{"defined":"MigrationTarget"}}]}}],"types":[{"name":"TokenMintParams","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"decimals","type":"u8"},{"name":"collateralCurrency","type":"u8"},{"name":"amount","type":"u64"},{"name":"curveType","type":"u8"},{"name":"migrationTarget","type":"u8"}]}},{"name":"TradeParams","type":{"kind":"struct","fields":[{"name":"tokenAmount","type":"u64"},{"name":"collateralAmount","type":"u64"},{"name":"fixedSide","type":"u8"},{"name":"slippageBps","type":"u64"}]}},{"name":"ConfigParams","type":{"kind":"struct","fields":[{"name":"migrationAuthority","type":{"option":"publicKey"}},{"name":"backendAuthority","type":{"option":"publicKey"}},{"name":"configAuthority","type":{"option":"publicKey"}},{"name":"helioFee","type":{"option":"publicKey"}},{"name":"dexFee","type":{"option":"publicKey"}},{"name":"feeBps","type":{"option":"u16"}},{"name":"dexFeeShare","type":{"option":"u8"}},{"name":"migrationFee","type":{"option":"u64"}},{"name":"marketcapThreshold","type":{"option":"u64"}},{"name":"marketcapCurrency","type":{"option":"u8"}},{"name":"minSupportedDecimalPlaces","type":{"option":"u8"}},{"name":"maxSupportedDecimalPlaces","type":{"option":"u8"}},{"name":"minSupportedTokenSupply","type":{"option":"u64"}},{"name":"maxSupportedTokenSupply","type":{"option":"u64"}},{"name":"coefB","type":{"option":"u32"}}]}},{"name":"Currency","type":{"kind":"enum","variants":[{"name":"Sol"}]}},{"name":"CurveType","type":{"kind":"enum","variants":[{"name":"LinearV1"},{"name":"ConstantProductV1"}]}},{"name":"MigrationTarget","type":{"kind":"enum","variants":[{"name":"Raydium"},{"name":"Meteora"}]}},{"name":"TradeType","type":{"kind":"enum","variants":[{"name":"Buy"},{"name":"Sell"}]}},{"name":"FixedSide","type":{"kind":"enum","variants":[{"name":"ExactIn"},{"name":"ExactOut"}]}}],"events":[{"name":"TradeEvent","fields":[{"name":"amount","type":"u64","index":false},{"name":"collateralAmount","type":"u64","index":false},{"name":"dexFee","type":"u64","index":false},{"name":"helioFee","type":"u64","index":false},{"name":"allocation","type":"u64","index":false},{"name":"curve","type":"publicKey","index":false},{"name":"costToken","type":"publicKey","index":false},{"name":"sender","type":"publicKey","index":false},{"name":"type","type":{"defined":"TradeType"},"index":false},{"name":"label","type":"string","index":true}]},{"name":"MigrationEvent","fields":[{"name":"tokensMigrated","type":"u64","index":false},{"name":"tokensBurned","type":"u64","index":false},{"name":"collateralMigrated","type":"u64","index":false},{"name":"fee","type":"u64","index":false},{"name":"label","type":"string","index":true}]}],"errors":[{"code":6000,"name":"InsufficientBalance","msg":"Insufficient SOL to pay for the transaction."},{"code":6001,"name":"InvalidAmount","msg":"The amount must be available in the curve ."},{"code":6002,"name":"InvalidSlippage","msg":"The slippage must be under 100 percent."},{"code":6003,"name":"SlippageOverflow","msg":"The cost amount is not in the allowed slippage interval."},{"code":6004,"name":"ThresholdReached","msg":"Threshold limit exceeded."},{"code":6005,"name":"InvalidTokenAccount","msg":"Trade disabled, market cap threshold reached."},{"code":6006,"name":"InvalidCurveAccount","msg":"Invalid curve account."},{"code":6007,"name":"InvalidFeeAccount","msg":"Invalid fee account address."},{"code":6008,"name":"CurveLimit","msg":"Curve limit exceeded."},{"code":6009,"name":"InvalidCurveType","msg":"Invalid curve type."},{"code":6010,"name":"InvalidCurrency","msg":"Invalid currency."},{"code":6011,"name":"Arithmetics","msg":"Artithmetics error"},{"code":6012,"name":"ThresholdNotHit","msg":"Market Cap threshold not hit, cannot migrate funds yet"},{"code":6013,"name":"InvalidAuthority","msg":"Invalid Authority provided."},{"code":6014,"name":"TradeAmountTooLow","msg":"Trade amount too low , resulting in 0 costs"},{"code":6015,"name":"ConfigFieldMissing","msg":"Config field needs to be present during initialization"},{"code":6016,"name":"DifferentCurrencies","msg":"Unsupported different currency types"},{"code":6017,"name":"BasisPointTooHigh","msg":"Basis points too high"},{"code":6018,"name":"FeeShareTooHigh","msg":"Fee share too High"},{"code":6019,"name":"TokenDecimalsOutOfRange","msg":"Token decimals are not within the supported range"},{"code":6020,"name":"TokenNameTooLong","msg":"Token Name too long, max supported length is 32 bytes"},{"code":6021,"name":"TokenSymbolTooLong","msg":"Token Symbol too long, max supported length is 10 bytes"},{"code":6022,"name":"TokenURITooLong","msg":"Token URI too long, max supported length is 200 bytes"},{"code":6023,"name":"IncorrectDecimalPlacesBounds","msg":"Minimum Decimal Places cannot be lower than Maximum Decimal Places"},{"code":6024,"name":"IncorrectTokenSupplyBounds","msg":"Minimum Token Supply cannot be lower than Maximum Token Supply"},{"code":6025,"name":"TotalSupplyOutOfBounds","msg":"Token Total Supply out of bounds"},{"code":6026,"name":"FinalCollateralTooLow","msg":"This setup will produce final collateral amount less than the migration fee"},{"code":6027,"name":"CoefficientZero","msg":"One of the Coefficients is equal to ZERO"},{"code":6028,"name":"MarketCapThresholdTooLow","msg":"Market cap Threshold under the Hard lower bound limits"},{"code":6029,"name":"CoefBOutofBounds","msg":"Default coef_b set out of hard limit bounds"},{"code":6030,"name":"IncorrectMarketCap","msg":"For Constant Product the Market Cap threshold cannot be higher than 325 SOL"},{"code":6031,"name":"IncorrectDecimals","msg":"For Constant Product the Decimal places cannot be other than 9"},{"code":6032,"name":"IncorrectMaxSupply","msg":"For Constant Product the Maximal Token Supply cannot be other than 1_000_000_000"},{"code":6033,"name":"MarketCapTooHigh","msg":"Market Cap Threshold set too high, will not be hit even if Curve Hard Limit reached"},{"code":6034,"name":"InvalidMigrationTarget","msg":"This Migration Target is not supported!"},{"code":6035,"name":"General","msg":"General error"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/numeraire.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.json b/olddocs/archivekbot2/idls/numeraire.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.json new file mode 100644 index 0000000..fb67676 --- /dev/null +++ b/olddocs/archivekbot2/idls/numeraire.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.json @@ -0,0 +1 @@ +{"address":"NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P","metadata":{"name":"numeraire","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_liquidity","docs":["Pool Owner/Whitelist only functions"],"discriminator":[181,157,89,67,143,182,52,72],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"payer_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_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":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"AddLiquidityData"}}}],"returns":"u64"},{"name":"compound","discriminator":[165,208,251,78,242,160,141,47],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"payer_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_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":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"create_pool","discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"arg","path":"data.pool_seed"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"creator_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_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":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"CreateStablePoolData"}}}]},{"name":"init_virtual_stable_pair","discriminator":[228,18,163,161,101,204,106,172],"accounts":[{"name":"x_mint"},{"name":"pair","writable":true,"pda":{"seeds":[{"kind":"account","path":"x_mint"},{"kind":"arg","path":"data.pair_seed"}]}},{"name":"pair_authority","pda":{"seeds":[{"kind":"account","path":"pair"},{"kind":"const","value":[97,117,116,104,111,114,105,116,121]}]}},{"name":"x_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"pair"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"x_adder","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"x_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":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"]},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"InitVirtualStablePairData"}}}]},{"name":"remove_all_liquidity","discriminator":[10,51,61,35,112,105,24,85],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"payer_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_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":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"remove_liquidity","discriminator":[80,85,209,72,24,206,177,108],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"payer_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_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":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"RemoveLiquidityData"}}}],"returns":"u64"},{"name":"set_fee","discriminator":[18,154,24,18,237,214,19,80],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"payer","signer":true}],"args":[{"name":"data","type":{"defined":{"name":"SetFeeData"}}}]},{"name":"set_inv_t_max","discriminator":[218,209,244,237,211,236,98,58],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"payer","signer":true}],"args":[{"name":"data","type":{"defined":{"name":"SetInvTMaxData"}}}]},{"name":"set_lp_token_metadata","discriminator":[71,73,56,155,202,142,100,150],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"metadata_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"account","path":"token_metadata_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"account","path":"token_metadata_program"}}},{"name":"payer","signer":true},{"name":"token_metadata_program","docs":["Solana ecosystem accounts"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"instructions","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SetMetadataData"}}}]},{"name":"set_numeraire_owner","discriminator":[6,199,177,104,86,61,93,253],"accounts":[{"name":"numeraire_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pair_mint","optional":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","docs":["Solana ecosystem accounts"],"address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SetOwnerData"}}}]},{"name":"set_numeraire_status","discriminator":[10,17,5,71,204,171,126,173],"accounts":[{"name":"numeraire_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pair_mint","optional":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","docs":["Solana ecosystem accounts"],"address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SetStatusData"}}}]},{"name":"set_numeraire_whitelisted_pool_creator","discriminator":[147,51,31,255,111,2,189,173],"accounts":[{"name":"numeraire_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pair_mint","optional":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","docs":["Solana ecosystem accounts"],"address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SetWhilelistedAddrData"}}}]},{"name":"set_owner","discriminator":[72,202,120,52,77,128,96,197],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"payer","signer":true}],"args":[{"name":"data","type":{"defined":{"name":"SetOwnerData"}}}]},{"name":"set_rate","discriminator":[99,58,170,238,160,120,74,11],"accounts":[{"name":"numeraire_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pair_mint","optional":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","docs":["Solana ecosystem accounts"],"address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SetRateData"}}}]},{"name":"set_status","docs":["Pool Owner only functions"],"discriminator":[181,184,224,203,193,29,177,224],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"payer","signer":true}],"args":[{"name":"data","type":{"defined":{"name":"SetStatusData"}}}]},{"name":"set_whitelisted_adder","discriminator":[74,38,140,129,228,73,236,105],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"payer","signer":true}],"args":[{"name":"data","type":{"defined":{"name":"SetWhilelistedAddrData"}}}]},{"name":"skim","discriminator":[238,120,221,138,82,60,100,218],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"payer_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_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":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"swap_exact_in","discriminator":[104,104,131,86,161,189,180,216],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"in_mint","writable":true},{"name":"out_mint","writable":true},{"name":"in_trader","writable":true},{"name":"out_trader","writable":true},{"name":"in_vault","writable":true,"optional":true},{"name":"out_vault","writable":true,"optional":true},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","docs":["The trader account (executing the swap, paying for all rents)"],"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"SwapExactInHintlessData"}}}],"returns":"u64"},{"name":"swap_exact_in_hinted","discriminator":[98,239,244,233,16,236,40,49],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"in_mint","writable":true},{"name":"out_mint","writable":true},{"name":"in_trader","writable":true},{"name":"out_trader","writable":true},{"name":"in_vault","writable":true,"optional":true},{"name":"out_vault","writable":true,"optional":true},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","docs":["The trader account (executing the swap, paying for all rents)"],"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"SwapExactInData"}}}],"returns":"u64"},{"name":"swap_exact_in_quote","discriminator":[68,209,177,170,185,100,29,191],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"in_mint","writable":true},{"name":"out_mint","writable":true},{"name":"in_trader","writable":true},{"name":"out_trader","writable":true},{"name":"in_vault","writable":true,"optional":true},{"name":"out_vault","writable":true,"optional":true},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","docs":["The trader account (executing the swap, paying for all rents)"],"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"SwapExactInData"}}}],"returns":"u64"},{"name":"swap_exact_out","discriminator":[250,73,101,33,38,207,75,184],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"in_mint","writable":true},{"name":"out_mint","writable":true},{"name":"in_trader","writable":true},{"name":"out_trader","writable":true},{"name":"in_vault","writable":true,"optional":true},{"name":"out_vault","writable":true,"optional":true},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","docs":["The trader account (executing the swap, paying for all rents)"],"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"SwapExactOutHintlessData"}}}],"returns":"u64"},{"name":"swap_exact_out_hinted","discriminator":[153,208,206,70,62,234,98,182],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"in_mint","writable":true},{"name":"out_mint","writable":true},{"name":"in_trader","writable":true},{"name":"out_trader","writable":true},{"name":"in_vault","writable":true,"optional":true},{"name":"out_vault","writable":true,"optional":true},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","docs":["The trader account (executing the swap, paying for all rents)"],"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"SwapExactOutData"}}}],"returns":"u64"}],"accounts":[{"name":"NumeraireConfig","discriminator":[230,62,124,43,102,101,88,63]},{"name":"StablePool","discriminator":[239,91,93,162,171,14,42,66]},{"name":"VirtualStablePair","discriminator":[112,153,135,223,53,247,129,101]}],"events":[{"name":"AddLiquidity","discriminator":[31,94,125,90,227,52,61,186]},{"name":"Quote","discriminator":[133,244,92,134,193,24,187,158]},{"name":"RemoveLiquidity","discriminator":[116,244,97,232,103,31,152,58]},{"name":"SwapExactIn","discriminator":[147,136,213,11,150,23,141,152]},{"name":"SwapExactOut","discriminator":[71,66,127,123,231,29,227,92]}],"errors":[{"code":6000,"name":"OnlyOwner","msg":"Attempt to call an owner only function not by the owner"},{"code":6001,"name":"InvalidTokenAccountData","msg":"Token account data is not as expected"},{"code":6002,"name":"InvalidAccountData","msg":"Account data is not as expected"},{"code":6003,"name":"DecimalsMismatch","msg":"Token pair decimals mismatch"},{"code":6004,"name":"InvalidTokenExtension","msg":"Token should not have this extension"},{"code":6005,"name":"IncorrectAccounts","msg":"Wrong account(s) passed as input"},{"code":6006,"name":"IncorrectAuthority","msg":"Wrong authority passed as input"},{"code":6007,"name":"InvalidDelegate","msg":"Delegate not allowed"},{"code":6008,"name":"UnsupportedFeature","msg":"This feature is currently unsupported or unenabled"},{"code":6009,"name":"FunctionPaused","msg":"This function is currently paused"},{"code":6010,"name":"InvalidFee","msg":"Fee must be less than 100 basis points"},{"code":6011,"name":"InvalidPoolCreate","msg":"Token mints must be ordered by pubkey"},{"code":6012,"name":"InvalidCurveParams","msg":"Curve params must be positive"},{"code":6013,"name":"InsufficientLiquidity","msg":"Pool has too little liquidity for action"},{"code":6014,"name":"LiquidityAddUnbalanced","msg":"Liquidity add does not make pool balanced (or curve params are asymmetric)"},{"code":6015,"name":"InsufficientBalance","msg":"Input is more than trader balance"},{"code":6016,"name":"InputTooSmall","msg":"Input is below the minimum expected"},{"code":6017,"name":"InputTooBig","msg":"Input is more than available liquidity"},{"code":6018,"name":"OutputTooSmall","msg":"Output is below the minimum expected"},{"code":6019,"name":"InvariantOverflow","msg":"Invariant computation overflowed"},{"code":6020,"name":"InvariantViolated","msg":"Invariant does not hold"},{"code":6021,"name":"LiquidityAddTooSmall","msg":"Depositing too little liquidity"},{"code":6022,"name":"UnsupportedTokenProgram","msg":"Only Token Program 2022 and/or Token Program are supported"},{"code":6023,"name":"InvalidPoolWeights","msg":"Some pool weights are zero or nonzero and shouldn't be"},{"code":6024,"name":"SwapOverflowError","msg":"A swap math operation overflowed"},{"code":6025,"name":"LiquidityMathOverflow","msg":"An add/remove liquidity math operation overflowed"},{"code":6026,"name":"InvalidBalanceDeltas","msg":"Some add/remove balance deltas are nonzero and shouldn't be"},{"code":6027,"name":"InvalidPoolParams","msg":"The provided pool params were not well formed"},{"code":6028,"name":"InvalidHints","msg":"The hints provided do not bound the swap amounts"},{"code":6029,"name":"FeeError","msg":"Unexpected fee result"},{"code":6030,"name":"VaultOverflowError","msg":"A vault math operation overflowed"},{"code":6031,"name":"OutputTooBig","msg":"Output is above the maximum expected"},{"code":6032,"name":"Unreachable","msg":"This cannot happen"},{"code":6033,"name":"InvalidAction","msg":"This action is not allowed"}],"types":[{"name":"AddLiquidity","type":{"kind":"struct","fields":[{"name":"lp_token_mint_amount","type":"u64"},{"name":"x_reserve_deltas","type":{"array":["u64",10]}},{"name":"y_reserve_deltas","type":{"array":["u64",10]}},{"name":"inv_L_deltas","type":{"array":["u64",10]}},{"name":"min_lp_token_mint_amount","type":"u64"},{"name":"trader","type":"pubkey"},{"name":"pool","type":"pubkey"}]}},{"name":"AddLiquidityData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"max_amounts_in","type":{"array":["u64",10]}},{"name":"min_lp_token_mint_amount","type":"u64"},{"name":"take_swaps","type":"u8"},{"name":"swap_paths","type":{"array":["u8",10]}},{"name":"swap_amounts","type":{"array":["u64",10]}}]}},{"name":"CreateStablePoolData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"decimals","type":"u8"},{"name":"fee_num","type":"u32"},{"name":"fee_denom","type":"u32"},{"name":"pool_seed","type":"pubkey"},{"name":"weights","type":{"array":["u32",10]}},{"name":"inv_T","type":"u64"},{"name":"inv_T_max","type":"u64"}]}},{"name":"InitVirtualStablePairData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"decimals","type":"u8"},{"name":"init_amount","type":"u64"},{"name":"curve_Amp","type":"u128"},{"name":"curve_a","type":"u128"},{"name":"curve_b","type":"u128"},{"name":"curve_alpha","type":"u64"},{"name":"curve_beta","type":"u64"},{"name":"pair_seed","type":"pubkey"}]}},{"name":"NumeraireConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"status","type":"u32"},{"name":"rate_mints","type":{"array":["pubkey",10]}},{"name":"rate_nums","type":{"array":["u32",10]}},{"name":"rate_denoms","type":{"array":["u32",10]}},{"name":"_padding","type":{"array":["u8",12]}},{"name":"padding","type":{"array":["u8",1024]}}]}},{"name":"Quote","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"RemoveLiquidity","type":{"kind":"struct","fields":[{"name":"lp_token_redeem_amount","type":"u64"},{"name":"x_reserve_deltas","type":{"array":["u64",10]}},{"name":"y_reserve_deltas","type":{"array":["u64",10]}},{"name":"inv_L_deltas","type":{"array":["u64",10]}},{"name":"min_amounts_out","type":{"array":["u64",10]}},{"name":"trader","type":"pubkey"},{"name":"pool","type":"pubkey"}]}},{"name":"RemoveLiquidityData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"lp_token_redeem_amount","type":"u64"},{"name":"min_amounts_out","type":{"array":["u64",10]}},{"name":"out_index","type":"u8"}]}},{"name":"SetFeeData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"fee_num","type":"u32"},{"name":"fee_denom","type":"u32"}]}},{"name":"SetInvTMaxData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"inv_T_max","type":"u64"}]}},{"name":"SetMetadataData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"SetOwnerData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"}]}},{"name":"SetRateData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"rate_mint","type":"pubkey"},{"name":"rate_num","type":"u32"},{"name":"rate_denom","type":"u32"}]}},{"name":"SetStatusData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"status","type":"u32"}]}},{"name":"SetWhilelistedAddrData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"whitelisted_addr","type":"pubkey"}]}},{"name":"StablePool","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pool_seed","type":"pubkey"},{"name":"lp_mint","type":"pubkey"},{"name":"whitelisted_adder","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"inv_T","type":"u64"},{"name":"inv_T_max","type":"u64"},{"name":"pairs","type":{"array":[{"defined":{"name":"VirtualStablePair"}},10]}},{"name":"weights","type":{"array":["u32",10]}},{"name":"total_weight","type":"u64"},{"name":"status","type":"u32"},{"name":"fee_num","type":"u32"},{"name":"fee_denom","type":"u32"},{"name":"decimals","type":"u8"},{"name":"num_stables","type":"u8"},{"name":"_padding","type":{"array":["u8",2]}},{"name":"padding","type":{"array":["u8",128]}}]}},{"name":"SwapExactIn","type":{"kind":"struct","fields":[{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"min_amount_out","type":"u64"},{"name":"trader","type":"pubkey"},{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"pool","type":"pubkey"}]}},{"name":"SwapExactInData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"exact_amount_in","type":"u64"},{"name":"min_amount_out","type":"u64"},{"name":"hints","type":{"array":["u64",10]}},{"name":"path_hints","type":{"array":["u8",10]}}]}},{"name":"SwapExactInHintlessData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"exact_amount_in","type":"u64"},{"name":"min_amount_out","type":"u64"}]}},{"name":"SwapExactOut","type":{"kind":"struct","fields":[{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"max_amount_in","type":"u64"},{"name":"trader","type":"pubkey"},{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"pool","type":"pubkey"}]}},{"name":"SwapExactOutData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"exact_amount_out","type":"u64"},{"name":"max_amount_in","type":"u64"},{"name":"hints","type":{"array":["u64",10]}},{"name":"path_hints","type":{"array":["u8",10]}}]}},{"name":"SwapExactOutHintlessData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"exact_amount_out","type":"u64"},{"name":"max_amount_in","type":"u64"}]}},{"name":"VirtualStablePair","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pair_authority","type":"pubkey"},{"name":"x_reserve_amount","type":"u64"},{"name":"y_reserve","type":"u64"},{"name":"curve_Amp","docs":["Curve params. Define bonding curve shape: x + y + a + b - A / (x + a) - A / (y + b) - D = 0"],"type":"u128"},{"name":"curve_a","type":"u128"},{"name":"curve_b","type":"u128"},{"name":"inv_L","docs":["Invariant constant. For invariant: x/L + y/L + a + b - A / (x/L + a) - A / (y/L + b) - D = 0"],"type":"u128"},{"name":"owner","type":"pubkey"},{"name":"x_mint","type":"pubkey"},{"name":"x_vault","type":"pubkey"},{"name":"curve_alpha","type":"u64"},{"name":"curve_beta","type":"u64"},{"name":"newest_rate_num","type":"u32"},{"name":"newest_rate_denom","type":"u32"},{"name":"decimals","type":"u8"},{"name":"pair_index","type":"u8"},{"name":"x_is_2022","type":"u8"},{"name":"_padding","type":{"array":["u8",5]}},{"name":"padding","type":{"array":["u8",128]}}]}}],"constants":[{"name":"AUTHORITY_SEED","type":"bytes","value":"[97, 117, 116, 104, 111, 114, 105, 116, 121]"},{"name":"CONFIG_SEED","type":"bytes","value":"[99, 111, 110, 102, 105, 103]"},{"name":"LIQUIDITY_SEED","type":"bytes","value":"[108, 105, 113, 117, 105, 100, 105, 116, 121]"},{"name":"LP_TOKEN_PROGRAM","type":"pubkey","value":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"MAX_STABLES_PER_POOL","type":"u8","value":"10"},{"name":"NORMALIZED_VALUE_DECIMALS","type":"u8","value":"6"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/okx_dex_router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.json b/olddocs/archivekbot2/idls/okx_dex_router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.json new file mode 100644 index 0000000..0366a0a --- /dev/null +++ b/olddocs/archivekbot2/idls/okx_dex_router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.json @@ -0,0 +1 @@ +{"address":"proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u","metadata":{"name":"OKX: DEX Router","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"claim","discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"signer","writable":true,"signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"receiver","writable":true},{"name":"source_token_account","writable":true,"optional":true},{"name":"destination_token_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"address":"ARu4n5mFdZogZAravu7CcizaojWnS6oqka37gdLT5SZn"},{"name":"token_mint","optional":true},{"name":"token_program","optional":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"claim_cashback_pumpfun","discriminator":[83,1,245,125,201,207,209,249],"accounts":[{"name":"signer","signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"sa_authority","docs":["PumpFun transfers claimed SOL directly to this account (account[0] in the CPI)."],"writable":true,"address":"ARu4n5mFdZogZAravu7CcizaojWnS6oqka37gdLT5SZn"},{"name":"user_volume_accumulator","docs":["Holds native SOL accumulated as cashback; emptied by PumpFun during claim."],"writable":true},{"name":"receiver","docs":["after PumpFun deposits it there."],"writable":true},{"name":"event_authority","address":"Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pumpfun_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[]},{"name":"claim_cashback_pumpswap","discriminator":[253,242,176,173,217,78,100,25],"accounts":[{"name":"signer","signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"sa_authority","writable":true,"address":"ARu4n5mFdZogZAravu7CcizaojWnS6oqka37gdLT5SZn"},{"name":"user_volume_accumulator","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"spl_token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"uva_wsol_ata","writable":true},{"name":"sa_wsol_ata","docs":["PumpSwap requires account[5] to be a token account owned by authority_pda","(same owner as user_volume_accumulator). WSOL is deposited here by PumpSwap,","then forwarded to receiver_wsol_ata via a second SPL transfer."],"writable":true},{"name":"receiver_wsol_ata","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"event_authority","address":"GS4CU59F31iL7aR2Q8zVS8DRrcRnXX1yjQ66TqNVQnaR"},{"name":"pumpswap_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"}],"args":[]},{"name":"create_token_account","discriminator":[147,241,123,100,244,132,174,118],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner"},{"name":"token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_mint"},{"kind":"account","path":"owner"}]}},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bump","type":"u8"}]},{"name":"create_token_account_with_seed","discriminator":[125,191,239,140,66,8,9,228],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner"},{"name":"token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_mint"},{"kind":"account","path":"owner"},{"kind":"arg","path":"seed"}]}},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bump","type":"u8"},{"name":"seed","type":"u32"}]},{"name":"init_token_ledger","discriminator":[157,116,66,59,137,180,49,157],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"token_ledger","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u8"}]},{"name":"proxy_swap","discriminator":[19,44,130,148,72,56,44,238],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"sa_authority","optional":true,"pda":{"seeds":[{"kind":"const","value":[111,107,120,95,115,97]}]}},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"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":"args","type":{"defined":{"name":"SwapArgs"}}}]},{"name":"set_token_ledger","discriminator":[228,85,185,112,78,79,77,2],"accounts":[{"name":"token_ledger","writable":true},{"name":"token_account","docs":["SPL / Token-2022 token account to snapshot."]}],"args":[]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"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":"args","type":{"defined":{"name":"SwapArgs"}}}]},{"name":"swap_tob","discriminator":[170,41,85,177,132,80,31,53],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"}]},{"name":"swap_tob_enhanced","discriminator":[190,156,169,176,149,154,161,108],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"},{"name":"charge_rate","type":"u16"}]},{"name":"swap_tob_v2","docs":["Used to support commission distribution between parent and child nodes in TOB business"],"discriminator":[72,1,215,242,8,75,54,216],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"parent_commission_account","writable":true},{"name":"child_commission_account","writable":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"total_commission_info","type":"u32"},{"name":"parent_commission_rate","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"}]},{"name":"swap_tob_with_receiver","discriminator":[223,170,216,234,204,6,241,25],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"name":"sol_receiver","docs":["Optional SOL receiver account","- None: normal swap or SOL stays with payer","- Some: SOL receiver when converting wSOL -> SOL"],"writable":true,"optional":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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"}]},{"name":"swap_tob_with_receiver_token_ledger","discriminator":[239,93,10,202,161,134,127,130],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"name":"sol_receiver","docs":["Optional SOL receiver account","- None: normal swap or SOL stays with payer","- Some: SOL receiver when converting wSOL -> SOL"],"writable":true,"optional":true},{"name":"token_ledger"},{"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":"args","type":{"defined":{"name":"SwapArgsTokenLedger"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"}]},{"name":"swap_tob_with_token_ledger","discriminator":[36,92,147,219,26,176,159,90],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"name":"token_ledger"},{"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":"args","type":{"defined":{"name":"SwapArgsTokenLedger"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"}]},{"name":"swap_toc","discriminator":[187,201,212,51,16,155,236,60],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"}]},{"name":"swap_toc_v2","docs":["Used to support commission distribution between parent and child nodes in TOC business"],"discriminator":[127,214,107,189,23,90,47,104],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"parent_commission_account","writable":true},{"name":"child_commission_account","writable":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"total_commission_info","type":"u32"},{"name":"parent_commission_rate","type":"u32"},{"name":"platform_fee_rate","type":"u16"}]},{"name":"wrap_unwrap","discriminator":[220,101,139,249,41,190,118,199],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"payer_wsol_account","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"temp_wsol_account","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[116,101,109,112,95,119,115,111,108]},{"kind":"account","path":"payer"}]}},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"authority_pda","docs":["Used for signing fee transfers from authority_pda (SOL) or wsol_sa (WSOL)"],"writable":true,"optional":true},{"name":"wsol_sa","docs":["This is the authority_pda's associated token account for WSOL"],"writable":true,"optional":true},{"name":"token_program"},{"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":"args","type":{"defined":{"name":"PlatformFeeWrapUnwrapArgs"}}}]},{"name":"wrap_unwrap_with_receiver","docs":["Wrap/Unwrap with optional specified receiver","- Wrap (SOL -> WSOL): receiver is WSOL token account (ATA)","- Unwrap (WSOL -> SOL): receiver is system account (EOA)","Transfer amount:","- From fee: amount_in","- To fee: amount_in - fees"],"discriminator":[123,25,47,134,233,167,171,170],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"payer_wsol_account","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"temp_wsol_account","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[116,101,109,112,95,119,115,111,108]},{"kind":"account","path":"payer"}]}},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"authority_pda","docs":["Used for signing fee transfers from authority_pda (SOL) or wsol_sa (WSOL)"],"writable":true,"optional":true},{"name":"wsol_sa","docs":["This is the authority_pda's associated token account for WSOL"],"writable":true,"optional":true},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"receiver","docs":["- Wrap: WSOL token account (ATA) to receive WSOL","- Unwrap: System account (EOA) to receive SOL"],"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":"args","type":{"defined":{"name":"PlatformFeeWrapUnwrapArgs"}}}]}],"accounts":[{"name":"TokenLedger","discriminator":[156,247,9,188,54,108,85,77]}],"events":[{"name":"SwapCpiEvent2","discriminator":[21,94,224,53,220,232,193,94]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"SwapTobV2CpiEvent2","discriminator":[244,105,184,90,60,165,36,33]},{"name":"SwapTocV2CpiEvent2","discriminator":[102,16,181,62,201,71,212,41]},{"name":"SwapWithFeesCpiEvent2","discriminator":[12,134,38,93,167,151,42,69]},{"name":"SwapWithFeesCpiEventEnhanced2","discriminator":[84,79,219,247,218,156,219,177]}],"errors":[{"code":6000,"name":"RoutesCannotBeEmpty","msg":"Routes cannot be empty"},{"code":6001,"name":"TooManyRoutes","msg":"Too many routes"},{"code":6002,"name":"MultipleOrNoOutputNode","msg":"Multiple or no output node"},{"code":6003,"name":"MultipleOrNoInputNode","msg":"Multiple or no input node"},{"code":6004,"name":"NotAllNodesProcessed","msg":"Not all nodes are processed"},{"code":6005,"name":"InputIndexShouldStartFromZero","msg":"Input index should start from zero"},{"code":6006,"name":"CircularDependency","msg":"Circular dependency detected in DAG"},{"code":6007,"name":"InvalidWeight","msg":"Invalid weight"},{"code":6008,"name":"InvalidNodeOrder","msg":"Invalid node order"},{"code":6009,"name":"TargetNodeNotFound","msg":"Target node not found"},{"code":6010,"name":"MinReturnNotReached","msg":"Min return not reached"},{"code":6011,"name":"AmountInMustBeGreaterThanZero","msg":"amount_in must be greater than 0"},{"code":6012,"name":"SlippageTooHigh","msg":"slippage must be less than or equal to 100%"},{"code":6013,"name":"InvalidExpectAmountOut","msg":"invalid expect amount out"},{"code":6014,"name":"WeightsMustSumTo100","msg":"weights must sum to 100%"},{"code":6015,"name":"InvalidShareAmount","msg":"Invalid share amount"},{"code":6016,"name":"InvalidCommissionRate","msg":"Invalid commission rate"},{"code":6017,"name":"InvalidParentCommissionRate","msg":"Invalid parent commission rate"},{"code":6018,"name":"InvalidTrimRate","msg":"Invalid trim rate"},{"code":6019,"name":"InvalidChargeRate","msg":"Invalid charge rate"},{"code":6020,"name":"InvalidCommissionTemporaryTokenAccount","msg":"Invalid commission temporary token account"},{"code":6021,"name":"InvalidAccountsLength","msg":"Invalid accounts length"},{"code":6022,"name":"SwapAuthorityIsNotSigner","msg":"Swap authority is not signer"},{"code":6023,"name":"InvalidAuthorityPda","msg":"Invalid authority pda"},{"code":6024,"name":"InvalidSwapAuthority","msg":"Invalid swap authority"},{"code":6025,"name":"InvalidProgramId","msg":"Invalid program id"},{"code":6026,"name":"InvalidPool","msg":"Invalid pool"},{"code":6027,"name":"InvalidTokenMint","msg":"Invalid token mint"},{"code":6028,"name":"CalculationError","msg":"Calculation error"},{"code":6029,"name":"InvalidSanctumLstStateListData","msg":"Invalid sanctum lst state list data"},{"code":6030,"name":"InvalidSanctumLstStateListIndex","msg":"Invalid sanctum lst state list index"},{"code":6031,"name":"InvalidSanctumSwapAccounts","msg":"Invalid sanctum swap accounts"},{"code":6032,"name":"InvalidSwapAuthorityAccount","msg":"Invalid swap authority account"},{"code":6033,"name":"InvalidBridgeSeed","msg":"Bridge Seed Error"},{"code":6034,"name":"InvalidBundleInput","msg":"Invalid accounts and instruction length"},{"code":6035,"name":"InvalidPlatformFeeRate","msg":"Invalid platform fee rate"},{"code":6036,"name":"AmountOutMustBeGreaterThanZero","msg":"Amount out must be greater than 0"},{"code":6037,"name":"InvalidDampingTerm","msg":"Invalid DampingTerm"},{"code":6038,"name":"InvalidMint","msg":"Invalid mint"},{"code":6039,"name":"InvalidPlatformFeeAccount","msg":"Invalid platform fee account"},{"code":6040,"name":"InvalidTrimAccount","msg":"Invalid trim account"},{"code":6041,"name":"InvalidChargeAccount","msg":"Invalid charge account"},{"code":6042,"name":"InvalidPlatformFeeAmount","msg":"Invalid platform fee amount"},{"code":6043,"name":"InvalidFeeTokenAccount","msg":"Invalid fee token account"},{"code":6044,"name":"InvalidSaAuthority","msg":"Invalid sa authority"},{"code":6045,"name":"InvalidNodeFromAccounts","msg":"Invalid node from accounts"},{"code":6046,"name":"InvalidNodeToAccounts","msg":"Invalid node to accounts"},{"code":6047,"name":"InvalidSourceTokenAccount","msg":"Invalid source token account"},{"code":6048,"name":"InvalidTokenAccount","msg":"Invalid token account"},{"code":6049,"name":"InvalidDestinationTokenAccount","msg":"Invalid destination token account"},{"code":6050,"name":"CommissionAccountIsNone","msg":"Commission account is none"},{"code":6051,"name":"PlatformFeeAccountIsNone","msg":"Platform fee account is none"},{"code":6052,"name":"TrimAccountIsNone","msg":"Trim account is none"},{"code":6053,"name":"ChargeAccountIsNone","msg":"Charge account is none"},{"code":6054,"name":"InvalidFeeAccount","msg":"Invalid fee account"},{"code":6055,"name":"InvalidTokenOwner","msg":"Invalid token owner"},{"code":6056,"name":"SaAuthorityIsNone","msg":"Sa authority is none"},{"code":6057,"name":"SourceTokenSaIsNone","msg":"Source token sa is none"},{"code":6058,"name":"SourceTokenProgramIsNone","msg":"Source token program is none"},{"code":6059,"name":"DestinationTokenSaIsNone","msg":"Destination token sa is none"},{"code":6060,"name":"DestinationTokenProgramIsNone","msg":"Destination token program is none"},{"code":6061,"name":"ResultMustBeGreaterThanZero","msg":"Calculation result must be greater than zero"},{"code":6062,"name":"InvalidAccountData","msg":"Invalid account data"},{"code":6063,"name":"InvalidRfqParameters","msg":"Invalid RFQ parameters"},{"code":6064,"name":"TobAuthorityPdaRequired","msg":"TOB mode requires authority PDA"},{"code":6065,"name":"TobWsolSaRequired","msg":"TOB mode with WSOL fees requires wsol_sa account"},{"code":6066,"name":"InvalidWsolSa","msg":"Invalid WSOL SA account"},{"code":6067,"name":"InvalidCommissionAccount","msg":"Invalid commission account"},{"code":6068,"name":"InvalidActualAmountIn","msg":"Invalid actual amount in"},{"code":6069,"name":"UnexpectedSaTokenAccount","msg":"Unexpected SA token account in CPI"},{"code":6070,"name":"InvalidSourceTokenSaMint","msg":"Invalid source token sa mint"},{"code":6071,"name":"InvalidDestinationTokenSaMint","msg":"Invalid destination token sa mint"},{"code":6072,"name":"InsufficientFunds","msg":"Insufficient funds"},{"code":6073,"name":"SaAuthorityLamportsDecreased","msg":"Sa authority lamports decreased"},{"code":6074,"name":"InvalidTokenProgram","msg":"Invalid token program"},{"code":6075,"name":"InvalidSigner","msg":"Invalid signer"},{"code":6076,"name":"InvalidAssociatedTokenProgram","msg":"Invalid associated token program"},{"code":6077,"name":"TokenProgramIsNone","msg":"Token program is none"},{"code":6078,"name":"AssociatedTokenProgramIsNone","msg":"Associated token program is none"},{"code":6079,"name":"SystemProgramIsNone","msg":"System program is none"},{"code":6080,"name":"InsufficientBalance","msg":"Insufficient balance for transfer"},{"code":6081,"name":"SolReceiverMustBeSystemAccount","msg":"SOL receiver must be a system account"},{"code":6082,"name":"SolReceiverRequiresAccCloseFlag","msg":"SOL receiver requires acc_close_flag to be true"},{"code":6083,"name":"DestinationMustBeWsolForSolReceiver","msg":"Destination must be wSOL when sol_receiver is specified"},{"code":6084,"name":"InvalidGoonfiParameters","msg":"Invalid goonfi parameters"},{"code":6085,"name":"AdapterAbort","msg":"Adapter abort"},{"code":6086,"name":"InconsistentFeeAccountTypes","msg":"Inconsistent fee account types"},{"code":6087,"name":"ReceiverMustBeTokenAccount","msg":"Receiver must be a token account"},{"code":6088,"name":"ReceiverMustBeWsolAccount","msg":"Receiver must be a WSOL token account"},{"code":6089,"name":"InconsistentCommissionAndTrimAccountTypes","msg":"The commission fee account and trim account are different types."},{"code":6090,"name":"NoAvailableNodeIndexForReturnToStart","msg":"No available node index to support returning to START_INDEX"},{"code":6091,"name":"InvalidTokenLedgerTokenAccount","msg":"Invalid token ledger token account"},{"code":6092,"name":"TokenLedgerDeltaCalculationFailure","msg":"Token ledger delta calculation failed"},{"code":6093,"name":"InvalidTokenAccountOwner","msg":"Token account wallet owner mismatch"},{"code":6094,"name":"CashbackFlagMismatch","msg":"Cashback flag mismatch"}],"types":[{"name":"Dex","type":{"kind":"enum","variants":[{"name":"SplTokenSwap"},{"name":"StableSwap"},{"name":"Whirlpool"},{"name":"MeteoraDynamicpool"},{"name":"RaydiumSwap"},{"name":"RaydiumStableSwap"},{"name":"RaydiumClmmSwap"},{"name":"AldrinExchangeV1"},{"name":"AldrinExchangeV2"},{"name":"LifinityV1"},{"name":"LifinityV2"},{"name":"RaydiumClmmSwapV2"},{"name":"FluxBeam"},{"name":"MeteoraDlmm"},{"name":"RaydiumCpmmSwap"},{"name":"OpenBookV2"},{"name":"WhirlpoolV2"},{"name":"Phoenix"},{"name":"ObricV2"},{"name":"SanctumAddLiq"},{"name":"SanctumRemoveLiq"},{"name":"SanctumNonWsolSwap"},{"name":"SanctumWsolSwap"},{"name":"PumpfunBuy","fields":[{"name":"is_cash_back","type":"bool"}]},{"name":"PumpfunSell","fields":[{"name":"is_cash_back","type":"bool"}]},{"name":"StabbleSwap"},{"name":"SanctumRouter"},{"name":"MeteoraVaultDeposit"},{"name":"MeteoraVaultWithdraw"},{"name":"Saros"},{"name":"MeteoraLst"},{"name":"Solfi"},{"name":"QualiaSwap"},{"name":"Zerofi"},{"name":"PumpfunammBuy","fields":[{"name":"is_cash_back","type":"bool"}]},{"name":"PumpfunammSell","fields":[{"name":"is_cash_back","type":"bool"}]},{"name":"Virtuals"},{"name":"VertigoBuy"},{"name":"VertigoSell"},{"name":"PerpetualsAddLiq"},{"name":"PerpetualsRemoveLiq"},{"name":"PerpetualsSwap"},{"name":"RaydiumLaunchpad"},{"name":"LetsBonkFun"},{"name":"Woofi"},{"name":"MeteoraDbc"},{"name":"MeteoraDlmmSwap2"},{"name":"MeteoraDAMMV2"},{"name":"Gavel"},{"name":"BoopfunBuy"},{"name":"BoopfunSell"},{"name":"MeteoraDbc2"},{"name":"GooseFX"},{"name":"Dooar"},{"name":"Numeraire"},{"name":"SaberDecimalWrapperDeposit"},{"name":"SaberDecimalWrapperWithdraw"},{"name":"SarosDlmm"},{"name":"OneDexSwap"},{"name":"Manifest"},{"name":"ByrealClmm"},{"name":"PancakeSwapV3Swap"},{"name":"PancakeSwapV3SwapV2"},{"name":"Tessera"},{"name":"SolRfq","fields":[{"name":"rfq_id","type":"u64"},{"name":"expected_maker_amount","type":"u64"},{"name":"expected_taker_amount","type":"u64"},{"name":"maker_send_amount","type":"u64"},{"name":"taker_send_amount","type":"u64"},{"name":"expiry","type":"u64"},{"name":"maker_use_native_sol","type":"bool"},{"name":"taker_use_native_sol","type":"bool"}]},{"name":"Humidifi"},{"name":"HeavenBuy"},{"name":"HeavenSell"},{"name":"SolfiV2"},{"name":"Goonfi"},{"name":"MoonitBuy"},{"name":"MoonitSell"},{"name":"RaydiumSwapV2"},{"name":"Whalestreet"},{"name":"SugarMoneyBuy","fields":[{"name":"bonding_curve_bump","type":"u8"},{"name":"bonding_curve_sol_associated_account_bump","type":"u8"}]},{"name":"SugarMoneySell","fields":[{"name":"bonding_curve_bump","type":"u8"},{"name":"bonding_curve_sol_associated_account_bump","type":"u8"}]},{"name":"MeteoraDAMMV2Swap2"},{"name":"AlphaQ"},{"name":"FutarchyAmm"},{"name":"PumpfunBuyV2"},{"name":"PumpfunSellV2"},{"name":"HumidifiSwap2","fields":[{"name":"swap_id","type":"u64"}]},{"name":"Scorch","fields":[{"name":"id","type":"u128"}]},{"name":"JupiterLendDeposit"},{"name":"JupiterLendRedeem"},{"name":"TaurusFi"},{"name":"BisonFi"},{"name":"GoonfiV2"},{"name":"Quantum"},{"name":"BoopfunBuy2"},{"name":"BoopfunSell2"},{"name":"ByrealClmm2"},{"name":"Dooar2"},{"name":"HeavenBuy2"},{"name":"HeavenSell2"},{"name":"MoonitBuy2"},{"name":"MoonitSell2"},{"name":"SaberDecimalWrapperDeposit2"},{"name":"SaberDecimalWrapperWithdraw2"},{"name":"ByrealPropAmm"},{"name":"SanctumPrefundSwapViaStake","fields":[{"name":"swap_id","type":"u64"}]},{"name":"AbyssAmm"},{"name":"Aquifer"},{"name":"WhalestreetV2","fields":[{"name":"auth_amount_in","type":"u64"},{"name":"auth","type":"u64"}]},{"name":"SolfiV2WithSig","fields":[{"name":"unix_timestamp","type":"u64"},{"name":"msg_amount_in","type":"u64"},{"name":"expect_amount_out","type":"u64"},{"name":"slippage","type":"u16"},{"name":"user_request_slot","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recovery_id","type":"u8"}]},{"name":"FusionAmm"},{"name":"ScaleAmmBuy"},{"name":"ScaleAmmSell"},{"name":"ScaleVmmBuy"},{"name":"ScaleVmmSell"},{"name":"PumpfunBuy3"},{"name":"PumpfunSell3"},{"name":"PumpfunammBuy2"},{"name":"PumpfunammSell2"},{"name":"Riptide"},{"name":"ZerofiSwapV2"},{"name":"TaurusFiV2"},{"name":"SolRfqV2","fields":[{"name":"taker_side","type":{"defined":{"name":"RfqSide"}}},{"name":"rfq_id","type":"u64"},{"name":"expire_at","type":"i64"},{"name":"levels","type":{"vec":{"defined":{"name":"RfqLevel"}}}}]}]}},{"name":"PlatformFeeWrapUnwrapArgs","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"amount_in","type":"u64"},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"tob","type":"bool"}]}},{"name":"RfqLevel","type":{"kind":"struct","fields":[{"name":"base_atoms","type":"u64"},{"name":"quote_atoms","type":"u64"}]}},{"name":"RfqSide","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Bid"},{"name":"Ask"}]}},{"name":"Route","type":{"kind":"struct","fields":[{"name":"dex","type":{"defined":{"name":"Dex"}}},{"name":"weight","type":"u16"},{"name":"index","type":"u8"}]}},{"name":"SwapArgs","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"amount_in","type":"u64"},{"name":"expect_amount_out","type":"u64"},{"name":"slippage","type":"u16"},{"name":"routes","type":{"vec":{"defined":{"name":"Route"}}}}]}},{"name":"SwapArgsTokenLedger","docs":["Swap args for token-ledger swaps: no `amount_in` parameter.","`amount_in` is derived on-chain from `token_ledger` delta."],"type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"expect_amount_out","type":"u64"},{"name":"slippage","type":"u16"},{"name":"routes","type":{"vec":{"defined":{"name":"Route"}}}}]}},{"name":"SwapCpiEvent2","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"}]}},{"name":"SwapEvent","type":{"kind":"struct","fields":[{"name":"dex","type":{"defined":{"name":"Dex"}}},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"}]}},{"name":"SwapTobV2CpiEvent2","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"},{"name":"commission_direction","type":"bool"},{"name":"total_commission_rate","type":"u32"},{"name":"parent_commission_rate","type":"u32"},{"name":"parent_commission_amount","type":"u64"},{"name":"parent_commission_account","type":"pubkey"},{"name":"child_commission_rate","type":"u32"},{"name":"child_commission_amount","type":"u64"},{"name":"child_commission_account","type":"pubkey"},{"name":"platform_fee_rate","type":"u16"},{"name":"platform_fee_amount","type":"u64"},{"name":"platform_fee_account","type":"pubkey"},{"name":"trim_rate","type":"u8"},{"name":"trim_amount","type":"u64"},{"name":"trim_account","type":"pubkey"}]}},{"name":"SwapTocV2CpiEvent2","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"},{"name":"commission_direction","type":"bool"},{"name":"total_commission_rate","type":"u32"},{"name":"parent_commission_rate","type":"u32"},{"name":"parent_commission_amount","type":"u64"},{"name":"parent_commission_account","type":"pubkey"},{"name":"child_commission_rate","type":"u32"},{"name":"child_commission_amount","type":"u64"},{"name":"child_commission_account","type":"pubkey"},{"name":"platform_fee_rate","type":"u16"},{"name":"platform_fee_amount","type":"u64"},{"name":"platform_fee_account","type":"pubkey"}]}},{"name":"SwapWithFeesCpiEvent2","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"},{"name":"commission_direction","type":"bool"},{"name":"commission_rate","type":"u32"},{"name":"commission_amount","type":"u64"},{"name":"commission_account","type":"pubkey"},{"name":"platform_fee_rate","type":"u16"},{"name":"platform_fee_amount","type":"u64"},{"name":"platform_fee_account","type":"pubkey"},{"name":"trim_rate","type":"u8"},{"name":"trim_amount","type":"u64"},{"name":"trim_account","type":"pubkey"}]}},{"name":"SwapWithFeesCpiEventEnhanced2","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"},{"name":"commission_direction","type":"bool"},{"name":"commission_rate","type":"u32"},{"name":"commission_amount","type":"u64"},{"name":"commission_account","type":"pubkey"},{"name":"platform_fee_rate","type":"u16"},{"name":"platform_fee_amount","type":"u64"},{"name":"platform_fee_account","type":"pubkey"},{"name":"trim_rate","type":"u8"},{"name":"trim_amount","type":"u64"},{"name":"trim_account","type":"pubkey"},{"name":"charge_rate","type":"u16"},{"name":"charge_amount","type":"u64"},{"name":"charge_account","type":"pubkey"}]}},{"name":"TokenLedger","docs":["Token ledger PDA used to snapshot a token account balance within a transaction.","","Seeds: `[b\"token_ledger\", [index]]`, where `index = 0..=255` (u8)."],"type":{"kind":"struct","fields":[{"name":"token_account","type":"pubkey"},{"name":"amount","type":"u64"}]}}],"constants":[{"name":"SEED_SA","type":"bytes","value":"[111, 107, 120, 95, 115, 97]"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/okx_lab_v1.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.json b/olddocs/archivekbot2/idls/okx_lab_v1.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.json new file mode 100644 index 0000000..723685a --- /dev/null +++ b/olddocs/archivekbot2/idls/okx_lab_v1.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.json @@ -0,0 +1 @@ +{"address":"6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma","metadata":{"name":"dex_solana","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"claim","discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"signer","writable":true,"signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"receiver","writable":true},{"name":"source_token_account","writable":true,"optional":true},{"name":"destination_token_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"address":"HV1KXxWFaSeriyFvXyx48FqG9BoFbfinB8njCJonqP7K"},{"name":"token_mint","optional":true},{"name":"token_program","optional":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"claim_cashback_pumpfun","discriminator":[83,1,245,125,201,207,209,249],"accounts":[{"name":"signer","signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"sa_authority","docs":["PumpFun transfers claimed SOL directly to this account (account[0] in the CPI)."],"writable":true,"address":"HV1KXxWFaSeriyFvXyx48FqG9BoFbfinB8njCJonqP7K"},{"name":"user_volume_accumulator","docs":["Holds native SOL accumulated as cashback; emptied by PumpFun during claim."],"writable":true},{"name":"receiver","docs":["after PumpFun deposits it there."],"writable":true},{"name":"event_authority","address":"Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pumpfun_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[]},{"name":"claim_cashback_pumpswap","discriminator":[253,242,176,173,217,78,100,25],"accounts":[{"name":"signer","signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"sa_authority","writable":true,"address":"HV1KXxWFaSeriyFvXyx48FqG9BoFbfinB8njCJonqP7K"},{"name":"user_volume_accumulator","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"spl_token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"uva_wsol_ata","writable":true},{"name":"sa_wsol_ata","docs":["PumpSwap requires account[5] to be a token account owned by authority_pda","(same owner as user_volume_accumulator). WSOL is deposited here by PumpSwap,","then forwarded to receiver_wsol_ata via a second SPL transfer."],"writable":true},{"name":"receiver_wsol_ata","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"event_authority","address":"GS4CU59F31iL7aR2Q8zVS8DRrcRnXX1yjQ66TqNVQnaR"},{"name":"pumpswap_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"}],"args":[]},{"name":"create_token_account","discriminator":[147,241,123,100,244,132,174,118],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner"},{"name":"token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_mint"},{"kind":"account","path":"owner"}]}},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bump","type":"u8"}]},{"name":"create_token_account_with_seed","discriminator":[125,191,239,140,66,8,9,228],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner"},{"name":"token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_mint"},{"kind":"account","path":"owner"},{"kind":"arg","path":"seed"}]}},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bump","type":"u8"},{"name":"seed","type":"u32"}]},{"name":"proxy_swap","discriminator":[19,44,130,148,72,56,44,238],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"sa_authority","optional":true,"pda":{"seeds":[{"kind":"const","value":[111,107,120,95,115,97]}]}},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SwapArgs"}}},{"name":"order_id","type":"u64"}]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"}],"args":[{"name":"data","type":{"defined":{"name":"SwapArgs"}}},{"name":"order_id","type":"u64"}]},{"name":"swap_tob_v3","discriminator":[14,191,44,246,142,225,224,157],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"}],"args":[{"name":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"trim_rate","type":"u8"},{"name":"platform_fee_rate","type":"u16"},{"name":"order_id","type":"u64"}]},{"name":"swap_tob_v3_enhanced","discriminator":[236,71,155,68,198,98,14,118],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"}],"args":[{"name":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"trim_rate","type":"u8"},{"name":"charge_rate","type":"u16"},{"name":"platform_fee_rate","type":"u16"},{"name":"order_id","type":"u64"}]},{"name":"swap_tob_v3_with_receiver","docs":["Swap ToB with optional specified receiver","- For normal token swaps: sol_receiver should be None","- For swap to SOL with custom receiver: sol_receiver should be Some and acc_close_flag must be true"],"discriminator":[63,114,246,131,51,2,247,29],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"name":"sol_receiver","docs":["Optional SOL receiver account","- None: normal swap or SOL stays with payer","- Some: SOL receiver when converting wSOL -> SOL"],"writable":true,"optional":true}],"args":[{"name":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"trim_rate","type":"u8"},{"name":"platform_fee_rate","type":"u16"},{"name":"order_id","type":"u64"}]},{"name":"swap_v3","discriminator":[240,224,38,33,176,31,241,175],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"}],"args":[{"name":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"order_id","type":"u64"}]},{"name":"swap_v3_with_cpi_event","discriminator":[184,104,79,156,107,182,120,138],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"order_id","type":"u64"}]},{"name":"wrap_unwrap_v3","discriminator":[180,178,191,54,70,8,13,224],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"payer_wsol_account","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"temp_wsol_account","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[116,101,109,112,95,119,115,111,108]},{"kind":"account","path":"payer"}]}},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"authority_pda","docs":["Used for signing fee transfers from authority_pda (SOL) or wsol_sa (WSOL)"],"writable":true,"optional":true},{"name":"wsol_sa","docs":["This is the authority_pda's associated token account for WSOL"],"writable":true,"optional":true},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"args","type":{"defined":{"name":"PlatformFeeWrapUnwrapArgs"}}}]},{"name":"wrap_unwrap_v3_with_receiver","docs":["Wrap/Unwrap with optional specified receiver","- Wrap (SOL -> WSOL): receiver is WSOL token account (ATA)","- Unwrap (WSOL -> SOL): receiver is system account (EOA)","Transfer amount:","- From fee: amount_in","- To fee: amount_in - fees"],"discriminator":[70,211,190,165,47,40,213,95],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"payer_wsol_account","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"temp_wsol_account","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[116,101,109,112,95,119,115,111,108]},{"kind":"account","path":"payer"}]}},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"authority_pda","docs":["Used for signing fee transfers from authority_pda (SOL) or wsol_sa (WSOL)"],"writable":true,"optional":true},{"name":"wsol_sa","docs":["This is the authority_pda's associated token account for WSOL"],"writable":true,"optional":true},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"receiver","docs":["- Wrap: WSOL token account (ATA) to receive WSOL","- Unwrap: System account (EOA) to receive SOL"],"writable":true}],"args":[{"name":"args","type":{"defined":{"name":"PlatformFeeWrapUnwrapArgs"}}}]}],"events":[{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"SwapWithFeesCpiEvent","discriminator":[189,97,67,12,37,209,247,29]}],"errors":[{"code":6000,"name":"TooManyHops","msg":"Too many hops"},{"code":6001,"name":"MinReturnNotReached","msg":"Min return not reached"},{"code":6002,"name":"AmountInMustBeGreaterThanZero","msg":"amount_in must be greater than 0"},{"code":6003,"name":"InvalidExpectAmountOut","msg":"invalid expect amount out"},{"code":6004,"name":"AmountsAndRoutesMustHaveTheSameLength","msg":"amounts and routes must have the same length"},{"code":6005,"name":"TotalAmountsMustBeEqualToAmountIn","msg":"total_amounts must be equal to amount_in"},{"code":6006,"name":"DexesAndWeightsMustHaveTheSameLength","msg":"dexes and weights must have the same length"},{"code":6007,"name":"WeightsMustSumTo100","msg":"weights must sum to 100"},{"code":6008,"name":"InvalidSourceTokenAccount","msg":"Invalid source token account"},{"code":6009,"name":"InvalidDestinationTokenAccount","msg":"Invalid destination token account"},{"code":6010,"name":"InvalidTokenAccount","msg":"Invalid token account"},{"code":6011,"name":"InvalidCommissionRate","msg":"Invalid commission rate"},{"code":6012,"name":"InvalidTrimRate","msg":"Invalid trim rate"},{"code":6013,"name":"InvalidChargeRate","msg":"Invalid charge rate"},{"code":6014,"name":"InvalidCommissionTokenAccount","msg":"Invalid commission token account"},{"code":6015,"name":"InvalidCommissionTemporaryTokenAccount","msg":"Invalid commission temporary token account"},{"code":6016,"name":"InvalidAccountsLength","msg":"Invalid accounts length"},{"code":6017,"name":"InvalidHopAccounts","msg":"Invalid hop accounts"},{"code":6018,"name":"InvalidHopFromAccount","msg":"Invalid hop from account"},{"code":6019,"name":"SwapAuthorityIsNotSigner","msg":"Swap authority is not signer"},{"code":6020,"name":"InvalidAuthorityPda","msg":"Invalid authority pda"},{"code":6021,"name":"InvalidSwapAuthority","msg":"Invalid swap authority"},{"code":6022,"name":"InvalidProgramId","msg":"Invalid program id"},{"code":6023,"name":"InvalidPool","msg":"Invalid pool"},{"code":6024,"name":"InvalidTokenMint","msg":"Invalid token mint"},{"code":6025,"name":"CalculationError","msg":"Calculation error"},{"code":6026,"name":"InvalidSanctumLstStateListData","msg":"Invalid sanctum lst state list data"},{"code":6027,"name":"InvalidSanctumLstStateListIndex","msg":"Invalid sanctum lst state list index"},{"code":6028,"name":"InvalidSanctumSwapAccounts","msg":"Invalid sanctum swap accounts"},{"code":6029,"name":"InvalidSwapAuthorityAccounts","msg":"Invalid swap authority account"},{"code":6030,"name":"InvalidBridgeSeed","msg":"Bridge Seed Error"},{"code":6031,"name":"InvalidBundleInput","msg":"Invalid accounts and instruction length"},{"code":6032,"name":"MissingSaAccount","msg":"SA is required"},{"code":6033,"name":"InvalidPlatformFeeRate","msg":"Invalid platform fee rate"},{"code":6034,"name":"AmountOutMustBeGreaterThanZero","msg":"Amount out must be greater than 0"},{"code":6035,"name":"InvalidDampingTerm","msg":"Invalid DampingTerm"},{"code":6036,"name":"InvalidMint","msg":"Invalid mint"},{"code":6037,"name":"InvalidPlatformFeeAmount","msg":"Invalid platform fee amount"},{"code":6038,"name":"InvalidFeeTokenAccount","msg":"Invalid fee token account"},{"code":6039,"name":"InvalidSaAuthority","msg":"Invalid sa authority"},{"code":6040,"name":"CommissionAccountIsNone","msg":"Commission account is none"},{"code":6041,"name":"PlatformFeeAccountIsNone","msg":"Platform fee account is none"},{"code":6042,"name":"TrimAccountIsNone","msg":"Trim account is none"},{"code":6043,"name":"ChargeAccountIsNone","msg":"Charge account is none"},{"code":6044,"name":"InvalidFeeAccount","msg":"Invalid fee account"},{"code":6045,"name":"InvalidSourceTokenSa","msg":"Invalid source token sa"},{"code":6046,"name":"SaAuthorityIsNone","msg":"Sa authority is none"},{"code":6047,"name":"SourceTokenSaIsNone","msg":"Source token sa is none"},{"code":6048,"name":"SourceTokenProgramIsNone","msg":"Source token program is none"},{"code":6049,"name":"DestinationTokenSaIsNone","msg":"Destination token sa is none"},{"code":6050,"name":"DestinationTokenProgramIsNone","msg":"Destination token program is none"},{"code":6051,"name":"ResultMustBeGreaterThanZero","msg":"Calculation result must be greater than zero"},{"code":6052,"name":"InvalidAccountData","msg":"Invalid account data"},{"code":6053,"name":"InvalidRfqParameters","msg":"Invalid RFQ parameters"},{"code":6054,"name":"TobAuthorityPdaRequired","msg":"TOB mode requires authority PDA"},{"code":6055,"name":"TobWsolSaRequired","msg":"TOB mode with WSOL fees requires wsol_sa account"},{"code":6056,"name":"InvalidWsolSa","msg":"Invalid WSOL SA account"},{"code":6057,"name":"InvalidTrimAccount","msg":"Invalid trim account"},{"code":6058,"name":"InvalidChargeAccount","msg":"Invalid charge account"},{"code":6059,"name":"InvalidCommissionAccount","msg":"Invalid commission account"},{"code":6060,"name":"InvalidPlatformFeeAccount","msg":"Invalid platform fee account"},{"code":6061,"name":"InvalidActualAmountIn","msg":"Invalid actual amount in"},{"code":6062,"name":"UnexpectedSaTokenAccount","msg":"Unexpected SA token account in CPI"},{"code":6063,"name":"InvalidSourceTokenSaMint","msg":"Invalid source token sa mint"},{"code":6064,"name":"InvalidDestinationTokenSaMint","msg":"Invalid destination token sa mint"},{"code":6065,"name":"AdapterAbort","msg":"Adapter abort"},{"code":6066,"name":"InsufficientFunds","msg":"Insufficient funds"},{"code":6067,"name":"InvalidDiffLamports","msg":"Invalid diff lamports"},{"code":6068,"name":"InvalidTokenProgram","msg":"Invalid token program"},{"code":6069,"name":"InvalidSigner","msg":"Invalid signer"},{"code":6070,"name":"InvalidAssociatedTokenProgram","msg":"Invalid associated token program"},{"code":6071,"name":"SolReceiverMustBeSystemAccount","msg":"SOL receiver must be a system account"},{"code":6072,"name":"InsufficientBalance","msg":"Insufficient balance for transfer"},{"code":6073,"name":"SolReceiverRequiresAccCloseFlag","msg":"SOL receiver requires acc_close_flag to be true"},{"code":6074,"name":"DestinationMustBeWsolForSolReceiver","msg":"Destination must be wSOL when sol_receiver is specified"},{"code":6075,"name":"InvalidGoonfiParameters","msg":"Invalid Goonfi parameters"},{"code":6076,"name":"InvalidTrimAmount","msg":"Invalid trim amount"},{"code":6077,"name":"ReceiverMustBeTokenAccount","msg":"Receiver must be a token account for wrap operation"},{"code":6078,"name":"ReceiverMustBeWsolAccount","msg":"Receiver must be a WSOL token account for wrap operation"},{"code":6079,"name":"TokenProgramIsNone","msg":"Token program is none"},{"code":6080,"name":"AssociatedTokenProgramIsNone","msg":"Associated token program is none"},{"code":6081,"name":"SystemProgramIsNone","msg":"System program is none"}],"types":[{"name":"Dex","type":{"kind":"enum","variants":[{"name":"SplTokenSwap"},{"name":"StableSwap"},{"name":"Whirlpool"},{"name":"MeteoraDynamicpool"},{"name":"RaydiumSwap"},{"name":"RaydiumStableSwap"},{"name":"RaydiumClmmSwap"},{"name":"AldrinExchangeV1"},{"name":"AldrinExchangeV2"},{"name":"LifinityV1"},{"name":"LifinityV2"},{"name":"RaydiumClmmSwapV2"},{"name":"FluxBeam"},{"name":"MeteoraDlmm"},{"name":"RaydiumCpmmSwap"},{"name":"OpenBookV2"},{"name":"WhirlpoolV2"},{"name":"Phoenix"},{"name":"ObricV2"},{"name":"SanctumAddLiq"},{"name":"SanctumRemoveLiq"},{"name":"SanctumNonWsolSwap"},{"name":"SanctumWsolSwap"},{"name":"PumpfunBuy"},{"name":"PumpfunSell"},{"name":"StabbleSwap"},{"name":"SanctumRouter"},{"name":"MeteoraVaultDeposit"},{"name":"MeteoraVaultWithdraw"},{"name":"Saros"},{"name":"MeteoraLst"},{"name":"Solfi"},{"name":"QualiaSwap"},{"name":"Zerofi"},{"name":"PumpfunammBuy"},{"name":"PumpfunammSell"},{"name":"Virtuals"},{"name":"VertigoBuy"},{"name":"VertigoSell"},{"name":"PerpetualsAddLiq"},{"name":"PerpetualsRemoveLiq"},{"name":"PerpetualsSwap"},{"name":"RaydiumLaunchpad"},{"name":"LetsBonkFun"},{"name":"Woofi"},{"name":"MeteoraDbc"},{"name":"MeteoraDlmmSwap2"},{"name":"MeteoraDAMMV2"},{"name":"Gavel"},{"name":"BoopfunBuy"},{"name":"BoopfunSell"},{"name":"MeteoraDbc2"},{"name":"GooseFX"},{"name":"Dooar"},{"name":"Numeraire"},{"name":"SaberDecimalWrapperDeposit"},{"name":"SaberDecimalWrapperWithdraw"},{"name":"SarosDlmm"},{"name":"OneDexSwap"},{"name":"Manifest"},{"name":"ByrealClmm"},{"name":"PancakeSwapV3Swap"},{"name":"PancakeSwapV3SwapV2"},{"name":"Tessera"},{"name":"SolRfq","fields":[{"name":"rfq_id","type":"u64"},{"name":"expected_maker_amount","type":"u64"},{"name":"expected_taker_amount","type":"u64"},{"name":"maker_send_amount","type":"u64"},{"name":"taker_send_amount","type":"u64"},{"name":"expiry","type":"u64"},{"name":"maker_use_native_sol","type":"bool"},{"name":"taker_use_native_sol","type":"bool"}]},{"name":"PumpfunBuy2"},{"name":"PumpfunammBuy2"},{"name":"Humidifi"},{"name":"HeavenBuy"},{"name":"HeavenSell"},{"name":"SolfiV2"},{"name":"PumpfunBuy3"},{"name":"PumpfunSell3"},{"name":"PumpfunammBuy3"},{"name":"PumpfunammSell3"},{"name":"Goonfi"},{"name":"MoonitBuy"},{"name":"MoonitSell"},{"name":"RaydiumSwapV2"},{"name":"Whalestreet"},{"name":"SugarMoneyBuy","fields":[{"name":"bonding_curve_bump","type":"u8"},{"name":"bonding_curve_sol_associated_account_bump","type":"u8"}]},{"name":"SugarMoneySell","fields":[{"name":"bonding_curve_bump","type":"u8"},{"name":"bonding_curve_sol_associated_account_bump","type":"u8"}]},{"name":"MeteoraDAMMV2Swap2"},{"name":"AlphaQ"},{"name":"FutarchyAmm"},{"name":"PumpfunSell2"},{"name":"HumidifiSwap2","fields":[{"name":"swap_id","type":"u64"}]},{"name":"Scorch","fields":[{"name":"id","type":"u128"}]},{"name":"JupiterLendDeposit"},{"name":"JupiterLendRedeem"},{"name":"TaurusFi"},{"name":"BisonFi"},{"name":"GoonfiV2"},{"name":"Quantum"},{"name":"BoopfunBuy2"},{"name":"BoopfunSell2"},{"name":"ByrealClmm2"},{"name":"Dooar2"},{"name":"HeavenBuy2"},{"name":"HeavenSell2"},{"name":"MoonitBuy2"},{"name":"MoonitSell2"},{"name":"SaberDecimalWrapperDeposit2"},{"name":"SaberDecimalWrapperWithdraw2"},{"name":"ByrealPropAmm"},{"name":"SanctumPrefundSwapViaStake","fields":[{"name":"swap_id","type":"u64"}]},{"name":"AbyssAmm"},{"name":"Aquifer"},{"name":"WhalestreetV2","fields":[{"name":"auth_amount_in","type":"u64"},{"name":"auth","type":"u64"}]},{"name":"SolfiV2WithSig","fields":[{"name":"unix_timestamp","type":"u64"},{"name":"msg_amount_in","type":"u64"},{"name":"expect_amount_out","type":"u64"},{"name":"slippage","type":"u16"},{"name":"user_request_slot","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recovery_id","type":"u8"}]}]}},{"name":"PlatformFeeWrapUnwrapArgs","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"amount_in","type":"u64"},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"tob","type":"bool"}]}},{"name":"Route","type":{"kind":"struct","fields":[{"name":"dexes","type":{"vec":{"defined":{"name":"Dex"}}}},{"name":"weights","type":"bytes"}]}},{"name":"SwapArgs","type":{"kind":"struct","fields":[{"name":"amount_in","type":"u64"},{"name":"expect_amount_out","type":"u64"},{"name":"min_return","type":"u64"},{"name":"amounts","type":{"vec":"u64"}},{"name":"routes","type":{"vec":{"vec":{"defined":{"name":"Route"}}}}}]}},{"name":"SwapEvent","type":{"kind":"struct","fields":[{"name":"dex","type":{"defined":{"name":"Dex"}}},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"}]}},{"name":"SwapWithFeesCpiEvent","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"},{"name":"commission_direction","type":"bool"},{"name":"commission_rate","type":"u32"},{"name":"commission_amount","type":"u64"},{"name":"commission_account","type":"pubkey"},{"name":"platform_fee_rate","type":"u16"},{"name":"platform_fee_amount","type":"u64"},{"name":"platform_fee_account","type":"pubkey"},{"name":"trim_rate","type":"u8"},{"name":"trim_amount","type":"u64"},{"name":"trim_account","type":"pubkey"}]}}],"constants":[{"name":"SEED_SA","type":"bytes","value":"[111, 107, 120, 95, 115, 97]"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/ondo_gm.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.json b/olddocs/archivekbot2/idls/ondo_gm.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.json new file mode 100644 index 0000000..c58d355 --- /dev/null +++ b/olddocs/archivekbot2/idls/ondo_gm.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.json @@ -0,0 +1 @@ +{"address":"XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm","metadata":{"name":"ondo_gm","version":"0.1.0","spec":"0.1.0","description":"Ondo Finance Global Markets"},"instructions":[{"name":"add_to_whitelist","docs":["Add an address to the whitelist","Signer must have the ADMIN_ROLE_WHITELIST role"],"discriminator":[157,211,52,54,144,81,5,55],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account that has the authority to add an address to the whitelist"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_WHITELIST` role","# PDA Seeds","- ADMIN_ROLE_WHITELIST","- The authority's address",""],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,87,104,105,116,101,108,105,115,116]},{"kind":"account","path":"authority"}]}},{"name":"whitelist","docs":["The Whitelist account being created","# PDA Seeds","- WHITELIST_SEED","- Address being whitelisted"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"arg","path":"address_to_whitelist"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"address_to_whitelist","type":"pubkey"}]},{"name":"batch_close_attestation_accounts","docs":["Batch close attestation accounts","","Accounts to close are passed via remaining_accounts, constraints:","1. Accounts must be marked writable","2. No other accounts should present in `remaining_accounts`","3. Each attestation account must be created by the recipient","4. Each attestation must be older than 30 seconds","Unpermissioned"],"discriminator":[73,167,240,82,80,48,205,207],"accounts":[{"name":"closer","docs":["The user closing the attestation accounts"],"signer":true},{"name":"recipient","docs":["The recipient of the lamports from closed attestation accounts","Must be the creator of each attestation"],"writable":true},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"burn_usdon","docs":["Burn USDon tokens (admin function)","Signer must have the BURNER_ROLE_USDON role"],"discriminator":[173,55,240,198,34,223,191,82],"accounts":[{"name":"authority","docs":["The account with the authority to burn USDon tokens"],"writable":true,"signer":true},{"name":"permanent_delegate","docs":["The permanent delegate PDA (also the mint authority)","# PDA Seeds","- MINT_AUTHORITY_SEED",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"usdon_manager_state","docs":["The USDonManagerState account containing USDon configuration","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has either the `BURNER_ROLE_USDON` role","or the `ADMIN_ROLE_USDON` role","# PDA Seeds","- Role seed (from the account's role field)","- The authority's address"],"pda":{"seeds":[{"kind":"account","path":"authority_role_account.role","account":"Roles"},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The USDon mint"],"writable":true},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"destination","docs":["The token account to burn tokens from"],"writable":true}],"args":[{"name":"amount","type":"u64"}]},{"name":"close_attestation_account","docs":["Close a single attestation account","","The attestation account must be older than 30 seconds to be closed.","The rent from the closed account is returned to the recipient (original creator).","Unpermissioned"],"discriminator":[201,34,214,89,249,220,97,101],"accounts":[{"name":"closer","docs":["The user closing the attestation account"],"signer":true},{"name":"attestation","docs":["The attestation account to close","# PDA Seeds","- ATTESTATION_ID_SEED","- _attestation_id"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,116,116,101,115,116,97,116,105,111,110,95,105,100]},{"kind":"arg","path":"_attestation_id"}]}},{"name":"recipient","docs":["The recipient of the lamports from the closed attestation account","Must be the creator of the attestation",""],"writable":true},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"_attestation_id","type":{"array":["u8",16]}}]},{"name":"enable_oracle_price","docs":["Enable or disable oracle price for USDon","Signer must have the ADMIN_ROLE_USDON_MANAGER role"],"discriminator":[31,98,115,216,241,185,41,109],"accounts":[{"name":"authority","docs":["The account with the authority to execute the operation"],"signer":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account to be modified","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_USDON_MANAGER` role","# PDA Seeds","- ADMIN_ROLE_USDON_MANAGER","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,85,83,68,111,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"is_enabled","type":"bool"}]},{"name":"grant_gmtoken_factory_role","docs":["Grants the specified GM Token Factory role to the user","Signer must have the ADMIN_ROLE_GMTOKEN_FACTORY role"],"discriminator":[219,108,46,79,46,104,74,179],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant a GM Token Factory role"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The new `Roles` account being created for the user","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_gmtoken_manager_role","docs":["Grant a GM Token Manager role","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[245,248,145,72,159,93,154,176],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant GM Token Manager roles"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- ADMIN_ROLE_GMTOKEN_MANAGER","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The new `Roles` account being created for the user","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_gmtoken_role","docs":["Grants the specified GMToken role to the user","Signer must have the ADMIN_ROLE_GMTOKEN role"],"discriminator":[80,114,198,5,12,2,84,105],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant GM Token roles"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN` role","# PDA Seeds","- ADMIN_ROLE_GMTOKEN","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The new Roles account being created for the user","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_role","docs":["Grants the specified role to a user","The signer must be the upgrade authority of the program"],"discriminator":[218,234,128,15,82,33,236,253],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant roles, must be the program upgrade authority"],"signer":true},{"name":"role_to_grant","docs":["The Roles account to be initialized","# PDA Seeds","- The role seed (from RoleType)","- The user's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"program","docs":["The Ondo Global Markets program"],"address":"XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm"},{"name":"program_data","docs":["The ProgramData account of the Ondo Global Markets program"]}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_sanity_configurer_role","docs":["Grant a configurer role for sanity check","Signer must have the ADMIN_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[22,112,48,145,46,77,61,33],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant the configurer role"],"signer":true},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `ADMIN_ROLE_ONDO_SANITY_CHECK`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The new `Roles` account being created for the user","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_sanity_setter_role","docs":["Grant a setter role for sanity check","Signer must have the ADMIN_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[209,154,110,150,18,113,63,227],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant the setter role"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `RoleType::ADMIN_ROLE_ONDO_SANITY_CHECK`","- `authority` (the authority's address)"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The role account to be initialized for the user","# PDA Seeds","- `role.seed()` (the seed for the setter role)","- `user` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_usdon_role","docs":["Grants the specified USDon role to a user","Signer must have the GUARDIAN_USDON role"],"discriminator":[107,112,6,81,156,182,208,9],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant the role"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `GUARDIAN_USDON` role","# PDA Seeds","- GUARDIAN_USDON","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[71,117,97,114,100,105,97,110,85,83,68,111,110]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The new `Roles` account being created for the user","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"init_mint","docs":["Initialize a new GM token mint (without permanent delegate)","Signer must have the DEPLOYER_ROLE_GMTOKEN_FACTORY role"],"discriminator":[126,176,233,16,66,117,209,125],"accounts":[{"name":"payer","docs":["The payer account funding the mint account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to deploy new GM tokens"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the user has `DEPLOYER_ROLE_GMTOKEN_FACTORY`","# PDA Seeds","- `DEPLOYER_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[68,101,112,108,111,121,101,114,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The new mint account to be initialized",""],"writable":true,"signer":true},{"name":"mint_authority","docs":["The mint authority PDA that will control the mint","# PDA Seeds","- `MINT_AUTHORITY_SEED`",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account containing factory configuration","# PDA Seeds","- GMTOKEN_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"freeze_authority","type":"pubkey"}]},{"name":"init_mint_delegate","docs":["Initialize a new token mint with permanent delegate (for USDon)","Signer must have the DEPLOYER_ROLE_GMTOKEN_FACTORY role"],"discriminator":[66,23,77,148,164,53,165,83],"accounts":[{"name":"payer","docs":["The payer account funding the mint account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to deploy new tokens"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `DEPLOYER_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `DEPLOYER_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[68,101,112,108,111,121,101,114,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The new mint account to be initialized with permanent delegate",""],"writable":true,"signer":true},{"name":"mint_authority","docs":["The mint authority PDA that will control the mint and act as permanent delegate","# PDA Seeds","- `MINT_AUTHORITY_SEED`",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account containing factory configuration","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"freeze_authority","type":"pubkey"}]},{"name":"initialize_gmtoken_manager","docs":["Initialize the GM token manager state","","Sets up the manager with pause states for factory, redemptions, and minting,","and configures the secp256k1 attestation signer address.","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[118,57,145,134,233,31,145,47],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to initialize the GM Token Manager"],"signer":true},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be initialized","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"factory_paused","type":"bool"},{"name":"redemptions_paused","type":"bool"},{"name":"minting_paused","type":"bool"},{"name":"attestation_signer_secp","type":{"array":["u8",20]}},{"name":"trading_hours_offset","type":"i64"}]},{"name":"initialize_sanity_check","docs":["Initialize sanity check parameters for a token","","Sets up price deviation and time delay checks to ensure safe trading.","Signer must have the ADMIN_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[99,169,10,74,68,74,22,72],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to initialize the sanity check"],"signer":true},{"name":"sanity_check","docs":["The sanity check account to be initialized","# PDA Seeds","- `ORACLE_SANITY_CHECK_SEED`","- `mint` (the mint address of the GM Token for which the sanity check is being initialized)"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `RoleType::ADMIN_ROLE_ONDO_SANITY_CHECK`","- `authority` (the authority's address)"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint for which the sanity check is being initialized"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"last_price","type":"u64"},{"name":"allowed_deviation_bps","type":"u64"},{"name":"max_time_delay","type":"i64"}]},{"name":"initialize_token_limit","docs":["Initialize token-level rate limits","","Sets rate limits for the token and default limits for users trading this token.","Signer must have the DEPLOYER_ROLE_GMTOKEN_FACTORY role"],"discriminator":[187,218,162,146,4,49,163,240],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to initialize token limit accounts"],"signer":true},{"name":"mint","docs":["The GM Token or USDon mint"]},{"name":"token_limit","docs":["The `TokenLimit` account to be initialized","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `DEPLOYER_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `DEPLOYER_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[68,101,112,108,111,121,101,114,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"rate_limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}},{"name":"default_user_rate_limit","type":{"option":"u64"}},{"name":"default_limit_window","type":{"option":"u64"}}]},{"name":"initialize_usdon_manager","docs":["Initialize the USDon manager state","","Sets up the manager with the USDon mint, initial price, oracle configuration,","and vault addresses for USDC and USDon tokens.","Signer must have the GUARDIAN_USDON role"],"discriminator":[9,32,232,105,2,166,13,47],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to initialize the USDon Manager"],"signer":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED","","Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"usdon_mint","docs":["The USDon mint account","Must be initialized with mint authority as `mint_authority`","and use the token-2022 program"]},{"name":"usdon_vault","docs":["The USDon vault token account","Must be the ATA for `usdon_mint` owned by `usdon_manager_state`"],"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"const","value":[6,221,246,225,238,117,143,222,24,66,93,188,228,108,205,218,182,26,252,77,131,185,13,39,254,189,249,40,216,161,139,252]},{"kind":"account","path":"usdon_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":"usdc_vault","docs":["The USDC vault token account","Must be the ATA for USDC mint owned by `usdon_manager_state`"],"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[198,250,122,243,190,219,173,58,61,101,243,106,171,201,116,49,177,187,228,194,210,246,224,228,124,166,2,3,69,47,93,97]}],"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":"usdon_manager_state","docs":["The USDonManagerState account to be initialized","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `GUARDIAN_USDON` role","# PDA Seeds","- GUARDIAN_USDON","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[71,117,97,114,100,105,97,110,85,83,68,111,110]},{"kind":"account","path":"authority"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"oracle_price_enabled","type":"bool"},{"name":"oracle_price_max_age","type":"u64"},{"name":"usdc_price_update_address","type":"pubkey"}]},{"name":"initialize_user","docs":["Initialize a user account with optional rate limits"],"discriminator":[111,17,185,250,60,122,38,254],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to initialize an `OndoUser` account"],"signer":true},{"name":"user","docs":["The user for whom the OndoUser account is being initialized"]},{"name":"mint","docs":["The GM Token mint associated with the OndoUser account"]},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"ondo_user","docs":["The `OndoUser` account to be initialized","# PDA seeds:","- `ONDO_USER_SEED`","- User's address,","- The GM Token's mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"user"},{"kind":"account","path":"mint"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"rate_limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}}]},{"name":"mint_gm","docs":["Mint GM tokens directly (admin function)","Signer must have the MINTER_ROLE_GMTOKEN role"],"discriminator":[117,223,58,111,44,36,16,43],"accounts":[{"name":"payer","docs":["Pays for destination account if needed"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to mint GM Tokens,"],"signer":true},{"name":"user","docs":["The user receiving the minted tokens"]},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `MINTER_ROLE_GMTOKEN` role","# PDA Seeds","- `MINTER_ROLE_GMTOKEN`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[77,105,110,116,101,114,82,111,108,101,71,77,84,111,107,101,110]},{"kind":"account","path":"authority"}]}},{"name":"oracle_sanity_check","docs":["The `OracleSanityCheck` account validating oracle price updates","# PDA Seeds","- `ORACLE_SANITY_CHECK_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- `MINT_AUTHORITY_SEED`",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"mint","docs":["The GM Token mint to mint from"],"writable":true,"relations":["oracle_sanity_check"]},{"name":"destination","docs":["The destination token account to mint tokens to"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"usdon_manager_state","docs":["The `USDonManagerState` account for validation","# PDA Seeds","- `USDON_MANAGER_STATE_SEED`"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"associated_token_program","docs":["The associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"mint_usdon","docs":["Mint USDon tokens (admin function)","Signer must have the MINTER_ROLE_USDON role"],"discriminator":[178,178,234,133,225,144,48,129],"accounts":[{"name":"authority","docs":["The account with the authority to mint USDon tokens"],"writable":true,"signer":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"usdon_manager_state","docs":["The USDonManagerState account containing USDon configuration","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has either the `MINTER_ROLE_USDON`","or `ADMIN_ROLE_USDON` role","# PDA Seeds","- Role seed (from the account's role field)","- The authority's address"],"pda":{"seeds":[{"kind":"account","path":"authority_role_account.role","account":"Roles"},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The USDon mint"],"writable":true},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"destination","docs":["The destination token account to mint tokens to"],"writable":true}],"args":[{"name":"amount","type":"u64"}]},{"name":"mint_with_usdc","docs":["Mint GM tokens by paying with USDC","","Requires a valid attestation with price, amount, and expiration."],"discriminator":[128,28,133,173,71,142,185,206],"accounts":[{"name":"user","docs":["The user performing the USDC swap, pays for account creation if needed"],"writable":true,"signer":true},{"name":"mint","docs":["The GM Token mint involved in the swap"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED","Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"ondo_user","docs":["The OndoUser account tracking user-specific state for this mint","# PDA Seeds","- ONDO_USER_SEED","- User's address","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"user"},{"kind":"account","path":"mint"}]}},{"name":"token_limit_account","docs":["The TokenLimit account enforcing mint/burn limits for the GM Token","# PDA Seeds","- TOKEN_LIMIT_ACCOUNT_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"sanity_check_account","docs":["The OracleSanityCheck account validating oracle price updates","# PDA Seeds","- ORACLE_SANITY_CHECK_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"user_token_account","docs":["The user's associated token account for the GM Token"],"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":"attestation_id_account","docs":["The attestation ID account preventing attestation reuse","# PDA Seeds","- ATTESTATION_ID_SEED","- Attestation ID (16-byte array)","Existence means the attestation has been used."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,116,116,101,115,116,97,116,105,111,110,95,105,100]},{"kind":"arg","path":"attestation_id"}]}},{"name":"whitelist","docs":["The Whitelist account verifying the user is authorized","# PDA Seeds","- WHITELIST_SEED","- User's address","Validated in instruction handler - returns UserNotWhitelisted if not initialized."],"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"account","path":"user"}]}},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["The associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"spl_token_program","docs":["The legacy SPL Token program","Required when performing swaps between USDC and USDon tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"usdc_price_update","docs":["The oracle price update account for USDC/USD price feed","Provides real-time price data for USDC token","Used in swap operations to calculate exchange rates","Must be recent (within oracle_price_max_age) to ensure price accuracy","`has_one` ensures that this account matches the expected oracle account stored in the `usdon_manager_state`."],"relations":["usdon_manager_state"]},{"name":"usdc_vault","docs":["The USDC vault storing USDC tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"spl_token_program"},{"kind":"account","path":"usdc_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":"usdon_vault","docs":["The USDon vault storing USDon tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdon_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":"usdc_mint"},{"name":"user_usdc_token_account","docs":["The user's USDC token account"],"writable":true},{"name":"usdon_mint","docs":["The USDon mint (Token-2022)"],"writable":true},{"name":"user_usdon_token_account","docs":["The user's USDon token account"],"writable":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account used as authority for vault operations","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"gmtoken_manager_state","docs":["The GmTokenManagerState account managing GM Token operations","- Stores protocol parameters like factory, redemption, and minting paused.","# PDA Seeds","- GMTOKEN_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}},{"name":"instructions","address":"Sysvar1nstructions1111111111111111111111111"},{"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":"attestation_id","type":{"array":["u8",16]}},{"name":"price","type":"u64"},{"name":"amount","type":"u64"},{"name":"expiration","type":"i64"}]},{"name":"mint_with_usdon","docs":["Mint GM tokens by paying with USDon","","Requires a valid attestation with price, amount, and expiration."],"discriminator":[25,116,92,45,43,188,95,58],"accounts":[{"name":"user","docs":["The user performing the USDon swap, pays for account creation if needed"],"writable":true,"signer":true},{"name":"mint","docs":["The GM Token mint involved in the swap"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED","Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"ondo_user","docs":["The OndoUser account tracking user-specific state for this mint","# PDA Seeds","- ONDO_USER_SEED","- User's address","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"user"},{"kind":"account","path":"mint"}]}},{"name":"token_limit_account","docs":["The TokenLimit account enforcing mint/burn limits for the GM Token","# PDA Seeds","- TOKEN_LIMIT_ACCOUNT_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"sanity_check_account","docs":["The OracleSanityCheck account validating oracle price updates","# PDA Seeds","- ORACLE_SANITY_CHECK_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"user_token_account","docs":["The user's associated token account for the GM Token"],"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":"attestation_id_account","docs":["The attestation ID account preventing attestation reuse","# PDA Seeds","- ATTESTATION_ID_SEED","- Attestation ID (16-byte array)","Existence means the attestation has been used."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,116,116,101,115,116,97,116,105,111,110,95,105,100]},{"kind":"arg","path":"attestation_id"}]}},{"name":"whitelist","docs":["The Whitelist account verifying the user is authorized","# PDA Seeds","- WHITELIST_SEED","- User's address","Validated in instruction handler - returns UserNotWhitelisted if not initialized."],"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"account","path":"user"}]}},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["The associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"usdon_vault","docs":["The USDon vault storing USDon tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdon_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":"usdon_mint","docs":["The USDon mint (Token-2022)"],"writable":true},{"name":"user_usdon_token_account","docs":["The user's USDon token account"],"writable":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account used as authority for vault operations","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"gmtoken_manager_state","docs":["The GmTokenManagerState account managing GM Token operations","- Stores protocol parameters like factory, redemption, and minting paused.","# PDA Seeds","- GMTOKEN_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}},{"name":"instructions","address":"Sysvar1nstructions1111111111111111111111111"},{"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":"attestation_id","type":{"array":["u8",16]}},{"name":"price","type":"u64"},{"name":"amount","type":"u64"},{"name":"expiration","type":"i64"}]},{"name":"pause_global_minting","docs":["Pause all mints globally","Signer must have the PAUSER_ROLE_GMTOKEN_MANAGER role"],"discriminator":[191,70,149,85,20,141,242,239],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_global_minting_admin","docs":["Pause minting globally (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[20,43,34,201,214,148,151,75],"accounts":[{"name":"authority","docs":["The account with the authority to execute the unpause/configuration operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_global_redemption","docs":["Pause all redemption globally","Signer must have the PAUSER_ROLE_GMTOKEN_MANAGER role"],"discriminator":[169,5,1,19,183,71,133,147],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_global_redemption_admin","docs":["Pause redemption globally (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[77,80,68,48,7,94,111,183],"accounts":[{"name":"authority","docs":["The account with the authority to execute the unpause/configuration operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_token","docs":["Pause all transfers for a GM token by invoking the pausable token extension","Signer must have the PAUSER_ROLE_GMTOKEN role"],"discriminator":[226,150,72,211,159,51,226,39],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"writable":true,"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint to pause"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA that has pausable authority","# PDA Seeds","- MINT_AUTHORITY_SEED",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"token_program","docs":["The token program (Token-2022)"]}],"args":[]},{"name":"pause_token_factory","docs":["Pause the GM token factory","Signer must have the PAUSER_ROLE_GMTOKEN_FACTORY role"],"discriminator":[79,227,221,11,182,89,193,150],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_token_factory_admin","docs":["Pause the GM token factory (admin version)","Signer must have the ADMIN_ROLE_GMTOKEN_FACTORY role"],"discriminator":[244,155,26,17,39,152,51,18],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has `ADMIN_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_token_minting","docs":["Pause minting for a specific token","Signer must have the PAUSER_ROLE_GMTOKEN_MANAGER role"],"discriminator":[105,219,64,183,163,148,17,126],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"pause_token_minting_admin","docs":["Pause mints for a specific token (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[8,3,163,16,201,93,94,145],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause/unpause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"pause_token_redemption","docs":["Pause redemptions for a specific token","Signer must have the PAUSER_ROLE_GMTOKEN_MANAGER role"],"discriminator":[232,134,32,8,70,234,54,216],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"pause_token_redemption_admin","docs":["Pause redemptions for a specific token (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[62,162,192,223,22,143,110,191],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause/unpause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"redeem_for_usdc","docs":["Redeem GM tokens for USDC","","Requires a valid attestation with price, amount, and expiration."],"discriminator":[150,9,215,220,255,157,74,78],"accounts":[{"name":"user","docs":["The user performing the USDC swap, pays for account creation if needed"],"writable":true,"signer":true},{"name":"mint","docs":["The GM Token mint involved in the swap"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED","Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"ondo_user","docs":["The OndoUser account tracking user-specific state for this mint","# PDA Seeds","- ONDO_USER_SEED","- User's address","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"user"},{"kind":"account","path":"mint"}]}},{"name":"token_limit_account","docs":["The TokenLimit account enforcing mint/burn limits for the GM Token","# PDA Seeds","- TOKEN_LIMIT_ACCOUNT_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"sanity_check_account","docs":["The OracleSanityCheck account validating oracle price updates","# PDA Seeds","- ORACLE_SANITY_CHECK_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"user_token_account","docs":["The user's associated token account for the GM Token"],"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":"attestation_id_account","docs":["The attestation ID account preventing attestation reuse","# PDA Seeds","- ATTESTATION_ID_SEED","- Attestation ID (16-byte array)","Existence means the attestation has been used."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,116,116,101,115,116,97,116,105,111,110,95,105,100]},{"kind":"arg","path":"attestation_id"}]}},{"name":"whitelist","docs":["The Whitelist account verifying the user is authorized","# PDA Seeds","- WHITELIST_SEED","- User's address","Validated in instruction handler - returns UserNotWhitelisted if not initialized."],"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"account","path":"user"}]}},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["The associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"spl_token_program","docs":["The legacy SPL Token program","Required when performing swaps between USDC and USDon tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"usdc_price_update","docs":["The oracle price update account for USDC/USD price feed","Provides real-time price data for USDC token","Used in swap operations to calculate exchange rates","Must be recent (within oracle_price_max_age) to ensure price accuracy","`has_one` ensures that this account matches the expected oracle account stored in the `usdon_manager_state`."],"relations":["usdon_manager_state"]},{"name":"usdc_vault","docs":["The USDC vault storing USDC tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"spl_token_program"},{"kind":"account","path":"usdc_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":"usdon_vault","docs":["The USDon vault storing USDon tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdon_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":"usdc_mint"},{"name":"user_usdc_token_account","docs":["The user's USDC token account"],"writable":true},{"name":"usdon_mint","docs":["The USDon mint (Token-2022)"],"writable":true},{"name":"user_usdon_token_account","docs":["The user's USDon token account"],"writable":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account used as authority for vault operations","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"gmtoken_manager_state","docs":["The GmTokenManagerState account managing GM Token operations","- Stores protocol parameters like factory, redemption, and minting paused.","# PDA Seeds","- GMTOKEN_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}},{"name":"instructions","address":"Sysvar1nstructions1111111111111111111111111"},{"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":"attestation_id","type":{"array":["u8",16]}},{"name":"price","type":"u64"},{"name":"amount","type":"u64"},{"name":"expiration","type":"i64"}]},{"name":"redeem_for_usdon","docs":["Redeem GM tokens for USDon","","Requires a valid attestation with price, amount, and expiration."],"discriminator":[231,121,93,33,143,252,82,13],"accounts":[{"name":"user","docs":["The user performing the USDon swap, pays for account creation if needed"],"writable":true,"signer":true},{"name":"mint","docs":["The GM Token mint involved in the swap"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED","Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"ondo_user","docs":["The OndoUser account tracking user-specific state for this mint","# PDA Seeds","- ONDO_USER_SEED","- User's address","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"user"},{"kind":"account","path":"mint"}]}},{"name":"token_limit_account","docs":["The TokenLimit account enforcing mint/burn limits for the GM Token","# PDA Seeds","- TOKEN_LIMIT_ACCOUNT_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"sanity_check_account","docs":["The OracleSanityCheck account validating oracle price updates","# PDA Seeds","- ORACLE_SANITY_CHECK_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"user_token_account","docs":["The user's associated token account for the GM Token"],"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":"attestation_id_account","docs":["The attestation ID account preventing attestation reuse","# PDA Seeds","- ATTESTATION_ID_SEED","- Attestation ID (16-byte array)","Existence means the attestation has been used."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,116,116,101,115,116,97,116,105,111,110,95,105,100]},{"kind":"arg","path":"attestation_id"}]}},{"name":"whitelist","docs":["The Whitelist account verifying the user is authorized","# PDA Seeds","- WHITELIST_SEED","- User's address","Validated in instruction handler - returns UserNotWhitelisted if not initialized."],"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"account","path":"user"}]}},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["The associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"usdon_vault","docs":["The USDon vault storing USDon tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdon_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":"usdon_mint","docs":["The USDon mint (Token-2022)"],"writable":true},{"name":"user_usdon_token_account","docs":["The user's USDon token account"],"writable":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account used as authority for vault operations","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"gmtoken_manager_state","docs":["The GmTokenManagerState account managing GM Token operations","- Stores protocol parameters like factory, redemption, and minting paused.","# PDA Seeds","- GMTOKEN_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}},{"name":"instructions","address":"Sysvar1nstructions1111111111111111111111111"},{"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":"attestation_id","type":{"array":["u8",16]}},{"name":"price","type":"u64"},{"name":"amount","type":"u64"},{"name":"expiration","type":"i64"}]},{"name":"remove_from_whitelist","docs":["Remove an address from the whitelist","Signer must have the ADMIN_ROLE_WHITELIST role"],"discriminator":[7,144,216,239,243,236,193,235],"accounts":[{"name":"authority","docs":["The account with the authority to remove an address from the whitelist"],"signer":true},{"name":"recipient","docs":["Receives the lamports from closing the Whitelist account"],"writable":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_WHITELIST` role","# PDA Seeds","- `ADMIN_ROLE_WHITELIST`","- The authority's address",""],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,87,104,105,116,101,108,105,115,116]},{"kind":"account","path":"authority"}]}},{"name":"whitelist","docs":["The Whitelist account being closed","# PDA Seeds","- `WHITELIST_SEED`","- Address being removed from whitelist"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"arg","path":"address_to_remove"}]}}],"args":[{"name":"address_to_remove","type":"pubkey"}]},{"name":"resume_global_minting","docs":["Resume all mints globally","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[18,40,173,140,250,6,10,207],"accounts":[{"name":"authority","docs":["The account with the authority to execute the unpause/configuration operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"resume_global_redemption","docs":["Resume all redemption globally","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[80,47,24,168,44,185,215,97],"accounts":[{"name":"authority","docs":["The account with the authority to execute the unpause/configuration operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"resume_token","docs":["Resume all transfers for a GM token by invoking the pausable token extension to remove a pause.","Signer must have the UNPAUSER_ROLE_GMTOKEN role"],"discriminator":[173,116,46,190,81,191,249,83],"accounts":[{"name":"authority","docs":["The account with the authority to execute the resume operation"],"writable":true,"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `UNPAUSER_ROLE_GMTOKEN` role","# PDA Seeds","- `UNPAUSER_ROLE_GMTOKEN`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[85,110,112,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint to resume"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA that has pausable authority","# PDA Seeds","- `MINT_AUTHORITY_SEED`",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"token_program","docs":["The token program (Token-2022)"]}],"args":[]},{"name":"resume_token_factory","docs":["Resume the GM token factory","Signer must have the ADMIN_ROLE_GMTOKEN_FACTORY role"],"discriminator":[235,37,239,145,244,212,31,37],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has `ADMIN_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"resume_token_minting","docs":["Resume mints for a token (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[188,102,226,249,194,29,81,248],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause/unpause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"resume_token_redemption","docs":["Resume redemptions for a token (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[152,249,213,178,85,141,122,45],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause/unpause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"retrieve_tokens","docs":["Retrieve (withdraw) tokens from a vault controlled by the USDon manager","","Allows admins to withdraw any tokens (USDC, USDon, etc.) from vaults","owned by the usdon_manager_state PDA.","Signer must have the ADMIN_ROLE_USDON_MANAGER role"],"discriminator":[208,194,68,55,183,22,93,135],"accounts":[{"name":"authority","docs":["The account with the authority to execute the retrieval operation"],"signer":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account used as authority for vault operations","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_USDON_MANAGER` role","# PDA Seeds","- ADMIN_ROLE_USDON_MANAGER","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,85,83,68,111,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_mint","docs":["The mint of the token being retrieved"]},{"name":"source_vault","docs":["The source vault token account (must be owned by usdon_manager_state)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_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":"destination","docs":["The destination token account to receive the tokens"],"writable":true},{"name":"token_program","docs":["The token program (SPL Token or Token-2022)"]}],"args":[{"name":"amount","type":"u64"}]},{"name":"revoke_gmtoken_factory_role","docs":["Revokes the specified GM Token Factory role from the user","Signer must have the ADMIN_ROLE_GMTOKEN_FACTORY role"],"discriminator":[214,48,33,96,99,36,94,198],"accounts":[{"name":"authority","docs":["The account with the authority to revoke a GM Token Factory role"],"signer":true},{"name":"recipient","docs":["Receives the lamports from closing the account"],"writable":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The Roles account being closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"revoke_gmtoken_manager_role","docs":["Revoke a role from the GM token manager","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[202,63,132,81,219,242,100,90],"accounts":[{"name":"authority","docs":["The account with the authority to revoke GM Token Manager roles"],"signer":true},{"name":"recipient","docs":["Receives the lamports from closing the Roles account"],"writable":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The Roles account being closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"revoke_gmtoken_role","docs":["Revokes the specified GMToken role from the user","Signer must have the ADMIN_ROLE_GMTOKEN role"],"discriminator":[108,55,0,39,40,39,103,144],"accounts":[{"name":"recipient","docs":["The recipient of the closed account lamports"],"writable":true},{"name":"authority","docs":["The account with the authority to revoke GM Token roles"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN` role","# PDA Seeds","- ADMIN_ROLE_GMTOKEN","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The Roles account being closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}}],"args":[]},{"name":"revoke_role","docs":["Revoke a role by closing the Roles account and reclaim rent","Signer must be the upgrade authority of the program"],"discriminator":[179,232,2,180,48,227,82,7],"accounts":[{"name":"recipient","docs":["Receives funds from account closure"],"writable":true},{"name":"authority","docs":["The account with the authority to revoke roles, must be the program upgrade authority"],"signer":true},{"name":"role_to_revoke","docs":["The Roles account to be closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"_role"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"program","docs":["The Ondo Global Markets program"],"address":"XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm"},{"name":"program_data","docs":["The ProgramData account of the Ondo Global Markets program"]}],"args":[{"name":"_role","type":{"defined":{"name":"RoleType"}}}]},{"name":"revoke_sanity_configurer_role","docs":["Revoke a configurer role for sanity check","Signer must have the ADMIN_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[170,122,0,190,220,165,67,86],"accounts":[{"name":"recipient","docs":["Receives the lamports from closing the Roles account"],"writable":true},{"name":"authority","docs":["The account with the authority to revoke the configurer role"],"signer":true},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `ADMIN_ROLE_ONDO_SANITY_CHECK`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The Roles account being closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the configurer role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"revoke_sanity_setter_role","docs":["Revoke a setter role for sanity check","Signer must have the ADMIN_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[224,165,35,213,84,53,9,229],"accounts":[{"name":"recipient","docs":["Receives the lamports from closing the Roles account"],"writable":true},{"name":"authority","docs":["The account that has the authority to revoke the setter role"],"signer":true},{"name":"authority_role_account","docs":["The role account of the admin","# PDA Seeds","- `RoleType::ADMIN_ROLE_ONDO_SANITY_CHECK`","- `authority` (the authority's address)"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The role account to be closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the setter role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"revoke_usdon_role","docs":["Revokes the specified USDon role from a user","Signer must have the GUARDIAN_USDON role"],"discriminator":[231,35,217,203,112,165,182,69],"accounts":[{"name":"authority","docs":["The account with the authority to revoke a role"],"signer":true},{"name":"recipient","docs":["Receives the lamports from closing the `Roles` account"],"writable":true},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `GUARDIAN_USDON` role","# PDA Seeds","- GUARDIAN_USDON","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[71,117,97,114,100,105,97,110,85,83,68,111,110]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The Roles account being closed","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}}],"args":[]},{"name":"set_allowed_deviation_bps","docs":["Set allowed price deviation in basis points","Signer must have the CONFIGURER_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[46,36,29,85,194,180,86,124],"accounts":[{"name":"authority","docs":["The account with the authority to configure the sanity check"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `CONFIGURER_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `CONFIGURER_ROLE_ONDO_SANITY_CHECK`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[67,111,110,102,105,103,117,114,101,114,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint"]},{"name":"sanity_check_account","docs":["The OracleSanityCheck account to be configured","# PDA Seeds","- `ORACLE_SANITY_CHECK_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}}],"args":[{"name":"allowed_deviation_bps","type":"u64"}]},{"name":"set_attestation_signer_secp","docs":["Update the secp256k1 attestation signer address","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[121,157,129,65,181,51,55,0],"accounts":[{"name":"authority","docs":["The account with the authority to execute the unpause/configuration operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[{"name":"attestation_signer_secp","type":{"array":["u8",20]}}]},{"name":"set_last_price","docs":["Update the last price in sanity check","Signer must have the SETTER_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[58,56,189,177,199,145,145,43],"accounts":[{"name":"authority","docs":["The account with the authority to set the last price"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `SETTER_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `SETTER_ROLE_ONDO_SANITY_CHECK`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[83,101,116,116,101,114,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint"]},{"name":"sanity_check_account","docs":["The `OracleSanityCheck` account to be updated","# PDA Seeds","- `ORACLE_SANITY_CHECK_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}}],"args":[{"name":"last_price","type":"u64"}]},{"name":"set_max_time_delay","docs":["Set maximum time delay for sanity check","Signer must have the CONFIGURER_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[145,127,145,218,239,173,252,9],"accounts":[{"name":"authority","docs":["The account with the authority to configure the sanity check"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `CONFIGURER_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `CONFIGURER_ROLE_ONDO_SANITY_CHECK`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[67,111,110,102,105,103,117,114,101,114,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint"]},{"name":"sanity_check_account","docs":["The OracleSanityCheck account to be configured","# PDA Seeds","- `ORACLE_SANITY_CHECK_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}}],"args":[{"name":"max_time_delay","type":"i64"}]},{"name":"set_ondo_user_limits","docs":["Set rate limit for a user","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[86,133,101,215,245,143,28,159],"accounts":[{"name":"authority","docs":["The account with the authority to set user limits"],"signer":true},{"name":"mint","docs":["The GM Token mint"],"relations":["token_limit"]},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"ondo_user","docs":["The `OndoUser` account to update","# PDA Seeds","- `ONDO_USER_SEED`","- User's owner address","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"ondo_user.owner","account":"OndoUser"},{"kind":"account","path":"mint"}]}},{"name":"token_limit","docs":["The TokenLimit account","# PDA Seeds","- TOKEN_LIMIT_ACCOUNT_SEED","- Mint address"],"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}}],"args":[{"name":"rate_limit","type":"u64"},{"name":"limit_window","type":"u64"}]},{"name":"set_oracle_price_max_age","docs":["Set the maximum age for oracle price data. When USDC oracle prices are more stale than `oracle_price_max_age`","swaps will halt.","Signer must have the ADMIN_ROLE_USDON_MANAGER role"],"discriminator":[198,173,23,10,148,48,248,61],"accounts":[{"name":"authority","docs":["The account with the authority to execute the operation"],"signer":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account to be modified","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_USDON_MANAGER` role","# PDA Seeds","- ADMIN_ROLE_USDON_MANAGER","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,85,83,68,111,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"oracle_price_max_age","type":"u64"}]},{"name":"set_token_limit","docs":["Update token-level rate limits","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[216,80,182,245,223,87,77,53],"accounts":[{"name":"authority","docs":["The account with the authority to update token limits"],"writable":true,"signer":true},{"name":"mint","docs":["The GM Token or USDon mint"]},{"name":"token_limit","docs":["The `TokenLimit` account to be updated","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"rate_limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}},{"name":"default_user_rate_limit","type":{"option":"u64"}},{"name":"default_user_limit_window","type":{"option":"u64"}}]},{"name":"set_trading_hours_offset","docs":["Set the trading hours offset","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER or ISSUANCE_HOURS_ROLE role"],"discriminator":[65,114,20,50,234,67,255,126],"accounts":[{"name":"authority","docs":["The account with the authority to set the trading hours offset"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER` or `ISSUANCE_HOURS_ROLE`","- The authority's address"],"pda":{"seeds":[{"kind":"account","path":"authority_role_account.role","account":"Roles"},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The GmTokenManagerState account to be modified"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[{"name":"new_trading_hours_offset","type":"i64"}]},{"name":"set_usdc_price_update_address","docs":["Set the USDC price update address","Signer must have the ADMIN_ROLE_USDON_MANAGER role"],"discriminator":[12,142,252,201,224,148,254,32],"accounts":[{"name":"authority","docs":["The account with the authority to execute the operation"],"signer":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account to be modified","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_USDON_MANAGER` role","# PDA Seeds","- ADMIN_ROLE_USDON_MANAGER","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,85,83,68,111,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"new_price_update_address","type":"pubkey"}]},{"name":"update_scaled_ui_multiplier","docs":["Update the UI multiplier for token display","Signer must have the UPDATE_MULTIPLIER_ROLE role"],"discriminator":[96,212,189,168,220,27,240,70],"accounts":[{"name":"authority","docs":["The account with the authority to update the multiplier"],"writable":true,"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `UPDATE_MULTIPLIER_ROLE` role"],"pda":{"seeds":[{"kind":"const","value":[85,112,100,97,116,101,77,117,108,116,105,112,108,105,101,114,82,111,108,101]},{"kind":"account","path":"authority"}]}},{"name":"mint_authority","docs":["Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"mint","docs":["The mint whose scaled UI multiplier is being updated"],"writable":true},{"name":"usdon_manager_state","docs":["The USDon manager state account, validates that the mint is not the USDon mint"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"token_program","docs":["The token program (should be the spl_token_2022 program)"]}],"args":[{"name":"new_multiplier","type":"f64"},{"name":"timestamp","type":"i64"}]},{"name":"update_token_metadata","docs":["Update a token's metadata (name, symbol, URI)","Signer must have the UPDATE_METADATA_ROLE role"],"discriminator":[243,6,8,23,126,181,251,158],"accounts":[{"name":"payer","docs":["Pays for fees if needed"],"writable":true,"signer":true},{"name":"authority","docs":["The operator updating the metadata, if multisig then this is different to the payer","Otherwise, the operator is the same as the payer"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has `UPDATE_METADATA_ROLE` role"],"pda":{"seeds":[{"kind":"const","value":[85,112,100,97,116,101,77,101,116,97,100,97,116,97,82,111,108,101]},{"kind":"account","path":"authority"}]}},{"name":"mint_authority","docs":["Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"mint","docs":["The mint whose metadata is being updated"],"writable":true},{"name":"token_program","docs":["The token program (should be the spl_token_2022 program)"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"new_name","type":{"option":"string"}},{"name":"new_symbol","type":{"option":"string"}},{"name":"new_uri","type":{"option":"string"}}]}],"accounts":[{"name":"Attestation","discriminator":[152,125,183,86,36,146,121,73]},{"name":"GMTokenManagerState","discriminator":[120,3,104,163,207,32,156,24]},{"name":"OndoUser","discriminator":[20,5,255,14,176,93,189,142]},{"name":"OracleSanityCheck","discriminator":[27,186,33,40,113,34,206,76]},{"name":"Roles","discriminator":[177,37,17,201,242,158,212,65]},{"name":"TokenLimit","discriminator":[130,254,128,120,255,3,217,51]},{"name":"USDonManagerState","discriminator":[4,39,95,41,51,43,174,91]},{"name":"Whitelist","discriminator":[204,176,52,79,146,121,54,247]}],"events":[{"name":"GMTokenDeployed","discriminator":[155,46,81,223,209,203,89,46]},{"name":"GMTokenMintingPaused","discriminator":[215,17,82,34,76,211,151,22]},{"name":"GMTokenPaused","discriminator":[147,68,57,240,27,46,44,201]},{"name":"GMTokenRedemptionPaused","discriminator":[246,249,230,73,152,65,61,214]},{"name":"RateLimitTokenSet","discriminator":[133,18,77,154,53,236,197,235]},{"name":"RateLimitUserSet","discriminator":[175,49,222,84,192,105,171,129]},{"name":"RoleGranted","discriminator":[220,183,89,228,143,63,246,58]},{"name":"RoleRevoked","discriminator":[167,183,52,229,126,206,62,61]},{"name":"SanityCheckSet","discriminator":[9,207,117,155,44,153,31,234]},{"name":"SanityCheckUpdated","discriminator":[173,97,103,183,67,230,249,1]},{"name":"SetTradingHoursOffset","discriminator":[122,8,3,44,200,105,217,208]},{"name":"TokenFactoryPaused","discriminator":[24,185,192,62,218,128,226,103]},{"name":"TokenManagerMintingPaused","discriminator":[96,11,118,59,8,78,247,254]},{"name":"TokenManagerRedemptionPaused","discriminator":[66,222,165,60,32,59,135,161]},{"name":"TokensRetrieved","discriminator":[217,35,1,89,38,122,145,187]},{"name":"TradeExecuted","discriminator":[41,110,64,129,60,79,179,80]},{"name":"UserAddedToWhitelist","discriminator":[206,139,181,72,116,111,42,42]},{"name":"UserRemovedFromWhitelist","discriminator":[106,223,245,11,213,150,2,15]}],"errors":[{"code":6000,"name":"MissingOrMismatchedSecpIx","msg":"Missing or mismatched secp256k1 verification instruction"},{"code":6001,"name":"MalformedSecpIx","msg":"Malformed secp256k1 instruction"},{"code":6002,"name":"WrongSigCount","msg":"Wrong signature count"},{"code":6003,"name":"WrongDigestLen","msg":"Expected 32-byte hash"},{"code":6004,"name":"DigestMismatch","msg":"Digest mismatch"},{"code":6005,"name":"AddressMismatch","msg":"Recovered address mismatch"}],"types":[{"name":"Attestation","docs":["Attestation account to track consumed attestations","each consumed attestation is stored in its own account"],"type":{"kind":"struct","fields":[{"name":"attestation_id","type":{"array":["u8",16]}},{"name":"creator","type":"pubkey"},{"name":"created_at","type":"i64"},{"name":"bump","type":"u8"}]}},{"name":"GMTokenDeployed","docs":["Event emitted when a GM Token is deployed","Fields:","- gm_token: The public key of the deployed GM Token"],"type":{"kind":"struct","fields":[{"name":"gm_token","type":"pubkey"}]}},{"name":"GMTokenManagerState","docs":["GM Token Manager State account - tracks global state for GM Token operations"],"type":{"kind":"struct","fields":[{"name":"execution_id","type":{"option":"u128"}},{"name":"factory_paused","type":"bool"},{"name":"redemption_paused","type":"bool"},{"name":"minting_paused","type":"bool"},{"name":"bump","type":"u8"},{"name":"attestation_signer_secp","docs":["Ethereum address (20 bytes) for secp256k1 signature verification","Used to verify attestation signatures for buy/sell operations","All zeros ([0u8; 20]) means not set"],"type":{"array":["u8",20]}},{"name":"trading_hours_offset","docs":["Trading hours offset from UTC in seconds","Positive values are east of UTC, negative values are west of UTC"],"type":"i64"}]}},{"name":"GMTokenMintingPaused","docs":["Event emitted when minting for a GM Token is paused or unpaused","Fields:","- is_paused: Boolean indicating if minting/redemptions are paused","- token: The address of the GM Token","- pauser: The address of the operator who performed the pause/unpause action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"token","type":"pubkey"},{"name":"pauser","type":"pubkey"}]}},{"name":"GMTokenPaused","docs":["Event emitted when a GM Token is paused/unpaused at the mint-level","Fields:","- is_paused: Boolean indicating whether the token is paused","- token: The address of the GM Token","- pauser: The address of the operator who performed the pause/unpaused action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"token","type":"pubkey"},{"name":"pauser","type":"pubkey"}]}},{"name":"GMTokenRedemptionPaused","docs":["Event emitted redemptions for a GM Token are paused or unpaused","Fields:","- is_paused: Boolean indicating if redemptions are paused","- token: The address of the GM Token","- pauser: The address of the operator who performed the pause/unpause action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"token","type":"pubkey"},{"name":"pauser","type":"pubkey"}]}},{"name":"OndoUser","docs":["OndoUser state account - tracks user-specific data for a GM Token"],"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"rate_limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}},{"name":"mint_capacity_used","type":{"option":"u64"}},{"name":"mint_last_updated","type":{"option":"i64"}},{"name":"redeem_capacity_used","type":{"option":"u64"}},{"name":"redeem_last_updated","type":{"option":"i64"}},{"name":"bump","type":"u8"}]}},{"name":"OracleSanityCheck","docs":["OracleSanityCheck state account - tracks sanity check parameters for a specific mint"],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"last_price","type":"u64"},{"name":"allowed_deviation_bps","type":"u64"},{"name":"max_time_delay","type":"i64"},{"name":"price_last_updated","type":"i64"},{"name":"bump","type":"u8"}]}},{"name":"RateLimitTokenSet","docs":["Event emitted when a rate limit is set for a token","Fields:","- token: The public key of the token for which the rate limit is set","- limit: The rate limit value","- limit_window: The time window for the rate limit"],"type":{"kind":"struct","fields":[{"name":"token","type":"pubkey"},{"name":"limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}}]}},{"name":"RateLimitUserSet","docs":["Event emitted when a rate limit is set for a user","Fields:","- user: The public key of the user for whom the rate limit is set","- limit: The rate limit value"],"type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"limit","type":"u64"}]}},{"name":"RoleGranted","docs":["Event emitted when a role is granted to a user","Fields:","- role: The role that was granted","- grantee: The public key of the user who was granted the role","- granter: The public key of the user who granted the role"],"type":{"kind":"struct","fields":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"grantee","type":"pubkey"},{"name":"granter","type":"pubkey"}]}},{"name":"RoleRevoked","docs":["Event emitted when a role is revoked from a user","Fields:","- role: The role that was revoked","- grantee: The public key of the user who had the role revoked","- revoker: The public key of the user who revoked the role"],"type":{"kind":"struct","fields":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"grantee","type":"pubkey"},{"name":"revoker","type":"pubkey"}]}},{"name":"RoleType","type":{"kind":"enum","variants":[{"name":"MinterRoleUSDon"},{"name":"BurnerRoleUSDon"},{"name":"AdminRoleUSDon"},{"name":"AdminRoleUSDonManager"},{"name":"GuardianUSDon"},{"name":"DeployerRoleGMTokenFactory"},{"name":"PauserRoleGMTokenFactory"},{"name":"AdminRoleGMTokenFactory"},{"name":"MinterRoleGMToken"},{"name":"AdminRoleGMToken"},{"name":"PauserRoleGMTokenManager"},{"name":"PauserRoleGMToken"},{"name":"UnpauserRoleGMToken"},{"name":"AdminRoleGMTokenManager"},{"name":"IssuanceHoursRole"},{"name":"SetterRoleOndoSanityCheck"},{"name":"ConfigurerRoleOndoSanityCheck"},{"name":"AdminRoleOndoSanityCheck"},{"name":"AdminRoleWhitelist"},{"name":"UpdateMultiplierRole"},{"name":"UpdateMetadataRole"}]}},{"name":"Roles","docs":["Roles state account - tracks role assignments for addresses"],"type":{"kind":"struct","fields":[{"name":"address","type":"pubkey"},{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"bump","type":"u8"}]}},{"name":"SanityCheckSet","docs":["Event emitted when a sanity check is set for a mint","Fields:","- mint: The public key of the mint for which the sanity check is set","- allowed_deviation_bps: The allowed deviation in basis points","- max_time_delay: The maximum time delay for the sanity check"],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"allowed_deviation_bps","type":"u64"},{"name":"max_time_delay","type":"i64"}]}},{"name":"SanityCheckUpdated","docs":["Event emitted when a sanity check is updated for a mint","Fields:","- mint: The public key of the mint for which the sanity check is updated","- last_price: The last recorded price (optional)","- allowed_deviation_bps: The allowed deviation in basis points (optional)","- max_time_delay: The maximum time delay for the sanity check (optional)"],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"last_price","type":{"option":"u64"}},{"name":"allowed_deviation_bps","type":{"option":"u64"}},{"name":"max_time_delay","type":{"option":"i64"}}]}},{"name":"SetTradingHoursOffset","docs":["Event emitted when the trading hours offset is set","Fields:","- prev_trading_hours_offset: The previous trading hours offset","- new_trading_hours_offset: The new trading hours offset"],"type":{"kind":"struct","fields":[{"name":"prev_trading_hours_offset","type":"i64"},{"name":"new_trading_hours_offset","type":"i64"}]}},{"name":"TokenFactoryPaused","docs":["Event emitted when the Token Factory is paused or unpaused","Fields:","- is_paused: Boolean indicating if the Token Factory is paused","- pauser: The address of the operator who performed the pause/unpause action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"pauser","type":"pubkey"}]}},{"name":"TokenLimit","docs":["TokenLimit state account - tracks global token limit parameters for a specific GM Token"],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"rate_limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}},{"name":"mint_capacity_used","type":{"option":"u64"}},{"name":"mint_last_updated","type":{"option":"i64"}},{"name":"redeem_capacity_used","type":{"option":"u64"}},{"name":"redeem_last_updated","type":{"option":"i64"}},{"name":"redemption_paused","type":"bool"},{"name":"minting_paused","type":"bool"},{"name":"default_user_rate_limit","type":{"option":"u64"}},{"name":"default_user_limit_window","type":{"option":"u64"}},{"name":"bump","type":"u8"}]}},{"name":"TokenManagerMintingPaused","docs":["Event emitted when GM Token minting is globally paused or unpaused","Fields:","- is_paused: Boolean indicating if the minting is globally paused","- pauser: The address of the user who performed the pause/unpause action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"pauser","type":"pubkey"}]}},{"name":"TokenManagerRedemptionPaused","docs":["Event emitted when GM Token redemptions are globally paused or unpaused","Fields:","- is_paused: Boolean indicating if redemptions are globally paused","- pauser: The address of the operator who performed the pause/unpause action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"pauser","type":"pubkey"}]}},{"name":"TokensRetrieved","docs":["Event emitted when tokens are retrieved (withdrawn) from a vault by an admin","Fields:","- token: The public key of the token mint being withdrawn","- to: The destination address receiving the tokens","- amount: The amount of tokens withdrawn","- authority: The public key of the admin who executed the withdrawal"],"type":{"kind":"struct","fields":[{"name":"token","type":"pubkey"},{"name":"to","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"authority","type":"pubkey"}]}},{"name":"TradeExecuted","docs":["Event emitted when a trade is executed","Fields:","- execution_id: The unique identifier of the trade execution"],"type":{"kind":"struct","fields":[{"name":"execution_id","type":"u128"}]}},{"name":"USDonManagerState","docs":["USDonManagerState state account - tracks global configuration for the USDon stablecoin system"],"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"usdon_mint","type":"pubkey"},{"name":"oracle_price_enabled","type":"bool"},{"name":"oracle_price_max_age","type":"u64"},{"name":"usdc_price_update","type":"pubkey"},{"name":"usdc_vault","type":"pubkey"},{"name":"usdon_vault","type":"pubkey"},{"name":"bump","type":"u8"}]}},{"name":"UserAddedToWhitelist","docs":["Event emitted when a user is added to the whitelist","Fields:","- user: The public key of the user being added to the whitelist","- added_by: The public key of the admin who added the user to the whitelist"],"type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"added_by","type":"pubkey"}]}},{"name":"UserRemovedFromWhitelist","docs":["Event emitted when a user is removed from the whitelist","Fields:","- user: The public key of the user being removed from the whitelist","- removed_by: The public key of the admin who removed the user from the whitelist"],"type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"removed_by","type":"pubkey"}]}},{"name":"Whitelist","docs":["Whitelist account - tracks whitelisted addresses.","","Used as a marker account - presence of the account indicates whitelisting."],"type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/openbook_v2.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.json b/olddocs/archivekbot2/idls/openbook_v2.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.json new file mode 100644 index 0000000..4869fc9 --- /dev/null +++ b/olddocs/archivekbot2/idls/openbook_v2.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"openbook_v2","instructions":[{"name":"createMarket","docs":["Create a [`Market`](crate::state::Market) for a given token pair."],"accounts":[{"name":"market","isMut":true,"isSigner":true},{"name":"marketAuthority","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false,"docs":["Accounts are initialized by client,","anchor discriminator is set first when ix exits,"]},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"collectFeeAdmin","isMut":false,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":false,"isOptional":true},{"name":"consumeEventsAdmin","isMut":false,"isSigner":false,"isOptional":true},{"name":"closeMarketAdmin","isMut":false,"isSigner":false,"isOptional":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"oracleConfig","type":{"defined":"OracleConfigParams"}},{"name":"quoteLotSize","type":"i64"},{"name":"baseLotSize","type":"i64"},{"name":"makerFee","type":"i64"},{"name":"takerFee","type":"i64"},{"name":"timeExpiry","type":"i64"}]},{"name":"closeMarket","docs":["Close a [`Market`](crate::state::Market) (only","[`close_market_admin`](crate::state::Market::close_market_admin))."],"accounts":[{"name":"closeMarketAdmin","isMut":false,"isSigner":true},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"solDestination","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createOpenOrdersIndexer","docs":["Create an [`OpenOrdersIndexer`](crate::state::OpenOrdersIndexer) account."],"accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"openOrdersIndexer","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"closeOpenOrdersIndexer","docs":["Close an [`OpenOrdersIndexer`](crate::state::OpenOrdersIndexer) account."],"accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"openOrdersIndexer","isMut":true,"isSigner":false},{"name":"solDestination","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createOpenOrdersAccount","docs":["Create an [`OpenOrdersAccount`](crate::state::OpenOrdersAccount)."],"accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"delegateAccount","isMut":false,"isSigner":false,"isOptional":true},{"name":"openOrdersIndexer","isMut":true,"isSigner":false},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"}]},{"name":"closeOpenOrdersAccount","docs":["Close an [`OpenOrdersAccount`](crate::state::OpenOrdersAccount)."],"accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"openOrdersIndexer","isMut":true,"isSigner":false},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"solDestination","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"placeOrder","docs":["Place an order.","","Different types of orders have different effects on the order book,","as described in [`PlaceOrderType`](crate::state::PlaceOrderType).","","`price_lots` refers to the price in lots: the number of quote lots","per base lot. It is ignored for `PlaceOrderType::Market` orders.","","`expiry_timestamp` is a unix timestamp for when this order should","expire. If 0 is passed in, the order will never expire. If the time","is in the past, the instruction is skipped. Timestamps in the future","are reduced to now + 65,535s.","","`limit` determines the maximum number of orders from the book to fill,","and can be used to limit CU spent. When the limit is reached, processing","stops and the instruction succeeds."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"PlaceOrderArgs"}}],"returns":{"option":"u128"}},{"name":"editOrder","docs":["Edit an order."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"clientOrderId","type":"u64"},{"name":"expectedCancelSize","type":"i64"},{"name":"placeOrder","type":{"defined":"PlaceOrderArgs"}}],"returns":{"option":"u128"}},{"name":"editOrderPegged","docs":["Edit an order pegged."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"clientOrderId","type":"u64"},{"name":"expectedCancelSize","type":"i64"},{"name":"placeOrder","type":{"defined":"PlaceOrderPeggedArgs"}}],"returns":{"option":"u128"}},{"name":"placeOrders","docs":["Place multiple orders"],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"ordersType","type":{"defined":"PlaceOrderType"}},{"name":"bids","type":{"vec":{"defined":"PlaceMultipleOrdersArgs"}}},{"name":"asks","type":{"vec":{"defined":"PlaceMultipleOrdersArgs"}}},{"name":"limit","type":"u8"}],"returns":{"vec":{"option":"u128"}}},{"name":"cancelAllAndPlaceOrders","docs":["Cancel orders and place multiple orders."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"ordersType","type":{"defined":"PlaceOrderType"}},{"name":"bids","type":{"vec":{"defined":"PlaceMultipleOrdersArgs"}}},{"name":"asks","type":{"vec":{"defined":"PlaceMultipleOrdersArgs"}}},{"name":"limit","type":"u8"}],"returns":{"vec":{"option":"u128"}}},{"name":"placeOrderPegged","docs":["Place an oracle-peg order."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"PlaceOrderPeggedArgs"}}],"returns":{"option":"u128"}},{"name":"placeTakeOrder","docs":["Place an order that shall take existing liquidity off of the book, not","add a new order off the book.","","This type of order allows for instant token settlement for the taker."],"accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"penaltyPayer","isMut":true,"isSigner":true},{"name":"market","isMut":true,"isSigner":false},{"name":"marketAuthority","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true}],"args":[{"name":"args","type":{"defined":"PlaceTakeOrderArgs"}}]},{"name":"consumeEvents","docs":["Process up to `limit` [events](crate::state::AnyEvent).","","When a user places a 'take' order, they do not know beforehand which","market maker will have placed the 'make' order that they get executed","against. This prevents them from passing in a market maker's","[`OpenOrdersAccount`](crate::state::OpenOrdersAccount), which is needed","to credit/debit the relevant tokens to/from the maker. As such, Openbook","uses a 'crank' system, where `place_order` only emits events, and","`consume_events` handles token settlement.","","Currently, there are two types of events: [`FillEvent`](crate::state::FillEvent)s","and [`OutEvent`](crate::state::OutEvent)s.","","A `FillEvent` is emitted when an order is filled, and it is handled by","debiting whatever the taker is selling from the taker and crediting","it to the maker, and debiting whatever the taker is buying from the","maker and crediting it to the taker. Note that *no tokens are moved*,","these are just debits and credits to each party's [`Position`](crate::state::Position).","","An `OutEvent` is emitted when a limit order needs to be removed from","the book during a `place_order` invocation, and it is handled by","crediting whatever the maker would have sold (quote token in a bid,","base token in an ask) back to the maker."],"accounts":[{"name":"consumeEventsAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"market","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false}],"args":[{"name":"limit","type":"u64"}]},{"name":"consumeGivenEvents","docs":["Process the [events](crate::state::AnyEvent) at the given positions."],"accounts":[{"name":"consumeEventsAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"market","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false}],"args":[{"name":"slots","type":{"vec":"u64"}}]},{"name":"cancelOrder","docs":["Cancel an order by its `order_id`.","","Note that this doesn't emit an [`OutEvent`](crate::state::OutEvent) because a","maker knows that they will be passing in their own [`OpenOrdersAccount`](crate::state::OpenOrdersAccount)."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false}],"args":[{"name":"orderId","type":"u128"}]},{"name":"cancelOrderByClientOrderId","docs":["Cancel an order by its `client_order_id`.","","Note that this doesn't emit an [`OutEvent`](crate::state::OutEvent) because a","maker knows that they will be passing in their own [`OpenOrdersAccount`](crate::state::OpenOrdersAccount)."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false}],"args":[{"name":"clientOrderId","type":"u64"}],"returns":"i64"},{"name":"cancelAllOrders","docs":["Cancel up to `limit` orders, optionally filtering by side"],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false}],"args":[{"name":"sideOption","type":{"option":{"defined":"Side"}}},{"name":"limit","type":"u8"}]},{"name":"deposit","docs":["Deposit a certain amount of `base` and `quote` lamports into one's","[`Position`](crate::state::Position).","","Makers might wish to `deposit`, rather than have actual tokens moved for","each trade, in order to reduce CUs."],"accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"baseAmount","type":"u64"},{"name":"quoteAmount","type":"u64"}]},{"name":"refill","docs":["Refill a certain amount of `base` and `quote` lamports. The amount being passed is the","total lamports that the [`Position`](crate::state::Position) will have.","","Makers might wish to `refill`, rather than have actual tokens moved for","each trade, in order to reduce CUs."],"accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"baseAmount","type":"u64"},{"name":"quoteAmount","type":"u64"}]},{"name":"settleFunds","docs":["Withdraw any available tokens."],"accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"penaltyPayer","isMut":true,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"marketAuthority","isMut":false,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"referrerAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"settleFundsExpired","docs":["Withdraw any available tokens when the market is expired (only","[`close_market_admin`](crate::state::Market::close_market_admin))."],"accounts":[{"name":"closeMarketAdmin","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"penaltyPayer","isMut":true,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"marketAuthority","isMut":false,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"referrerAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"sweepFees","docs":["Sweep fees, as a [`Market`](crate::state::Market)'s admin."],"accounts":[{"name":"collectFeeAdmin","isMut":false,"isSigner":true},{"name":"market","isMut":true,"isSigner":false},{"name":"marketAuthority","isMut":false,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"tokenReceiverAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"setDelegate","docs":["Update the [`delegate`](crate::state::OpenOrdersAccount::delegate) of an open orders account."],"accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"delegateAccount","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"setMarketExpired","docs":["Set market to expired before pruning orders and closing the market (only","[`close_market_admin`](crate::state::Market::close_market_admin))."],"accounts":[{"name":"closeMarketAdmin","isMut":false,"isSigner":true},{"name":"market","isMut":true,"isSigner":false}],"args":[]},{"name":"pruneOrders","docs":["Remove orders from the book when the market is expired (only","[`close_market_admin`](crate::state::Market::close_market_admin))."],"accounts":[{"name":"closeMarketAdmin","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false}],"args":[{"name":"limit","type":"u8"}]},{"name":"stubOracleCreate","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"oracle","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"price","type":"f64"}]},{"name":"stubOracleClose","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"oracle","isMut":true,"isSigner":false},{"name":"solDestination","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"stubOracleSet","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"oracle","isMut":true,"isSigner":false}],"args":[{"name":"price","type":"f64"}]}],"accounts":[{"name":"Market","type":{"kind":"struct","fields":[{"name":"bump","docs":["PDA bump"],"type":"u8"},{"name":"baseDecimals","docs":["Number of decimals used for the base token.","","Used to convert the oracle's price into a native/native price."],"type":"u8"},{"name":"quoteDecimals","type":"u8"},{"name":"padding1","type":{"array":["u8",5]}},{"name":"marketAuthority","type":"publicKey"},{"name":"timeExpiry","docs":["No expiry = 0. Market will expire and no trading allowed after time_expiry"],"type":"i64"},{"name":"collectFeeAdmin","docs":["Admin who can collect fees from the market"],"type":"publicKey"},{"name":"openOrdersAdmin","docs":["Admin who must sign off on all order creations"],"type":{"defined":"NonZeroPubkeyOption"}},{"name":"consumeEventsAdmin","docs":["Admin who must sign off on all event consumptions"],"type":{"defined":"NonZeroPubkeyOption"}},{"name":"closeMarketAdmin","docs":["Admin who can set market expired, prune orders and close the market"],"type":{"defined":"NonZeroPubkeyOption"}},{"name":"name","docs":["Name. Trailing zero bytes are ignored."],"type":{"array":["u8",16]}},{"name":"bids","docs":["Address of the BookSide account for bids"],"type":"publicKey"},{"name":"asks","docs":["Address of the BookSide account for asks"],"type":"publicKey"},{"name":"eventHeap","docs":["Address of the EventHeap account"],"type":"publicKey"},{"name":"oracleA","docs":["Oracles account address"],"type":{"defined":"NonZeroPubkeyOption"}},{"name":"oracleB","type":{"defined":"NonZeroPubkeyOption"}},{"name":"oracleConfig","docs":["Oracle configuration"],"type":{"defined":"OracleConfig"}},{"name":"quoteLotSize","docs":["Number of quote native in a quote lot. Must be a power of 10.","","Primarily useful for increasing the tick size on the market: A lot price","of 1 becomes a native price of quote_lot_size/base_lot_size becomes a","ui price of quote_lot_size*base_decimals/base_lot_size/quote_decimals."],"type":"i64"},{"name":"baseLotSize","docs":["Number of base native in a base lot. Must be a power of 10.","","Example: If base decimals for the underlying asset is 6, base lot size","is 100 and and base position lots is 10_000 then base position native is","1_000_000 and base position ui is 1."],"type":"i64"},{"name":"seqNum","docs":["Total number of orders seen"],"type":"u64"},{"name":"registrationTime","docs":["Timestamp in seconds that the market was registered at."],"type":"i64"},{"name":"makerFee","docs":["Fees","","Fee (in 10^-6) when matching maker orders.","maker_fee < 0 it means some of the taker_fees goes to the maker","maker_fee > 0, it means no taker_fee to the maker, and maker fee goes to the referral"],"type":"i64"},{"name":"takerFee","docs":["Fee (in 10^-6) for taker orders, always >= 0."],"type":"i64"},{"name":"feesAccrued","docs":["Total fees accrued in native quote"],"type":"u128"},{"name":"feesToReferrers","docs":["Total fees settled in native quote"],"type":"u128"},{"name":"referrerRebatesAccrued","docs":["Referrer rebates to be distributed"],"type":"u64"},{"name":"feesAvailable","docs":["Fees generated and available to withdraw via sweep_fees"],"type":"u64"},{"name":"makerVolume","docs":["Cumulative maker volume (same as taker volume) in quote native units"],"type":"u128"},{"name":"takerVolumeWoOo","docs":["Cumulative taker volume in quote native units due to place take orders"],"type":"u128"},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"marketBaseVault","type":"publicKey"},{"name":"baseDepositTotal","type":"u64"},{"name":"marketQuoteVault","type":"publicKey"},{"name":"quoteDepositTotal","type":"u64"},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"OpenOrdersAccount","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"market","type":"publicKey"},{"name":"name","type":{"array":["u8",32]}},{"name":"delegate","type":{"defined":"NonZeroPubkeyOption"}},{"name":"accountNum","type":"u32"},{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"padding","type":{"array":["u8",2]}},{"name":"position","type":{"defined":"Position"}},{"name":"openOrders","type":{"array":[{"defined":"OpenOrder"},24]}}]}},{"name":"OpenOrdersIndexer","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"createdCounter","type":"u32"},{"name":"addresses","type":{"vec":"publicKey"}}]}},{"name":"StubOracle","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"price","type":"f64"},{"name":"lastUpdateTs","type":"i64"},{"name":"lastUpdateSlot","type":"u64"},{"name":"deviation","type":"f64"},{"name":"reserved","type":{"array":["u8",104]}}]}},{"name":"BookSide","type":{"kind":"struct","fields":[{"name":"roots","type":{"array":[{"defined":"OrderTreeRoot"},2]}},{"name":"reservedRoots","type":{"array":[{"defined":"OrderTreeRoot"},4]}},{"name":"reserved","type":{"array":["u8",256]}},{"name":"nodes","type":{"defined":"OrderTreeNodes"}}]}},{"name":"EventHeap","docs":["Container for the different EventTypes.","","Events are stored in a fixed-array of nodes. Free nodes are connected by a single-linked list","starting at free_head while used nodes form a circular doubly-linked list starting at","used_head."],"type":{"kind":"struct","fields":[{"name":"header","type":{"defined":"EventHeapHeader"}},{"name":"nodes","type":{"array":[{"defined":"EventNode"},600]}},{"name":"reserved","type":{"array":["u8",64]}}]}}],"types":[{"name":"NonZeroPubkeyOption","docs":["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"],"type":{"kind":"struct","fields":[{"name":"key","type":"publicKey"}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"bidsBaseLots","docs":["Base lots in open bids"],"type":"i64"},{"name":"asksBaseLots","docs":["Base lots in open asks"],"type":"i64"},{"name":"baseFreeNative","type":"u64"},{"name":"quoteFreeNative","type":"u64"},{"name":"lockedMakerFees","type":"u64"},{"name":"referrerRebatesAvailable","type":"u64"},{"name":"penaltyHeapCount","docs":["Count of ixs when events are added to the heap","To avoid this, send remaining accounts in order to process the events"],"type":"u64"},{"name":"makerVolume","docs":["Cumulative maker volume in quote native units (display only)"],"type":"u128"},{"name":"takerVolume","docs":["Cumulative taker volume in quote native units (display only)"],"type":"u128"},{"name":"bidsQuoteLots","docs":["Quote lots in open bids"],"type":"i64"},{"name":"reserved","type":{"array":["u8",64]}}]}},{"name":"OpenOrder","type":{"kind":"struct","fields":[{"name":"id","type":"u128"},{"name":"clientId","type":"u64"},{"name":"lockedPrice","docs":["Price at which user's assets were locked"],"type":"i64"},{"name":"isFree","type":"u8"},{"name":"sideAndTree","type":"u8"},{"name":"padding","type":{"array":["u8",6]}}]}},{"name":"OracleConfig","type":{"kind":"struct","fields":[{"name":"confFilter","type":"f64"},{"name":"maxStalenessSlots","type":"i64"},{"name":"reserved","type":{"array":["u8",72]}}]}},{"name":"OracleConfigParams","type":{"kind":"struct","fields":[{"name":"confFilter","type":"f32"},{"name":"maxStalenessSlots","type":{"option":"u32"}}]}},{"name":"EventHeapHeader","type":{"kind":"struct","fields":[{"name":"freeHead","type":"u16"},{"name":"usedHead","type":"u16"},{"name":"count","type":"u16"},{"name":"padd","type":"u16"},{"name":"seqNum","type":"u64"}]}},{"name":"EventNode","type":{"kind":"struct","fields":[{"name":"next","type":"u16"},{"name":"prev","type":"u16"},{"name":"pad","type":{"array":["u8",4]}},{"name":"event","type":{"defined":"AnyEvent"}}]}},{"name":"AnyEvent","type":{"kind":"struct","fields":[{"name":"eventType","type":"u8"},{"name":"padding","type":{"array":["u8",143]}}]}},{"name":"FillEvent","type":{"kind":"struct","fields":[{"name":"eventType","type":"u8"},{"name":"takerSide","type":"u8"},{"name":"makerOut","type":"u8"},{"name":"makerSlot","type":"u8"},{"name":"padding","type":{"array":["u8",4]}},{"name":"timestamp","type":"u64"},{"name":"seqNum","type":"u64"},{"name":"maker","type":"publicKey"},{"name":"makerTimestamp","type":"u64"},{"name":"taker","type":"publicKey"},{"name":"takerClientOrderId","type":"u64"},{"name":"price","type":"i64"},{"name":"pegLimit","type":"i64"},{"name":"quantity","type":"i64"},{"name":"makerClientOrderId","type":"u64"},{"name":"reserved","type":{"array":["u8",8]}}]}},{"name":"OutEvent","type":{"kind":"struct","fields":[{"name":"eventType","type":"u8"},{"name":"side","type":"u8"},{"name":"ownerSlot","type":"u8"},{"name":"padding0","type":{"array":["u8",5]}},{"name":"timestamp","type":"u64"},{"name":"seqNum","type":"u64"},{"name":"owner","type":"publicKey"},{"name":"quantity","type":"i64"},{"name":"padding1","type":{"array":["u8",80]}}]}},{"name":"InnerNode","docs":["InnerNodes and LeafNodes compose the binary tree of orders.","","Each InnerNode has exactly two children, which are either InnerNodes themselves,","or LeafNodes. The children share the top `prefix_len` bits of `key`. The left","child has a 0 in the next bit, and the right a 1."],"type":{"kind":"struct","fields":[{"name":"tag","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"prefixLen","docs":["number of highest `key` bits that all children share","e.g. if it's 2, the two highest bits of `key` will be the same on all children"],"type":"u32"},{"name":"key","docs":["only the top `prefix_len` bits of `key` are relevant"],"type":"u128"},{"name":"children","docs":["indexes into `BookSide::nodes`"],"type":{"array":["u32",2]}},{"name":"childEarliestExpiry","docs":["The earliest expiry timestamp for the left and right subtrees.","","Needed to be able to find and remove expired orders without having to","iterate through the whole bookside."],"type":{"array":["u64",2]}},{"name":"reserved","type":{"array":["u8",40]}}]}},{"name":"LeafNode","docs":["LeafNodes represent an order in the binary tree"],"type":{"kind":"struct","fields":[{"name":"tag","docs":["NodeTag"],"type":"u8"},{"name":"ownerSlot","docs":["Index into the owning OpenOrdersAccount's OpenOrders"],"type":"u8"},{"name":"timeInForce","docs":["Time in seconds after `timestamp` at which the order expires.","A value of 0 means no expiry."],"type":"u16"},{"name":"padding","type":{"array":["u8",4]}},{"name":"key","docs":["The binary tree key, see new_node_key()"],"type":"u128"},{"name":"owner","docs":["Address of the owning OpenOrdersAccount"],"type":"publicKey"},{"name":"quantity","docs":["Number of base lots to buy or sell, always >=1"],"type":"i64"},{"name":"timestamp","docs":["The time the order was placed"],"type":"u64"},{"name":"pegLimit","docs":["If the effective price of an oracle pegged order exceeds this limit,","it will be considered invalid and may be removed.","","Only applicable in the oracle_pegged OrderTree"],"type":"i64"},{"name":"clientOrderId","docs":["User defined id for this order, used in FillEvents"],"type":"u64"}]}},{"name":"AnyNode","type":{"kind":"struct","fields":[{"name":"tag","type":"u8"},{"name":"data","type":{"array":["u8",87]}}]}},{"name":"OrderTreeRoot","type":{"kind":"struct","fields":[{"name":"maybeNode","type":"u32"},{"name":"leafCount","type":"u32"}]}},{"name":"OrderTreeNodes","docs":["A binary tree on AnyNode::key()","","The key encodes the price in the top 64 bits."],"type":{"kind":"struct","fields":[{"name":"orderTreeType","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"bumpIndex","type":"u32"},{"name":"freeListLen","type":"u32"},{"name":"freeListHead","type":"u32"},{"name":"reserved","type":{"array":["u8",512]}},{"name":"nodes","type":{"array":[{"defined":"AnyNode"},1024]}}]}},{"name":"I80F48","docs":["Nothing in Rust shall use these types. They only exist so that the Anchor IDL","knows about them and typescript can deserialize it."],"type":{"kind":"struct","fields":[{"name":"val","type":"i128"}]}},{"name":"PlaceOrderArgs","type":{"kind":"struct","fields":[{"name":"side","type":{"defined":"Side"}},{"name":"priceLots","type":"i64"},{"name":"maxBaseLots","type":"i64"},{"name":"maxQuoteLotsIncludingFees","type":"i64"},{"name":"clientOrderId","type":"u64"},{"name":"orderType","type":{"defined":"PlaceOrderType"}},{"name":"expiryTimestamp","type":"u64"},{"name":"selfTradeBehavior","type":{"defined":"SelfTradeBehavior"}},{"name":"limit","type":"u8"}]}},{"name":"PlaceMultipleOrdersArgs","type":{"kind":"struct","fields":[{"name":"priceLots","type":"i64"},{"name":"maxQuoteLotsIncludingFees","type":"i64"},{"name":"expiryTimestamp","type":"u64"}]}},{"name":"PlaceOrderPeggedArgs","type":{"kind":"struct","fields":[{"name":"side","type":{"defined":"Side"}},{"name":"priceOffsetLots","type":"i64"},{"name":"pegLimit","type":"i64"},{"name":"maxBaseLots","type":"i64"},{"name":"maxQuoteLotsIncludingFees","type":"i64"},{"name":"clientOrderId","type":"u64"},{"name":"orderType","type":{"defined":"PlaceOrderType"}},{"name":"expiryTimestamp","type":"u64"},{"name":"selfTradeBehavior","type":{"defined":"SelfTradeBehavior"}},{"name":"limit","type":"u8"}]}},{"name":"PlaceTakeOrderArgs","type":{"kind":"struct","fields":[{"name":"side","type":{"defined":"Side"}},{"name":"priceLots","type":"i64"},{"name":"maxBaseLots","type":"i64"},{"name":"maxQuoteLotsIncludingFees","type":"i64"},{"name":"orderType","type":{"defined":"PlaceOrderType"}},{"name":"limit","type":"u8"}]}},{"name":"OracleType","type":{"kind":"enum","variants":[{"name":"Pyth"},{"name":"Stub"},{"name":"SwitchboardV1"},{"name":"SwitchboardV2"},{"name":"RaydiumCLMM"}]}},{"name":"OrderState","type":{"kind":"enum","variants":[{"name":"Valid"},{"name":"Invalid"},{"name":"Skipped"}]}},{"name":"BookSideOrderTree","type":{"kind":"enum","variants":[{"name":"Fixed"},{"name":"OraclePegged"}]}},{"name":"EventType","type":{"kind":"enum","variants":[{"name":"Fill"},{"name":"Out"}]}},{"name":"NodeTag","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"InnerNode"},{"name":"LeafNode"},{"name":"FreeNode"},{"name":"LastFreeNode"}]}},{"name":"PlaceOrderType","type":{"kind":"enum","variants":[{"name":"Limit"},{"name":"ImmediateOrCancel"},{"name":"PostOnly"},{"name":"Market"},{"name":"PostOnlySlide"}]}},{"name":"PostOrderType","type":{"kind":"enum","variants":[{"name":"Limit"},{"name":"PostOnly"},{"name":"PostOnlySlide"}]}},{"name":"SelfTradeBehavior","docs":["Self trade behavior controls how taker orders interact with resting limit orders of the same account.","This setting has no influence on placing a resting or oracle pegged limit order that does not match","immediately, instead it's the responsibility of the user to correctly configure his taker orders."],"type":{"kind":"enum","variants":[{"name":"DecrementTake"},{"name":"CancelProvide"},{"name":"AbortTransaction"}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Bid"},{"name":"Ask"}]}},{"name":"SideAndOrderTree","docs":["SideAndOrderTree is a storage optimization, so we don't need two bytes for the data"],"type":{"kind":"enum","variants":[{"name":"BidFixed"},{"name":"AskFixed"},{"name":"BidOraclePegged"},{"name":"AskOraclePegged"}]}},{"name":"OrderParams","type":{"kind":"enum","variants":[{"name":"Market"},{"name":"ImmediateOrCancel","fields":[{"name":"price_lots","type":"i64"}]},{"name":"Fixed","fields":[{"name":"price_lots","type":"i64"},{"name":"order_type","type":{"defined":"PostOrderType"}}]},{"name":"OraclePegged","fields":[{"name":"price_offset_lots","type":"i64"},{"name":"order_type","type":{"defined":"PostOrderType"}},{"name":"peg_limit","type":"i64"}]}]}},{"name":"OrderTreeType","type":{"kind":"enum","variants":[{"name":"Bids"},{"name":"Asks"}]}}],"events":[{"name":"DepositLog","fields":[{"name":"openOrdersAccount","type":"publicKey","index":false},{"name":"signer","type":"publicKey","index":false},{"name":"baseAmount","type":"u64","index":false},{"name":"quoteAmount","type":"u64","index":false}]},{"name":"FillLog","fields":[{"name":"market","type":"publicKey","index":false},{"name":"takerSide","type":"u8","index":false},{"name":"makerSlot","type":"u8","index":false},{"name":"makerOut","type":"bool","index":false},{"name":"timestamp","type":"u64","index":false},{"name":"seqNum","type":"u64","index":false},{"name":"maker","type":"publicKey","index":false},{"name":"makerClientOrderId","type":"u64","index":false},{"name":"makerFee","type":"u64","index":false},{"name":"makerTimestamp","type":"u64","index":false},{"name":"taker","type":"publicKey","index":false},{"name":"takerClientOrderId","type":"u64","index":false},{"name":"takerFeeCeil","type":"u64","index":false},{"name":"price","type":"i64","index":false},{"name":"quantity","type":"i64","index":false}]},{"name":"MarketMetaDataLog","fields":[{"name":"market","type":"publicKey","index":false},{"name":"name","type":"string","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"baseDecimals","type":"u8","index":false},{"name":"quoteDecimals","type":"u8","index":false},{"name":"baseLotSize","type":"i64","index":false},{"name":"quoteLotSize","type":"i64","index":false}]},{"name":"TotalOrderFillEvent","fields":[{"name":"side","type":"u8","index":false},{"name":"taker","type":"publicKey","index":false},{"name":"totalQuantityPaid","type":"u64","index":false},{"name":"totalQuantityReceived","type":"u64","index":false},{"name":"fees","type":"u64","index":false}]},{"name":"SetDelegateLog","fields":[{"name":"openOrdersAccount","type":"publicKey","index":false},{"name":"delegate","type":{"option":"publicKey"},"index":false}]},{"name":"SettleFundsLog","fields":[{"name":"openOrdersAccount","type":"publicKey","index":false},{"name":"baseNative","type":"u64","index":false},{"name":"quoteNative","type":"u64","index":false},{"name":"referrerRebate","type":"u64","index":false},{"name":"referrer","type":{"option":"publicKey"},"index":false}]},{"name":"SweepFeesLog","fields":[{"name":"market","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"receiver","type":"publicKey","index":false}]},{"name":"OpenOrdersPositionLog","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"openOrdersAccountNum","type":"u32","index":false},{"name":"market","type":"publicKey","index":false},{"name":"bidsBaseLots","type":"i64","index":false},{"name":"bidsQuoteLots","type":"i64","index":false},{"name":"asksBaseLots","type":"i64","index":false},{"name":"baseFreeNative","type":"u64","index":false},{"name":"quoteFreeNative","type":"u64","index":false},{"name":"lockedMakerFees","type":"u64","index":false},{"name":"referrerRebatesAvailable","type":"u64","index":false},{"name":"makerVolume","type":"u128","index":false},{"name":"takerVolume","type":"u128","index":false}]}],"errors":[{"code":6000,"name":"SomeError","msg":""},{"code":6001,"name":"InvalidInputNameLength","msg":"Name lenght above limit"},{"code":6002,"name":"InvalidInputMarketExpired","msg":"Market cannot be created as expired"},{"code":6003,"name":"InvalidInputMarketFees","msg":"Taker fees should be positive and if maker fees are negative, greater or equal to their abs value"},{"code":6004,"name":"InvalidInputLots","msg":"Lots cannot be negative"},{"code":6005,"name":"InvalidInputLotsSize","msg":"Lots size above market limits"},{"code":6006,"name":"InvalidInputOrdersAmounts","msg":"Input amounts above limits"},{"code":6007,"name":"InvalidInputCancelSize","msg":"Price lots should be greater than zero"},{"code":6008,"name":"InvalidInputPriceLots","msg":"Expected cancel size should be greater than zero"},{"code":6009,"name":"InvalidInputPegLimit","msg":"Peg limit should be greater than zero"},{"code":6010,"name":"InvalidInputOrderType","msg":"The order type is invalid. A taker order must be Market or ImmediateOrCancel"},{"code":6011,"name":"InvalidInputOrderId","msg":"Order id cannot be zero"},{"code":6012,"name":"InvalidInputHeapSlots","msg":"Slot above heap limit"},{"code":6013,"name":"InvalidOracleTypes","msg":"Cannot combine two oracles of different providers"},{"code":6014,"name":"InvalidSecondOracle","msg":"Cannot configure secondary oracle without primary"},{"code":6015,"name":"NoCloseMarketAdmin","msg":"This market does not have a `close_market_admin` and thus cannot be closed."},{"code":6016,"name":"InvalidCloseMarketAdmin","msg":"The signer of this transaction is not this market's `close_market_admin`."},{"code":6017,"name":"InvalidOpenOrdersAdmin","msg":"The `open_orders_admin` required by this market to sign all instructions that creates orders is missing or is not valid"},{"code":6018,"name":"InvalidConsumeEventsAdmin","msg":"The `consume_events_admin` required by this market to sign all instructions that consume events is missing or is not valid"},{"code":6019,"name":"InvalidMarketVault","msg":"Provided `market_vault` is invalid"},{"code":6020,"name":"IndexerActiveOO","msg":"Cannot be closed due to the existence of open orders accounts"},{"code":6021,"name":"OraclePegInvalidOracleState","msg":"Cannot place a peg order due to invalid oracle state"},{"code":6022,"name":"UnknownOracleType","msg":"oracle type cannot be determined"},{"code":6023,"name":"OracleConfidence","msg":"an oracle does not reach the confidence threshold"},{"code":6024,"name":"OracleStale","msg":"an oracle is stale"},{"code":6025,"name":"OrderIdNotFound","msg":"Order id not found on the orderbook"},{"code":6026,"name":"EventHeapContainsElements","msg":"Event heap contains elements and market can't be closed"},{"code":6027,"name":"InvalidOrderPostIOC","msg":"ImmediateOrCancel is not a PostOrderType"},{"code":6028,"name":"InvalidOrderPostMarket","msg":"Market is not a PostOrderType"},{"code":6029,"name":"WouldSelfTrade","msg":"would self trade"},{"code":6030,"name":"MarketHasExpired","msg":"The Market has already expired."},{"code":6031,"name":"InvalidPriceLots","msg":"Price lots should be greater than zero"},{"code":6032,"name":"InvalidOraclePrice","msg":"Oracle price above market limits"},{"code":6033,"name":"MarketHasNotExpired","msg":"The Market has not expired yet."},{"code":6034,"name":"NoOwnerOrDelegate","msg":"No correct owner or delegate."},{"code":6035,"name":"NoOwner","msg":"No correct owner"},{"code":6036,"name":"OpenOrdersFull","msg":"No free order index in open orders account"},{"code":6037,"name":"BookContainsElements","msg":"Book contains elements"},{"code":6038,"name":"OpenOrdersOrderNotFound","msg":"Could not find order in user account"},{"code":6039,"name":"InvalidPostAmount","msg":"Amount to post above book limits"},{"code":6040,"name":"DisabledOraclePeg","msg":"Oracle peg orders are not enabled for this market"},{"code":6041,"name":"NonEmptyMarket","msg":"Cannot close a non-empty market"},{"code":6042,"name":"NonEmptyOpenOrdersPosition","msg":"Cannot close a non-empty open orders account"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/orca_wavebreak.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.json b/olddocs/archivekbot2/idls/orca_wavebreak.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.json new file mode 100644 index 0000000..2c861b2 --- /dev/null +++ b/olddocs/archivekbot2/idls/orca_wavebreak.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.json @@ -0,0 +1 @@ +{"version":"1.1.5","name":"orca_wavebreak_program","instructions":[{"name":"PermissionConsumeTopLevel","accounts":[{"name":"consumer","isMut":true,"isSigner":true,"docs":["The consumer of the permission"]},{"name":"permissionConfig","isMut":false,"isSigner":false,"docs":["The permission config account"]},{"name":"consumedPermission","isMut":true,"isSigner":false,"docs":["The permission program account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Sysvar instructions"]}],"args":[{"name":"permissionMessage","type":{"defined":"PermissionMessage"}},{"name":"permissionSignature","type":{"defined":"PermissionSignature"}}],"discriminant":{"type":"u8","value":0}},{"name":"PermissionConsumeCpi","accounts":[{"name":"consumer","isMut":true,"isSigner":true,"docs":["The consumer of the permission"]},{"name":"consumerProgramAuthority","isMut":false,"isSigner":true,"docs":["Any pda of the consumer program"]},{"name":"permissionConfig","isMut":false,"isSigner":false,"docs":["The permission config account"]},{"name":"consumedPermission","isMut":true,"isSigner":false,"docs":["The permission program account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]}],"args":[{"name":"permissionMessage","type":{"defined":"PermissionMessage"}},{"name":"permissionSignature","type":{"defined":"PermissionSignature"}},{"name":"consumerProgramAuthoritySeeds","type":{"vec":"bytes"}}],"discriminant":{"type":"u8","value":1}},{"name":"PermissionConfigInitialize","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to initialize a permission config"]},{"name":"permissionConfig","isMut":true,"isSigner":false,"docs":["The permission config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]}],"args":[{"name":"permissionAuthority","type":{"defined":"PermissionSigner"}},{"name":"consumerProgram","type":"publicKey"}],"discriminant":{"type":"u8","value":2}},{"name":"PermissionConfigUpdate","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to update a permission config"]},{"name":"permissionConfig","isMut":true,"isSigner":false,"docs":["The permission config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]}],"args":[{"name":"update","type":{"defined":"PermissionConfigUpdateType"}}],"discriminant":{"type":"u8","value":3}},{"name":"PermissionConfigClose","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to close a permission config"]},{"name":"permissionConfig","isMut":true,"isSigner":false,"docs":["The permission config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]}],"args":[],"discriminant":{"type":"u8","value":4}},{"name":"PermissionRevoke","accounts":[{"name":"funder","isMut":true,"isSigner":true,"docs":["The funder of the consumed permission PDA"]},{"name":"permissionConfig","isMut":false,"isSigner":false,"docs":["The permission config account"]},{"name":"consumedPermission","isMut":true,"isSigner":false,"docs":["The consumed permission account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]}],"args":[{"name":"permissionMessage","type":{"defined":"PermissionMessage"}},{"name":"permissionSignature","type":{"defined":"PermissionSignature"}}],"discriminant":{"type":"u8","value":5}},{"name":"PermissionRefund","accounts":[{"name":"consumedPermission","isMut":true,"isSigner":false,"docs":["The consumed permission account"]},{"name":"refundDestination","isMut":true,"isSigner":false,"docs":["The destination to refund the rent to"]}],"args":[],"discriminant":{"type":"u8","value":6}},{"name":"ReservedPermissionA","accounts":[],"args":[],"discriminant":{"type":"u8","value":7}},{"name":"TokenBuyExactIn","accounts":[{"name":"buyer","isMut":true,"isSigner":true,"docs":["The buyer of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"baseAta","isMut":true,"isSigner":false,"docs":["The base token ata for the buyer"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"quoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata for the buyer"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the base token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]}],"args":[{"name":"amountIn","type":"u64"},{"name":"allowPartialFill","type":"bool"},{"name":"priceThreshold","type":{"option":{"tuple":["u64","u64"]}}}],"discriminant":{"type":"u8","value":8}},{"name":"TokenBuyExactOut","accounts":[{"name":"buyer","isMut":true,"isSigner":true,"docs":["The buyer of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"baseAta","isMut":true,"isSigner":false,"docs":["The base token ata for the buyer"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"quoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata for the buyer"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the base token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]}],"args":[{"name":"amountOut","type":"u64"},{"name":"allowPartialFill","type":"bool"},{"name":"priceThreshold","type":{"option":{"tuple":["u64","u64"]}}}],"discriminant":{"type":"u8","value":9}},{"name":"TokenSellExactIn","accounts":[{"name":"seller","isMut":true,"isSigner":true,"docs":["The seller of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"baseAta","isMut":true,"isSigner":false,"docs":["The base token ata for the seller"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"quoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata for the seller"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the base token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]}],"args":[{"name":"amountIn","type":"u64"},{"name":"allowPartialFill","type":"bool"},{"name":"priceThreshold","type":{"option":{"tuple":["u64","u64"]}}}],"discriminant":{"type":"u8","value":10}},{"name":"TokenSellExactOut","accounts":[{"name":"seller","isMut":true,"isSigner":true,"docs":["The seller of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"baseAta","isMut":true,"isSigner":false,"docs":["The base token ata for the seller"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"quoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata for the seller"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the base token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]}],"args":[{"name":"amountOut","type":"u64"},{"name":"allowPartialFill","type":"bool"},{"name":"priceThreshold","type":{"option":{"tuple":["u64","u64"]}}}],"discriminant":{"type":"u8","value":11}},{"name":"TokenRefund","accounts":[{"name":"signer","isMut":true,"isSigner":true,"docs":["The signer of the transaction"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"signerQuoteAta","isMut":true,"isSigner":false,"docs":["The signer's quote token ata account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"signerBaseAta","isMut":true,"isSigner":false,"docs":["The signer's base token ata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The base token program"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]}],"args":[],"discriminant":{"type":"u8","value":12}},{"name":"ReservedTokenY","accounts":[],"args":[],"discriminant":{"type":"u8","value":13}},{"name":"ReservedTokenZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":14}},{"name":"ReservedTokenA","accounts":[],"args":[],"discriminant":{"type":"u8","value":15}},{"name":"AuthorityConfigInitialize","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority of the config"]},{"name":"authorityConfig","isMut":true,"isSigner":false,"docs":["The authority config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]}],"args":[],"discriminant":{"type":"u8","value":16}},{"name":"AuthorityConfigGrant","accounts":[{"name":"authority","isMut":false,"isSigner":true,"docs":["The authority that is allowed to update the config"]},{"name":"authorityConfig","isMut":true,"isSigner":false,"docs":["The authority config account"]}],"args":[{"name":"account","type":"publicKey"},{"name":"privileges","type":{"vec":{"defined":"Privilege"}}}],"discriminant":{"type":"u8","value":17}},{"name":"AuthorityConfigRevoke","accounts":[{"name":"authority","isMut":false,"isSigner":true,"docs":["The authority that is allowed to update the config"]},{"name":"authorityConfig","isMut":true,"isSigner":false,"docs":["The authority config account"]}],"args":[{"name":"account","type":"publicKey"},{"name":"privileges","type":{"vec":{"defined":"Privilege"}}}],"discriminant":{"type":"u8","value":18}},{"name":"ReservedAuthorityConfigY","accounts":[],"args":[],"discriminant":{"type":"u8","value":19}},{"name":"ReservedAuthorityConfigZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":20}},{"name":"ReservedAuthorityConfigA","accounts":[],"args":[],"discriminant":{"type":"u8","value":21}},{"name":"ReservedAuthorityConfigB","accounts":[],"args":[],"discriminant":{"type":"u8","value":22}},{"name":"ReservedAuthorityConfigC","accounts":[],"args":[],"discriminant":{"type":"u8","value":23}},{"name":"MintConfigInitialize","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to initialize a mint config"]},{"name":"mintConfig","isMut":true,"isSigner":false,"docs":["The mint config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]}],"args":[{"name":"tokenMint","type":"publicKey"},{"name":"instructionDiscriminator","type":"u8"}],"discriminant":{"type":"u8","value":24}},{"name":"MintConfigClose","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to close a mint config"]},{"name":"mintConfig","isMut":true,"isSigner":false,"docs":["The mint config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]}],"args":[],"discriminant":{"type":"u8","value":25}},{"name":"MintConfigUpdate","accounts":[{"name":"authority","isMut":false,"isSigner":true,"docs":["The authority that is allowed to update a mint config"]},{"name":"mintConfig","isMut":true,"isSigner":false,"docs":["The mint config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]}],"args":[{"name":"update","type":{"defined":"MintConfigUpdateType"}}],"discriminant":{"type":"u8","value":26}},{"name":"ReservedMintConfigY","accounts":[],"args":[],"discriminant":{"type":"u8","value":27}},{"name":"ReservedMintConfigZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":28}},{"name":"ReservedMintConfigA","accounts":[],"args":[],"discriminant":{"type":"u8","value":29}},{"name":"ReservedMintConfigB","accounts":[],"args":[],"discriminant":{"type":"u8","value":30}},{"name":"ReservedMintConfigC","accounts":[],"args":[],"discriminant":{"type":"u8","value":31}},{"name":"GraduateWhirlpool","accounts":[{"name":"signer","isMut":true,"isSigner":true,"docs":["The signer of the transaction"]},{"name":"lpAuthority","isMut":false,"isSigner":false,"docs":["The lp authority of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"signerQuoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata account"]},{"name":"lpAuthorityQuoteAta","isMut":true,"isSigner":false,"docs":["The lp authority quote token ata account"]},{"name":"whirlpoolQuoteVault","isMut":true,"isSigner":false,"docs":["The whirlpool quote vault account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"baseVault","isMut":true,"isSigner":false,"docs":["The config base vault account"]},{"name":"lpAuthorityBaseAta","isMut":true,"isSigner":false,"docs":["The lp authority base token ata account"]},{"name":"whirlpoolBaseVault","isMut":true,"isSigner":false,"docs":["The whirlpool base vault account"]},{"name":"whirlpoolConfig","isMut":false,"isSigner":false,"docs":["The whirlpool config account"]},{"name":"feeTier","isMut":false,"isSigner":false,"docs":["The fee tier account"]},{"name":"whirlpool","isMut":true,"isSigner":false,"docs":["The whirlpool account"]},{"name":"oracle","isMut":true,"isSigner":false,"docs":["The whirlpool oracle account"]},{"name":"position","isMut":true,"isSigner":false,"docs":["The position account"]},{"name":"positionMint","isMut":true,"isSigner":false,"docs":["The position mint account"]},{"name":"positionTokenAccount","isMut":true,"isSigner":false,"docs":["The position token account for the bonding curve"]},{"name":"lpAuthorityTokenAccount","isMut":true,"isSigner":false,"docs":["The position token account for the lp authority"]},{"name":"lowerTickArray","isMut":true,"isSigner":false,"docs":["The lower tick array account"]},{"name":"upperTickArray","isMut":true,"isSigner":false,"docs":["The upper tick array account"]},{"name":"quoteTokenBadge","isMut":false,"isSigner":false,"docs":["The quote token badge account"]},{"name":"baseTokenBadge","isMut":false,"isSigner":false,"docs":["The base token badge account"]},{"name":"whirlpoolInitAuthority","isMut":false,"isSigner":false,"docs":["The whirlpool init authority account"]},{"name":"whirlpoolUpdateAuthority","isMut":false,"isSigner":false,"docs":["The whirlpool update authority account"]},{"name":"lockConfig","isMut":true,"isSigner":false,"docs":["The lock config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The ata program"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The base token program"]},{"name":"token22Program","isMut":false,"isSigner":false,"docs":["The token 22 program"]},{"name":"memoProgram","isMut":false,"isSigner":false,"docs":["The memo program"]},{"name":"whirlpoolProgram","isMut":false,"isSigner":false,"docs":["The whirlpool program"]},{"name":"rent","isMut":false,"isSigner":false,"docs":["The rent sysvar"]}],"args":[],"discriminant":{"type":"u8","value":32}},{"name":"GraduateManual","accounts":[{"name":"signer","isMut":true,"isSigner":true,"docs":["The signer of the transaction"]},{"name":"destination","isMut":false,"isSigner":false,"docs":["The destination of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote vault account"]},{"name":"signerQuoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata account"]},{"name":"destinationQuoteAta","isMut":true,"isSigner":false,"docs":["The destination quote ata account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base mint account"]},{"name":"destinationBaseAta","isMut":true,"isSigner":false,"docs":["The destination base ata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program account"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The ata program account"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program account"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The base token program account"]}],"args":[],"discriminant":{"type":"u8","value":33}},{"name":"ReservedGraduateX","accounts":[],"args":[],"discriminant":{"type":"u8","value":34}},{"name":"ReservedGraduateY","accounts":[],"args":[],"discriminant":{"type":"u8","value":35}},{"name":"ReservedGraduateZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":36}},{"name":"ReservedGraduateA","accounts":[],"args":[],"discriminant":{"type":"u8","value":37}},{"name":"ReservedGraduateB","accounts":[],"args":[],"discriminant":{"type":"u8","value":38}},{"name":"ReservedGraduateC","accounts":[],"args":[],"discriminant":{"type":"u8","value":39}},{"name":"CreateLockedlaunch","accounts":[{"name":"creator","isMut":true,"isSigner":true,"docs":["The creator of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":true,"docs":["The token mint account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"mintConfig","isMut":false,"isSigner":false,"docs":["The base token mint config account"]},{"name":"metadata","isMut":true,"isSigner":false,"docs":["The metadata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the new token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"metaplexProgram","isMut":false,"isSigner":false,"docs":["The metaplex metadata program"]}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}],"discriminant":{"type":"u8","value":40}},{"name":"CreateLaunch","accounts":[{"name":"creator","isMut":true,"isSigner":true,"docs":["The creator of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":true,"docs":["The token mint account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"mintConfig","isMut":false,"isSigner":false,"docs":["The base token mint config account"]},{"name":"metadata","isMut":true,"isSigner":false,"docs":["The metadata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the new token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"metaplexProgram","isMut":false,"isSigner":false,"docs":["The metaplex metadata program"]}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"startPrice","type":{"option":"u128"}},{"name":"endPrice","type":{"option":"u128"}},{"name":"controlPoints","type":{"option":{"array":["u16",4]}}},{"name":"graduationTarget","type":{"option":"u64"}},{"name":"graduationMethods","type":{"option":{"array":[{"defined":"GraduationMethod"},8]}}},{"name":"launchTime","type":{"option":"i64"}},{"name":"graduationTime","type":{"option":"i64"}},{"name":"baseAllocationBps","type":{"option":"u16"}}],"discriminant":{"type":"u8","value":41}},{"name":"CreatePresale","accounts":[{"name":"creator","isMut":true,"isSigner":true,"docs":["The creator of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":true,"docs":["The token mint account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"mintConfig","isMut":false,"isSigner":false,"docs":["The base token mint config account"]},{"name":"metadata","isMut":true,"isSigner":false,"docs":["The metadata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the new token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"metaplexProgram","isMut":false,"isSigner":false,"docs":["The metaplex metadata program"]}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"tokenPrice","type":{"option":"u128"}},{"name":"graduationTarget","type":{"option":"u64"}},{"name":"graduationMethods","type":{"option":{"array":[{"defined":"GraduationMethod"},8]}}},{"name":"launchTime","type":{"option":"i64"}},{"name":"graduationTime","type":{"option":"i64"}},{"name":"minReserveBps","type":{"option":"u16"}},{"name":"baseAllocationBps","type":{"option":"u16"}}],"discriminant":{"type":"u8","value":42}},{"name":"ReservedCreateY","accounts":[],"args":[],"discriminant":{"type":"u8","value":43}},{"name":"ReservedCreateZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":44}},{"name":"ReservedCreateA","accounts":[],"args":[],"discriminant":{"type":"u8","value":45}},{"name":"ReservedCreateB","accounts":[],"args":[],"discriminant":{"type":"u8","value":46}},{"name":"ReservedCreateC","accounts":[],"args":[],"discriminant":{"type":"u8","value":47}},{"name":"BondingCurveInitialize","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to initialize a bonding curve"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":false,"isSigner":false,"docs":["The token mint account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the new token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]}],"args":[{"name":"startPrice","type":"u128"},{"name":"endPrice","type":"u128"},{"name":"controlPoints","type":{"array":["u16",4]}},{"name":"creator","type":"publicKey"},{"name":"graduationMethods","type":{"array":[{"defined":"GraduationMethod"},8]}},{"name":"swapFeeBps","type":"u16"},{"name":"quoteFeeBps","type":"u16"},{"name":"baseFeeBps","type":"u16"},{"name":"launchTime","type":"i64"},{"name":"creatorReward","type":"u64"},{"name":"graduationReward","type":"u64"},{"name":"graduationTarget","type":"u64"},{"name":"graduationTime","type":"i64"},{"name":"minReserveBps","type":"u16"},{"name":"buyRequiresPermission","type":"bool"},{"name":"buyPermissionBitmap","type":{"array":["u8",32]}},{"name":"sellRequiresPermission","type":"bool"},{"name":"sellPermissionBitmap","type":{"array":["u8",32]}},{"name":"maxBuyAmount","type":"u64"},{"name":"maxSellAmount","type":"u64"},{"name":"retainMintAuthority","type":"bool"},{"name":"baseAllocationBps","type":"u16"}],"discriminant":{"type":"u8","value":48}},{"name":"BondingCurveCollectFees","accounts":[{"name":"signer","isMut":true,"isSigner":true,"docs":["The signer of the transaction"]},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["The fee authority of the program"]},{"name":"feeAuthorityAta","isMut":true,"isSigner":false,"docs":["The fee authority associated token account"]},{"name":"bondingCurve","isMut":false,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":false,"isSigner":false,"docs":["The base token mint account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program"]}],"args":[],"discriminant":{"type":"u8","value":49}},{"name":"BondingCurveGraduate","accounts":[{"name":"signer","isMut":true,"isSigner":true,"docs":["The signer of the transaction"]},{"name":"creator","isMut":true,"isSigner":false,"docs":["The creator of the token"]},{"name":"feeAuthority","isMut":true,"isSigner":false,"docs":["The fee authority of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"signerQuoteAta","isMut":true,"isSigner":false,"docs":["The signer's quote token ata account"]},{"name":"creatorQuoteAta","isMut":true,"isSigner":false,"docs":["The creator's quote token ata account"]},{"name":"feeAuthorityQuoteAta","isMut":true,"isSigner":false,"docs":["The fee authority's quote token ata account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"creatorBaseAta","isMut":true,"isSigner":false,"docs":["The creator's base token ata account"]},{"name":"feeAuthorityBaseAta","isMut":true,"isSigner":false,"docs":["The fee authority's base token ata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The base token program"]}],"args":[],"discriminant":{"type":"u8","value":50}},{"name":"BondingCurveClose","accounts":[{"name":"authority","isMut":false,"isSigner":true,"docs":["The authority that is allowed to close a bonding curve"]},{"name":"creator","isMut":true,"isSigner":false,"docs":["The creator of the bonding curve"]},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["The fee authority of the bonding curve"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"feeAuthorityQuoteAta","isMut":true,"isSigner":false,"docs":["The fee authority's quote token ata account"]},{"name":"baseMint","isMut":false,"isSigner":false,"docs":["The base token mint account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The base token program"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]}],"args":[],"discriminant":{"type":"u8","value":51}},{"name":"ReservedBondingCurveX","accounts":[],"args":[],"discriminant":{"type":"u8","value":52}},{"name":"ReservedBondingCurveY","accounts":[],"args":[],"discriminant":{"type":"u8","value":53}},{"name":"ReservedBondingCurveZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":54}},{"name":"ReservedBondingCurveA","accounts":[],"args":[],"discriminant":{"type":"u8","value":55}},{"name":"LpHarvest","accounts":[{"name":"lpAuthority","isMut":true,"isSigner":true,"docs":["The authority of the lp escrow account"]},{"name":"lpEscrow","isMut":false,"isSigner":false,"docs":["The LP escrow account"]},{"name":"whirlpool","isMut":true,"isSigner":false,"docs":["The whirlpool account"]},{"name":"position","isMut":true,"isSigner":false,"docs":["The position account"]},{"name":"positionTokenAccount","isMut":false,"isSigner":false,"docs":["The position token account"]},{"name":"lowerTickArray","isMut":false,"isSigner":false,"docs":["The lower tick array account"]},{"name":"upperTickArray","isMut":false,"isSigner":false,"docs":["The upper tick array account"]},{"name":"tokenAMint","isMut":true,"isSigner":false,"docs":["The token mint a account"]},{"name":"tokenBMint","isMut":true,"isSigner":false,"docs":["The token mint b account"]},{"name":"tokenAAta","isMut":true,"isSigner":false,"docs":["The token owner a account"]},{"name":"tokenBAta","isMut":true,"isSigner":false,"docs":["The token owner b account"]},{"name":"tokenAVault","isMut":true,"isSigner":false,"docs":["The token vault a account"]},{"name":"tokenBVault","isMut":true,"isSigner":false,"docs":["The token vault b account"]},{"name":"reward1Mint","isMut":false,"isSigner":false,"docs":["The reward mint 1 account"]},{"name":"reward2Mint","isMut":false,"isSigner":false,"docs":["The reward mint 2 account"]},{"name":"reward3Mint","isMut":false,"isSigner":false,"docs":["The reward mint 3 account"]},{"name":"reward1Ata","isMut":true,"isSigner":false,"docs":["The reward owner 1 account"]},{"name":"reward2Ata","isMut":true,"isSigner":false,"docs":["The reward owner 2 account"]},{"name":"reward3Ata","isMut":true,"isSigner":false,"docs":["The reward owner 3 account"]},{"name":"reward1Vault","isMut":true,"isSigner":false,"docs":["The reward vault 1 account"]},{"name":"reward2Vault","isMut":true,"isSigner":false,"docs":["The reward vault 2 account"]},{"name":"reward3Vault","isMut":true,"isSigner":false,"docs":["The reward vault 3 account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program"]},{"name":"tokenAProgram","isMut":false,"isSigner":false,"docs":["The token a program"]},{"name":"tokenBProgram","isMut":false,"isSigner":false,"docs":["The token b program"]},{"name":"reward1TokenProgram","isMut":false,"isSigner":false,"docs":["The token reward 1 program"]},{"name":"reward2TokenProgram","isMut":false,"isSigner":false,"docs":["The token reward 2 program"]},{"name":"reward3TokenProgram","isMut":false,"isSigner":false,"docs":["The token reward 3 program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The ata program"]},{"name":"memoProgram","isMut":false,"isSigner":false,"docs":["The memo program"]},{"name":"whirlpoolProgram","isMut":false,"isSigner":false,"docs":["The whirlpool program"]}],"args":[],"discriminant":{"type":"u8","value":56}},{"name":"LpTransfer","accounts":[{"name":"lpAuthority","isMut":true,"isSigner":true,"docs":["The authority of the lp escrow account"]},{"name":"newLpAuthority","isMut":false,"isSigner":false,"docs":["The new authority of the lp escrow account"]},{"name":"lpEscrow","isMut":false,"isSigner":false,"docs":["The lp escrow account"]},{"name":"newLpEscrow","isMut":false,"isSigner":false,"docs":["The new lp escrow account"]},{"name":"positionMint","isMut":false,"isSigner":false,"docs":["The position mint account"]},{"name":"position","isMut":false,"isSigner":false,"docs":["The position account"]},{"name":"positionTokenAccount","isMut":true,"isSigner":false,"docs":["The position token account"]},{"name":"newPositionTokenAccount","isMut":true,"isSigner":false,"docs":["The new position token account"]},{"name":"lockConfig","isMut":true,"isSigner":false,"docs":["The lock config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program"]},{"name":"token22Program","isMut":false,"isSigner":false,"docs":["The token 22 program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The ata program"]},{"name":"whirlpoolProgram","isMut":false,"isSigner":false,"docs":["The whirlpool program"]}],"args":[],"discriminant":{"type":"u8","value":57}},{"name":"LpTakeover","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"lpAuthority","isMut":false,"isSigner":false,"docs":["The authority of the lp escrow account"]},{"name":"newLpAuthority","isMut":false,"isSigner":false,"docs":["The new authority of the lp escrow account"]},{"name":"lpEscrow","isMut":false,"isSigner":false,"docs":["The lp escrow account"]},{"name":"newLpEscrow","isMut":false,"isSigner":false,"docs":["The new lp escrow account"]},{"name":"positionMint","isMut":false,"isSigner":false,"docs":["The position mint account"]},{"name":"position","isMut":false,"isSigner":false,"docs":["The position account"]},{"name":"positionTokenAccount","isMut":true,"isSigner":false,"docs":["The position token account"]},{"name":"newPositionTokenAccount","isMut":true,"isSigner":false,"docs":["The new position token account"]},{"name":"lockConfig","isMut":true,"isSigner":false,"docs":["The lock config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program"]},{"name":"token22Program","isMut":false,"isSigner":false,"docs":["The token 22 program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The ata program"]},{"name":"whirlpoolProgram","isMut":false,"isSigner":false,"docs":["The whirlpool program"]}],"args":[],"discriminant":{"type":"u8","value":58}},{"name":"ReservedLpX","accounts":[],"args":[],"discriminant":{"type":"u8","value":59}},{"name":"ReservedLpY","accounts":[],"args":[],"discriminant":{"type":"u8","value":60}},{"name":"ReservedLpZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":61}},{"name":"ReservedLpA","accounts":[],"args":[],"discriminant":{"type":"u8","value":62}},{"name":"ReservedLpB","accounts":[],"args":[],"discriminant":{"type":"u8","value":63}}],"accounts":[{"name":"AuthorityConfig","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"defined":"AccountDiscriminator"}},{"name":"authorities","type":{"array":[{"defined":"ProgramAuthority"},64]}}]}},{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"defined":"AccountDiscriminator"}},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"creator","type":"publicKey"},{"name":"retainMintAuthority","type":"bool"},{"name":"buyRequiresPermission","type":"bool"},{"name":"buyPermissionBitmap","type":{"array":["u8",32]}},{"name":"sellRequiresPermission","type":"bool"},{"name":"sellPermissionBitmap","type":{"array":["u8",32]}},{"name":"quoteFeeBps","type":"u16"},{"name":"baseFeeBps","type":"u16"},{"name":"controlPoints","type":{"array":["u16",4]}},{"name":"startPrice","type":"u128"},{"name":"endPrice","type":"u128"},{"name":"quoteAmount","type":"u64"},{"name":"baseAmount","type":"u64"},{"name":"launchTime","type":"i64"},{"name":"creatorReward","type":"u64"},{"name":"graduationTarget","type":"u64"},{"name":"graduationTime","type":"i64"},{"name":"graduationReward","type":"u64"},{"name":"maxBuyAmount","type":"u64"},{"name":"maxSellAmount","type":"u64"},{"name":"swapFeeBps","type":"u16"},{"name":"baseAllocationBps","type":"u16"},{"name":"graduationMethods","type":{"array":[{"defined":"GraduationMethodData"},8]}},{"name":"minReserveBps","type":"u16"},{"name":"padding1","type":{"array":["u8",2]}},{"name":"premintedSupply","type":"u64"},{"name":"padding2","type":{"array":["u8",728]}}]}},{"name":"MintConfig","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"defined":"AccountDiscriminator"}},{"name":"instructionDiscriminator","type":"u8"},{"name":"quoteMint","type":"publicKey"},{"name":"createRequiresPermission","type":"bool"},{"name":"createPermissionBitmap","type":{"array":["u8",32]}},{"name":"defaultBuyRequiresPermission","type":"bool"},{"name":"defaultBuyPermissionBitmap","type":{"array":["u8",32]}},{"name":"defaultSellRequiresPermission","type":"bool"},{"name":"defaultSellPermissionBitmap","type":{"array":["u8",32]}},{"name":"padding1","type":{"array":["u8",3]}},{"name":"defaultCreatorReward","type":"u64"},{"name":"defaultGraduationReward","type":"u64"},{"name":"defaultGraduationTarget","type":"u64"},{"name":"defaultMaxBuyAmount","type":"u64"},{"name":"defaultMaxSellAmount","type":"u64"},{"name":"defaultStartPrice","type":"u128"},{"name":"defaultEndPrice","type":"u128"},{"name":"defaultControlPoints","type":{"array":["u16",4]}},{"name":"defaultSwapFeeBps","type":"u16"},{"name":"defaultQuoteFeeBps","type":"u16"},{"name":"defaultBaseFeeBps","type":"u16"},{"name":"padding2","type":{"array":["u8",1826]}}]}},{"name":"PermissionConfig","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"defined":"AccountDiscriminator"}},{"name":"consumerProgram","type":"publicKey"},{"name":"allowedSigners","type":{"array":[{"defined":"PermissionSigner"},3]}},{"name":"padding","type":{"array":["u8",124]}}]}},{"name":"ConsumedPermission","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"defined":"AccountDiscriminator"}},{"name":"padding1","type":{"array":["u8",7]}},{"name":"safeToCloseSlot","type":"u64"},{"name":"refundDestination","type":"publicKey"},{"name":"padding2","type":{"array":["u8",16]}}]}}],"types":[{"name":"MetaplexMetadata","type":{"kind":"struct","fields":[{"name":"discriminator","type":"u8"},{"name":"updateAuthority","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"data","type":{"defined":"MetaplexData"}},{"name":"primarySaleHappened","type":"bool"},{"name":"mutable","type":"bool"},{"name":"editionNonce","type":{"option":"u8"}},{"name":"tokenStandard","type":{"option":{"defined":"MetaplexTokenStandard"}}},{"name":"collection","type":{"option":{"defined":"MetaplexCollection"}}},{"name":"uses","type":{"option":{"defined":"MetaplexUses"}}},{"name":"collectionDetails","type":{"option":{"defined":"MetaplexCollectionDetails"}}},{"name":"programmableConfig","type":{"option":{"defined":"MetaplexProgrammableConfig"}}}]}},{"name":"MetaplexData","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"sellerFeeBasisPoints","type":"u16"},{"name":"creators","type":{"option":{"vec":{"defined":"MetaplexCreator"}}}}]}},{"name":"MetaplexCreator","type":{"kind":"struct","fields":[{"name":"address","type":"publicKey"},{"name":"verified","type":"bool"},{"name":"share","type":"u8"}]}},{"name":"MetaplexCollection","type":{"kind":"struct","fields":[{"name":"verified","type":"bool"},{"name":"key","type":"publicKey"}]}},{"name":"MetaplexUses","type":{"kind":"struct","fields":[{"name":"useMethod","type":{"defined":"MetaplexUseMethod"}},{"name":"remaining","type":"u64"},{"name":"total","type":"u64"}]}},{"name":"TokenMint","type":{"kind":"struct","fields":[{"name":"mintAuthorityFlag","type":"u32"},{"name":"mintAuthority","type":"publicKey"},{"name":"supply","type":"u64"},{"name":"decimals","type":"u8"},{"name":"isInitialized","type":"bool"},{"name":"freezeAuthorityFlag","type":"u32"},{"name":"freezeAuthority","type":"publicKey"}]}},{"name":"TokenAccount","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"delegateFlag","type":"u32"},{"name":"delegate","type":"publicKey"},{"name":"state","type":{"defined":"TokenAccountState"}},{"name":"isNativeFlag","type":"u32"},{"name":"nativeAmount","type":"u64"},{"name":"delegateAmount","type":"u64"},{"name":"closeAuthorityFlag","type":"u32"},{"name":"closeAuthority","type":"publicKey"}]}},{"name":"TokenMetadata","type":{"kind":"struct","fields":[{"name":"updateAuthority","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"additionalMetadata","type":{"vec":{"tuple":["string","string"]}}}]}},{"name":"TokenMetadataPointer","type":{"kind":"struct","fields":[{"name":"updateAuthority","type":"publicKey"},{"name":"metadataAddress","type":"publicKey"}]}},{"name":"WhirlpoolFeeTier","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"whirlpoolConfig","type":"publicKey"},{"name":"tickSpacing","type":"u16"},{"name":"defaultFeeRate","type":"u16"}]}},{"name":"WhirlpoolAdaptiveFeeTier","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"whirlpoolConfig","type":"publicKey"},{"name":"feeTierIndex","type":"u16"},{"name":"tickSpacing","type":"u16"},{"name":"initializePoolAuthority","type":"publicKey"},{"name":"delegatedFeeAuthority","type":"publicKey"},{"name":"defaultBaseFeeRate","type":"u16"},{"name":"filterPeriod","type":"u16"},{"name":"decayPeriod","type":"u16"},{"name":"reductionFactor","type":"u16"},{"name":"adaptiveFeeControlFactor","type":"u32"},{"name":"maxVolatilityAccumulator","type":"u32"},{"name":"tickGroupSize","type":"u16"},{"name":"majorSwapThresholdTicks","type":"u16"}]}},{"name":"WhirlpoolConfig","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"feeAuthority","type":"publicKey"},{"name":"collectProtocolFeesAuthority","type":"publicKey"},{"name":"rewardEmissionsSuperAuthority","type":"publicKey"},{"name":"defaultProtocolFeeRate","type":"u16"},{"name":"featureFlags","type":"u16"}]}},{"name":"Whirlpool","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"whirlpoolConfig","type":"publicKey"},{"name":"whirlpoolBump","type":"u8"},{"name":"tickSpacing","type":"u16"},{"name":"feeTierIndex","type":"u16"},{"name":"feeRate","type":"u16"},{"name":"protocolFeeRate","type":"u16"},{"name":"liquidity","type":"u128"},{"name":"sqrtPrice","type":"u128"},{"name":"tickCurrentIndex","type":"i32"},{"name":"protocolFeeOwedA","type":"u64"},{"name":"protocolFeeOwedB","type":"u64"},{"name":"tokenAMint","type":"publicKey"},{"name":"tokenAVault","type":"publicKey"},{"name":"feeGrowthGlobalA","type":"u128"},{"name":"tokenBMint","type":"publicKey"},{"name":"tokenBVault","type":"publicKey"},{"name":"feeGrowthGlobalB","type":"u128"},{"name":"rewardLastUpdatedTimestamp","type":"u64"},{"name":"rewardInfos","type":{"array":[{"defined":"WhirlpoolRewardInfo"},3]}}]}},{"name":"WhirlpoolRewardInfo","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"vault","type":"publicKey"},{"name":"authority","type":"publicKey"},{"name":"emissionsPerSecondX64","type":"u128"},{"name":"growthGlobalX64","type":"u128"}]}},{"name":"WhirlpoolLockConfig","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"position","type":"publicKey"},{"name":"positionOwner","type":"publicKey"},{"name":"whirlpool","type":"publicKey"},{"name":"lockedTimestamp","type":"u64"},{"name":"lockType","type":{"defined":"LockTypeLabel"}}]}},{"name":"WhirlpoolPosition","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"whirlpool","type":"publicKey"},{"name":"positionMint","type":"publicKey"},{"name":"liquidity","type":"u128"},{"name":"tickLowerIndex","type":"i32"},{"name":"tickUpperIndex","type":"i32"},{"name":"feeGrowthCheckpointA","type":"u128"},{"name":"feeOwedA","type":"u64"},{"name":"feeGrowthCheckpointB","type":"u128"},{"name":"feeOwedB","type":"u64"},{"name":"rewardInfos","type":{"array":[{"defined":"WhirlpoolPositionRewardInfo"},3]}}]}},{"name":"WhirlpoolPositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growthInsideCheckpoint","type":"u128"},{"name":"amountOwed","type":"u64"}]}},{"name":"WhirlpoolTickArray","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"startTickIndex","type":"i32"},{"name":"ticks","type":{"array":["u8",9944]}},{"name":"whirlpool","type":"publicKey"}]}},{"name":"ProgramAuthority","type":{"kind":"struct","fields":[{"name":"key","type":"publicKey"},{"name":"privileges","type":{"array":["u8",32]}}]}},{"name":"GraduationMethodData","type":{"kind":"struct","fields":[{"name":"label","type":{"defined":"GraduationMethodLabel"}},{"name":"graduated","type":"bool"},{"name":"feeTierIndex","type":"u16"},{"name":"splitBps","type":"u16"},{"name":"destination","type":"publicKey"},{"name":"unlocked","type":"bool"},{"name":"padding","type":{"array":["u8",89]}}]}},{"name":"PermissionSigner","type":{"kind":"struct","fields":[{"name":"bytes","type":{"array":["u8",33]}}]}},{"name":"PermissionSignature","type":{"kind":"struct","fields":[{"name":"recoveryId","type":"u8"},{"name":"bytes","type":{"array":["u8",64]}}]}},{"name":"MetaplexTokenStandard","type":{"kind":"enum","variants":[{"name":"NonFungible"},{"name":"FungibleAsset"},{"name":"Fungible"},{"name":"NonFungibleEdition"},{"name":"ProgrammableNonFungible"},{"name":"ProgrammableNonFungibleEdition"}]}},{"name":"MetaplexUseMethod","type":{"kind":"enum","variants":[{"name":"Burn"},{"name":"Multiple"},{"name":"Single"}]}},{"name":"MetaplexCollectionDetails","type":{"kind":"enum","variants":[{"name":"V1","fields":[{"name":"size","type":"u64"}]},{"name":"V2","fields":[{"name":"padding","type":{"array":["u8",8]}}]}]}},{"name":"MetaplexProgrammableConfig","type":{"kind":"enum","variants":[{"name":"V1","fields":[{"name":"rule_set","type":{"option":"publicKey"}}]}]}},{"name":"TokenAccountState","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Initialized"},{"name":"Frozen"}]}},{"name":"LockTypeLabel","type":{"kind":"enum","variants":[{"name":"Permanent"}]}},{"name":"BondingCurveCreationType","type":{"kind":"enum","variants":[{"name":"Manual"},{"name":"Launch"},{"name":"Lockedlaunch"},{"name":"Presale"}]}},{"name":"Event","type":{"kind":"enum","variants":[{"name":"BondingCurveCreated","fields":[{"name":"creation_type","type":{"defined":"BondingCurveCreationType"}},{"name":"base_mint","type":"publicKey"},{"name":"quote_mint","type":"publicKey"},{"name":"creator","type":"publicKey"},{"name":"start_price","type":"u128"},{"name":"end_price","type":"u128"},{"name":"control_points","type":{"array":["u16",4]}},{"name":"swap_fee_bps","type":"u16"},{"name":"quote_fee_bps","type":"u16"},{"name":"base_fee_bps","type":"u16"},{"name":"base_allocation_bps","type":"u16"},{"name":"launch_time","type":"i64"},{"name":"creator_reward","type":"u64"},{"name":"graduation_methods","type":{"array":[{"defined":"GraduationMethodData"},8]}},{"name":"graduation_target","type":"u64"},{"name":"graduation_time","type":"i64"},{"name":"graduation_reward","type":"u64"},{"name":"retain_mint_authority","type":"bool"},{"name":"min_reserve_bps","type":"u16"},{"name":"buy_requires_permission","type":"bool"},{"name":"buy_permission_bitmap","type":{"array":["u8",32]}},{"name":"max_buy_amount","type":"u64"},{"name":"sell_requires_permission","type":"bool"},{"name":"sell_permission_bitmap","type":{"array":["u8",32]}},{"name":"max_sell_amount","type":"u64"},{"name":"quote_token_program","type":"publicKey"},{"name":"base_token_program","type":"publicKey"},{"name":"quote_token_decimals","type":"u8"},{"name":"base_token_decimals","type":"u8"}]},{"name":"TokenBought","fields":[{"name":"buyer","type":"publicKey"},{"name":"base_mint","type":"publicKey"},{"name":"quote_mint","type":"publicKey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"price_before","type":"u128"},{"name":"price_after","type":"u128"},{"name":"quote_amount_before","type":"u64"},{"name":"quote_amount_after","type":"u64"},{"name":"base_amount_before","type":"u64"},{"name":"base_amount_after","type":"u64"},{"name":"protocol_fee","type":"u64"}]},{"name":"TokenSold","fields":[{"name":"seller","type":"publicKey"},{"name":"base_mint","type":"publicKey"},{"name":"quote_mint","type":"publicKey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"price_before","type":"u128"},{"name":"price_after","type":"u128"},{"name":"quote_amount_before","type":"u64"},{"name":"quote_amount_after","type":"u64"},{"name":"base_amount_before","type":"u64"},{"name":"base_amount_after","type":"u64"},{"name":"protocol_fee","type":"u64"}]},{"name":"TokenRefunded","fields":[{"name":"signer","type":"publicKey"},{"name":"base_mint","type":"publicKey"},{"name":"quote_mint","type":"publicKey"},{"name":"price","type":"u128"},{"name":"quote_amount","type":"u64"},{"name":"base_amount","type":"u64"}]},{"name":"BondingCurveGraduated","fields":[{"name":"graduator","type":"publicKey"},{"name":"base_mint","type":"publicKey"},{"name":"quote_mint","type":"publicKey"},{"name":"final_price","type":"u128"},{"name":"graduation_methods","type":{"array":[{"defined":"GraduationMethodData"},8]}}]},{"name":"BondingCurveClosed","fields":[{"name":"bonding_curve","type":"publicKey"}]}]}},{"name":"MintConfigUpdateType","type":{"kind":"enum","variants":[{"name":"DefaultCreatorReward","fields":["u64"]},{"name":"DefaultGraduationReward","fields":["u64"]},{"name":"DefaultGraduationTarget","fields":["u64"]},{"name":"DefaultMaxBuyAmount","fields":["u64"]},{"name":"DefaultMaxSellAmount","fields":["u64"]},{"name":"DefaultBuyPermissionBitmap","fields":[{"option":{"array":["u8",32]}}]},{"name":"DefaultSellPermissionBitmap","fields":[{"option":{"array":["u8",32]}}]},{"name":"CreatePermissionBitmap","fields":[{"option":{"array":["u8",32]}}]},{"name":"PriceCurve","fields":["u128","u128",{"array":["u16",4]}]},{"name":"DefaultSwapFeeBps","fields":["u16"]},{"name":"DefaultBaseFeeBps","fields":["u16"]},{"name":"DefaultQuoteFeeBps","fields":["u16"]}]}},{"name":"PermissionConfigUpdateType","type":{"kind":"enum","variants":[{"name":"AllowedSigner1","fields":[{"defined":"PermissionSigner"}]},{"name":"AllowedSigner2","fields":[{"defined":"PermissionSigner"}]},{"name":"AllowedSigner3","fields":[{"defined":"PermissionSigner"}]}]}},{"name":"AccountDiscriminator","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Closed"},{"name":"BondingCurve"},{"name":"AuthorityConfig"},{"name":"PermissionConfig"},{"name":"ConsumedPermission"},{"name":"MintConfig"}]}},{"name":"Privilege","type":{"kind":"enum","variants":[{"name":"AuthorityConfigUpdate"},{"name":"ReceiveProtocolFees"},{"name":"MintConfigInitialize"},{"name":"MintConfigUpdate"},{"name":"MintConfigClose"},{"name":"PermissionConfigInitialize"},{"name":"PermissionConfigUpdate"},{"name":"PermissionConfigClose"},{"name":"BondingCurveInitialize"},{"name":"BondingCurveUpdate"},{"name":"BondingCurveClose"},{"name":"ExecuteLpTakeover"}]}},{"name":"GraduationMethodLabel","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Whirlpool"},{"name":"Manual"}]}},{"name":"GraduationMethod","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Whirlpool","fields":[{"name":"split_bps","type":"u16"},{"name":"fee_tier_index","type":"u16"},{"name":"destination","type":"publicKey"},{"name":"unlocked","type":"bool"}]},{"name":"Manual","fields":[{"name":"split_bps","type":"u16"},{"name":"destination","type":"publicKey"}]}]}},{"name":"PermissionMessage","type":{"kind":"enum","variants":[{"name":"V1","fields":[{"name":"nonce","type":"u64"},{"name":"consumer_program","type":"publicKey"},{"name":"permission_signer","type":{"defined":"PermissionSigner"}},{"name":"permission_subject","type":"publicKey"},{"name":"valid_until","type":"u64"},{"name":"permission_type","type":"u8"},{"name":"instruction_discriminators","type":{"vec":"bytes"}}]}]}}],"errors":[{"code":6000,"name":"InvalidAccountRole","msg":"Invalid account role"},{"code":6001,"name":"IncorrectAccountAddress","msg":"Incorrect account address"},{"code":6002,"name":"PermissionActive","msg":"Permission still active"},{"code":6003,"name":"PermissionExpired","msg":"Permission expired"},{"code":6004,"name":"PermissionInvalidSignature","msg":"Permission invalid signature"},{"code":6005,"name":"WhirlpoolError","msg":"Error from whirlpool lib"},{"code":6006,"name":"UnknownInstructionDiscriminator","msg":"Unknown instruction discriminator"},{"code":6007,"name":"IncorrectProgramId","msg":"Incorrect program id"},{"code":6008,"name":"NotEnoughAccountKeys","msg":"Not enough account keys"},{"code":6009,"name":"ArithmeticError","msg":"Arithmetic error"},{"code":6010,"name":"QuoteError","msg":"Error calculating quote from math-lib"},{"code":6011,"name":"SlippageExceeded","msg":"Slippage exceeded"},{"code":6012,"name":"PriceError","msg":"Error calculating token price"},{"code":6013,"name":"GraduationConditionsNotMet","msg":"Token has not met graduation conditions"},{"code":6014,"name":"WhirlpoolAlreadyExists","msg":"Whirlpool already exists"},{"code":6015,"name":"IncorrectGraduationInstruction","msg":"Incorrect graduation instruction"},{"code":6016,"name":"BondingCurveNotExpired","msg":"Bonding curve is still active"},{"code":6017,"name":"InsufficientTokensForGraduation","msg":"Insufficient tokens for graduation"},{"code":6018,"name":"MissingPermissionConsumeInstruction","msg":"Missing permission consume instruction"},{"code":6019,"name":"BondingCurveNotActive","msg":"Bonding curve is either not launched yet or is ready to be graduated"},{"code":6020,"name":"InvalidPriceCurve","msg":"Invalid price curve"},{"code":6021,"name":"GraduationMethodNotCalled","msg":"Graduation method not called"},{"code":6022,"name":"InvalidAccountData","msg":"Invalid account data"},{"code":6023,"name":"InvalidSeeds","msg":"Invalid seeds"},{"code":6024,"name":"IncorrectOwner","msg":"Account is not owned by the right program"},{"code":6025,"name":"InvalidInstructionData","msg":"Invalid instruction data"},{"code":6026,"name":"ReservedX","msg":"Reserved for future use"},{"code":6027,"name":"MissingPrivileges","msg":"An account does not have the required privileges"},{"code":6028,"name":"NoMoreAuthoritySlots","msg":"No more authority slots"},{"code":6029,"name":"EmitEventError","msg":"Event serialization failed"}],"metadata":{"origin":"shank","address":"waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF"}} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/orca_whirlpool.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.json b/olddocs/archivekbot2/idls/orca_whirlpool.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.json new file mode 100644 index 0000000..7a4dee9 --- /dev/null +++ b/olddocs/archivekbot2/idls/orca_whirlpool.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.json @@ -0,0 +1 @@ +{"address":"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc","metadata":{"name":"whirlpool","version":"0.9.0","spec":"0.1.0"},"instructions":[{"name":"close_bundled_position","discriminator":[41,36,216,245,27,85,103,67],"accounts":[{"name":"bundled_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,117,110,100,108,101,100,95,112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_bundle.position_bundle_mint","account":"PositionBundle"},{"kind":"arg","path":"bundle_index"}]}},{"name":"position_bundle","writable":true},{"name":"position_bundle_token_account"},{"name":"position_bundle_authority","signer":true},{"name":"receiver","writable":true}],"args":[{"name":"bundle_index","type":"u16"}]},{"name":"close_position","discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"position_authority","signer":true},{"name":"receiver","writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint","writable":true},{"name":"position_token_account","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"close_position_with_token_extensions","discriminator":[1,182,135,59,155,25,99,223],"accounts":[{"name":"position_authority","signer":true},{"name":"receiver","writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint","writable":true},{"name":"position_token_account","writable":true},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"collect_fees","discriminator":[164,152,207,99,30,186,19,182],"accounts":[{"name":"whirlpool","relations":["position"]},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_owner_account_a","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"collect_fees_v2","discriminator":[207,117,95,191,229,180,226,15],"accounts":[{"name":"whirlpool","relations":["position"]},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"collect_protocol_fees","discriminator":[22,67,23,98,150,178,70,220],"accounts":[{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"whirlpool","writable":true},{"name":"collect_protocol_fees_authority","signer":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_destination_a","writable":true},{"name":"token_destination_b","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"collect_protocol_fees_v2","discriminator":[103,128,222,134,114,200,22,200],"accounts":[{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"whirlpool","writable":true},{"name":"collect_protocol_fees_authority","signer":true},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_destination_a","writable":true},{"name":"token_destination_b","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"collect_reward","discriminator":[70,5,132,87,86,235,177,34],"accounts":[{"name":"whirlpool","relations":["position"]},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"reward_owner_account","writable":true},{"name":"reward_vault","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"collect_reward_v2","discriminator":[177,107,37,180,160,19,49,209],"accounts":[{"name":"whirlpool","relations":["position"]},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"reward_owner_account","writable":true},{"name":"reward_mint"},{"name":"reward_vault","writable":true},{"name":"reward_token_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"reward_index","type":"u8"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"decrease_liquidity","discriminator":[160,38,208,111,104,91,44,1],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_min_a","type":"u64"},{"name":"token_min_b","type":"u64"}]},{"name":"decrease_liquidity_v2","discriminator":[58,127,188,62,79,82,196,96],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_min_a","type":"u64"},{"name":"token_min_b","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"delete_position_bundle","discriminator":[100,25,99,2,217,239,124,173],"accounts":[{"name":"position_bundle","writable":true},{"name":"position_bundle_mint","writable":true},{"name":"position_bundle_token_account","writable":true},{"name":"position_bundle_owner","signer":true},{"name":"receiver","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"delete_token_badge","discriminator":[53,146,68,8,18,117,17,185],"accounts":[{"name":"whirlpools_config","relations":["whirlpools_config_extension","token_badge"]},{"name":"whirlpools_config_extension"},{"name":"token_badge_authority","signer":true},{"name":"token_mint"},{"name":"token_badge","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint"}]}},{"name":"receiver","writable":true}],"args":[]},{"name":"idl_include","discriminator":[223,253,121,121,60,193,129,31],"accounts":[{"name":"tick_array"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"increase_liquidity","discriminator":[46,156,243,118,13,205,251,178],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_max_a","type":"u64"},{"name":"token_max_b","type":"u64"}]},{"name":"increase_liquidity_by_token_amounts_v2","discriminator":[239,251,9,124,210,198,53,43],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"method","type":{"defined":{"name":"IncreaseLiquidityMethod"}}},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"increase_liquidity_v2","discriminator":[133,29,89,223,69,238,176,10],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_max_a","type":"u64"},{"name":"token_max_b","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"initialize_adaptive_fee_tier","discriminator":[77,99,208,200,141,123,117,48],"accounts":[{"name":"whirlpools_config"},{"name":"adaptive_fee_tier","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,116,105,101,114]},{"kind":"account","path":"whirlpools_config"},{"kind":"arg","path":"fee_tier_index"}]}},{"name":"funder","writable":true,"signer":true},{"name":"fee_authority","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"fee_tier_index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"initialize_pool_authority","type":"pubkey"},{"name":"delegated_fee_authority","type":"pubkey"},{"name":"default_base_fee_rate","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"adaptive_fee_control_factor","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"tick_group_size","type":"u16"},{"name":"major_swap_threshold_ticks","type":"u16"}]},{"name":"initialize_config","discriminator":[208,127,21,1,194,190,196,70],"accounts":[{"name":"config","writable":true,"signer":true},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"fee_authority","type":"pubkey"},{"name":"collect_protocol_fees_authority","type":"pubkey"},{"name":"reward_emissions_super_authority","type":"pubkey"},{"name":"default_protocol_fee_rate","type":"u16"}]},{"name":"initialize_config_extension","discriminator":[55,9,53,9,114,57,209,52],"accounts":[{"name":"config"},{"name":"config_extension","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"config"}]}},{"name":"funder","writable":true,"signer":true},{"name":"fee_authority","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize_dynamic_tick_array","discriminator":[41,33,165,200,120,231,142,50],"accounts":[{"name":"whirlpool"},{"name":"funder","writable":true,"signer":true},{"name":"tick_array","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"whirlpool"},{"kind":"arg","path":"start_tick_index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"start_tick_index","type":"i32"},{"name":"idempotent","type":"bool"}]},{"name":"initialize_fee_tier","discriminator":[183,74,156,160,112,2,42,30],"accounts":[{"name":"config"},{"name":"fee_tier","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,116,105,101,114]},{"kind":"account","path":"config"},{"kind":"arg","path":"tick_spacing"}]}},{"name":"funder","writable":true,"signer":true},{"name":"fee_authority","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"tick_spacing","type":"u16"},{"name":"default_fee_rate","type":"u16"}]},{"name":"initialize_pool","discriminator":[95,180,10,172,84,174,232,40],"accounts":[{"name":"whirlpools_config","relations":["fee_tier"]},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"funder","writable":true,"signer":true},{"name":"whirlpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[119,104,105,114,108,112,111,111,108]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_a"},{"kind":"account","path":"token_mint_b"},{"kind":"arg","path":"tick_spacing"}]}},{"name":"token_vault_a","writable":true,"signer":true},{"name":"token_vault_b","writable":true,"signer":true},{"name":"fee_tier"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"bumps","type":{"defined":{"name":"WhirlpoolBumps"}}},{"name":"tick_spacing","type":"u16"},{"name":"initial_sqrt_price","type":"u128"}]},{"name":"initialize_pool_v2","discriminator":[207,45,87,242,27,63,204,67],"accounts":[{"name":"whirlpools_config","relations":["fee_tier"]},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_badge_a","pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_a"}]}},{"name":"token_badge_b","pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_b"}]}},{"name":"funder","writable":true,"signer":true},{"name":"whirlpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[119,104,105,114,108,112,111,111,108]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_a"},{"kind":"account","path":"token_mint_b"},{"kind":"arg","path":"tick_spacing"}]}},{"name":"token_vault_a","writable":true,"signer":true},{"name":"token_vault_b","writable":true,"signer":true},{"name":"fee_tier"},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"tick_spacing","type":"u16"},{"name":"initial_sqrt_price","type":"u128"}]},{"name":"initialize_pool_with_adaptive_fee","discriminator":[143,94,96,76,172,124,119,199],"accounts":[{"name":"whirlpools_config","relations":["adaptive_fee_tier"]},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_badge_a","pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_a"}]}},{"name":"token_badge_b","pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_b"}]}},{"name":"funder","writable":true,"signer":true},{"name":"initialize_pool_authority","signer":true},{"name":"whirlpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[119,104,105,114,108,112,111,111,108]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_a"},{"kind":"account","path":"token_mint_b"},{"kind":"account","path":"adaptive_fee_tier.fee_tier_index","account":"AdaptiveFeeTier"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool"}]}},{"name":"token_vault_a","writable":true,"signer":true},{"name":"token_vault_b","writable":true,"signer":true},{"name":"adaptive_fee_tier"},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"initial_sqrt_price","type":"u128"},{"name":"trade_enable_timestamp","type":{"option":"u64"}}]},{"name":"initialize_position_bundle","discriminator":[117,45,241,149,24,18,194,65],"accounts":[{"name":"position_bundle","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,98,117,110,100,108,101]},{"kind":"account","path":"position_bundle_mint"}]}},{"name":"position_bundle_mint","writable":true,"signer":true},{"name":"position_bundle_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"position_bundle_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_bundle_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":"position_bundle_owner"},{"name":"funder","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"initialize_position_bundle_with_metadata","discriminator":[93,124,16,179,249,131,115,245],"accounts":[{"name":"position_bundle","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,98,117,110,100,108,101]},{"kind":"account","path":"position_bundle_mint"}]}},{"name":"position_bundle_mint","writable":true,"signer":true},{"name":"position_bundle_metadata","writable":true},{"name":"position_bundle_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"position_bundle_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_bundle_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":"position_bundle_owner"},{"name":"funder","writable":true,"signer":true},{"name":"metadata_update_auth","address":"3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[]},{"name":"initialize_reward","discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"reward_authority","signer":true},{"name":"funder","writable":true,"signer":true},{"name":"whirlpool","writable":true},{"name":"reward_mint"},{"name":"reward_vault","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"initialize_reward_v2","discriminator":[91,1,77,50,235,229,133,49],"accounts":[{"name":"reward_authority","signer":true},{"name":"funder","writable":true,"signer":true},{"name":"whirlpool","writable":true},{"name":"reward_mint"},{"name":"reward_token_badge","pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpool.whirlpools_config","account":"Whirlpool"},{"kind":"account","path":"reward_mint"}]}},{"name":"reward_vault","writable":true,"signer":true},{"name":"reward_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"initialize_tick_array","discriminator":[11,188,193,214,141,91,149,184],"accounts":[{"name":"whirlpool"},{"name":"funder","writable":true,"signer":true},{"name":"tick_array","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"whirlpool"},{"kind":"arg","path":"start_tick_index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"start_tick_index","type":"i32"}]},{"name":"initialize_token_badge","discriminator":[253,77,205,95,27,224,89,223],"accounts":[{"name":"whirlpools_config","relations":["whirlpools_config_extension"]},{"name":"whirlpools_config_extension"},{"name":"token_badge_authority","signer":true},{"name":"token_mint"},{"name":"token_badge","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint"}]}},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"lock_position","discriminator":[227,62,2,252,247,10,171,185],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"position_authority","signer":true},{"name":"position","pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint"},{"name":"position_token_account","writable":true},{"name":"lock_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,107,95,99,111,110,102,105,103]},{"kind":"account","path":"position"}]}},{"name":"whirlpool","relations":["position"]},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"lock_type","type":{"defined":{"name":"LockType"}}}]},{"name":"migrate_repurpose_reward_authority_space","discriminator":[214,161,248,79,152,98,172,231],"accounts":[{"name":"whirlpool","writable":true}],"args":[]},{"name":"open_bundled_position","discriminator":[169,113,126,171,213,172,212,49],"accounts":[{"name":"bundled_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,117,110,100,108,101,100,95,112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_bundle.position_bundle_mint","account":"PositionBundle"},{"kind":"arg","path":"bundle_index"}]}},{"name":"position_bundle","writable":true},{"name":"position_bundle_token_account"},{"name":"position_bundle_authority","signer":true},{"name":"whirlpool"},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"bundle_index","type":"u16"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]},{"name":"open_position","discriminator":[135,128,47,77,15,152,240,49],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"owner"},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint","writable":true,"signer":true},{"name":"position_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_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":"whirlpool"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"bumps","type":{"defined":{"name":"OpenPositionBumps"}}},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]},{"name":"open_position_with_metadata","discriminator":[242,29,134,48,58,110,14,60],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"owner"},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint","writable":true,"signer":true},{"name":"position_metadata_account","writable":true},{"name":"position_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_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":"whirlpool"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"metadata_update_auth","address":"3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr"}],"args":[{"name":"bumps","type":{"defined":{"name":"OpenPositionWithMetadataBumps"}}},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]},{"name":"open_position_with_token_extensions","discriminator":[212,47,95,92,114,102,131,250],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"owner"},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint","writable":true,"signer":true},{"name":"position_token_account","writable":true},{"name":"whirlpool"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_update_auth","address":"3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"with_token_metadata_extension","type":"bool"}]},{"name":"reposition_liquidity_v2","discriminator":[191,169,224,11,131,19,158,253],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"position_authority","signer":true},{"name":"funder","writable":true,"signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"existing_tick_array_lower","writable":true},{"name":"existing_tick_array_upper","writable":true},{"name":"new_tick_array_lower","writable":true},{"name":"new_tick_array_upper","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"new_tick_lower_index","type":"i32"},{"name":"new_tick_upper_index","type":"i32"},{"name":"method","type":{"defined":{"name":"RepositionLiquidityMethod"}}},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"reset_position_range","discriminator":[164,123,180,141,194,100,160,175],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"position_authority","signer":true},{"name":"whirlpool","relations":["position"]},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"new_tick_lower_index","type":"i32"},{"name":"new_tick_upper_index","type":"i32"}]},{"name":"set_adaptive_fee_constants","discriminator":[133,158,212,189,237,12,73,39],"accounts":[{"name":"whirlpool","relations":["oracle"]},{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"oracle","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"filter_period","type":{"option":"u16"}},{"name":"decay_period","type":{"option":"u16"}},{"name":"reduction_factor","type":{"option":"u16"}},{"name":"adaptive_fee_control_factor","type":{"option":"u32"}},{"name":"max_volatility_accumulator","type":{"option":"u32"}},{"name":"tick_group_size","type":{"option":"u16"}},{"name":"major_swap_threshold_ticks","type":{"option":"u16"}}]},{"name":"set_collect_protocol_fees_authority","discriminator":[34,150,93,244,139,225,233,67],"accounts":[{"name":"whirlpools_config","writable":true},{"name":"collect_protocol_fees_authority","signer":true},{"name":"new_collect_protocol_fees_authority"}],"args":[]},{"name":"set_config_extension_authority","discriminator":[44,94,241,116,24,188,60,143],"accounts":[{"name":"whirlpools_config","relations":["whirlpools_config_extension"]},{"name":"whirlpools_config_extension","writable":true},{"name":"config_extension_authority","signer":true},{"name":"new_config_extension_authority"}],"args":[]},{"name":"set_config_feature_flag","discriminator":[71,173,228,18,67,247,210,57],"accounts":[{"name":"whirlpools_config","writable":true},{"name":"authority","signer":true}],"args":[{"name":"feature_flag","type":{"defined":{"name":"ConfigFeatureFlag"}}}]},{"name":"set_default_base_fee_rate","discriminator":[229,66,84,251,164,134,183,7],"accounts":[{"name":"whirlpools_config","relations":["adaptive_fee_tier"]},{"name":"adaptive_fee_tier","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"default_base_fee_rate","type":"u16"}]},{"name":"set_default_fee_rate","discriminator":[118,215,214,157,182,229,208,228],"accounts":[{"name":"whirlpools_config","relations":["fee_tier"]},{"name":"fee_tier","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"default_fee_rate","type":"u16"}]},{"name":"set_default_protocol_fee_rate","discriminator":[107,205,249,226,151,35,86,0],"accounts":[{"name":"whirlpools_config","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"default_protocol_fee_rate","type":"u16"}]},{"name":"set_delegated_fee_authority","discriminator":[193,234,231,147,138,57,3,122],"accounts":[{"name":"whirlpools_config","relations":["adaptive_fee_tier"]},{"name":"adaptive_fee_tier","writable":true},{"name":"fee_authority","signer":true},{"name":"new_delegated_fee_authority"}],"args":[]},{"name":"set_fee_authority","discriminator":[31,1,50,87,237,101,97,132],"accounts":[{"name":"whirlpools_config","writable":true},{"name":"fee_authority","signer":true},{"name":"new_fee_authority"}],"args":[]},{"name":"set_fee_rate","discriminator":[53,243,137,65,8,140,158,6],"accounts":[{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"whirlpool","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"fee_rate","type":"u16"}]},{"name":"set_fee_rate_by_delegated_fee_authority","discriminator":[121,121,54,114,131,230,162,104],"accounts":[{"name":"whirlpool","writable":true},{"name":"adaptive_fee_tier"},{"name":"delegated_fee_authority","signer":true}],"args":[{"name":"fee_rate","type":"u16"}]},{"name":"set_initialize_pool_authority","discriminator":[125,43,127,235,149,26,106,236],"accounts":[{"name":"whirlpools_config","relations":["adaptive_fee_tier"]},{"name":"adaptive_fee_tier","writable":true},{"name":"fee_authority","signer":true},{"name":"new_initialize_pool_authority"}],"args":[]},{"name":"set_preset_adaptive_fee_constants","discriminator":[132,185,66,148,83,88,134,198],"accounts":[{"name":"whirlpools_config","relations":["adaptive_fee_tier"]},{"name":"adaptive_fee_tier","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"adaptive_fee_control_factor","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"tick_group_size","type":"u16"},{"name":"major_swap_threshold_ticks","type":"u16"}]},{"name":"set_protocol_fee_rate","discriminator":[95,7,4,50,154,79,156,131],"accounts":[{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"whirlpool","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"protocol_fee_rate","type":"u16"}]},{"name":"set_reward_authority","discriminator":[34,39,183,252,83,28,85,127],"accounts":[{"name":"whirlpool","writable":true},{"name":"reward_authority","signer":true},{"name":"new_reward_authority"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"set_reward_authority_by_super_authority","discriminator":[240,154,201,198,148,93,56,25],"accounts":[{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"whirlpool","writable":true},{"name":"reward_emissions_super_authority","signer":true},{"name":"new_reward_authority"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"set_reward_emissions","discriminator":[13,197,86,168,109,176,27,244],"accounts":[{"name":"whirlpool","writable":true},{"name":"reward_authority","signer":true},{"name":"reward_vault"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"}]},{"name":"set_reward_emissions_super_authority","discriminator":[207,5,200,209,122,56,82,183],"accounts":[{"name":"whirlpools_config","writable":true},{"name":"reward_emissions_super_authority","signer":true},{"name":"new_reward_emissions_super_authority"}],"args":[]},{"name":"set_reward_emissions_v2","discriminator":[114,228,72,32,193,48,160,102],"accounts":[{"name":"whirlpool","writable":true},{"name":"reward_authority","signer":true},{"name":"reward_vault"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"}]},{"name":"set_token_badge_attribute","discriminator":[224,88,65,33,138,147,246,137],"accounts":[{"name":"whirlpools_config","relations":["whirlpools_config_extension","token_badge"]},{"name":"whirlpools_config_extension"},{"name":"token_badge_authority","signer":true},{"name":"token_mint","relations":["token_badge"]},{"name":"token_badge","writable":true}],"args":[{"name":"attribute","type":{"defined":{"name":"TokenBadgeAttribute"}}}]},{"name":"set_token_badge_authority","discriminator":[207,202,4,32,205,79,13,178],"accounts":[{"name":"whirlpools_config","relations":["whirlpools_config_extension"]},{"name":"whirlpools_config_extension","writable":true},{"name":"config_extension_authority","signer":true},{"name":"new_token_badge_authority"}],"args":[]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_authority","signer":true},{"name":"whirlpool","writable":true},{"name":"token_owner_account_a","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_0","writable":true},{"name":"tick_array_1","writable":true},{"name":"tick_array_2","writable":true},{"name":"oracle","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool"}]}}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit","type":"u128"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b","type":"bool"}]},{"name":"swap_v2","discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"token_authority","signer":true},{"name":"whirlpool","writable":true},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_0","writable":true},{"name":"tick_array_1","writable":true},{"name":"tick_array_2","writable":true},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool"}]}}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit","type":"u128"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b","type":"bool"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"transfer_locked_position","discriminator":[179,121,229,46,67,138,194,138],"accounts":[{"name":"position_authority","signer":true},{"name":"receiver","writable":true},{"name":"position","pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]},"relations":["lock_config"]},{"name":"position_mint"},{"name":"position_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"lock_config","writable":true},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"two_hop_swap","discriminator":[195,96,237,108,68,162,219,230],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_authority","signer":true},{"name":"whirlpool_one","writable":true},{"name":"whirlpool_two","writable":true},{"name":"token_owner_account_one_a","writable":true},{"name":"token_vault_one_a","writable":true},{"name":"token_owner_account_one_b","writable":true},{"name":"token_vault_one_b","writable":true},{"name":"token_owner_account_two_a","writable":true},{"name":"token_vault_two_a","writable":true},{"name":"token_owner_account_two_b","writable":true},{"name":"token_vault_two_b","writable":true},{"name":"tick_array_one_0","writable":true},{"name":"tick_array_one_1","writable":true},{"name":"tick_array_one_2","writable":true},{"name":"tick_array_two_0","writable":true},{"name":"tick_array_two_1","writable":true},{"name":"tick_array_two_2","writable":true},{"name":"oracle_one","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool_one"}]}},{"name":"oracle_two","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool_two"}]}}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b_one","type":"bool"},{"name":"a_to_b_two","type":"bool"},{"name":"sqrt_price_limit_one","type":"u128"},{"name":"sqrt_price_limit_two","type":"u128"}]},{"name":"two_hop_swap_v2","discriminator":[186,143,209,29,254,2,194,117],"accounts":[{"name":"whirlpool_one","writable":true},{"name":"whirlpool_two","writable":true},{"name":"token_mint_input"},{"name":"token_mint_intermediate"},{"name":"token_mint_output"},{"name":"token_program_input"},{"name":"token_program_intermediate"},{"name":"token_program_output"},{"name":"token_owner_account_input","writable":true},{"name":"token_vault_one_input","writable":true},{"name":"token_vault_one_intermediate","writable":true},{"name":"token_vault_two_intermediate","writable":true},{"name":"token_vault_two_output","writable":true},{"name":"token_owner_account_output","writable":true},{"name":"token_authority","signer":true},{"name":"tick_array_one_0","writable":true},{"name":"tick_array_one_1","writable":true},{"name":"tick_array_one_2","writable":true},{"name":"tick_array_two_0","writable":true},{"name":"tick_array_two_1","writable":true},{"name":"tick_array_two_2","writable":true},{"name":"oracle_one","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool_one"}]}},{"name":"oracle_two","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool_two"}]}},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b_one","type":"bool"},{"name":"a_to_b_two","type":"bool"},{"name":"sqrt_price_limit_one","type":"u128"},{"name":"sqrt_price_limit_two","type":"u128"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"update_fees_and_rewards","discriminator":[154,230,250,13,236,209,75,223],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"tick_array_lower"},{"name":"tick_array_upper"}],"args":[]}],"accounts":[{"name":"AdaptiveFeeTier","discriminator":[147,16,144,116,47,146,149,46]},{"name":"DynamicTickArray","discriminator":[17,216,246,142,225,199,218,56]},{"name":"FeeTier","discriminator":[56,75,159,76,142,68,190,105]},{"name":"LockConfig","discriminator":[106,47,238,159,124,12,160,192]},{"name":"Oracle","discriminator":[139,194,131,179,140,179,229,244]},{"name":"Position","discriminator":[170,188,143,228,122,64,247,208]},{"name":"PositionBundle","discriminator":[129,169,175,65,185,95,32,100]},{"name":"TickArray","discriminator":[69,97,189,190,110,7,66,187]},{"name":"TokenBadge","discriminator":[116,219,204,229,249,116,255,150]},{"name":"Whirlpool","discriminator":[63,149,209,12,225,128,99,9]},{"name":"WhirlpoolsConfig","discriminator":[157,20,49,224,217,87,193,254]},{"name":"WhirlpoolsConfigExtension","discriminator":[2,99,215,163,240,26,153,58]}],"events":[{"name":"LiquidityDecreased","discriminator":[166,1,36,71,112,202,181,171]},{"name":"LiquidityIncreased","discriminator":[30,7,144,181,102,254,155,161]},{"name":"LiquidityRepositioned","discriminator":[95,130,181,132,251,50,195,38]},{"name":"PoolInitialized","discriminator":[100,118,173,87,12,198,254,229]},{"name":"PositionOpened","discriminator":[237,175,243,230,147,117,101,121]},{"name":"Traded","discriminator":[225,202,73,175,147,43,160,150]}],"errors":[{"code":6000,"name":"InvalidEnum","msg":"Enum value could not be converted"},{"code":6001,"name":"InvalidStartTick","msg":"Invalid start tick index provided."},{"code":6002,"name":"TickArrayExistInPool","msg":"Tick-array already exists in this whirlpool"},{"code":6003,"name":"TickArrayIndexOutofBounds","msg":"Attempt to search for a tick-array failed"},{"code":6004,"name":"InvalidTickSpacing","msg":"Tick-spacing is not supported"},{"code":6005,"name":"ClosePositionNotEmpty","msg":"Position is not empty It cannot be closed"},{"code":6006,"name":"DivideByZero","msg":"Unable to divide by zero"},{"code":6007,"name":"NumberCastError","msg":"Unable to cast number into BigInt"},{"code":6008,"name":"NumberDownCastError","msg":"Unable to down cast number"},{"code":6009,"name":"TickNotFound","msg":"Tick not found within tick array"},{"code":6010,"name":"InvalidTickIndex","msg":"Provided tick index is either out of bounds or uninitializable"},{"code":6011,"name":"SqrtPriceOutOfBounds","msg":"Provided sqrt price out of bounds"},{"code":6012,"name":"LiquidityZero","msg":"Liquidity amount must be greater than zero"},{"code":6013,"name":"LiquidityTooHigh","msg":"Liquidity amount must be less than i64::MAX"},{"code":6014,"name":"LiquidityOverflow","msg":"Liquidity overflow"},{"code":6015,"name":"LiquidityUnderflow","msg":"Liquidity underflow"},{"code":6016,"name":"LiquidityNetError","msg":"Tick liquidity net underflowed or overflowed"},{"code":6017,"name":"TokenMaxExceeded","msg":"Exceeded token max"},{"code":6018,"name":"TokenMinSubceeded","msg":"Did not meet token min"},{"code":6019,"name":"MissingOrInvalidDelegate","msg":"Position token account has a missing or invalid delegate"},{"code":6020,"name":"InvalidPositionTokenAmount","msg":"Position token amount must be 1"},{"code":6021,"name":"InvalidTimestampConversion","msg":"Timestamp should be convertible from i64 to u64"},{"code":6022,"name":"InvalidTimestamp","msg":"Timestamp should be greater than the last updated timestamp"},{"code":6023,"name":"InvalidTickArraySequence","msg":"Invalid tick array sequence provided for instruction."},{"code":6024,"name":"InvalidTokenMintOrder","msg":"Token Mint in wrong order"},{"code":6025,"name":"RewardNotInitialized","msg":"Reward not initialized"},{"code":6026,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6027,"name":"RewardVaultAmountInsufficient","msg":"Reward vault requires amount to support emissions for at least one day"},{"code":6028,"name":"FeeRateMaxExceeded","msg":"Exceeded max fee rate"},{"code":6029,"name":"ProtocolFeeRateMaxExceeded","msg":"Exceeded max protocol fee rate"},{"code":6030,"name":"MultiplicationShiftRightOverflow","msg":"Multiplication with shift right overflow"},{"code":6031,"name":"MulDivOverflow","msg":"Muldiv overflow"},{"code":6032,"name":"MulDivInvalidInput","msg":"Invalid div_u256 input"},{"code":6033,"name":"MultiplicationOverflow","msg":"Multiplication overflow"},{"code":6034,"name":"InvalidSqrtPriceLimitDirection","msg":"Provided SqrtPriceLimit not in the same direction as the swap."},{"code":6035,"name":"ZeroTradableAmount","msg":"There are no tradable amount to swap."},{"code":6036,"name":"AmountOutBelowMinimum","msg":"Amount out below minimum threshold"},{"code":6037,"name":"AmountInAboveMaximum","msg":"Amount in above maximum threshold"},{"code":6038,"name":"TickArraySequenceInvalidIndex","msg":"Invalid index for tick array sequence"},{"code":6039,"name":"AmountCalcOverflow","msg":"Amount calculated overflows"},{"code":6040,"name":"AmountRemainingOverflow","msg":"Amount remaining overflows"},{"code":6041,"name":"InvalidIntermediaryMint","msg":"Invalid intermediary mint"},{"code":6042,"name":"DuplicateTwoHopPool","msg":"Duplicate two hop pool"},{"code":6043,"name":"InvalidBundleIndex","msg":"Bundle index is out of bounds"},{"code":6044,"name":"BundledPositionAlreadyOpened","msg":"Position has already been opened"},{"code":6045,"name":"BundledPositionAlreadyClosed","msg":"Position has already been closed"},{"code":6046,"name":"PositionBundleNotDeletable","msg":"Unable to delete PositionBundle with open positions"},{"code":6047,"name":"UnsupportedTokenMint","msg":"Token mint has unsupported attributes"},{"code":6048,"name":"RemainingAccountsInvalidSlice","msg":"Invalid remaining accounts"},{"code":6049,"name":"RemainingAccountsInsufficient","msg":"Insufficient remaining accounts"},{"code":6050,"name":"NoExtraAccountsForTransferHook","msg":"Unable to call transfer hook without extra accounts"},{"code":6051,"name":"IntermediateTokenAmountMismatch","msg":"Output and input amount mismatch"},{"code":6052,"name":"TransferFeeCalculationError","msg":"Transfer fee calculation failed"},{"code":6053,"name":"RemainingAccountsDuplicatedAccountsType","msg":"Same accounts type is provided more than once"},{"code":6054,"name":"FullRangeOnlyPool","msg":"This whirlpool only supports full-range positions"},{"code":6055,"name":"TooManySupplementalTickArrays","msg":"Too many supplemental tick arrays provided"},{"code":6056,"name":"DifferentWhirlpoolTickArrayAccount","msg":"TickArray account for different whirlpool provided"},{"code":6057,"name":"PartialFillError","msg":"Trade resulted in partial fill"},{"code":6058,"name":"PositionNotLockable","msg":"Position is not lockable"},{"code":6059,"name":"OperationNotAllowedOnLockedPosition","msg":"Operation not allowed on locked position"},{"code":6060,"name":"SameTickRangeNotAllowed","msg":"Cannot reset position range with same tick range"},{"code":6061,"name":"InvalidAdaptiveFeeConstants","msg":"Invalid adaptive fee constants"},{"code":6062,"name":"InvalidFeeTierIndex","msg":"Invalid fee tier index"},{"code":6063,"name":"InvalidTradeEnableTimestamp","msg":"Invalid trade enable timestamp"},{"code":6064,"name":"TradeIsNotEnabled","msg":"Trade is not enabled yet"},{"code":6065,"name":"RentCalculationError","msg":"Rent calculation error"},{"code":6066,"name":"FeatureIsNotEnabled","msg":"Feature is not enabled"},{"code":6067,"name":"PositionWithTokenExtensionsRequired","msg":"This whirlpool only supports open_position_with_token_extensions instruction"},{"code":6068,"name":"AdaptiveFeeConstantsUnchanged","msg":"Provided adaptive fee constants are unchanged"},{"code":6069,"name":"PriceSlippageOutOfBounds","msg":"Price outside slippage bounds"}],"types":[{"name":"AccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookA"},{"name":"TransferHookB"},{"name":"TransferHookReward"},{"name":"TransferHookInput"},{"name":"TransferHookIntermediate"},{"name":"TransferHookOutput"},{"name":"SupplementalTickArrays"},{"name":"SupplementalTickArraysOne"},{"name":"SupplementalTickArraysTwo"},{"name":"TransferHookDepositA"},{"name":"TransferHookDepositB"},{"name":"TransferHookWithdrawalA"},{"name":"TransferHookWithdrawalB"}]}},{"name":"AdaptiveFeeConstants","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"adaptive_fee_control_factor","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"tick_group_size","type":"u16"},{"name":"major_swap_threshold_ticks","type":"u16"},{"name":"reserved","type":{"array":["u8",16]}}]}},{"name":"AdaptiveFeeTier","type":{"kind":"struct","fields":[{"name":"whirlpools_config","type":"pubkey"},{"name":"fee_tier_index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"initialize_pool_authority","type":"pubkey"},{"name":"delegated_fee_authority","type":"pubkey"},{"name":"default_base_fee_rate","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"adaptive_fee_control_factor","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"tick_group_size","type":"u16"},{"name":"major_swap_threshold_ticks","type":"u16"}]}},{"name":"AdaptiveFeeVariables","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"last_reference_update_timestamp","type":"u64"},{"name":"last_major_swap_timestamp","type":"u64"},{"name":"volatility_reference","type":"u32"},{"name":"tick_group_index_reference","type":"i32"},{"name":"volatility_accumulator","type":"u32"},{"name":"reserved","type":{"array":["u8",16]}}]}},{"name":"ConfigFeatureFlag","type":{"kind":"enum","variants":[{"name":"TokenBadge","fields":["bool"]}]}},{"name":"DynamicTick","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Initialized","fields":[{"defined":{"name":"DynamicTickData"}}]}]}},{"name":"DynamicTickArray","type":{"kind":"struct","fields":[{"name":"start_tick_index","type":"i32"},{"name":"whirlpool","type":"pubkey"},{"name":"tick_bitmap","type":"u128"},{"name":"ticks","type":{"array":[{"defined":{"name":"DynamicTick"}},88]}}]}},{"name":"DynamicTickData","type":{"kind":"struct","fields":[{"name":"liquidity_net","type":"i128"},{"name":"liquidity_gross","type":"u128"},{"name":"fee_growth_outside_a","type":"u128"},{"name":"fee_growth_outside_b","type":"u128"},{"name":"reward_growths_outside","type":{"array":["u128",3]}}]}},{"name":"FeeTier","type":{"kind":"struct","fields":[{"name":"whirlpools_config","type":"pubkey"},{"name":"tick_spacing","type":"u16"},{"name":"default_fee_rate","type":"u16"}]}},{"name":"IncreaseLiquidityMethod","type":{"kind":"enum","variants":[{"name":"ByTokenAmounts","fields":[{"name":"token_max_a","type":"u64"},{"name":"token_max_b","type":"u64"},{"name":"min_sqrt_price","type":"u128"},{"name":"max_sqrt_price","type":"u128"}]}]}},{"name":"LiquidityDecreased","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"},{"name":"token_a_transfer_fee","type":"u64"},{"name":"token_b_transfer_fee","type":"u64"}]}},{"name":"LiquidityIncreased","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"},{"name":"token_a_transfer_fee","type":"u64"},{"name":"token_b_transfer_fee","type":"u64"}]}},{"name":"LiquidityRepositioned","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"existing_range_tick_lower_index","type":"i32"},{"name":"existing_range_tick_upper_index","type":"i32"},{"name":"new_range_tick_lower_index","type":"i32"},{"name":"new_range_tick_upper_index","type":"i32"},{"name":"existing_range_liquidity","type":"u128"},{"name":"new_range_liquidity","type":"u128"},{"name":"existing_range_token_a_amount","type":"u64"},{"name":"existing_range_token_b_amount","type":"u64"},{"name":"new_range_token_a_amount","type":"u64"},{"name":"new_range_token_b_amount","type":"u64"},{"name":"token_a_transfer_amount","type":"u64"},{"name":"token_a_transfer_fee","type":"u64"},{"name":"is_token_a_transfer_from_owner","type":"bool"},{"name":"token_b_transfer_amount","type":"u64"},{"name":"token_b_transfer_fee","type":"u64"},{"name":"is_token_b_transfer_from_owner","type":"bool"}]}},{"name":"LockConfig","type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"position_owner","type":"pubkey"},{"name":"whirlpool","type":"pubkey"},{"name":"locked_timestamp","type":"u64"},{"name":"lock_type","type":{"defined":{"name":"LockTypeLabel"}}}]}},{"name":"LockType","type":{"kind":"enum","variants":[{"name":"Permanent"}]}},{"name":"LockTypeLabel","type":{"kind":"enum","variants":[{"name":"Permanent"}]}},{"name":"OpenPositionBumps","type":{"kind":"struct","fields":[{"name":"position_bump","type":"u8"}]}},{"name":"OpenPositionWithMetadataBumps","type":{"kind":"struct","fields":[{"name":"position_bump","type":"u8"},{"name":"metadata_bump","type":"u8"}]}},{"name":"Oracle","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"trade_enable_timestamp","type":"u64"},{"name":"adaptive_fee_constants","type":{"defined":{"name":"AdaptiveFeeConstants"}}},{"name":"adaptive_fee_variables","type":{"defined":{"name":"AdaptiveFeeVariables"}}},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"PoolInitialized","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"whirlpools_config","type":"pubkey"},{"name":"token_mint_a","type":"pubkey"},{"name":"token_mint_b","type":"pubkey"},{"name":"tick_spacing","type":"u16"},{"name":"token_program_a","type":"pubkey"},{"name":"token_program_b","type":"pubkey"},{"name":"decimals_a","type":"u8"},{"name":"decimals_b","type":"u8"},{"name":"initial_sqrt_price","type":"u128"}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"position_mint","type":"pubkey"},{"name":"liquidity","type":"u128"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"fee_growth_checkpoint_a","type":"u128"},{"name":"fee_owed_a","type":"u64"},{"name":"fee_growth_checkpoint_b","type":"u128"},{"name":"fee_owed_b","type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"PositionRewardInfo"}},3]}}]}},{"name":"PositionBundle","type":{"kind":"struct","fields":[{"name":"position_bundle_mint","type":"pubkey"},{"name":"position_bitmap","type":{"array":["u8",32]}}]}},{"name":"PositionOpened","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]}},{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growth_inside_checkpoint","type":"u128"},{"name":"amount_owed","type":"u64"}]}},{"name":"RemainingAccountsInfo","type":{"kind":"struct","fields":[{"name":"slices","type":{"vec":{"defined":{"name":"RemainingAccountsSlice"}}}}]}},{"name":"RemainingAccountsSlice","type":{"kind":"struct","fields":[{"name":"accounts_type","type":{"defined":{"name":"AccountsType"}}},{"name":"length","type":"u8"}]}},{"name":"RepositionLiquidityMethod","type":{"kind":"enum","variants":[{"name":"ByLiquidity","fields":[{"name":"new_liquidity_amount","type":"u128"},{"name":"existing_range_token_min_a","type":"u64"},{"name":"existing_range_token_min_b","type":"u64"},{"name":"new_range_token_max_a","type":"u64"},{"name":"new_range_token_max_b","type":"u64"}]}]}},{"name":"Tick","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","type":"bool"},{"name":"liquidity_net","type":"i128"},{"name":"liquidity_gross","type":"u128"},{"name":"fee_growth_outside_a","type":"u128"},{"name":"fee_growth_outside_b","type":"u128"},{"name":"reward_growths_outside","type":{"array":["u128",3]}}]}},{"name":"TickArray","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"start_tick_index","type":"i32"},{"name":"ticks","type":{"array":[{"defined":{"name":"Tick"}},88]}},{"name":"whirlpool","type":"pubkey"}]}},{"name":"TokenBadge","type":{"kind":"struct","fields":[{"name":"whirlpools_config","type":"pubkey"},{"name":"token_mint","type":"pubkey"},{"name":"attribute_require_non_transferable_position","type":"bool"}]}},{"name":"TokenBadgeAttribute","type":{"kind":"enum","variants":[{"name":"RequireNonTransferablePosition","fields":["bool"]}]}},{"name":"Traded","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"a_to_b","type":"bool"},{"name":"pre_sqrt_price","type":"u128"},{"name":"post_sqrt_price","type":"u128"},{"name":"input_amount","type":"u64"},{"name":"output_amount","type":"u64"},{"name":"input_transfer_fee","type":"u64"},{"name":"output_transfer_fee","type":"u64"},{"name":"lp_fee","type":"u64"},{"name":"protocol_fee","type":"u64"}]}},{"name":"Whirlpool","type":{"kind":"struct","fields":[{"name":"whirlpools_config","type":"pubkey"},{"name":"whirlpool_bump","type":{"array":["u8",1]}},{"name":"tick_spacing","type":"u16"},{"name":"fee_tier_index_seed","type":{"array":["u8",2]}},{"name":"fee_rate","type":"u16"},{"name":"protocol_fee_rate","type":"u16"},{"name":"liquidity","type":"u128"},{"name":"sqrt_price","type":"u128"},{"name":"tick_current_index","type":"i32"},{"name":"protocol_fee_owed_a","type":"u64"},{"name":"protocol_fee_owed_b","type":"u64"},{"name":"token_mint_a","type":"pubkey"},{"name":"token_vault_a","type":"pubkey"},{"name":"fee_growth_global_a","type":"u128"},{"name":"token_mint_b","type":"pubkey"},{"name":"token_vault_b","type":"pubkey"},{"name":"fee_growth_global_b","type":"u128"},{"name":"reward_last_updated_timestamp","type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"WhirlpoolRewardInfo"}},3]}}]}},{"name":"WhirlpoolBumps","type":{"kind":"struct","fields":[{"name":"whirlpool_bump","type":"u8"}]}},{"name":"WhirlpoolRewardInfo","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"extension","type":{"array":["u8",32]}},{"name":"emissions_per_second_x64","type":"u128"},{"name":"growth_global_x64","type":"u128"}]}},{"name":"WhirlpoolsConfig","type":{"kind":"struct","fields":[{"name":"fee_authority","type":"pubkey"},{"name":"collect_protocol_fees_authority","type":"pubkey"},{"name":"reward_emissions_super_authority","type":"pubkey"},{"name":"default_protocol_fee_rate","type":"u16"},{"name":"feature_flags","type":"u16"}]}},{"name":"WhirlpoolsConfigExtension","type":{"kind":"struct","fields":[{"name":"whirlpools_config","type":"pubkey"},{"name":"config_extension_authority","type":"pubkey"},{"name":"token_badge_authority","type":"pubkey"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/pancakeswap.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.json b/olddocs/archivekbot2/idls/pancakeswap.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.json new file mode 100644 index 0000000..ca82772 --- /dev/null +++ b/olddocs/archivekbot2/idls/pancakeswap.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.json @@ -0,0 +1 @@ +{"address":"HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq","metadata":{"name":"amm_v3","version":"0.1.0","spec":"0.1.0","description":"Anchor client and source for Pancake concentrated liquidity AMM"},"instructions":[{"name":"close_position","docs":["Close the user's position and NFT account. If the NFT mint belongs to token2022, it will also be closed and the funds returned to the NFT owner.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"nft_owner","docs":["The position nft owner"],"writable":true,"signer":true},{"name":"position_nft_mint","docs":["Mint address bound to the personal position."],"writable":true},{"name":"position_nft_account","docs":["User token account where position NFT be minted to"],"writable":true},{"name":"personal_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"system_program","docs":["System program to close the position state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Token/Token2022 program to close token/mint account"]}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"owner","docs":["Only admin or fund_owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"owner","docs":["Only admin or config owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_remaining_rewards","docs":["Collect remaining reward token for reward founder","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info",""],"discriminator":[18,237,166,197,34,16,213,144],"accounts":[{"name":"reward_funder","docs":["The founder who init reward info previously"],"signer":true},{"name":"funder_token_account","docs":["The funder's reward token account"],"writable":true},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"reward_token_vault","docs":["Reward vault transfer remaining token to founder token account"]},{"name":"reward_vault_mint","docs":["The mint of reward token vault"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"create_amm_config","docs":["# Arguments","","* `ctx`- The accounts needed by instruction.","* `index` - The index of amm config, there may be multiple config.","* `tick_spacing` - The tickspacing binding with config, cannot be changed.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within trade fee.","* `fund_fee_rate` - The rate of fund fee within trade fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"amm_config","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"trade_fee_rate","type":"u32"},{"name":"protocol_fee_rate","type":"u32"},{"name":"fund_fee_rate","type":"u32"}]},{"name":"create_operation_account","docs":["Creates an operation account for the program","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[63,87,148,33,109,35,8,104],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"writable":true,"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_permissionless_farm_switch","docs":["Creates a permissionless farm switch account for the program","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[88,242,198,70,241,6,196,251],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"permissionless_farm_switch","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110,108,101,115,115,95,102,97,114,109,95,115,119,105,116,99,104]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_pool","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `sqrt_price_x64` - the initial sqrt price (amount_token_1 / amount_token_0) of the pool as a Q64.64","Note: The open_time must be smaller than the current block_timestamp on chain."],"discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","docs":["Token_0 vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","docs":["Token_1 vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"sqrt_price_x64","type":"u128"},{"name":"open_time","type":"u64"}]},{"name":"create_support_mint_associated","docs":["Create support token22 mint account which can create pool and send rewards with ignoring the not support extensions."],"discriminator":[17,251,65,92,136,242,14,169],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"token_mint","docs":["Support token mint"]},{"name":"support_mint_associated","docs":["Initialize support mint state account to store support mint address and bump."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,117,112,112,111,114,116,95,109,105,110,116]},{"kind":"account","path":"token_mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"decrease_liquidity","docs":["#[deprecated(note = \"Use `decrease_liquidity_v2` instead.\")]","Decreases liquidity for an existing position","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[160,38,208,111,104,91,44,1],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"personal_position.tick_lower_index","account":"PersonalPositionState"},{"kind":"account","path":"personal_position.tick_upper_index","account":"PersonalPositionState"}]}},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"decrease_liquidity_v2","docs":["Decreases liquidity for an existing position, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[58,127,188,62,79,82,196,96],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"personal_position.tick_lower_index","account":"PersonalPositionState"},{"kind":"account","path":"personal_position.tick_upper_index","account":"PersonalPositionState"}]}},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"increase_liquidity","docs":["#[deprecated(note = \"Use `increase_liquidity_v2` instead.\")]","Increases liquidity for an existing position, with amount paid by `payer`","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, can't be zero","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[46,156,243,118,13,205,251,178],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"personal_position.tick_lower_index","account":"PersonalPositionState"},{"kind":"account","path":"personal_position.tick_upper_index","account":"PersonalPositionState"}]}},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"increase_liquidity_v2","docs":["Increases liquidity for an existing position, with amount paid by `payer`, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, if zero, calculate liquidity base amount_0 or amount_1 according base_flag","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `base_flag` - must be specified if liquidity is zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[133,29,89,223,69,238,176,10],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"personal_position.tick_lower_index","account":"PersonalPositionState"},{"kind":"account","path":"personal_position.tick_upper_index","account":"PersonalPositionState"}]}},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"initialize_reward","docs":["Initialize a reward info for a given pool and reward index","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info","* `open_time` - reward open timestamp","* `end_time` - reward end timestamp","* `emissions_per_second_x64` - Token reward per second are earned per unit of liquidity.",""],"discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"reward_funder","docs":["The founder deposit reward token to vault"],"writable":true,"signer":true},{"name":"funder_token_account","writable":true},{"name":"amm_config","docs":["For check the reward_funder authority"]},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"permissionless_farm_switch","pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110,108,101,115,115,95,102,97,114,109,95,115,119,105,116,99,104]}]}},{"name":"reward_token_mint","docs":["Reward mint"]},{"name":"reward_token_vault","docs":["A pda, reward vault"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,114,101,119,97,114,100,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_token_mint"}]}},{"name":"reward_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"param","type":{"defined":{"name":"InitializeRewardParam"}}}]},{"name":"open_position","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `liquidity` - The liquidity to be added","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[135,128,47,77,15,152,240,49],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted","This account created in the contract by cpi to avoid large stack variables"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_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":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position","docs":["Store the information of market marking in range"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_lower_index"},{"kind":"arg","path":"tick_upper_index"}]}},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"open_position_v2","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `liquidity` - The liquidity to be added, if zero, and the base_flag is specified, calculate liquidity base amount_0_max or amount_1_max according base_flag, otherwise open position with zero liquidity","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,184,74,214,112,86,241,199],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_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":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position","docs":["Store the information of market marking in range"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_lower_index"},{"kind":"arg","path":"tick_upper_index"}]}},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program_2022","docs":["Program to create mint account and mint tokens"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"open_position_with_token22_nft","docs":["Creates a new position wrapped in a Token2022 NFT without relying on metadata_program and metadata_account, reduce the cost for user to create a personal position.","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `liquidity` - The liquidity to be added, if zero, and the base_flag is specified, calculate liquidity base amount_0_max or amount_1_max according base_flag, otherwise open position with zero liquidity","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,255,174,82,125,29,201,46],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address, initialize in contract"],"writable":true,"signer":true},{"name":"position_nft_account","writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position","docs":["Store the information of market marking in range"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_lower_index"},{"kind":"arg","path":"tick_upper_index"}]}},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to transfer for token account"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program_2022","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"set_reward_params","docs":["Reset reward param, start a new reward cycle or extend the current cycle.","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - The index of reward token in the pool.","* `emissions_per_second_x64` - The per second emission reward, when extend the current cycle,","new value can't be less than old value","* `open_time` - reward open timestamp, must be set when starting a new cycle","* `end_time` - reward end timestamp",""],"discriminator":[112,52,167,75,32,201,211,137],"accounts":[{"name":"authority","docs":["Address to be set as protocol owner. It pays to create factory state account."],"signer":true},{"name":"amm_config"},{"name":"pool_state","writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"token_program","docs":["Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"},{"name":"open_time","type":"u64"},{"name":"end_time","type":"u64"}]},{"name":"swap","docs":["#[deprecated(note = \"Use `swap_v2` instead.\")]","Swaps one token for as much as possible of another token across a single pool","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"tick_array","writable":true}],"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":"swap_router_base_in","docs":["Swap token for as much as possible of another token across the path provided, base input","","# Arguments","","* `ctx` - The context of accounts","* `amount_in` - Token amount to be swapped in","* `amount_out_minimum` - Panic if output amount is below minimum amount. For slippage.",""],"discriminator":[69,125,115,218,245,186,242,196],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"input_token_account","docs":["The token account that pays input tokens for the swap"],"writable":true},{"name":"input_token_mint","docs":["The mint of input token"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"amount_in","type":"u64"},{"name":"amount_out_minimum","type":"u64"}]},{"name":"swap_v2","docs":["Swaps one token for as much as possible of another token across a single pool, support token program 2022","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"input_vault_mint","docs":["The mint of token vault 0"]},{"name":"output_vault_mint","docs":["The mint of token vault 1"]}],"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":"toggle_permissionless_farm_switch","docs":["Toggle the permissionless farm switch account","","# Arguments","","* `ctx`- The context of accounts","* `is_on`- Is the permissionless farm allowed or not",""],"discriminator":[150,112,54,233,238,161,7,86],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"permissionless_farm_switch","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110,108,101,115,115,95,102,97,114,109,95,115,119,105,116,99,104]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"is_on","type":"bool"}]},{"name":"transfer_reward_owner","docs":["Transfer reward owner","","# Arguments","","* `ctx`- The context of accounts","* `new_owner`- new owner pubkey",""],"discriminator":[7,22,12,83,242,43,48,121],"accounts":[{"name":"authority","docs":["Address to be set as operation account owner."],"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"pool_state","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"update_amm_config","docs":["Updates the owner of the amm config","Must be called by the current owner or admin","","# Arguments","","* `ctx`- The context of accounts","* `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0","* `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1","* `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2","* `new_owner`- The config's new owner, be set when `param` is 3","* `new_fund_owner`- The config's new fund owner, be set when `param` is 4","* `param`- The value can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The amm config owner or admin"],"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"amm_config","docs":["Amm config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u32"}]},{"name":"update_operation_account","docs":["Update the operation account","","# Arguments","","* `ctx`- The context of accounts","* `param`- The value can be 0 | 1 | 2 | 3, otherwise will report a error","* `keys`- update operation owner when the `param` is 0","remove operation owner when the `param` is 1","update whitelist mint when the `param` is 2","remove whitelist mint when the `param` is 3",""],"discriminator":[127,70,119,40,188,227,61,7],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"param","type":"u8"},{"name":"keys","type":{"vec":"pubkey"}}]},{"name":"update_pool_status","docs":["Update pool status for given value","","# Arguments","","* `ctx`- The context of accounts","* `status` - The value of status",""],"discriminator":[130,87,108,6,46,224,117,123],"accounts":[{"name":"authority","signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"pool_state","writable":true}],"args":[{"name":"status","type":"u8"}]},{"name":"update_reward_infos","docs":["Update rewards info of the given pool, can be called for everyone","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[163,172,224,52,11,154,106,223],"accounts":[{"name":"pool_state","docs":["The liquidity pool for which reward info to update"],"writable":true}],"args":[]}],"accounts":[{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"OperationState","discriminator":[19,236,58,237,81,222,183,252]},{"name":"PermissionlessFarmSwitch","discriminator":[37,92,147,78,250,100,147,137]},{"name":"PersonalPositionState","discriminator":[70,111,150,126,230,15,25,117]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"ProtocolPositionState","discriminator":[100,226,145,99,146,218,160,106]},{"name":"SupportMintAssociated","discriminator":[134,40,183,79,12,112,162,53]},{"name":"TickArrayBitmapExtension","discriminator":[60,150,36,219,97,128,139,153]},{"name":"TickArrayState","discriminator":[192,155,85,205,49,249,129,42]}],"events":[{"name":"CollectPersonalFeeEvent","discriminator":[166,174,105,192,81,161,83,105]},{"name":"CollectProtocolFeeEvent","discriminator":[206,87,17,79,45,41,213,61]},{"name":"ConfigChangeEvent","discriminator":[247,189,7,119,106,112,95,151]},{"name":"CreatePersonalPositionEvent","discriminator":[100,30,87,249,196,223,154,206]},{"name":"DecreaseLiquidityEvent","discriminator":[58,222,86,58,68,50,85,56]},{"name":"IncreaseLiquidityEvent","discriminator":[49,79,105,212,32,34,30,84]},{"name":"LiquidityCalculateEvent","discriminator":[237,112,148,230,57,84,180,162]},{"name":"LiquidityChangeEvent","discriminator":[126,240,175,206,158,88,153,107]},{"name":"PoolCreatedEvent","discriminator":[25,94,75,47,112,99,53,63]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"UpdateRewardInfosEvent","discriminator":[109,127,186,78,114,65,37,236]}],"errors":[{"code":6000,"name":"LOK","msg":"LOK"},{"code":6001,"name":"NotApproved","msg":"Not approved"},{"code":6002,"name":"InvalidUpdateConfigFlag","msg":"invalid update amm config flag"},{"code":6003,"name":"AccountLack","msg":"Account lack"},{"code":6004,"name":"ClosePositionErr","msg":"Remove liquitity, collect fees owed and reward then you can close position account"},{"code":6005,"name":"ZeroMintAmount","msg":"Minting amount should be greater than 0"},{"code":6006,"name":"InvalidTickIndex","msg":"Tick out of range"},{"code":6007,"name":"TickInvalidOrder","msg":"The lower tick must be below the upper tick"},{"code":6008,"name":"TickLowerOverflow","msg":"The tick must be greater, or equal to the minimum tick(-443636)"},{"code":6009,"name":"TickUpperOverflow","msg":"The tick must be lesser than, or equal to the maximum tick(443636)"},{"code":6010,"name":"TickAndSpacingNotMatch","msg":"tick % tick_spacing must be zero"},{"code":6011,"name":"InvalidTickArray","msg":"Invalid tick array account"},{"code":6012,"name":"InvalidTickArrayBoundary","msg":"Invalid tick array boundary"},{"code":6013,"name":"SqrtPriceLimitOverflow","msg":"Square root price limit overflow"},{"code":6014,"name":"SqrtPriceX64","msg":"sqrt_price_x64 out of range"},{"code":6015,"name":"LiquiditySubValueErr","msg":"Liquidity sub delta L must be smaller than before"},{"code":6016,"name":"LiquidityAddValueErr","msg":"Liquidity add delta L must be greater, or equal to before"},{"code":6017,"name":"InvalidLiquidity","msg":"Invalid liquidity when update position"},{"code":6018,"name":"ForbidBothZeroForSupplyLiquidity","msg":"Both token amount must not be zero while supply liquidity"},{"code":6019,"name":"LiquidityInsufficient","msg":"Liquidity insufficient"},{"code":6020,"name":"TransactionTooOld","msg":"Transaction too old"},{"code":6021,"name":"PriceSlippageCheck","msg":"Price slippage check"},{"code":6022,"name":"TooLittleOutputReceived","msg":"Too little output received"},{"code":6023,"name":"TooMuchInputPaid","msg":"Too much input paid"},{"code":6024,"name":"ZeroAmountSpecified","msg":"Swap special amount can not be zero"},{"code":6025,"name":"InvalidInputPoolVault","msg":"Input pool vault is invalid"},{"code":6026,"name":"TooSmallInputOrOutputAmount","msg":"Swap input or output amount is too small"},{"code":6027,"name":"NotEnoughTickArrayAccount","msg":"Not enought tick array account"},{"code":6028,"name":"InvalidFirstTickArrayAccount","msg":"Invalid first tick array account"},{"code":6029,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6030,"name":"FullRewardInfo","msg":"The init reward token reach to the max"},{"code":6031,"name":"RewardTokenAlreadyInUse","msg":"The init reward token already in use"},{"code":6032,"name":"ExceptRewardMint","msg":"The reward tokens must contain one of pool vault mint except the last reward"},{"code":6033,"name":"InvalidRewardInitParam","msg":"Invalid reward init param"},{"code":6034,"name":"InvalidRewardDesiredAmount","msg":"Invalid collect reward desired amount"},{"code":6035,"name":"InvalidRewardInputAccountNumber","msg":"Invalid collect reward input account number"},{"code":6036,"name":"InvalidRewardPeriod","msg":"Invalid reward period"},{"code":6037,"name":"NotApproveUpdateRewardEmissiones","msg":"Modification of emissiones is allowed within 72 hours from the end of the previous cycle"},{"code":6038,"name":"UnInitializedRewardInfo","msg":"uninitialized reward info"},{"code":6039,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6040,"name":"MissingTickArrayBitmapExtensionAccount","msg":"Missing tickarray bitmap extension account"},{"code":6041,"name":"InsufficientLiquidityForDirection","msg":"Insufficient liquidity for this direction"},{"code":6042,"name":"MaxTokenOverflow","msg":"Max token overflow"},{"code":6043,"name":"CalculateOverflow","msg":"Calculate overflow"},{"code":6044,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"}],"types":[{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"index","type":"u16"},{"name":"owner","docs":["Address of the protocol owner"],"type":"pubkey"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u32"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"tick_spacing","docs":["The tick spacing"],"type":"u16"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"padding_u32","type":"u32"},{"name":"fund_owner","type":"pubkey"},{"name":"padding","type":{"array":["u64",3]}}]}},{"name":"CollectPersonalFeeEvent","docs":["Emitted when tokens are collected for a position"],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which underlying tokens were collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The token account that received the collected token_0 tokens"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The token account that received the collected token_1 tokens"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 owed to the position that was collected"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 owed to the position that was collected"],"type":"u64"}]}},{"name":"CollectProtocolFeeEvent","docs":["Emitted when the collected protocol fees are withdrawn by the factory owner"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool whose protocol fee is collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"}]}},{"name":"ConfigChangeEvent","docs":["Emitted when create or update a config"],"type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"owner","type":"pubkey"},{"name":"protocol_fee_rate","type":"u32"},{"name":"trade_fee_rate","type":"u32"},{"name":"tick_spacing","type":"u16"},{"name":"fund_fee_rate","type":"u32"},{"name":"fund_owner","type":"pubkey"}]}},{"name":"CreatePersonalPositionEvent","docs":["Emitted when create a new position"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which liquidity was added"],"type":"pubkey"},{"name":"minter","docs":["The address that create the position"],"type":"pubkey"},{"name":"nft_owner","docs":["The owner of the position and recipient of any minted liquidity"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity minted to the position range"],"type":"u128"},{"name":"deposit_amount_0","docs":["The amount of token_0 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_1","docs":["The amount of token_1 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_0_transfer_fee","docs":["The token transfer fee for deposit_amount_0"],"type":"u64"},{"name":"deposit_amount_1_transfer_fee","docs":["The token transfer fee for deposit_amount_1"],"type":"u64"}]}},{"name":"DecreaseLiquidityEvent","docs":["Emitted when liquidity is decreased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was decreased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the position was decreased"],"type":"u128"},{"name":"decrease_amount_0","docs":["The amount of token_0 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"decrease_amount_1","docs":["The amount of token_1 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"fee_amount_0","type":"u64"},{"name":"fee_amount_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"reward_amounts","docs":["The amount of rewards"],"type":{"array":["u64",3]}},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee"],"type":"u64"}]}},{"name":"IncreaseLiquidityEvent","docs":["Emitted when liquidity is increased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was increased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the NFT position was increased"],"type":"u128"},{"name":"amount_0","docs":["The amount of token_0 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_0_transfer_fee","docs":["The token transfer fee for amount_0"],"type":"u64"},{"name":"amount_1_transfer_fee","docs":["The token transfer fee for amount_1"],"type":"u64"}]}},{"name":"InitializeRewardParam","type":{"kind":"struct","fields":[{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Token reward per second are earned per unit of liquidity"],"type":"u128"}]}},{"name":"LiquidityCalculateEvent","docs":["Emitted when liquidity decreased or increase."],"type":{"kind":"struct","fields":[{"name":"pool_liquidity","docs":["The pool liquidity before decrease or increase"],"type":"u128"},{"name":"pool_sqrt_price_x64","docs":["The pool price when decrease or increase in liquidity"],"type":"u128"},{"name":"pool_tick","docs":["The pool tick when decrease or increase in liquidity"],"type":"i32"},{"name":"calc_amount_0","docs":["The amount of token_0 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"calc_amount_1","docs":["The amount of token_1 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"trade_fee_owed_0","type":"u64"},{"name":"trade_fee_owed_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee without trade_fee_amount_0"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee without trade_fee_amount_0"],"type":"u64"}]}},{"name":"LiquidityChangeEvent","docs":["Emitted pool liquidity change when increase and decrease liquidity"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for swap"],"type":"pubkey"},{"name":"tick","docs":["The tick of the pool"],"type":"i32"},{"name":"tick_lower","docs":["The tick lower of position"],"type":"i32"},{"name":"tick_upper","docs":["The tick lower of position"],"type":"i32"},{"name":"liquidity_before","docs":["The liquidity of the pool before liquidity change"],"type":"u128"},{"name":"liquidity_after","docs":["The liquidity of the pool after liquidity change"],"type":"u128"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u32"},{"name":"tick_cumulative","docs":["the cumulative of tick during the duration time"],"type":"i64"},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is initialized"],"type":"bool"},{"name":"recent_epoch","docs":["recent update epoch"],"type":"u64"},{"name":"observation_index","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","docs":["belongs to which pool"],"type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"OperationState","docs":["Holds the current owner of the factory"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"operation_owners","docs":["Address of the operation owner"],"type":{"array":["pubkey",10]}},{"name":"whitelist_mints","docs":["The mint address of whitelist to emit reward"],"type":{"array":["pubkey",100]}}]}},{"name":"PermissionlessFarmSwitch","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"is_on","docs":["Is the permissionless farm allowed or not"],"type":"bool"}]}},{"name":"PersonalPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"nft_mint","docs":["Mint address of the tokenized position"],"type":"pubkey"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0, as of the last computation"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1, as of the last computation"],"type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"PositionRewardInfo"}},3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"PoolCreatedEvent","docs":["Emitted when a pool is created and initialized with a starting price",""],"type":{"kind":"struct","fields":[{"name":"token_mint_0","docs":["The first token of the pool by address sort order"],"type":"pubkey"},{"name":"token_mint_1","docs":["The second token of the pool by address sort order"],"type":"pubkey"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"pool_state","docs":["The address of the created pool"],"type":"pubkey"},{"name":"sqrt_price_x64","docs":["The initial sqrt price of the pool, as a Q64.64"],"type":"u128"},{"name":"tick","docs":["The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool"],"type":"i32"},{"name":"token_vault_0","docs":["Vault of token_0"],"type":"pubkey"},{"name":"token_vault_1","docs":["Vault of token_1"],"type":"pubkey"}]}},{"name":"PoolState","docs":["The pool state","","PDA of `[POOL_SEED, config, token_mint_0, token_mint_1]`",""],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"amm_config","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"token_mint_0","docs":["Token pair of the pool, where token_mint_0 address < token_mint_1 address"],"type":"pubkey"},{"name":"token_mint_1","type":"pubkey"},{"name":"token_vault_0","docs":["Token pair vault"],"type":"pubkey"},{"name":"token_vault_1","type":"pubkey"},{"name":"observation_key","docs":["observation account key"],"type":"pubkey"},{"name":"mint_decimals_0","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_decimals_1","type":"u8"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"liquidity","docs":["The currently in range liquidity available to the pool."],"type":"u128"},{"name":"sqrt_price_x64","docs":["The current price of the pool as a sqrt(token_1/token_0) Q64.64 value"],"type":"u128"},{"name":"tick_current","docs":["The current tick of the pool, i.e. according to the last tick transition that was run."],"type":"i32"},{"name":"padding3","type":"u16"},{"name":"padding4","type":"u16"},{"name":"fee_growth_global_0_x64","docs":["The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per","unit of liquidity for the entire life of the pool."],"type":"u128"},{"name":"fee_growth_global_1_x64","type":"u128"},{"name":"protocol_fees_token_0","docs":["The amounts of token_0 and token_1 that are owed to the protocol."],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"swap_in_amount_token_0","docs":["The amounts in and out of swap token_0 and token_1"],"type":"u128"},{"name":"swap_out_amount_token_1","type":"u128"},{"name":"swap_in_amount_token_1","type":"u128"},{"name":"swap_out_amount_token_0","type":"u128"},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable open position and increase liquidity, 0: normal","bit1, 1: disable decrease liquidity, 0: normal","bit2, 1: disable collect fee, 0: normal","bit3, 1: disable collect reward, 0: normal","bit4, 1: disable swap, 0: normal"],"type":"u8"},{"name":"padding","docs":["Leave blank for future use"],"type":{"array":["u8",7]}},{"name":"reward_infos","type":{"array":[{"defined":{"name":"RewardInfo"}},3]}},{"name":"tick_array_bitmap","docs":["Packed initialized tick array state"],"type":{"array":["u64",16]}},{"name":"total_fees_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_claimed_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_token_1","type":"u64"},{"name":"total_fees_claimed_token_1","type":"u64"},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"recent_epoch","type":"u64"},{"name":"padding1","type":{"array":["u64",24]}},{"name":"padding2","type":{"array":["u64",32]}}]}},{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growth_inside_last_x64","type":"u128"},{"name":"reward_amount_owed","type":"u64"}]}},{"name":"ProtocolPositionState","docs":["Info stored for each user's position"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1"],"type":"u64"},{"name":"reward_growth_inside","docs":["The reward growth per unit of liquidity as of the last update to liquidity"],"type":{"array":["u128",3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"RewardInfo","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"reward_state","docs":["Reward state"],"type":"u8"},{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"last_update_time","docs":["Reward last update time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Q64.64 number indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"reward_total_emissioned","docs":["The total amount of reward emissioned"],"type":"u64"},{"name":"reward_claimed","docs":["The total amount of claimed reward"],"type":"u64"},{"name":"token_mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"token_vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"authority","docs":["The owner that has permission to set reward param"],"type":"pubkey"},{"name":"reward_growth_global_x64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"SupportMintAssociated","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"mint","docs":["Address of the supported token22 mint"],"type":"pubkey"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"SwapEvent","docs":["Emitted by when a swap is performed for a pool"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which token_0 and token_1 were swapped"],"type":"pubkey"},{"name":"sender","docs":["The address that initiated the swap call, and that received the callback"],"type":"pubkey"},{"name":"token_account_0","docs":["The payer token account in zero for one swaps, or the recipient token account","in one for zero swaps"],"type":"pubkey"},{"name":"token_account_1","docs":["The payer token account in one for zero swaps, or the recipient token account","in zero for one swaps"],"type":"pubkey"},{"name":"amount_0","docs":["The real delta amount of the token_0 of the pool or user"],"type":"u64"},{"name":"transfer_fee_0","docs":["The transfer fee charged by the withheld_amount of the token_0"],"type":"u64"},{"name":"amount_1","docs":["The real delta of the token_1 of the pool or user"],"type":"u64"},{"name":"transfer_fee_1","docs":["The transfer fee charged by the withheld_amount of the token_1"],"type":"u64"},{"name":"zero_for_one","docs":["if true, amount_0 is negtive and amount_1 is positive"],"type":"bool"},{"name":"sqrt_price_x64","docs":["The sqrt(price) of the pool after the swap, as a Q64.64"],"type":"u128"},{"name":"liquidity","docs":["The liquidity of the pool after the swap"],"type":"u128"},{"name":"tick","docs":["The log base 1.0001 of price of the pool after the swap"],"type":"i32"}]}},{"name":"TickArrayBitmapExtension","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"positive_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is positive"],"type":{"array":[{"array":["u64",8]},14]}},{"name":"negative_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is negitive"],"type":{"array":[{"array":["u64",8]},14]}}]}},{"name":"TickArrayState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"start_tick_index","type":"i32"},{"name":"ticks","type":{"array":[{"defined":{"name":"TickState"}},60]}},{"name":"initialized_tick_count","type":"u8"},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u8",107]}}]}},{"name":"TickState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"tick","type":"i32"},{"name":"liquidity_net","docs":["Amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left)"],"type":"i128"},{"name":"liquidity_gross","docs":["The total position liquidity that references this tick"],"type":"u128"},{"name":"fee_growth_outside_0_x64","docs":["Fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)","only has relative meaning, not absolute — the value depends on when the tick is initialized"],"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":"UpdateRewardInfosEvent","docs":["Emitted when Reward are updated for a pool"],"type":{"kind":"struct","fields":[{"name":"reward_growth_global_x64","docs":["Reward info"],"type":{"array":["u128",3]}}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/phoenix_eternal.EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.json b/olddocs/archivekbot2/idls/phoenix_eternal.EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.json new file mode 100644 index 0000000..e69de29 diff --git a/olddocs/archivekbot2/idls/printr.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.json b/olddocs/archivekbot2/idls/printr.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.json new file mode 100644 index 0000000..2899019 --- /dev/null +++ b/olddocs/archivekbot2/idls/printr.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.json @@ -0,0 +1 @@ +{"address":"T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint","metadata":{"name":"printr","version":"1.0.0","spec":"0.1.0","description":"Printr on Solana"},"instructions":[{"name":"authorized_spend_all_quote","discriminator":[55,106,238,14,152,246,186,129],"accounts":[{"name":"authorizor","docs":["This is a Printr PDA.","You can see the expected seed in the [Self::apply] static function."],"writable":true},{"name":"authorizor_wallet","writable":true,"optional":true},{"name":"swap","accounts":[{"name":"payer","docs":["The user performing the swap"],"writable":true,"signer":true},{"name":"printr_authority","docs":["This is the account that funds the graduation process.",""],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"input_wallet","writable":true},{"name":"output_wallet","docs":["The mint of this token account determines what's being sold, whether telecoin or quote."],"writable":true},{"name":"telecoin_mint","writable":true},{"name":"quote_mint","writable":true},{"name":"dbc_pool_authority","writable":true},{"name":"dbc_config"},{"name":"dbc_pool","writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dbc_migration_metadata","docs":["DEPRECATED: Meteora no longer uses this one.",""],"writable":true},{"name":"damm_printr_partner_config"},{"name":"damm_pool","writable":true},{"name":"damm_pool_authority"},{"name":"damm_telecoin_vault","writable":true},{"name":"damm_quote_vault","writable":true},{"name":"damm_position_nft_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,100,97,109,109,95,112,111,115,105,116,105,111,110,95,110,102,116,95,109,105,110,116]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"damm_position_nft_account","writable":true},{"name":"damm_position","writable":true},{"name":"damm_event_authority"},{"name":"telecoin_token_program","docs":["We'll need this to init the mint and init the token account."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"name":"damm_program","docs":["The DAMM V2 program that abstracts the AMM logic."],"address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"system_program","docs":["New accounts, native transfers, etc."],"address":"11111111111111111111111111111111"}]}],"args":[{"name":"max_price","type":{"defined":{"name":"SqrtBitshiftedPrice"}}},{"name":"extra_seed","type":"bytes"}]},{"name":"buyback_and_burn","discriminator":[121,156,154,165,194,86,180,130],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"printr_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"payer_quote_wallet","writable":true},{"name":"buyback_telecoin_wallet","docs":["Owned by printr_authority (PDA)."],"writable":true},{"name":"telecoin_mint","writable":true},{"name":"quote_mint","docs":["UncheckedAccount to avoid self-CPI exit handler corruption."],"writable":true},{"name":"dbc_pool_authority","writable":true},{"name":"dbc_config"},{"name":"dbc_pool","writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dbc_migration_metadata","writable":true},{"name":"damm_printr_partner_config"},{"name":"damm_pool","writable":true},{"name":"damm_pool_authority"},{"name":"damm_telecoin_vault","writable":true},{"name":"damm_quote_vault","writable":true},{"name":"damm_position_nft_mint","writable":true},{"name":"damm_position_nft_account","writable":true},{"name":"damm_position","writable":true},{"name":"damm_event_authority"},{"name":"telecoin_token_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program"},{"name":"dbc_program","address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"name":"damm_program","address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"printr_config","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"quote_fee_vault","docs":["Stores all quote fees across all telecoins."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"printr_quote_fee_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"printr_config.printr_fee_authority","account":"PrintrConfig"},{"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":"revshare1_quote_fee_wallet","docs":["If relevant then authority is checked via [CollectProtocolTransfers]"],"writable":true,"optional":true},{"name":"revshare2_quote_fee_wallet","docs":["If relevant then authority is checked via [CollectProtocolTransfers]"],"writable":true,"optional":true},{"name":"instructions_sysvar","address":"Sysvar1nstructions1111111111111111111111111"},{"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":[],"returns":{"defined":{"name":"FeesClaimed"}}},{"name":"cancel_authorized_spend_all_quote","discriminator":[167,1,184,69,242,171,240,207],"accounts":[{"name":"authorizor","docs":["This is a Printr PDA.","You can see the expected seed in the [Self::apply] static function."],"writable":true},{"name":"authorizor_wallet","docs":["The SPL token account associated with the authorizor."],"writable":true,"optional":true},{"name":"quote_mint","docs":["The quote mint that was meant to be swapped against the telecoin token."]},{"name":"recipient","docs":["The authorizor's recipient can cancel their own swap order."],"writable":true,"signer":true},{"name":"recipient_wallet","docs":["The recipient's wallet if applicable."],"writable":true,"optional":true},{"name":"quote_token_program","docs":["Allows us to swap."]},{"name":"system_program","docs":["We need to transfer."],"address":"11111111111111111111111111111111"}],"args":[{"name":"max_price","type":{"defined":{"name":"SqrtBitshiftedPrice"}}},{"name":"telecoin_mint","type":"pubkey"},{"name":"extra_seed","type":"bytes"}]},{"name":"claim_damm_fees","discriminator":[221,192,167,35,180,110,107,114],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"printr_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"telecoin_mint"},{"name":"quote_mint","docs":["The quote mint is the token that will be used to buy telecoin tokens."]},{"name":"telecoin_fee_vault_authority","docs":["Authority for the telecoin fee vault.","For staking telecoins: the staking pool PDA.","For non-staking telecoins: printr_config.staking_authority.",""]},{"name":"telecoin_fee_vault","docs":["Stores telecoin fees.","","For staking telecoins: staking pool's fee vault (authority = staking_pool).","","For non-staking telecoins: generic staking wallet (authority =","printr_config.staking_authority).",""],"writable":true},{"name":"dev_config","docs":["The dev config stores information about the dev and must match the damm pool.","","We know this is the right dev config because its seed matches the telecoin mint which in","turn matches the dammv2 pool."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"quote_fee_vault","docs":["Stores all quote fees across all telecoins."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"damm_position_nft_account"},{"name":"damm_position","writable":true},{"name":"damm_pool_authority"},{"name":"damm_pool","writable":true},{"name":"damm_base_vault","writable":true},{"name":"damm_quote_vault","writable":true},{"name":"damm_event_authority"},{"name":"telecoin_token_program","docs":["We'll need this to transfer."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","docs":["For the telecoin fees."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"},{"name":"damm_v2_program","docs":["The DAMM program that abstracts the bonding curve logic."],"address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"}],"args":[],"returns":{"defined":{"name":"FeesClaimed"}}},{"name":"claim_dbc_fees","discriminator":[162,222,128,90,59,115,34,130],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"printr_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"printr_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"telecoin_mint"},{"name":"quote_mint","docs":["The quote mint is the token that is be used to buy telecoin tokens."]},{"name":"any_telecoin_wallet","docs":["Therefore any old telecoin wallet will do, it will not be used."],"writable":true},{"name":"printr_intermediary_authority","pda":{"seeds":[{"kind":"const","value":[105,110,116,101,114,109,101,100,105,97,114,121,95,116,111,107,101,110,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"printr_intermediary_quote_wallet","docs":["Useful only for $wSOL quote token.","We will collect some fee amount to support smart graduation in swap ix."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"printr_intermediary_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":"dbc_pool_authority"},{"name":"dbc_pool","writable":true},{"name":"dbc_base_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dev_config","docs":["The dev config stores information about the dev and must match the DBC pool.","","We know this is the right dev config because its seed matches the telecoin mint which in","turn matches the dbc pool."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"quote_fee_vault","docs":["Shared vault per quote mint. Per-telecoin accounting is tracked in DevConfig."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"telecoin_token_program","docs":["We'll need this to transfer."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["Used to create dev's telecoin ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"}],"args":[],"returns":{"defined":{"name":"FeesClaimed"}}},{"name":"claim_printr_authority_lamports","discriminator":[52,14,140,114,41,105,0,48],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"printr_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"claim_staking_rewards","discriminator":[229,141,170,69,111,94,6,72],"accounts":[{"name":"payer","docs":["Anyone can call this instruction."],"writable":true,"signer":true},{"name":"position_owner","writable":true},{"name":"printr_config","docs":["Printr config for authorizing transfers."],"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"telecoin_mint","docs":["The telecoin mint."]},{"name":"quote_mint","docs":["The quote token mint."]},{"name":"staking_pool","docs":["The staking pool for this telecoin."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,105,110,103,95,112,111,111,108]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"stake_position","docs":["The stake position being claimed from."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,95,112,111,115,105,116,105,111,110]},{"kind":"account","path":"telecoin_mint"},{"kind":"account","path":"position_owner"},{"kind":"account","path":"stake_position.position_nonce","account":"StakePosition"}]}},{"name":"owner_quote_account","docs":["Owner's quote token account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_owner"},{"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":"owner_telecoin_account","docs":["Owner's telecoin token account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_owner"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_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":"quote_fee_vault","docs":["Stores all quote fees across Printr so be gentle with it."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"pool_telecoin_vault","docs":["Pool's telecoin vault.","Contains both trading fees and staked telecoin."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"staking_pool"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_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":"telecoin_token_program","docs":["Checks the account owner."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["ATA boy"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Needed because `owner_quote_account` and `owner_telecoin_account` are `init_if_needed`."],"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":"close_stake_position","discriminator":[8,63,74,143,105,42,28,64],"accounts":[{"name":"position_owner","docs":["Only the position owner can close the position.","Receives the rent refund from the closed position account."],"writable":true,"signer":true},{"name":"telecoin_mint","docs":["The telecoin mint."]},{"name":"staking_pool","docs":["The staking pool for this telecoin."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,105,110,103,95,112,111,111,108]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"stake_position","docs":["The stake position being closed. Rent is refunded to `position_owner`."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,95,112,111,115,105,116,105,111,110]},{"kind":"account","path":"telecoin_mint"},{"kind":"account","path":"position_owner"},{"kind":"account","path":"stake_position.position_nonce","account":"StakePosition"}]}},{"name":"owner_telecoin_account","docs":["Owner's telecoin token account. Receives the staked telecoin back."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_owner"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_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_telecoin_vault","docs":["Pool's telecoin vault holding the staked telecoin."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"staking_pool"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_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":"telecoin_token_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Needed for `init_if_needed` on `owner_telecoin_account` and for `close` on the position."],"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":"create_printr_config","discriminator":[160,191,66,212,5,106,20,215],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"printr_fee_authority"},{"name":"questflow_ai_fee_authority"},{"name":"printr_staking_authority"},{"name":"printr_config","docs":["We use `init_if_needed` purposefully.","Call this ix again to update the config."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_stake_position","discriminator":[92,168,96,133,102,121,86,138],"accounts":[{"name":"payer","docs":["We can create positions on behalf of others."],"writable":true,"signer":true},{"name":"position_owner","writable":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"dev_config","docs":["Dev config must indicate this telecoin uses staking for fee distribution."],"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"staking_pool","docs":["The staking pool for this telecoin.","Will be lazily initialized if this is the first time anyone stakes this telecoin."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,105,110,103,95,112,111,111,108]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"stake_position","docs":["The stake position being created.","The ID can be reused, just cannot be used at the same time as another position."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,95,112,111,115,105,116,105,111,110]},{"kind":"account","path":"telecoin_mint"},{"kind":"account","path":"position_owner"},{"kind":"arg","path":"position_nonce"}]}},{"name":"payer_telecoin_account","docs":["Payer doesn't necessarily equal to the user but most likely will."],"writable":true},{"name":"pool_telecoin_vault","docs":["Staking pool's telecoin vault."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"staking_pool"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_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":"telecoin_mint","docs":["The telecoin mint."]},{"name":"telecoin_token_program","docs":["Checks the account owner."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","docs":["Related to the telecoin vault ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"position_nonce","type":"u32"},{"name":"to_stake","type":{"defined":{"name":"TokenAmount"}}},{"name":"lock_period","type":{"defined":{"name":"LockPeriod"}}}]},{"name":"deploy_telecoin","discriminator":[4,248,20,1,125,63,15,0],"accounts":[{"name":"payer","docs":["Creating a launch is a permission-less operation.","This could be a Printr user or a BE."],"writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"telecoin_mint","docs":["This is the telecoin mint which we initialize according to the telecoin params."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,116,101,108,101,99,111,105,110,95,109,105,110,116]},{"kind":"arg","path":"telecoin_params"}]}},{"name":"telecoin_token_program","docs":["We'll need this to init the mint."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","docs":["Necessary for creating new accounts."],"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":"telecoin_params_compact","type":{"defined":{"name":"TelecoinParamsCompact"}}}]},{"name":"deploy_telecoin2","discriminator":[37,155,54,236,186,225,201,137],"accounts":[{"name":"payer","docs":["Creating a launch is a permission-less operation.","This could be a Printr user or a BE."],"writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"telecoin_mint","docs":["This is the telecoin mint which we initialize according to the telecoin params."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,116,101,108,101,99,111,105,110,95,109,105,110,116]},{"kind":"arg","path":"telecoin_params"}]}},{"name":"telecoin_token_program","docs":["We'll need this to init the mint."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","docs":["Necessary for creating new accounts."],"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":"telecoin_params","type":{"defined":{"name":"TelecoinParams"}}}]},{"name":"distribute_telecoin_quote_fees","discriminator":[31,197,88,239,123,165,197,208],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"printr_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"quote_mint","docs":["The quote mint is the token that is be used to buy telecoin tokens."]},{"name":"telecoin_mint"},{"name":"quote_fee_vault","docs":["Stores all quote fees across all telecoins.","How much can we claim now is tracked in the dev config."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"dev_config","docs":["The dev config stores information about how much a dev can claim.","The existence of this account implies that the telecoin mint was created by Printr."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"dev"},{"name":"dev_quote_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"dev"},{"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":"printr_quote_fee_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"printr_config.printr_fee_authority","account":"PrintrConfig"},{"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":"revshare1_quote_fee_wallet","docs":["If relevant then authority is checked via [CollectProtocolTransfers]"],"writable":true,"optional":true},{"name":"revshare2_quote_fee_wallet","docs":["If relevant then authority is checked via [CollectProtocolTransfers]"],"writable":true,"optional":true},{"name":"dbc_pool"},{"name":"dbc_config"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["Used to create dev's quote ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"estimate_swap","discriminator":[219,196,183,82,59,37,166,59],"accounts":[{"name":"dbc_config"},{"name":"dbc_pool"},{"name":"damm_pool","docs":["Might be uninitialized if the pool is not yet graduated."]}],"args":[{"name":"params","type":{"defined":{"name":"SwapIntent"}}}],"returns":{"defined":{"name":"EstimateSwapOutput"}}},{"name":"estimate_teleport_with_lz","discriminator":[11,141,166,118,153,255,62,132],"accounts":[{"name":"peer"}],"args":[{"name":"params","type":{"defined":{"name":"EstimateTeleportWithLzParams"}}}],"returns":{"defined":{"name":"TokenAmount"}}},{"name":"lz_receive","discriminator":[8,179,120,109,33,118,189,80],"accounts":[{"name":"payer","docs":["The LZ executor."],"writable":true,"signer":true},{"name":"peer","docs":["Represents where did the message come from."]},{"name":"telecoin_teleport_config","docs":["If this account does not exist then the provided peer must be set as a default peer.","Otherwise we parse this account's configuration and assert it's been upheld."]},{"name":"printr_authority","docs":["Global Printr telecoin mint authority"],"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"telecoin_mint","docs":["We'll mint these tokens.",""],"writable":true},{"name":"recipient"},{"name":"recipient_destination_telecoin_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"recipient"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_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":"telecoin_token_program","docs":["Telecoin mint is always token program 2022."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","docs":["In case we need to create the ATA"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["In case we need to create the ATA"],"address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"LzReceiveParams"}}}]},{"name":"lz_receive_types","discriminator":[221,17,246,159,248,128,31,96],"accounts":[],"args":[{"name":"params","type":{"defined":{"name":"LzReceiveParams"}}}],"returns":{"vec":{"defined":{"name":"LzAccount"}}}},{"name":"lz_set_peer","discriminator":[199,123,81,116,208,49,213,232],"accounts":[{"name":"admin","docs":["Printr staff."],"writable":true,"signer":true},{"name":"peer","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,101,101,114]},{"kind":"arg","path":"peer_address"}]}},{"name":"lz_oapp_registry","writable":true,"pda":{"seeds":[{"kind":"const","value":[79,65,112,112]},{"kind":"account","path":"peer"}],"program":{"kind":"account","path":"endpoint_program"}}},{"name":"endpoint_emit_cpi_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"account","path":"endpoint_program"}}},{"name":"endpoint_program","address":"76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"peer_address","type":{"array":["u8",32]}}]},{"name":"print_telecoin","discriminator":[214,30,4,102,207,73,108,35],"accounts":[{"name":"payer","docs":["Creating a launch is a permission-less operation.","This could be a Printr user or a BE."],"writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"telecoin_mint","docs":["This is the telecoin mint which we initialize according to the telecoin params in the","Meteora CPI.",""],"writable":true},{"name":"quote_mint","docs":["The quote mint is the token that will be used to buy telecoin tokens."]},{"name":"initial_buy_authority","docs":["When a telecoin is printed we perform an initial buy on behalf of the dev.","","There are three options how the initial buy can happen:","1. No deposit PDA","2. Deposit PDA of native $SOL","3. Deposit PDA with an associated token account.","","See `DepositPda` enum for more details.",""],"writable":true},{"name":"initial_buy_source","writable":true},{"name":"dev_on_solana","writable":true},{"name":"dev_destination_telecoin_wallet","docs":["Associated token account cannot exist because we've just created the telecoin mint.","Will not be initialized if initial spend is zero.",""],"writable":true,"optional":true},{"name":"dbc_config","docs":["We'll init the config first.",""],"writable":true},{"name":"dbc_pool_authority"},{"name":"dbc_pool","docs":["The bonding curve state, initialized after the config.",""],"writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dbc_migration_metadata","docs":["DEPRECATED: Meteora no longer uses this one.","","If provided then we create a migration metadata account for the DBC pool.",""],"writable":true,"optional":true},{"name":"telecoin_token_program","docs":["We'll need this to init the mint and init the token account."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["Used to create dev's telecoin ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"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":"telecoin_params_compact","type":{"defined":{"name":"TelecoinParamsCompact"}}}]},{"name":"print_telecoin2","discriminator":[166,60,38,43,238,32,2,160],"accounts":[{"name":"payer","docs":["Creating a launch is a permission-less operation.","This could be a Printr user or a BE."],"writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"telecoin_mint","docs":["This is the telecoin mint which we initialize according to the telecoin params in the","Meteora CPI.",""],"writable":true},{"name":"quote_mint","docs":["The quote mint is the token that will be used to buy telecoin tokens."]},{"name":"initial_buy_authority","docs":["When a telecoin is printed we perform an initial buy on behalf of the dev.","","There are three options how the initial buy can happen:","1. No deposit PDA","2. Deposit PDA of native $SOL","3. Deposit PDA with an associated token account.","","See `DepositPda` enum for more details.",""],"writable":true},{"name":"initial_buy_source","writable":true},{"name":"dev_on_solana","writable":true},{"name":"dev_destination_telecoin_wallet","docs":["Associated token account cannot exist because we've just created the telecoin mint.","Will not be initialized if initial spend is zero.",""],"writable":true,"optional":true},{"name":"dbc_config","docs":["We'll init the config first.",""],"writable":true},{"name":"dbc_pool_authority"},{"name":"dbc_pool","docs":["The bonding curve state, initialized after the config.",""],"writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dbc_migration_metadata","docs":["DEPRECATED: Meteora no longer uses this one.","","If provided then we create a migration metadata account for the DBC pool.",""],"writable":true,"optional":true},{"name":"telecoin_token_program","docs":["We'll need this to init the mint and init the token account."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["Used to create dev's telecoin ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"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":"telecoin_params","type":{"defined":{"name":"TelecoinParams"}}}]},{"name":"refresh_staking2","discriminator":[36,197,195,27,8,224,118,27],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"printr_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"printr_quote_fee_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"printr_config.printr_fee_authority","account":"PrintrConfig"},{"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":"quote_fee_vault","docs":["Stores all quote fees across Printr."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"revshare1_quote_fee_wallet","writable":true,"optional":true},{"name":"revshare2_quote_fee_wallet","writable":true,"optional":true},{"name":"staking_pool","docs":["The staking pool for this telecoin."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,105,110,103,95,112,111,111,108]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"dev_config","docs":["The dev config stores information about accumulated quote fees."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"dbc_config"},{"name":"dbc_pool","docs":["DBC config."]},{"name":"telecoin_mint","docs":["The telecoin mint."]},{"name":"quote_mint","docs":["The quote mint is the token that is be used to buy telecoin tokens."]},{"name":"pool_telecoin_vault","docs":["Telecoin vault that holds staked tokens and accumulated telecoin fees."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"staking_pool"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_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":"protocol_telecoin_wallet","docs":["Protocol's telecoin wallet. Receives the protocol's share of telecoin rewards.","ATA of `printr_config.staking_authority` for the telecoin mint."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_telecoin_authority"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_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":"protocol_telecoin_authority"},{"name":"telecoin_token_program","docs":["Checks the account owner."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["Related to the telecoin vault ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Need to init the staking pool if not yet."],"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":"set_dev_config_dev","discriminator":[175,111,205,104,111,167,15,28],"accounts":[{"name":"admin","signer":true},{"name":"telecoin_mint","docs":["The telecoin mint whose dev config we want to update."]},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"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":"new_dev","type":"pubkey"}]},{"name":"set_dev_config_fees","discriminator":[75,184,89,133,143,57,183,121],"accounts":[{"name":"admin","signer":true},{"name":"telecoin_mint","docs":["The telecoin mint whose dev config we want to update."]},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}}],"args":[{"name":"params","type":{"defined":{"name":"SetDevConfigFeesParams"}}}]},{"name":"set_peer_conf","discriminator":[81,211,81,152,212,153,58,71],"accounts":[{"name":"admin","docs":["Printr staff."],"signer":true},{"name":"peer","writable":true}],"args":[{"name":"params","type":{"defined":{"name":"SetPeerConfParams"}}}]},{"name":"set_telecoin_teleport_conf","discriminator":[100,47,61,148,198,138,62,49],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"admin","docs":["Printr staff."],"signer":true},{"name":"telecoin_teleport_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,101,108,101,99,111,105,110,95,116,101,108,101,112,111,114,116,95,99,111,110,102,105,103]},{"kind":"arg","path":"telecoin_id"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"telecoin_id","type":{"defined":{"name":"TelecoinId"}}},{"name":"params","type":{"defined":{"name":"SetTelecoinTeleportConfParams"}}}]},{"name":"spend_all_quote_no_graduation","discriminator":[198,170,217,245,59,73,114,60],"accounts":[{"name":"payer","docs":["The entity performing the swap.","Owner of the input token account.","","If the quote token is $wSOL then we transfer everything from this account to the","intermediary token account."],"writable":true,"signer":true},{"name":"printr_intermediary_authority","pda":{"seeds":[{"kind":"const","value":[105,110,116,101,114,109,101,100,105,97,114,121,95,116,111,107,101,110,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"printr_intermediary_quote_wallet","docs":["To support post hooks with native $SOL we need to create an intermediate ATA for the quote","token.","All the quote tokens will be transferred to this account first before being swapped.","The account is not closed so that it can be reused in the future without paying rent."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"printr_intermediary_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":"input_quote_wallet","docs":["We will use everything that's in this token account to buy as much telecoin as possible.","","Can be none for $wSOL quote if wrapping is needed."],"writable":true,"optional":true},{"name":"recipient"},{"name":"recipient_quote_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"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":"output_telecoin_wallet","docs":["The owner of the output account will not match the payer for a posthook ix.",""],"writable":true,"pda":{"seeds":[{"kind":"account","path":"recipient"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_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":"telecoin_mint","writable":true},{"name":"quote_mint","writable":true},{"name":"dbc_pool_authority","writable":true},{"name":"dbc_config"},{"name":"dbc_pool","writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"damm_pool","writable":true},{"name":"damm_pool_authority"},{"name":"damm_telecoin_vault","writable":true},{"name":"damm_quote_vault","writable":true},{"name":"damm_event_authority"},{"name":"telecoin_token_program","docs":["We'll need this to init the mint and init the token account."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"name":"damm_program","docs":["The DAMM V2 program that abstracts the AMM logic."],"address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"associated_token_program","docs":["Used to create ATA if needed."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["We might need to refill the input token account with $wSOL."],"address":"11111111111111111111111111111111"}],"args":[{"name":"max_price","type":{"defined":{"name":"SqrtBitshiftedPrice"}}}]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","docs":["The user performing the swap"],"writable":true,"signer":true},{"name":"printr_authority","docs":["This is the account that funds the graduation process.",""],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"input_wallet","writable":true},{"name":"output_wallet","docs":["The mint of this token account determines what's being sold, whether telecoin or quote."],"writable":true},{"name":"telecoin_mint","writable":true},{"name":"quote_mint","writable":true},{"name":"dbc_pool_authority","writable":true},{"name":"dbc_config"},{"name":"dbc_pool","writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dbc_migration_metadata","docs":["DEPRECATED: Meteora no longer uses this one.",""],"writable":true},{"name":"damm_printr_partner_config"},{"name":"damm_pool","writable":true},{"name":"damm_pool_authority"},{"name":"damm_telecoin_vault","writable":true},{"name":"damm_quote_vault","writable":true},{"name":"damm_position_nft_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,100,97,109,109,95,112,111,115,105,116,105,111,110,95,110,102,116,95,109,105,110,116]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"damm_position_nft_account","writable":true},{"name":"damm_position","writable":true},{"name":"damm_event_authority"},{"name":"telecoin_token_program","docs":["We'll need this to init the mint and init the token account."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"name":"damm_program","docs":["The DAMM V2 program that abstracts the AMM logic."],"address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"system_program","docs":["New accounts, native transfers, etc."],"address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"SwapIntent"}}}]},{"name":"teleport_with_lz","discriminator":[166,121,233,8,125,40,179,47],"accounts":[{"name":"payer","docs":["This is the user that wants to send telecoin tokens."],"writable":true,"signer":true},{"name":"telecoin_mint","docs":["The telecoin mint that we burn here."],"writable":true},{"name":"telecoin_teleport_config","docs":["If this account does not exist then the provided peer must be set as a default peer.","Otherwise we parse this account's configuration and assert it's been upheld."]},{"name":"peer"},{"name":"user_source_telecoin_wallet","docs":["Where to burn from."],"writable":true},{"name":"telecoin_token_program","docs":["Needed to burn telecoin tokens."],"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":"params","type":{"defined":{"name":"TeleportWithLzParams"}}}]}],"accounts":[{"name":"DevConfig","discriminator":[92,158,1,106,83,222,4,81]},{"name":"Peer","discriminator":[50,8,19,55,40,253,37,58]},{"name":"PoolConfig","discriminator":[26,108,14,123,116,230,129,43]},{"name":"PrintrConfig","discriminator":[184,34,37,157,37,223,65,252]},{"name":"StakePosition","discriminator":[78,165,30,111,171,125,11,220]},{"name":"StakingPool","discriminator":[203,19,214,220,220,154,24,102]},{"name":"TelecoinTeleportConfig","discriminator":[146,117,46,78,137,112,71,57]},{"name":"VirtualPool","discriminator":[213,224,5,209,98,69,119,92]}],"events":[{"name":"BuybackAndBurnEvent","discriminator":[158,146,152,190,14,197,155,158]},{"name":"ClaimStakingRewardsEvent","discriminator":[109,78,167,39,50,229,74,85]},{"name":"CreateStakePositionEvent","discriminator":[47,51,210,240,178,138,154,198]},{"name":"DeployTelecoinEvent","discriminator":[133,217,193,229,51,195,248,98]},{"name":"PrintTelecoinEvent","discriminator":[202,7,212,34,205,71,111,139]},{"name":"RefreshStaking2Event","discriminator":[39,218,120,153,29,229,190,254]},{"name":"SetDevConfigDevEvent","discriminator":[89,201,9,41,16,123,16,57]},{"name":"TeleportWithLzEvent","discriminator":[166,170,61,125,224,166,227,98]}],"types":[{"name":"Accumulator","docs":["Accumulator value tracking cumulative rewards per unit of weighted stake.","","Used in the staking system where rewards are distributed proportionally across","all stakers. Values are scaled by 2^64 for precision:","","```text","accumulator += (new_rewards << 64) / total_weighted_stake","pending_rewards = weighted_stake * (current_acc - last_acc) >> 64","```"],"type":{"kind":"struct","fields":["u128"]}},{"name":"BaseFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"second_factor","type":"u64"},{"name":"third_factor","type":"u64"},{"name":"first_factor","type":"u16"},{"name":"base_fee_mode","type":"u8"},{"name":"padding_0","type":{"array":["u8",5]}}]}},{"name":"BuybackAndBurnEvent","type":{"kind":"struct","fields":[{"name":"telecoin_id","type":{"defined":{"name":"TelecoinId"}}},{"name":"quote_spent","type":{"defined":{"name":"TokenAmount"}}},{"name":"telecoin_burned","type":{"defined":{"name":"TokenAmount"}}}]}},{"name":"ClaimStakingRewardsEvent","type":{"kind":"struct","fields":[{"name":"owner","docs":["Owner of the position."],"type":"pubkey"},{"name":"telecoin_mint","docs":["Telecoin mint."],"type":"pubkey"},{"name":"position_nonce","docs":["Position nonce."],"type":"u32"},{"name":"quote_rewards","docs":["Quote token rewards claimed."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"telecoin_rewards","docs":["Telecoin rewards claimed."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"position_closed","docs":["Whether the position was closed. Always false for `claim_staking_rewards`;","set to true only by `close_stake_position`."],"type":"bool"},{"name":"returned_stake","docs":["Amount returned to user if closed. Always zero for `claim_staking_rewards`;","the staked amount is only returned by `close_stake_position`."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"quote_token_accumulator","docs":["Position's quote token accumulator after claim."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_accumulator","docs":["Position's telecoin accumulator after claim."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_id","docs":["Telecoin ID."],"type":{"defined":{"name":"TelecoinId"}}}]}},{"name":"CreateStakePositionEvent","type":{"kind":"struct","fields":[{"name":"owner","docs":["User that will receive the staking rewards and the telecoins back."],"type":"pubkey"},{"name":"telecoin_id","docs":["Telecoin ID."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"position_nonce","docs":["Position nonce for this user's stake."],"type":"u32"},{"name":"staked","docs":["Amount of telecoin staked."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"lock_period","docs":["Lock period selected."],"type":{"defined":{"name":"LockPeriod"}}},{"name":"staked_at","docs":["Timestamp when staking was created."],"type":"i64"},{"name":"quote_token_accumulator","docs":["Pool's quote token accumulator at position creation (position's initial checkpoint)."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_accumulator","docs":["Pool's telecoin accumulator at position creation (position's initial checkpoint)."],"type":{"defined":{"name":"Accumulator"}}}]}},{"name":"DeployTelecoinEvent","docs":["Some Printr related details about the deploy."],"type":{"kind":"struct","fields":[{"name":"protocol_version","docs":["The protocol version of the graduating telecoin token."],"type":{"defined":{"name":"PrintrProtocolVersion"}}},{"name":"telecoin_id","docs":["The Printr Telecoin ID."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"dev_on_solana","docs":["The dev's wallet on Solana.","","Will be default if this telecoin doesn't have a solana dev wallet."],"type":"pubkey"}]}},{"name":"DevConfig","docs":["Configuration for a dev of a telecoin token."],"type":{"kind":"struct","fields":[{"name":"fee_sink","docs":["Used to identify the dev for fee distribution.","","Will be the default key if this telecoin doesn't have a solana dev wallet.","That can happen if the telecoin was not printed on Solana and only deployed here","additionally without a bonding curve."],"type":{"defined":{"name":"FeeSink"}}},{"name":"protocol_version","docs":["Can be used to distinguish between breaking changes in the future."],"type":{"defined":{"name":"PrintrProtocolVersion"}}},{"name":"telecoin_id","docs":["What's the canonical telecoin ID at the time of creation.","We try not to break how telecoin IDs are derived but we neither make guarantees they won't","change."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"fee_sink_quote_fee","docs":["When claiming fees we accumulate them in this counter.","When distributing the fees we reset this to zero and transfer the amount.","","# Migration","","After `PrintrProtocolVersion(3)` inclusive this field collects _all_ quote fees, both dev","fees and protocol fees."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"fees","docs":["Custom fee configuration set at print/deploy time."],"type":{"defined":{"name":"DevConfigFees"}}},{"name":"flags","docs":["Bit flags for fee distribution lifecycle."],"type":{"defined":{"name":"DevConfigFlags"}}},{"name":"_padding","type":"u8"}]}},{"name":"DevConfigFees","docs":["Custom fee overrides stored in [DevConfig].","","# Migration","","Until `PrintrProtocolVersion(3)` exclusive we used to store 8 padding bytes."],"type":{"kind":"struct","fields":[{"name":"dbc_protocol_share_of_trading_fee_pct","docs":["Protocol's share of the bonding curve trading fee as a percentage (0-100).","","For example, if the total DBC trading fee is 2% and this value is 15,","then 0.3% goes to the protocol and 1.7% goes to the dev.","","0 means not set.","This is going to be the case for telecoins printed before this struct was introduced.","In that case we use the defaults to keep the behavior consistent with what it was before."],"type":"u8"},{"name":"amm_protocol_share_of_trading_fee_pct","docs":["Protocol's share of the AMM trading fee as a percentage (0-100).","","Same semantics as [Self::dbc_protocol_share_of_trading_fee_pct] but for AMM trades."],"type":"u8"},{"name":"rev_shares","docs":["Up to 2 revshare entries for protocol fee distribution."],"type":{"array":[{"defined":{"name":"RevShareSlot"}},2]}}]}},{"name":"DevConfigFlags","docs":["Anchor-serializable wrapper around [printr_sdk::dev_config::DevConfigFlags]."],"type":{"kind":"struct","fields":["u8"]}},{"name":"DynamicFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","type":"u8"},{"name":"padding","type":{"array":["u8",7]}},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"},{"name":"bin_step","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"padding2","type":{"array":["u8",8]}},{"name":"bin_step_u128","type":"u128"}]}},{"name":"EstimateSwapOutput","docs":["This is the returned value from this ix."],"type":{"kind":"struct","fields":[{"name":"estimate","docs":["The swap estimate."],"type":{"defined":{"name":"SwapEstimate"}}},{"name":"which_remaining_accounts_are_owned_by_system_program","docs":["The remaining accounts are mapped onto this list.","The index will be `true` if the account is owned by the system program."],"type":{"vec":"bool"}}]}},{"name":"EstimateTeleportWithLzParams","docs":["Parameters for the [TeleportWithLz] instruction."],"type":{"kind":"struct","fields":[{"name":"message_len","docs":["How long is the message to send.","","See [omnichain_codec::OutgoingMessage] for the message format."],"type":"u16"},{"name":"lz_options","docs":[""],"type":"bytes"},{"name":"lz_destination_endpoint_id","docs":["The chain ID of the destination chain.","",""],"type":"u32"}]}},{"name":"FeeSink","type":{"kind":"type","alias":"pubkey"}},{"name":"FeesClaimed","docs":["Fee claiming endpoints return how much fees were claimed - in total - for each token."],"type":{"kind":"struct","fields":[{"name":"in_telecoin","type":{"defined":{"name":"TokenAmount"}}},{"name":"in_quote","type":{"defined":{"name":"TokenAmount"}}}]}},{"name":"LiquidityDistributionConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"sqrt_price","type":"u128"},{"name":"liquidity","type":"u128"}]}},{"name":"LiquidityVestingInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"is_initialized","type":"u8"},{"name":"vesting_percentage","type":"u8"},{"name":"_padding","type":{"array":["u8",2]}},{"name":"bps_per_period","type":"u16"},{"name":"number_of_periods","type":"u16"},{"name":"frequency","type":"u32"},{"name":"cliff_duration_from_migration_time","type":"u32"}]}},{"name":"LockPeriod","docs":["Lock periods for staking, each with its own reward multiplier."],"type":{"kind":"enum","variants":[{"name":"SevenDays"},{"name":"FourteenDays"},{"name":"ThirtyDays"},{"name":"SixtyDays"},{"name":"NinetyDays"},{"name":"OneHundredEightyDays"},{"name":"TenSeconds"}]}},{"name":"LockedVestingConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount_per_period","type":"u64"},{"name":"cliff_duration_from_migration_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"_padding","type":"u64"}]}},{"name":"LzAccount","docs":["same to anchor_lang::prelude::AccountMeta"],"type":{"kind":"struct","fields":[{"name":"pubkey","type":"pubkey"},{"name":"is_signer","type":"bool"},{"name":"is_writable","type":"bool"}]}},{"name":"LzReceiveParams","type":{"kind":"struct","fields":[{"name":"src_eid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"guid","type":{"array":["u8",32]}},{"name":"message","type":"bytes"},{"name":"extra_data","type":"bytes"}]}},{"name":"Peer","docs":["A peer in omnichain network is a connection living on another chain,","typically a smart contract.","","A peer is authorized by the Printr staff to send and receive messages","authoritatively.","This suggests a reciprocal relationship between the two peers.","","To trust a message we must validate that it was sent by a peer.","Validation is done by relaying networks such as Axelar or LayerZero.","Acts as a connection to another chain."],"type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"address","docs":["The address of the peer on the other chain.","Is part of the seed"],"type":{"array":["u8",32]}},{"name":"is_lz_enabled","docs":["Admin can enable and disable the LZ communication channel to the peer.","","Multiple peers can be enabled."],"type":"bool"},{"name":"is_lz_default","docs":["Use this peer as the default for LZ teleports.","","Multiple peers can be set as default in which case they are equivalent from the POV of the","security of the protocol."],"type":"bool"}]}},{"name":"PoolConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"quote_mint","docs":["quote mint"],"type":"pubkey"},{"name":"fee_claimer","docs":["Address to get the fee"],"type":"pubkey"},{"name":"leftover_receiver","docs":["Address to receive extra base token after migration, in case token is fixed supply"],"type":"pubkey"},{"name":"pool_fees","docs":["Pool fee"],"type":{"defined":{"name":"PoolFeesConfig"}}},{"name":"partner_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfo"}}},{"name":"creator_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfo"}}},{"name":"padding_0","docs":["Padding for future use"],"type":{"array":["u8",14]}},{"name":"padding_1","docs":["Previously was protocol and referral fee percent. Beware of tombstone."],"type":"u16"},{"name":"collect_fee_mode","docs":["Collect fee mode"],"type":"u8"},{"name":"migration_option","docs":["migration option"],"type":"u8"},{"name":"activation_type","docs":["whether mode slot or timestamp"],"type":"u8"},{"name":"token_decimal","docs":["token decimals"],"type":"u8"},{"name":"version","docs":["version"],"type":"u8"},{"name":"token_type","docs":["token type of base token"],"type":"u8"},{"name":"quote_token_flag","docs":["quote token flag"],"type":"u8"},{"name":"partner_permanent_locked_liquidity_percentage","docs":["partner locked liquidity percentage"],"type":"u8"},{"name":"partner_liquidity_percentage","docs":["partner liquidity percentage"],"type":"u8"},{"name":"creator_permanent_locked_liquidity_percentage","docs":["creator post migration fee percentage"],"type":"u8"},{"name":"creator_liquidity_percentage","docs":["creator liquidity percentage"],"type":"u8"},{"name":"migration_fee_option","docs":["migration fee option"],"type":"u8"},{"name":"fixed_token_supply_flag","docs":["flag to indicate whether token is dynamic supply (0) or fixed supply (1)"],"type":"u8"},{"name":"creator_trading_fee_percentage","docs":["creator trading fee percentage"],"type":"u8"},{"name":"token_update_authority","docs":["token update authority"],"type":"u8"},{"name":"migration_fee_percentage","docs":["migration fee percentage"],"type":"u8"},{"name":"creator_migration_fee_percentage","docs":["creator migration fee percentage"],"type":"u8"},{"name":"padding_2","type":{"array":["u8",7]}},{"name":"swap_base_amount","docs":["swap base amount"],"type":"u64"},{"name":"migration_quote_threshold","docs":["migration quote threshold (in quote token)"],"type":"u64"},{"name":"migration_base_threshold","docs":["migration base threshold (in base token)"],"type":"u64"},{"name":"migration_sqrt_price","docs":["migration sqrt price"],"type":"u128"},{"name":"locked_vesting_config","docs":["locked vesting config"],"type":{"defined":{"name":"LockedVestingConfig"}}},{"name":"pre_migration_token_supply","docs":["pre migration token supply"],"type":"u64"},{"name":"post_migration_token_supply","docs":["post migration token supply"],"type":"u64"},{"name":"migrated_collect_fee_mode","docs":["migrated pool collect fee mode"],"type":"u8"},{"name":"migrated_dynamic_fee","docs":["migrated dynamic fee option."],"type":"u8"},{"name":"migrated_pool_fee_bps","docs":["migrated pool fee in bps"],"type":"u16"},{"name":"migrated_pool_base_fee_mode","type":"u8"},{"name":"enable_first_swap_with_min_fee","type":"u8"},{"name":"migrated_compounding_fee_bps","docs":["compounding fee bps for migrated DAMM v2 pool, should only be non-zero if migrated_collect_fee_mode is 2 (Compounding)"],"type":"u16"},{"name":"pool_creation_fee","docs":["pool creation fee in lamports value"],"type":"u64"},{"name":"migrated_pool_base_fee_bytes","docs":["serialized MigratedPoolMarketCapFeeSchedulerParams, only used when migrated_pool_base_fee_mode is market cap scheduler"],"type":{"array":["u8",16]}},{"name":"sqrt_start_price","docs":["minimum price"],"type":"u128"},{"name":"curve","docs":["curve, only use 20 point firstly, we can extend that latter"],"type":{"array":[{"defined":{"name":"LiquidityDistributionConfig"}},20]}}]}},{"name":"PoolFeesConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee","type":{"defined":{"name":"BaseFeeConfig"}}},{"name":"dynamic_fee","type":{"defined":{"name":"DynamicFeeConfig"}}}]}},{"name":"PoolMetrics","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"total_protocol_base_fee","type":"u64"},{"name":"total_protocol_quote_fee","type":"u64"},{"name":"total_trading_base_fee","type":"u64"},{"name":"total_trading_quote_fee","type":"u64"}]}},{"name":"PrintTelecoinEvent","docs":["Some Printr related details about the launch on top of meteora events."],"type":{"kind":"struct","fields":[{"name":"protocol_version","docs":["The protocol version of the graduating telecoin token."],"type":{"defined":{"name":"PrintrProtocolVersion"}}},{"name":"telecoin_id","docs":["The Printr Telecoin ID."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"quote_mint","docs":["Which mint is used as a quote."],"type":"pubkey"},{"name":"dev_on_solana","docs":["The dev's wallet on Solana."],"type":"pubkey"}]}},{"name":"PrintrConfig","docs":["Configuration struct holding the public keys for various Printr program wallets.","","# Fields","- `printr_fee_authority`: Receives Printr's portion of the protocol fees.","- `questflow_ai_fee_authority`: Receives QuestFlow AI's portion of the protocol fees.","- `staking_authority`: Receives all fees that are in telecoin.","","# Authority","","This account is an authority over several token account vaults that hold protocol and dev fees."],"type":{"kind":"struct","fields":[{"name":"printr_fee_authority","docs":["This account receives Printr's portion of the protocol fees."],"type":"pubkey"},{"name":"questflow_ai_fee_authority","docs":["This account receives QuestFlow AI's portion of the protocol fees."],"type":"pubkey"},{"name":"_padding_1","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",32]}},{"name":"staking_authority","docs":["Receives all fees that are in telecoin."],"type":"pubkey"},{"name":"_padding_2","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",2]}},{"name":"_padding_3","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",2]}},{"name":"_padding_4","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",2]}},{"name":"_padding_5","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",2]}},{"name":"_padding_6","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",1]}},{"name":"last_update","docs":["# Migration","","This field was originally padding.","It was therefore set to 0.","We repurposed it to [PrintrProtocolVersion] to be able to track migrations of this struct."],"type":{"defined":{"name":"PrintrProtocolVersion"}}}]}},{"name":"PrintrProtocolVersion","docs":["Stores the protocol version that the telecoin was created with."],"type":{"kind":"struct","fields":["u8"]}},{"name":"ProtocolFeeSink","docs":["Lookup table for protocol fee sinks.","","Main raison d'etre for this is to avoid storage cost and migrations on Solana.","We agreed with the business side of Printr that the list will be rather static and won't require","additions in near future.","So we buy ourselves time by skipping the need for migrations this way."],"repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"None"},{"name":"QuestflowAi"}]}},{"name":"RefreshStaking2Event","type":{"kind":"struct","fields":[{"name":"telecoin_id","docs":["Telecoin ID, derives the mint."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"quote_rewards","docs":["Quote token rewards distributed to stakers."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"protocol_quote_fees","docs":["Quote token fees sent to protocol + revshare wallets."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"telecoin_rewards","docs":["Telecoin rewards added."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"quote_token_accumulator","docs":["New quote token accumulator value."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_accumulator","docs":["New telecoin accumulator value."],"type":{"defined":{"name":"Accumulator"}}},{"name":"protocol_telecoin_fees","docs":["Telecoin fees sent to the protocol staking wallet."],"type":{"defined":{"name":"TokenAmount"}}}]}},{"name":"RevShareSlot","type":{"kind":"struct","fields":[{"name":"sink","type":{"defined":{"name":"ProtocolFeeSink"}}},{"name":"share_of_protocol_fee_pct","docs":["This partner's share of the protocol fee as a percentage (0-100).","","The fee hierarchy is:","1. A trade incurs a **trading fee** (e.g. 1% of trade volume).","2. The protocol takes a share of that trading fee","([DevConfigFees::dbc_protocol_share_of_trading_fee_pct] or","[DevConfigFees::amm_protocol_share_of_trading_fee_pct], e.g. 75%).","3. This field is a percentage of *that* protocol share (e.g. 10%).","","Concrete example: 1% trading fee, 75% protocol share, 10% revshare →","effective revshare = 1% × 75% × 10% = 0.075% of trade volume."],"type":"u8"}]}},{"name":"SetDevConfigDevEvent","docs":["Emitted whenever an admin updates the fee sink on a dev config."],"type":{"kind":"struct","fields":[{"name":"telecoin_id","docs":["The Printr Telecoin ID whose dev config was updated."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"telecoin_mint","docs":["The telecoin mint whose dev config was updated."],"type":"pubkey"},{"name":"previous_fee_sink","docs":["The fee sink before the update."],"type":{"defined":{"name":"FeeSink"}}},{"name":"new_fee_sink","docs":["The fee sink after the update."],"type":{"defined":{"name":"FeeSink"}}}]}},{"name":"SetDevConfigFeesParams","type":{"kind":"struct","fields":[{"name":"dbc_protocol_share_of_trading_fee_pct","type":"u8"},{"name":"amm_protocol_share_of_trading_fee_pct","type":"u8"}]}},{"name":"SetPeerConfParams","docs":["Parameters for the [SetPeerConf] instruction."],"type":{"kind":"struct","fields":[{"name":"enable_lz","type":{"option":"bool"}},{"name":"set_as_default","type":{"option":"bool"}}]}},{"name":"SetTelecoinTeleportConfParams","docs":["Parameters for the [SetTelecoinTeleportConf] instruction."],"type":{"kind":"struct","fields":[{"name":"set_lz_peer_config","type":{"option":{"defined":{"name":"TeleportPathConfig"}}}}]}},{"name":"SqrtBitshiftedPrice","docs":["This is a sqrt and bitshifted price ready to be compared to Meteora prices."],"type":{"kind":"struct","fields":[{"name":"price","docs":["The inner raw value."],"type":"u128"}]}},{"name":"StakePosition","docs":["Individual user's stake position in a staking pool.","","PDA seeds:","```ignore","[","SEED_PREFIX_FOR_STAKE_POSITION,","telecoin_mint.as_ref(),","owner.as_ref(),","position_nonce.to_le_bytes().as_ref(),","]","```","","The position_nonce allows users to have multiple stake positions per telecoin."],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump seed for PDA derivation."],"type":"u8"},{"name":"position_nonce","docs":["Position nonce - allows multiple positions per user per telecoin.","","Stored as u32 and used in PDA derivation as little-endian bytes (to_le_bytes()).","There can be only one position per (telecoin, owner, position_nonce) tuple at the time.","However, position nonces can be reused after a position is closed (unlocked and fully","claimed)."],"type":"u32"},{"name":"staked","docs":["Amount of telecoin staked."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"lock_period","docs":["Lock period selected by user."],"type":{"defined":{"name":"LockPeriod"}}},{"name":"staked_at_clock_timestamp","docs":["Timestamp from Clock sysvar when the stake was created."],"type":"i64"},{"name":"quote_token_last_accumulator","docs":["Quote token accumulator value when user last claimed or staked."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_last_accumulator","docs":["Telecoin accumulator value when user last claimed or staked."],"type":{"defined":{"name":"Accumulator"}}}]}},{"name":"StakingPool","docs":["One pool per telecoin. Users stake the telecoin and earn rewards in multiple tokens:","","- Quote token trading fees","- Telecoin trading fees","","PDA seeds: `[b\"staking_pool\", telecoin_mint.as_ref()]`","","Note: Mint addresses can be derived from telecoin_id, so they're not stored here."],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump seed for PDA derivation."],"type":"u8"},{"name":"refreshed_at_clock_slot","docs":["Last slot when the pool was refreshed."],"type":"u64"},{"name":"telecoin_id","docs":["Telecoin ID this pool is associated with."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"total_weighted_stake","docs":["Total weighted stake across all users.","","weighted_stake = sum(user_staked_amount × lock_multiplier_bps / 10000)"],"type":"u128"},{"name":"quote_token_accumulator","docs":["Accumulator for quote token rewards."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_accumulator","docs":["Accumulator for telecoin rewards."],"type":{"defined":{"name":"Accumulator"}}},{"name":"last_telecoin_vault_balance","docs":["Last observed telecoin vault balance for calculating new rewards."],"type":{"defined":{"name":"TokenAmount"}}}]}},{"name":"SwapEstimate","type":{"kind":"struct","fields":[{"name":"actual_input","docs":["What goes into a pool (either bonding curve or AMM).","Does not include the fees."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"input_fee","docs":["What's spent on fees. (Input)"],"type":{"defined":{"name":"TokenAmount"}}},{"name":"output_fee","docs":["What's spent on fees. (Output)"],"type":{"defined":{"name":"TokenAmount"}}},{"name":"output","docs":["What comes out of the pool.","Does not include the fees."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"next_price","docs":["The sqrt price after the swap."],"type":{"defined":{"name":"SqrtBitshiftedPrice"}}},{"name":"current_price","docs":["The sqrt price after the swap."],"type":{"defined":{"name":"SqrtBitshiftedPrice"}}}]}},{"name":"SwapIntent","docs":["Represents user's intent to swap tokens in Printr ecosystem.","We translate this intent to specific Meteora CPIs."],"type":{"kind":"enum","variants":[{"name":"SpendQuote","fields":[{"name":"sell","docs":["Quote amount"],"type":{"defined":{"name":"TokenAmount"}}},{"name":"max_price","docs":["In Printr we apply slippage to price."],"type":{"defined":{"name":"SqrtBitshiftedPrice"}}}]},{"name":"SellTelecoin","fields":[{"name":"sell","docs":["telecoin amount"],"type":{"defined":{"name":"TokenAmount"}}},{"name":"min_price","docs":["In Printr we apply slippage to price."],"type":{"defined":{"name":"SqrtBitshiftedPrice"}}}]},{"name":"SpendAllQuote","fields":[{"name":"special_value","docs":["Must be equal to [printr_sdk::consts::SPEND_ALL_SPECIAL_VALUE]."],"type":"u64"},{"name":"max_price","docs":["In Printr we apply slippage to price."],"type":{"defined":{"name":"SqrtBitshiftedPrice"}}}]}]}},{"name":"TelecoinId","docs":["Printr's Token ID is a hash of the ABI-encoded telecoin params."],"type":{"kind":"struct","fields":[{"array":["u8",32]}]}},{"name":"TelecoinParams","docs":["The core primitive of the Printr protocol.","","These telecoin params uniquely identify a token launched with Printr."],"type":{"kind":"struct","fields":[{"name":"salt","type":{"array":["u8",32]}},{"name":"dev_addresses","docs":["# Note","","At this point, `dev_addresses` has become a misnomer.","It contains more information than that."],"type":"bytes"},{"name":"name","type":{"array":["u8",32]}},{"name":"symbol","type":{"array":["u8",32]}},{"name":"packed_params","type":{"array":["u8",32]}},{"name":"chains","type":{"vec":{"array":["u8",32]}}},{"name":"quote_pairs","type":{"vec":{"array":["u8",32]}}},{"name":"quote_prices","type":"bytes"}]}},{"name":"TelecoinParamsCompact","docs":["On Solana we're dealing with txs size limits.","Being able to compress the telecoin params into a smaller structure helps us submit smaller txs.","","You can always convert this back to [TelecoinParams]."],"type":{"kind":"struct","fields":[{"name":"version","docs":["It's nice to version this in case we need to further compact it or do other changes."],"type":"u8"},{"name":"data","docs":["The compact representation of the telecoin params."],"type":"bytes"}]}},{"name":"TelecoinTeleportConfig","docs":["Overrides default configuration for a specific telecoin with respect to omnichain transfers."],"type":{"kind":"struct","fields":[{"name":"lz_peer","docs":["If set then only the specified peer can be used to teleport this telecoin."],"type":{"defined":{"name":"TeleportPathConfig"}}}]}},{"name":"TeleportPathConfig","docs":["Defines how teleports should be handled."],"type":{"kind":"enum","variants":[{"name":"Default"},{"name":"Disabled"},{"name":"Peers","fields":[{"name":"teleport_any_direction1","docs":["This peer can be used for teleports in any direction: mint and burn."],"type":"pubkey"},{"name":"teleport_any_direction2","docs":["This peer can be used for teleports in any direction: mint and burn."],"type":"pubkey"},{"name":"teleport_in_only","docs":["This peer can be used for teleports in only: mint"],"type":"pubkey"}]}]}},{"name":"TeleportWithLzEvent","docs":["Event emitted by the [TeleportWithLz] instruction."],"type":{"kind":"struct","fields":[{"name":"guid","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"lz_destination_endpoint_id","type":"u32"},{"name":"telecoin_id","type":{"defined":{"name":"TelecoinId"}}},{"name":"destination_recipient_address","type":{"array":["u8",32]}},{"name":"destination_peer_address","type":{"array":["u8",32]}},{"name":"source_user_address","type":"pubkey"},{"name":"teleporting","type":{"defined":{"name":"TokenAmount"}}}]}},{"name":"TeleportWithLzParams","docs":["Parameters for the [TeleportWithLz] instruction.","Used to construct [OutgoingMessage]."],"type":{"kind":"struct","fields":[{"name":"to_send","docs":["Burns this much telecoin tokens and mints them again on the other chain."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"destination_recipient_address","docs":["Who to mint the telecoin tokens to."],"type":{"array":["u8",32]}},{"name":"telecoin_id","docs":["Printr Telecoin ID derives the telecoin mint."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"lamports_gas","docs":["How much to pay LZ for the transaction."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"lz_options","docs":[""],"type":"bytes"},{"name":"lz_destination_endpoint_id","docs":["The chain ID of the destination chain.","",""],"type":"u32"}]}},{"name":"TokenAmount","docs":["A token amount in its smallest denomination as seen in a token account."],"type":{"kind":"struct","fields":[{"name":"amount","docs":["Wraps around this value to give it a meaning."],"type":"u64"}]}},{"name":"VirtualPool","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"volatility_tracker","docs":["volatility tracker"],"type":{"defined":{"name":"VolatilityTracker"}}},{"name":"config","docs":["config key"],"type":"pubkey"},{"name":"creator","docs":["creator"],"type":"pubkey"},{"name":"base_mint","docs":["base mint"],"type":"pubkey"},{"name":"base_vault","docs":["base vault"],"type":"pubkey"},{"name":"quote_vault","docs":["quote vault"],"type":"pubkey"},{"name":"base_reserve","docs":["base reserve"],"type":"u64"},{"name":"quote_reserve","docs":["quote reserve"],"type":"u64"},{"name":"protocol_base_fee","docs":["protocol base fee"],"type":"u64"},{"name":"protocol_quote_fee","docs":["protocol quote fee"],"type":"u64"},{"name":"partner_base_fee","docs":["partner base fee"],"type":"u64"},{"name":"partner_quote_fee","docs":["trading quote fee"],"type":"u64"},{"name":"sqrt_price","docs":["current price"],"type":"u128"},{"name":"activation_point","docs":["Activation point"],"type":"u64"},{"name":"pool_type","docs":["pool type, spl token or token2022"],"type":"u8"},{"name":"is_migrated","docs":["is migrated"],"type":"u8"},{"name":"is_partner_withdraw_surplus","docs":["is partner withdraw surplus"],"type":"u8"},{"name":"is_protocol_withdraw_surplus","docs":["is protocol withdraw surplus"],"type":"u8"},{"name":"migration_progress","docs":["migration progress"],"type":"u8"},{"name":"is_withdraw_leftover","docs":["is withdraw leftover"],"type":"u8"},{"name":"is_creator_withdraw_surplus","docs":["is creator withdraw surplus"],"type":"u8"},{"name":"migration_fee_withdraw_status","docs":["migration fee withdraw status","bit 1 (0b010) creator","bit 2 (0b100) partner"],"type":"u8"},{"name":"metrics","docs":["pool metrics"],"type":{"defined":{"name":"PoolMetrics"}}},{"name":"finish_curve_timestamp","docs":["The time curve is finished"],"type":"u64"},{"name":"creator_base_fee","docs":["creator base fee"],"type":"u64"},{"name":"creator_quote_fee","docs":["creator quote fee"],"type":"u64"},{"name":"legacy_creation_fee_bits","docs":["legacy creation fee bits, we dont use this now"],"type":"u8"},{"name":"creation_fee_bits","docs":["pool creation fee claim status"],"type":"u8"},{"name":"has_swap","docs":["Cached flag"],"type":"u8"},{"name":"_padding_0","docs":["Padding for further use"],"type":{"array":["u8",5]}},{"name":"protocol_liquidity_migration_fee_bps","type":"u16"},{"name":"_padding_1","type":{"array":["u8",6]}},{"name":"protocol_migration_base_fee_amount","type":"u64"},{"name":"protocol_migration_quote_fee_amount","type":"u64"},{"name":"_padding_2","docs":["Padding for further use"],"type":{"array":["u64",3]}}]}},{"name":"VolatilityTracker","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"last_update_timestamp","type":"u64"},{"name":"padding","type":{"array":["u8",8]}},{"name":"sqrt_price_reference","type":"u128"},{"name":"volatility_accumulator","type":"u128"},{"name":"volatility_reference","type":"u128"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/pump_fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.json b/olddocs/archivekbot2/idls/pump_fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.json new file mode 100644 index 0000000..d2804b5 --- /dev/null +++ b/olddocs/archivekbot2/idls/pump_fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.json @@ -0,0 +1 @@ +{"address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ","metadata":{"name":"pump_fees","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"claim_social_fee_pda","discriminator":[225,21,251,133,161,30,199,226],"accounts":[{"name":"recipient","writable":true},{"name":"social_fee_pda","writable":true},{"name":"fee_program_global","pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"social_claim_authority","signer":true,"relations":["fee_program_global"]},{"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":"user_id","type":"string"},{"name":"platform","type":"u8"}],"returns":{"option":{"defined":{"name":"SocialFeePdaClaimed"}}}},{"name":"claim_social_fee_pda_v2","discriminator":[17,77,240,134,58,188,53,149],"accounts":[{"name":"recipient","writable":true},{"name":"social_fee_pda","writable":true},{"name":"quote_mint","docs":["Quote mint for claim"],"writable":true},{"name":"associated_social_fee_pda","writable":true,"pda":{"seeds":[{"kind":"account","path":"social_fee_pda"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"associated_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_program_global","pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"social_claim_authority","signer":true,"relations":["fee_program_global"]},{"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":"user_id","type":"string"},{"name":"platform","type":"u8"}],"returns":{"option":{"defined":{"name":"SocialFeePdaClaimed"}}}},{"name":"crank_donation_fee_pda","discriminator":[220,10,189,167,169,17,25,69],"accounts":[{"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":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"payer","docs":["Pays rent when [`temp_wsol_token_account`] is created (`init_if_needed`); receives rent when it is closed after the relay CPI."],"writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"fee_program_global","pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"donation_fee_pda","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,111,110,97,116,105,111,110,45,102,101,101,45,112,100,97]},{"kind":"account","path":"donation_fee_pda.base_mint","account":"DonationFeePda"},{"kind":"account","path":"donation_fee_pda.config_id","account":"DonationFeePda"}]}},{"name":"quote_mint","docs":["Quote mint from donation fee pda."],"writable":true},{"name":"donation_fee_pda_ata","docs":["WSOL ATA owned by `donation_fee_pda`."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"donation_fee_pda"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"donation_relay_program","address":"RLAYHr9TRFcKB2ubYQhspcnXiaGpaVzNQvHytt47RZu"},{"name":"donation_relay_event_authority"},{"name":"mint_whitelist"},{"name":"epoch_tracker","writable":true},{"name":"debouncer","writable":true},{"name":"debouncer_ata","writable":true}],"args":[]},{"name":"create_donation_fee_pda","discriminator":[244,139,16,88,14,255,122,26],"accounts":[{"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":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"fee_program_global","pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"donation_fee_pda","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,111,110,97,116,105,111,110,45,102,101,101,45,112,100,97]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"config_id"}]}},{"name":"config_id","docs":["stored on the PDA, so distinct `config_id`s for the same `base_mint` derive distinct addresses."]},{"name":"base_mint"},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"base_mint"}],"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":"pool"},{"name":"sharing_config","docs":["(derived from `[SHARING_CONFIG_SEED, base_mint]`)"],"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"base_mint"}]}}],"args":[]},{"name":"create_fee_sharing_config","docs":["Create Fee Sharing Config"],"discriminator":[195,78,86,76,111,52,251,213],"accounts":[{"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":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"payer","writable":true,"signer":true},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"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":"mint"},{"name":"sharing_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"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":"pump_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"pump_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"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":"pool","writable":true,"optional":true},{"name":"pump_amm_program","optional":true,"address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"pump_amm_event_authority","optional":true,"pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"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]}}}],"args":[]},{"name":"create_social_fee_pda","discriminator":[144,224,59,211,78,248,202,220],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"social_fee_pda","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"fee_program_global","pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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":"user_id","type":"string"},{"name":"platform","type":"u8"}]},{"name":"extend_fee_config","docs":["Realloc the fee_config PDA to [`FeeConfig::CURRENT_SIZE`] (signer pays rent delta)."],"discriminator":[68,179,244,90,173,56,17,217],"accounts":[{"name":"fee_config","writable":true},{"name":"user","signer":true},{"name":"config_program_id"},{"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":"get_fees","docs":["Get Fees"],"discriminator":[231,37,126,85,207,91,63,52],"accounts":[{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"config_program_id"}],"args":[{"name":"is_pump_pool","type":"bool"},{"name":"market_cap_lamports","type":"u128"},{"name":"trade_size_lamports","type":"u64"},{"name":"is_new_quote_mint","type":{"defined":{"name":"OptionBool"}}}],"returns":{"defined":{"name":"Fees"}}},{"name":"initialize_buyback","discriminator":[250,129,236,160,227,36,103,134],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"buyback_vault","writable":true},{"name":"buyback_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"buyback_vault"},{"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":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"mint"},{"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":"index","type":"u8"}]},{"name":"initialize_fee_config","docs":["Initialize FeeConfig admin"],"discriminator":[62,162,20,133,121,65,145,27],"accounts":[{"name":"admin","writable":true,"signer":true,"address":"8LWu7QM2dGR1G8nKDHthckea57bkCzXyBTAKPJUBDHo8"},{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"config_program_id"},{"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":"initialize_fee_program_global","discriminator":[35,215,130,84,233,56,124,167],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["pump_global"]},{"name":"pump_global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"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":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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":"social_claim_authority","type":"pubkey"},{"name":"disable_flags","type":"u8"},{"name":"claim_rate_limit","type":"u64"}]},{"name":"reset_fee_sharing_config","docs":["Reset Fee Sharing Config and distribute pending fees first"],"discriminator":[10,2,182,95,16,127,129,186],"accounts":[{"name":"new_admin"},{"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":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"authority","signer":true},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"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":"mint","relations":["sharing_config"]},{"name":"sharing_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"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":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"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":"system_program","address":"11111111111111111111111111111111"},{"name":"pump_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"pump_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"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":"pump_amm_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"amm_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"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]}}},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"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]}}},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"wsol_mint"}],"program":{"kind":"account","path":"associated_token_program"}}}],"args":[]},{"name":"reset_fee_sharing_config_v2","docs":["Reset Fee Sharing Config and distribute pending fees first"],"discriminator":[169,245,17,209,94,91,248,128],"accounts":[{"name":"new_admin"},{"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":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"authority","writable":true,"signer":true},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"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":"mint","relations":["sharing_config"]},{"name":"sharing_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"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":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"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":"pump_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"pump_creator_vault"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pump_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"pump_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"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":"pump_amm_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"amm_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"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]}}},{"name":"quote_mint"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"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]}}},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}}],"args":[]},{"name":"revoke_fee_sharing_authority","docs":["Revoke Fee Sharing Authority"],"discriminator":[18,233,158,39,185,207,58,104],"accounts":[],"args":[]},{"name":"set_authority","discriminator":[133,250,37,21,110,163,26,121],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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":"new_authority","type":"pubkey"}]},{"name":"set_claim_rate_limit","discriminator":[185,211,159,174,212,49,88,4],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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":"claim_rate_limit","type":"u64"}]},{"name":"set_disable_flags","discriminator":[194,217,112,35,114,222,51,190],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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_flags","type":"u8"}]},{"name":"set_social_claim_authority","discriminator":[147,54,184,154,136,237,185,153],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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":"social_claim_authority","type":"pubkey"}]},{"name":"sweep_buyback","discriminator":[138,33,204,38,207,161,159,226],"accounts":[{"name":"destination","writable":true},{"name":"authority","writable":true,"signer":true,"relations":["buyback_vault"]},{"name":"buyback_vault","writable":true},{"name":"buyback_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"buyback_vault"},{"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":"destination_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"destination"},{"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":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"mint"},{"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":"index","type":"u8"}]},{"name":"transfer_fee_sharing_authority","docs":["Transfer Fee Sharing Authority"],"discriminator":[202,10,75,200,164,34,210,96],"accounts":[],"args":[]},{"name":"update_admin","docs":["Update admin (only callable by admin)"],"discriminator":[161,176,40,213,60,184,179,228],"accounts":[{"name":"admin","signer":true,"relations":["fee_config"]},{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"new_admin"},{"name":"config_program_id"},{"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":"update_buyback_authority","discriminator":[66,98,113,202,121,37,219,107],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"buyback_vault","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":"index","type":"u8"},{"name":"new_authority","type":"pubkey"}]},{"name":"update_buyback_claim_rate_limit","discriminator":[186,95,135,190,255,199,137,170],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"buyback_vault","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":"index","type":"u8"},{"name":"claim_rate_limit","type":"i64"}]},{"name":"update_fee_config","docs":["Set/Replace fee parameters entirely (only callable by admin)"],"discriminator":[104,184,103,242,88,151,107,20],"accounts":[{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"admin","signer":true,"relations":["fee_config"]},{"name":"config_program_id"},{"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":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"flat_fees","type":{"defined":{"name":"Fees"}}}]},{"name":"update_fee_shares","docs":["Update Fee Shares, make sure to distribute all the fees before calling this"],"discriminator":[189,13,136,99,187,164,237,35],"accounts":[{"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":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"authority","signer":true},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"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":"mint","relations":["sharing_config"]},{"name":"sharing_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"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":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"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":"system_program","address":"11111111111111111111111111111111"},{"name":"pump_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"pump_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"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":"pump_amm_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"amm_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"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]}}},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"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]}}},{"name":"coin_creator_vault_ata","writable":true}],"args":[{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}}]},{"name":"update_fee_shares_v2","docs":["Update Fee Shares, make sure to distribute all the fees before calling this"],"discriminator":[111,251,49,6,78,78,106,18],"accounts":[{"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":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"authority","writable":true,"signer":true},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"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":"mint","relations":["sharing_config"]},{"name":"sharing_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"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":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"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":"pump_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"pump_creator_vault"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pump_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"pump_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"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":"pump_amm_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"amm_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"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]}}},{"name":"quote_mint"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"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]}}},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}}],"args":[{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}}]},{"name":"update_stable_fee_config","docs":["Set/Replace fee parameters entirely (only callable by admin)"],"discriminator":[107,169,100,179,134,155,146,221],"accounts":[{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"admin","signer":true,"relations":["fee_config"]},{"name":"config_program_id"},{"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":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}}]},{"name":"upsert_fee_tiers","docs":["Update or expand fee tiers (only callable by admin)"],"discriminator":[227,23,150,12,77,86,94,4],"accounts":[{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"admin","signer":true,"relations":["fee_config"]},{"name":"config_program_id"},{"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":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"offset","type":"u8"}]},{"name":"upsert_stable_fee_tiers","docs":["Update or expand fee tiers (only callable by admin)"],"discriminator":[181,160,162,252,74,76,224,221],"accounts":[{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"admin","signer":true,"relations":["fee_config"]},{"name":"config_program_id"},{"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":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"offset","type":"u8"}]}],"accounts":[{"name":"BondingCurve","discriminator":[23,183,248,55,96,216,172,96]},{"name":"BuybackVault","discriminator":[153,166,71,144,179,189,137,251]},{"name":"DonationFeePda","discriminator":[246,197,96,9,193,30,93,115]},{"name":"FeeConfig","discriminator":[143,52,146,187,219,123,76,155]},{"name":"FeeProgramGlobal","discriminator":[162,165,245,49,29,37,55,242]},{"name":"Global","discriminator":[167,232,232,177,200,108,114,127]},{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"SharingConfig","discriminator":[216,74,9,0,56,140,93,75]},{"name":"SocialFeePda","discriminator":[139,96,53,17,42,169,206,150]}],"events":[{"name":"CreateFeeSharingConfigEvent","discriminator":[133,105,170,200,184,116,251,88]},{"name":"DonationFeePdaCranked","discriminator":[30,208,107,93,177,0,223,78]},{"name":"DonationFeePdaCreated","discriminator":[94,20,137,239,35,77,225,235]},{"name":"ExtendFeeConfigEvent","discriminator":[226,203,224,35,153,10,88,51]},{"name":"InitializeFeeConfigEvent","discriminator":[89,138,244,230,10,56,226,126]},{"name":"InitializeFeeProgramGlobalEvent","discriminator":[40,233,156,78,95,0,8,199]},{"name":"ResetFeeSharingConfigEvent","discriminator":[203,204,151,226,120,55,214,243]},{"name":"SetAuthorityEvent","discriminator":[18,175,132,66,208,201,87,242]},{"name":"SetClaimRateLimitEvent","discriminator":[13,143,143,235,181,19,51,40]},{"name":"SetDisableFlagsEvent","discriminator":[5,8,179,65,49,55,145,126]},{"name":"SetSocialClaimAuthorityEvent","discriminator":[60,118,127,132,239,52,254,14]},{"name":"SocialFeePdaClaimed","discriminator":[50,18,193,65,237,210,234,236]},{"name":"SocialFeePdaCreated","discriminator":[183,183,218,147,24,124,137,169]},{"name":"SweepBuybackEvent","discriminator":[43,56,42,214,153,57,166,137]},{"name":"UpdateAdminEvent","discriminator":[225,152,171,87,246,63,66,234]},{"name":"UpdateFeeConfigEvent","discriminator":[90,23,65,35,62,244,188,208]},{"name":"UpdateFeeSharesEvent","discriminator":[21,186,196,184,91,228,225,203]},{"name":"UpdateStableFeeConfigEvent","discriminator":[94,5,43,237,103,147,232,245]},{"name":"UpsertFeeTiersEvent","discriminator":[171,89,169,187,122,186,33,204]},{"name":"UpsertStableFeeTiersEvent","discriminator":[232,237,237,52,98,146,73,243]}],"errors":[{"code":6000,"name":"UnauthorizedProgram","msg":"Only Pump and PumpSwap programs can call this instruction"},{"code":6001,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6002,"name":"NoFeeTiers","msg":"No fee tiers provided"},{"code":6003,"name":"TooManyFeeTiers","msg":"format"},{"code":6004,"name":"OffsetNotContinuous","msg":"The offset should be <= fee_config.fee_tiers.len()"},{"code":6005,"name":"FeeTiersNotSorted","msg":"Fee tiers must be sorted by market cap threshold (ascending)"},{"code":6006,"name":"InvalidFeeTotal","msg":"Fee total must not exceed 10_000bps"},{"code":6007,"name":"InvalidSharingConfig","msg":"Invalid Sharing Config"},{"code":6008,"name":"InvalidPool","msg":"Invalid Pool"},{"code":6009,"name":"SharingConfigAdminRevoked","msg":"Sharing config authority has been revoked - sharing config can only be updated once"},{"code":6010,"name":"NoShareholders","msg":"No shareholders provided"},{"code":6011,"name":"TooManyShareholders","msg":"format"},{"code":6012,"name":"DuplicateShareholder","msg":"Duplicate shareholder address"},{"code":6013,"name":"NotEnoughRemainingAccounts","msg":"Not enough remaining accounts"},{"code":6014,"name":"InvalidShareTotal","msg":"Invalid share total - must equal 10_000 basis points"},{"code":6015,"name":"ShareCalculationOverflow","msg":"Share calculation overflow"},{"code":6016,"name":"NotAuthorized","msg":"The given account is not authorized to execute this instruction."},{"code":6017,"name":"ZeroShareNotAllowed","msg":"Shareholder cannot have zero share"},{"code":6018,"name":"SharingConfigNotActive","msg":"Fee sharing config is not active"},{"code":6019,"name":"AmmAccountsRequiredForGraduatedCoin","msg":"AMM accounts are required for graduated coins"},{"code":6020,"name":"ShareholderAccountMismatch","msg":"Remaining account key doesn't match shareholder address"},{"code":6021,"name":"FeatureDeactivated","msg":"Feature is currently deactivated"},{"code":6022,"name":"UserIdTooLong","msg":"User ID exceeds maximum length"},{"code":6023,"name":"DeprecatedInstruction","msg":"Instruction is deprecated"},{"code":6024,"name":"FeeSharesAlreadyUpdated","msg":"Reward split can only be updated once"},{"code":6025,"name":"MathOverflow","msg":"Math overflow"},{"code":6026,"name":"InvalidBuybackIndex","msg":"Invalid buybackindex"},{"code":6027,"name":"ClaimRateLimitExceeded","msg":"Claim rate limit exceeded"},{"code":6028,"name":"InvalidFeeConfigAccount","msg":"Account is not a valid FeeConfig for this instruction"},{"code":6029,"name":"AccountTypeNotSupported","msg":"Account type not supported"},{"code":6030,"name":"InvalidMint","msg":"Mint does not match quote mint"}],"types":[{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"virtual_token_reserves","type":"u64"},{"name":"virtual_quote_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"real_quote_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"complete","type":"bool"},{"name":"creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"}]}},{"name":"BuybackVault","type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"total_claimed","type":"u64"},{"name":"total_claimed_token1","type":"u64"},{"name":"total_claimed_token2","type":"u64"},{"name":"last_claimed","type":"i64"},{"name":"claim_rate_limit","type":"i64"},{"name":"_reserved","type":{"array":["u8",128]}}]}},{"name":"ConfigStatus","type":{"kind":"enum","variants":[{"name":"Paused"},{"name":"Active"}]}},{"name":"CreateFeeSharingConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"pool","type":{"option":"pubkey"}},{"name":"sharing_config","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"initial_shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"status","type":{"defined":{"name":"ConfigStatus"}}}]}},{"name":"DonationFeePda","docs":["Escrow PDA for donation relay: one per (mint, donation campaign `config_id`)."],"type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"config_id","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"total_donated","type":"u64"},{"name":"last_crank_ts","type":"i64"},{"name":"_reserved","type":{"array":["u8",64]}}]}},{"name":"DonationFeePdaCranked","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"signer","type":"pubkey"},{"name":"donation_fee_pda","type":"pubkey"},{"name":"config_id","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"DonationFeePdaCreated","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"created_by","type":"pubkey"},{"name":"donation_fee_pda","type":"pubkey"},{"name":"config_id","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"ExtendFeeConfigEvent","type":{"kind":"struct","fields":[{"name":"fee_config","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"current_size","type":"u64"},{"name":"new_size","type":"u64"},{"name":"timestamp","type":"i64"}]}},{"name":"FeeConfig","type":{"kind":"struct","fields":[{"name":"bump","docs":["The bump for the PDA"],"type":"u8"},{"name":"admin","docs":["The admin account that can update the fee config"],"type":"pubkey"},{"name":"flat_fees","docs":["The flat fees for non-pump pools"],"type":{"defined":{"name":"Fees"}}},{"name":"fee_tiers","docs":["The fee tiers"],"type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"stable_fee_tiers","docs":["The fee tiers"],"type":{"vec":{"defined":{"name":"FeeTier"}}}}]}},{"name":"FeeProgramGlobal","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"authority","type":"pubkey"},{"name":"disable_flags","type":"u8"},{"name":"social_claim_authority","type":"pubkey"},{"name":"claim_rate_limit","type":"u64"},{"name":"_reserved","type":{"array":["u8",256]}}]}},{"name":"FeeTier","type":{"kind":"struct","fields":[{"name":"market_cap_lamports_threshold","type":"u128"},{"name":"fees","type":{"defined":{"name":"Fees"}}}]}},{"name":"Fees","type":{"kind":"struct","fields":[{"name":"lp_fee_bps","type":"u64"},{"name":"protocol_fee_bps","type":"u64"},{"name":"creator_fee_bps","type":"u64"}]}},{"name":"Global","type":{"kind":"struct","fields":[{"name":"initialized","type":"bool"},{"name":"authority","type":"pubkey"},{"name":"fee_recipient","type":"pubkey"},{"name":"initial_virtual_token_reserves","type":"u64"},{"name":"initial_virtual_sol_reserves","type":"u64"},{"name":"initial_real_token_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"fee_basis_points","type":"u64"},{"name":"withdraw_authority","type":"pubkey"},{"name":"enable_migrate","type":"bool"},{"name":"pool_migration_fee","type":"u64"},{"name":"creator_fee_basis_points","type":"u64"},{"name":"fee_recipients","type":{"array":["pubkey",7]}},{"name":"set_creator_authority","type":"pubkey"},{"name":"admin_set_creator_authority","type":"pubkey"},{"name":"create_v2_enabled","type":"bool"},{"name":"whitelist_pda","type":"pubkey"},{"name":"reserved_fee_recipient","type":"pubkey"},{"name":"mayhem_mode_enabled","type":"bool"},{"name":"reserved_fee_recipients","type":{"array":["pubkey",7]}}]}},{"name":"InitializeFeeConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"fee_config","type":"pubkey"}]}},{"name":"InitializeFeeProgramGlobalEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"authority","type":"pubkey"},{"name":"social_claim_authority","type":"pubkey"},{"name":"disable_flags","type":"u8"},{"name":"claim_rate_limit","type":"u64"}]}},{"name":"OptionBool","type":{"kind":"struct","fields":["bool"]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"pool_bump","type":"u8"},{"name":"index","type":"u16"},{"name":"creator","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"lp_mint","type":"pubkey"},{"name":"pool_base_token_account","type":"pubkey"},{"name":"pool_quote_token_account","type":"pubkey"},{"name":"lp_supply","type":"u64"},{"name":"coin_creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"}]}},{"name":"ResetFeeSharingConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"sharing_config","type":"pubkey"},{"name":"old_admin","type":"pubkey"},{"name":"old_shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"new_admin","type":"pubkey"},{"name":"new_shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"old_version","type":"u8"},{"name":"new_version","type":"u8"}]}},{"name":"SetAuthorityEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"old_authority","type":"pubkey"},{"name":"new_authority","type":"pubkey"}]}},{"name":"SetClaimRateLimitEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"claim_rate_limit","type":"u64"}]}},{"name":"SetDisableFlagsEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"disable_flags","type":"u8"}]}},{"name":"SetSocialClaimAuthorityEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"social_claim_authority","type":"pubkey"}]}},{"name":"Shareholder","type":{"kind":"struct","fields":[{"name":"address","type":"pubkey"},{"name":"share_bps","type":"u16"}]}},{"name":"SharingConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"status","type":{"defined":{"name":"ConfigStatus"}}},{"name":"mint","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"admin_revoked","type":"bool"},{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}}]}},{"name":"SocialFeePda","docs":["Platform identifier: 0=pump, 1=twitter, etc."],"type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"user_id","docs":["Max 20 characters to fit u64::MAX (18,446,744,073,709,551,615) as a string.","Actual storage: 4 bytes (length prefix) + 20 bytes (content) = 24 bytes."],"type":"string"},{"name":"platform","type":"u8"},{"name":"total_claimed","type":"u64"},{"name":"last_claimed","type":"u64"},{"name":"_reserved","type":{"array":["u8",128]}}]}},{"name":"SocialFeePdaClaimed","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"user_id","type":"string"},{"name":"platform","type":"u8"},{"name":"social_fee_pda","type":"pubkey"},{"name":"recipient","type":"pubkey"},{"name":"social_claim_authority","type":"pubkey"},{"name":"amount_claimed","type":"u64"},{"name":"claimable_before","type":"u64"},{"name":"lifetime_claimed","type":"u64"},{"name":"recipient_balance_before","type":"u64"},{"name":"recipient_balance_after","type":"u64"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"SocialFeePdaCreated","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"user_id","type":"string"},{"name":"platform","type":"u8"},{"name":"social_fee_pda","type":"pubkey"},{"name":"created_by","type":"pubkey"}]}},{"name":"SweepBuybackEvent","type":{"kind":"struct","fields":[{"name":"index","type":"u8"},{"name":"sol_amount","type":"u64"},{"name":"token_amount","type":"u64"},{"name":"destination","type":"pubkey"},{"name":"buyback_vault","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"UpdateAdminEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"old_admin","type":"pubkey"},{"name":"new_admin","type":"pubkey"}]}},{"name":"UpdateFeeConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"fee_config","type":"pubkey"},{"name":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"flat_fees","type":{"defined":{"name":"Fees"}}}]}},{"name":"UpdateFeeSharesEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"sharing_config","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"new_shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"version","type":"u8"}]}},{"name":"UpdateStableFeeConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"fee_config","type":"pubkey"},{"name":"stable_fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"flat_fees","type":{"defined":{"name":"Fees"}}}]}},{"name":"UpsertFeeTiersEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"fee_config","type":"pubkey"},{"name":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"offset","type":"u8"}]}},{"name":"UpsertStableFeeTiersEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"fee_config","type":"pubkey"},{"name":"stable_fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"offset","type":"u8"}]}}],"constants":[{"name":"AMM_CREATOR_VAULT_AUTHORITY_SEED","type":{"array":["u8",13]},"value":"[99, 114, 101, 97, 116, 111, 114, 95, 118, 97, 117, 108, 116]"},{"name":"BUYBACK_VAULT_SEED","type":{"array":["u8",13]},"value":"[98, 117, 121, 98, 97, 99, 107, 45, 118, 97, 117, 108, 116]"},{"name":"DEBOUNCER_V1","type":"bytes","value":"[100, 101, 98, 111, 117, 110, 99, 101, 114, 95, 118, 49]"},{"name":"DONATION_FEE_PDA_SEED","type":{"array":["u8",16]},"value":"[100, 111, 110, 97, 116, 105, 111, 110, 45, 102, 101, 101, 45, 112, 100, 97]"},{"name":"EPOCH_TRACKER_V1","type":"bytes","value":"[101, 112, 111, 99, 104, 95, 116, 114, 97, 99, 107, 101, 114, 95, 118, 49]"},{"name":"FEE_CONFIG_SEED","type":"bytes","value":"[102, 101, 101, 95, 99, 111, 110, 102, 105, 103]"},{"name":"FEE_PROGRAM_GLOBAL_SEED","type":{"array":["u8",18]},"value":"[102, 101, 101, 45, 112, 114, 111, 103, 114, 97, 109, 45, 103, 108, 111, 98, 97, 108]"},{"name":"IX_DONATE_PUBKEY_CONFIG_ID_WITH_PAYER_V1","type":{"array":["u8",8]},"value":"[120, 217, 57, 241, 135, 104, 139, 184]"},{"name":"MAX_BUYBACK_INDEX","type":"u8","value":"8"},{"name":"MINT_WHITELIST_V1","type":"bytes","value":"[109, 105, 110, 116, 95, 119, 104, 105, 116, 101, 108, 105, 115, 116, 95, 118, 49]"},{"name":"PUMP_CREATOR_VAULT_SEED","type":{"array":["u8",13]},"value":"[99, 114, 101, 97, 116, 111, 114, 45, 118, 97, 117, 108, 116]"},{"name":"PUMP_GLOBAL_SEED","docs":["Bonding Curve Program Global Seed"],"type":{"array":["u8",6]},"value":"[103, 108, 111, 98, 97, 108]"},{"name":"SHARING_CONFIG_SEED","type":{"array":["u8",14]},"value":"[115, 104, 97, 114, 105, 110, 103, 45, 99, 111, 110, 102, 105, 103]"},{"name":"SOCIAL_FEE_PDA_SEED","type":{"array":["u8",14]},"value":"[115, 111, 99, 105, 97, 108, 45, 102, 101, 101, 45, 112, 100, 97]"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/pump_fun.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.json b/olddocs/archivekbot2/idls/pump_fun.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.json new file mode 100644 index 0000000..670461a --- /dev/null +++ b/olddocs/archivekbot2/idls/pump_fun.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.json @@ -0,0 +1 @@ +{"address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P","metadata":{"name":"pump","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_quote_mint","discriminator":[111,121,21,56,40,24,94,209],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"quote_mint","type":"pubkey"}]},{"name":"admin_set_creator","docs":["Allows Global::admin_set_creator_authority to override the bonding curve creator"],"discriminator":[69,25,171,142,57,239,13,4],"accounts":[{"name":"admin_set_creator_authority","signer":true,"relations":["global"]},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"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":"creator","type":"pubkey"}]},{"name":"admin_set_idl_authority","discriminator":[8,217,96,231,144,104,192,5],"accounts":[{"name":"authority","signer":true,"relations":["global"]},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"idl_account","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program_signer","pda":{"seeds":[]}},{"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":"idl_authority","type":"pubkey"}]},{"name":"admin_update_token_incentives","discriminator":[209,11,115,87,213,23,124,204],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"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":"pump_token_supply_per_day","type":"u64"}]},{"name":"buy","docs":["Buys tokens from a bonding curve."],"discriminator":[102,6,61,18,1,218,235,234],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"fee_recipient","writable":true},{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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_user","writable":true},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program"},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"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":[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]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"}],"args":[{"name":"amount","type":"u64"},{"name":"max_sol_cost","type":"u64"},{"name":"track_volume","type":{"defined":{"name":"OptionBool"}}}]},{"name":"buy_exact_quote_in_v2","discriminator":[194,171,28,70,104,77,91,47],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"base_mint"},{"name":"quote_mint"},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_recipient","writable":true},{"name":"associated_quote_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"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":"buyback_fee_recipient","writable":true},{"name":"associated_quote_buyback_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"buyback_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":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"base_mint"}]}},{"name":"associated_base_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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":"associated_quote_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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","writable":true,"signer":true},{"name":"associated_base_user","writable":true},{"name":"associated_quote_user","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":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"name":"associated_creator_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator_vault"},{"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":"sharing_config","docs":["seeds; the account is intentionally not deserialized here because it may be uninitialized","for mints that have not created a fee sharing config. Handlers must check","`data_is_empty()` / owner before reading."],"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"base_mint"}],"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":"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":"associated_user_volume_accumulator","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":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"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]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[{"name":"spendable_quote_in","type":"u64"},{"name":"min_tokens_out","type":"u64"}]},{"name":"buy_exact_sol_in","docs":["Given a budget of spendable SOL, buy at least min_tokens_out tokens.","Fees are deducted from spendable_sol_in.","","# Quote formulas","Where:","- total_fee_bps = protocol_fee_bps + creator_fee_bps (creator_fee_bps is 0 if no creator)","- floor(a/b) = a / b (integer division)","- ceil(a/b) = (a + b - 1) / b","","SOL → tokens quote","To calculate tokens_out for a given spendable_sol_in:","1. net_sol = floor(spendable_sol_in * 10_000 / (10_000 + total_fee_bps))","2. fees = ceil(net_sol * protocol_fee_bps / 10_000) + ceil(net_sol * creator_fee_bps / 10_000) (creator_fee_bps is 0 if no creator)","3. if net_sol + fees > spendable_sol_in: net_sol = net_sol - (net_sol + fees - spendable_sol_in)","4. tokens_out = floor((net_sol - 1) * virtual_token_reserves / (virtual_sol_reserves + net_sol - 1))","","Reverse quote (tokens → SOL)","To calculate spendable_sol_in for a desired number of tokens:","1. net_sol = ceil(tokens * virtual_sol_reserves / (virtual_token_reserves - tokens)) + 1","2. spendable_sol_in = ceil(net_sol * (10_000 + total_fee_bps) / 10_000)","","Rent","Separately make sure the instruction's payer has enough SOL to cover rent for:","- creator_vault: rent.minimum_balance(0)","- user_volume_accumulator: rent.minimum_balance(UserVolumeAccumulator::LEN)"],"discriminator":[56,252,116,8,158,223,205,95],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"fee_recipient","writable":true},{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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_user","writable":true},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program"},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"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":[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]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"}],"args":[{"name":"spendable_sol_in","type":"u64"},{"name":"min_tokens_out","type":"u64"},{"name":"track_volume","type":{"defined":{"name":"OptionBool"}}}]},{"name":"buy_v2","discriminator":[184,23,238,97,103,197,211,61],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"base_mint"},{"name":"quote_mint"},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_recipient","writable":true},{"name":"associated_quote_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"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":"buyback_fee_recipient","writable":true},{"name":"associated_quote_buyback_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"buyback_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":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"base_mint"}]}},{"name":"associated_base_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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":"associated_quote_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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","writable":true,"signer":true},{"name":"associated_base_user","writable":true},{"name":"associated_quote_user","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":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"name":"associated_creator_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator_vault"},{"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":"sharing_config","docs":["seeds; the account is intentionally not deserialized here because it may be uninitialized","for mints that have not created a fee sharing config. Handlers must check","`data_is_empty()` / owner before reading."],"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"base_mint"}],"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":"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":"associated_user_volume_accumulator","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":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"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]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[{"name":"amount","type":"u64"},{"name":"max_sol_cost","type":"u64"}]},{"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":"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[]},{"name":"claim_cashback_v2","discriminator":[122,243,204,65,94,116,29,55],"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":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"associated_user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"account","path":"user_volume_accumulator"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"associated_quote_user","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"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_creator_fee","docs":["Collects creator_fee from creator_vault to the coin creator account"],"discriminator":[20,22,86,123,198,28,219,132],"accounts":[{"name":"creator","writable":true},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"creator"}]}},{"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":"collect_creator_fee_v2","docs":["Collects creator_fee from creator_vault to the coin creator account"],"discriminator":[207,17,138,242,4,34,19,56],"accounts":[{"name":"creator","writable":true},{"name":"creator_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"creator"}]}},{"name":"creator_vault_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator_vault"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"quote_mint"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"create","docs":["Creates a new coin and bonding curve."],"discriminator":[24,30,200,40,5,28,7,119],"accounts":[{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,45,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"mpl_token_metadata","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"metadata","writable":true,"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":"mint"}],"program":{"kind":"account","path":"mpl_token_metadata"}}},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"creator","type":"pubkey"}]},{"name":"create_v2","docs":["Creates a new spl-22 coin and bonding curve."],"discriminator":[214,144,76,236,95,139,49,180],"accounts":[{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,45,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"mayhem_program_id","writable":true,"address":"MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e"},{"name":"global_params","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,45,112,97,114,97,109,115]}],"program":{"kind":"const","value":[5,42,229,215,167,218,167,36,166,234,176,167,41,84,145,133,90,212,160,103,22,96,103,76,78,3,69,89,128,61,101,163]}}},{"name":"sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,111,108,45,118,97,117,108,116]}],"program":{"kind":"const","value":[5,42,229,215,167,218,167,36,166,234,176,167,41,84,145,133,90,212,160,103,22,96,103,76,78,3,69,89,128,61,101,163]}}},{"name":"mayhem_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,121,104,101,109,45,115,116,97,116,101]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[5,42,229,215,167,218,167,36,166,234,176,167,41,84,145,133,90,212,160,103,22,96,103,76,78,3,69,89,128,61,101,163]}}},{"name":"mayhem_token_vault","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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_enabled","type":{"defined":{"name":"OptionBool"}}}]},{"name":"distribute_creator_fees","docs":["Distributes creator fees to shareholders based on their share percentages","The creator vault needs to have at least the minimum distributable amount to distribute fees","This can be checked with the get_minimum_distributable_fee instruction"],"discriminator":[165,114,103,0,121,206,247,81],"accounts":[{"name":"mint","relations":["sharing_config"]},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"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":"mint"}],"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":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[],"returns":{"defined":{"name":"DistributeCreatorFeesEvent"}}},{"name":"distribute_creator_fees_v2","discriminator":[255,203,19,79,244,68,8,159],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"mint","relations":["sharing_config"]},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"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":"mint"}],"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":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"creator_vault_quote_token_account","docs":["Deserialized manually in the handler for non-legacy quote mints."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"creator_vault"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"quote_mint"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"initialize_ata","type":"bool"}],"returns":{"defined":{"name":"DistributeCreatorFeesEvent"}}},{"name":"extend_account","docs":["Extends the size of program-owned accounts"],"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":"get_minimum_distributable_fee","docs":["Permissionless instruction to check the minimum required fees for distribution","Returns the minimum required balance from the creator_vault and whether distribution can proceed"],"discriminator":[117,225,127,202,134,95,68,35],"accounts":[{"name":"mint","relations":["sharing_config"]},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"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":"mint"}],"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":"creator_vault","pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}}],"args":[],"returns":{"defined":{"name":"MinimumDistributableFeeEvent"}}},{"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":"initialize","docs":["Creates the global state."],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"migrate","docs":["Migrates liquidity to pump_amm if the bonding curve is complete"],"discriminator":[155,234,231,146,236,158,162,30],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"withdraw_authority","writable":true,"relations":["global"]},{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"mint"},{"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","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"pump_amm","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"const","value":[0,0]},{"kind":"account","path":"pool_authority"},{"kind":"account","path":"mint"},{"kind":"account","path":"wsol_mint"}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"pool_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,45,97,117,116,104,111,114,105,116,121]},{"kind":"account","path":"mint"}]}},{"name":"pool_authority_mint_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"mint"},{"kind":"account","path":"mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"pool_authority_wsol_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"wsol_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"amm_global_config","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,99,111,110,102,105,103]}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"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"}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"user_pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"token_2022_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"pool_base_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint"},{"kind":"account","path":"mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"pool_quote_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"token_program"},{"kind":"account","path":"wsol_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"pump_amm_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"account","path":"pump_amm"}}},{"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"migrate_bonding_curve_creator","discriminator":[87,124,52,191,52,38,214,232],"accounts":[{"name":"mint","relations":["sharing_config"]},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"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":"mint"}],"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":"migrate_v2","docs":["Migrates liquidity to pump_amm if the bonding curve is complete"],"discriminator":[187,203,18,31,206,237,254,41],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"withdraw_authority","writable":true,"relations":["global"]},{"name":"base_mint"},{"name":"quote_mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"base_mint"}]}},{"name":"associated_base_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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":"associated_quote_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"user","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pump_amm","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"const","value":[0,0]},{"kind":"account","path":"pool_authority"},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"pool_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,45,97,117,116,104,111,114,105,116,121]},{"kind":"account","path":"base_mint"}]}},{"name":"pool_authority_mint_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"base_token_program"},{"kind":"account","path":"base_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"pool_authority_quote_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"amm_global_config","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,99,111,110,102,105,103]}],"program":{"kind":"account","path":"pump_amm"}}},{"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"}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"user_pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"token_2022_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"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":"account","path":"associated_token_program"}}},{"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":"account","path":"associated_token_program"}}},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"pump_amm_event_authority"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"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":"remove_quote_mint","discriminator":[177,65,223,38,88,209,158,155],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"quote_mint","type":"pubkey"}]},{"name":"sell","docs":["Sells tokens into a bonding curve.","For cashback coins, pass as remaining_accounts: [0] user_volume_accumulator,","[1] bonding_curve_v2. If provided and valid, creator_fee goes to user_volume_accumulator.","Otherwise, falls back to transferring creator_fee to creator_vault."],"discriminator":[51,230,133,164,1,127,131,173],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"fee_recipient","writable":true},{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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_user","writable":true},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"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]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"}],"args":[{"name":"amount","type":"u64"},{"name":"min_sol_output","type":"u64"}]},{"name":"sell_v2","discriminator":[93,246,130,60,231,233,64,178],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"base_mint"},{"name":"quote_mint"},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_recipient","writable":true},{"name":"associated_quote_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"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":"buyback_fee_recipient","writable":true},{"name":"associated_quote_buyback_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"buyback_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":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"base_mint"}]}},{"name":"associated_base_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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":"associated_quote_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"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","writable":true,"signer":true},{"name":"associated_base_user","writable":true},{"name":"associated_quote_user","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":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"name":"associated_creator_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator_vault"},{"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":"sharing_config","docs":["seeds; the account is intentionally not deserialized here because it may be uninitialized","for mints that have not created a fee sharing config. Handlers must check","`data_is_empty()` / owner before reading."],"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"base_mint"}],"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":"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":"associated_user_volume_accumulator","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":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"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]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"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":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[{"name":"amount","type":"u64"},{"name":"min_sol_output","type":"u64"}]},{"name":"set_creator","docs":["Allows Global::set_creator_authority to set the bonding curve creator from Metaplex metadata or input argument"],"discriminator":[254,148,255,112,207,142,170,165],"accounts":[{"name":"set_creator_authority","signer":true,"relations":["global"]},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"mint"},{"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":"mint"}],"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","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"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":"creator","type":"pubkey"}]},{"name":"set_mayhem_virtual_params","discriminator":[61,169,188,191,153,149,42,97],"accounts":[{"name":"sol_vault_authority","writable":true,"signer":true,"pda":{"seeds":[{"kind":"const","value":[115,111,108,45,118,97,117,108,116]}],"program":{"kind":"const","value":[5,42,229,215,167,218,167,36,166,234,176,167,41,84,145,133,90,212,160,103,22,96,103,76,78,3,69,89,128,61,101,163]}}},{"name":"mayhem_token_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"sol_vault_authority"},{"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":"mint"},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"token_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":"set_metaplex_creator","docs":["Syncs the bonding curve creator with the Metaplex metadata creator if it exists"],"discriminator":[138,96,174,217,48,85,197,246],"accounts":[{"name":"mint"},{"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":"mint"}],"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","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"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_params","docs":["Sets the global state parameters."],"discriminator":[27,234,178,52,147,2,187,141],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"initial_virtual_token_reserves","type":"u64"},{"name":"initial_virtual_sol_reserves","type":"u64"},{"name":"initial_real_token_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"fee_basis_points","type":"u64"},{"name":"withdraw_authority","type":"pubkey"},{"name":"enable_migrate","type":"bool"},{"name":"pool_migration_fee","type":"u64"},{"name":"creator_fee_basis_points","type":"u64"},{"name":"set_creator_authority","type":"pubkey"},{"name":"admin_set_creator_authority","type":"pubkey"}]},{"name":"set_reserved_fee_recipients","discriminator":[111,172,162,232,114,89,213,142],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","signer":true,"relations":["global"]},{"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":"set_virtual_quote_reserves","discriminator":[101,135,191,104,9,88,20,96],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"initial_virtual_quote_reserves","type":"u64"}]},{"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":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"enabled","type":"bool"}]},{"name":"toggle_create_v2","discriminator":[28,255,230,240,172,107,203,171],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"enabled","type":"bool"}]},{"name":"toggle_mayhem_mode","discriminator":[1,9,111,208,100,31,255,163],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"enabled","type":"bool"}]},{"name":"update_buyback_config","discriminator":[251,224,171,146,160,26,113,233],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"buyback_basis_points","type":{"option":"u64"}}]},{"name":"update_global_authority","discriminator":[227,181,74,196,208,21,97,213],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","signer":true,"relations":["global"]},{"name":"new_authority"},{"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":[]}],"accounts":[{"name":"BondingCurve","discriminator":[23,183,248,55,96,216,172,96]},{"name":"FeeConfig","discriminator":[143,52,146,187,219,123,76,155]},{"name":"Global","discriminator":[167,232,232,177,200,108,114,127]},{"name":"GlobalVolumeAccumulator","discriminator":[202,42,246,43,142,190,30,255]},{"name":"SharingConfig","discriminator":[216,74,9,0,56,140,93,75]},{"name":"UserVolumeAccumulator","discriminator":[86,255,112,14,102,53,154,250]}],"events":[{"name":"AdminSetCreatorEvent","discriminator":[64,69,192,104,29,30,25,107]},{"name":"AdminSetIdlAuthorityEvent","discriminator":[245,59,70,34,75,185,109,92]},{"name":"AdminUpdateTokenIncentivesEvent","discriminator":[147,250,108,120,247,29,67,222]},{"name":"ClaimCashbackEvent","discriminator":[226,214,246,33,7,242,147,229]},{"name":"ClaimTokenIncentivesEvent","discriminator":[79,172,246,49,205,91,206,232]},{"name":"CloseUserVolumeAccumulatorEvent","discriminator":[146,159,189,172,146,88,56,244]},{"name":"CollectCreatorFeeEvent","discriminator":[122,2,127,1,14,191,12,175]},{"name":"CompleteEvent","discriminator":[95,114,97,156,212,46,152,8]},{"name":"CompletePumpAmmMigrationEvent","discriminator":[189,233,93,185,92,148,234,148]},{"name":"CreateEvent","discriminator":[27,114,169,77,222,235,99,118]},{"name":"DistributeCreatorFeesEvent","discriminator":[165,55,129,112,4,179,202,40]},{"name":"ExtendAccountEvent","discriminator":[97,97,215,144,93,146,22,124]},{"name":"InitUserVolumeAccumulatorEvent","discriminator":[134,36,13,72,232,101,130,216]},{"name":"MigrateBondingCurveCreatorEvent","discriminator":[155,167,104,220,213,108,243,3]},{"name":"MinimumDistributableFeeEvent","discriminator":[168,216,132,239,235,182,49,52]},{"name":"ReservedFeeRecipientsEvent","discriminator":[43,188,250,18,221,75,187,95]},{"name":"SetCreatorEvent","discriminator":[237,52,123,37,245,251,72,210]},{"name":"SetMetaplexCreatorEvent","discriminator":[142,203,6,32,127,105,191,162]},{"name":"SetParamsEvent","discriminator":[223,195,159,246,62,48,143,131]},{"name":"SyncUserVolumeAccumulatorEvent","discriminator":[197,122,167,124,116,81,91,255]},{"name":"TradeEvent","discriminator":[189,219,127,211,78,230,97,238]},{"name":"UpdateGlobalAuthorityEvent","discriminator":[182,195,137,42,35,206,207,247]},{"name":"UpdateMayhemVirtualParamsEvent","discriminator":[117,123,228,182,161,168,220,214]}],"errors":[{"code":6000,"name":"NotAuthorized","msg":"The given account is not authorized to execute this instruction."},{"code":6001,"name":"AlreadyInitialized","msg":"The program is already initialized."},{"code":6002,"name":"TooMuchSolRequired","msg":"slippage: Too much SOL required to buy the given amount of tokens."},{"code":6003,"name":"TooLittleSolReceived","msg":"slippage: Too little SOL received to sell the given amount of tokens."},{"code":6004,"name":"MintDoesNotMatchBondingCurve","msg":"The mint does not match the bonding curve."},{"code":6005,"name":"BondingCurveComplete","msg":"The bonding curve has completed and liquidity migrated to raydium."},{"code":6006,"name":"BondingCurveNotComplete","msg":"The bonding curve has not completed."},{"code":6007,"name":"NotInitialized","msg":"The program is not initialized."},{"code":6008,"name":"WithdrawTooFrequent","msg":"Withdraw too frequent"},{"code":6009,"name":"NewSizeShouldBeGreaterThanCurrentSize","msg":"new_size should be > current_size"},{"code":6010,"name":"AccountTypeNotSupported","msg":"Account type not supported"},{"code":6011,"name":"InitialRealTokenReservesShouldBeLessThanTokenTotalSupply","msg":"initial_real_token_reserves should be less than token_total_supply"},{"code":6012,"name":"InitialVirtualTokenReservesShouldBeGreaterThanInitialRealTokenReserves","msg":"initial_virtual_token_reserves should be greater than initial_real_token_reserves"},{"code":6013,"name":"FeeBasisPointsGreaterThanMaximum","msg":"fee_basis_points greater than maximum"},{"code":6014,"name":"AllZerosWithdrawAuthority","msg":"Withdraw authority cannot be set to System Program ID"},{"code":6015,"name":"PoolMigrationFeeShouldBeLessThanFinalRealSolReserves","msg":"pool_migration_fee should be less than final_real_sol_reserves"},{"code":6016,"name":"PoolMigrationFeeShouldBeGreaterThanCreatorFeePlusMaxMigrateFees","msg":"pool_migration_fee should be greater than creator_fee + MAX_MIGRATE_FEES"},{"code":6017,"name":"DisabledWithdraw","msg":"Migrate instruction is disabled"},{"code":6018,"name":"DisabledMigrate","msg":"Migrate instruction is disabled"},{"code":6019,"name":"InvalidCreator","msg":"Invalid creator pubkey"},{"code":6020,"name":"BuyZeroAmount","msg":"Buy zero amount"},{"code":6021,"name":"NotEnoughTokensToBuy","msg":"Not enough tokens to buy"},{"code":6022,"name":"SellZeroAmount","msg":"Sell zero amount"},{"code":6023,"name":"NotEnoughTokensToSell","msg":"Not enough tokens to sell"},{"code":6024,"name":"Overflow","msg":"Overflow"},{"code":6025,"name":"Truncation","msg":"Truncation"},{"code":6026,"name":"DivisionByZero","msg":"Division by zero"},{"code":6027,"name":"NotEnoughRemainingAccounts","msg":"Not enough remaining accounts"},{"code":6028,"name":"AllFeeRecipientsShouldBeNonZero","msg":"All fee recipients should be non-zero"},{"code":6029,"name":"UnsortedNotUniqueFeeRecipients","msg":"Unsorted or not unique fee recipients"},{"code":6030,"name":"CreatorShouldNotBeZero","msg":"Creator should not be zero"},{"code":6031,"name":"StartTimeInThePast"},{"code":6032,"name":"EndTimeInThePast"},{"code":6033,"name":"EndTimeBeforeStartTime"},{"code":6034,"name":"TimeRangeTooLarge"},{"code":6035,"name":"EndTimeBeforeCurrentDay"},{"code":6036,"name":"SupplyUpdateForFinishedRange"},{"code":6037,"name":"DayIndexAfterEndIndex"},{"code":6038,"name":"DayInActiveRange"},{"code":6039,"name":"InvalidIncentiveMint"},{"code":6040,"name":"BuyNotEnoughSolToCoverRent","msg":"Buy: Not enough SOL to cover for rent exemption."},{"code":6041,"name":"BuyNotEnoughSolToCoverFees","msg":"Buy: Not enough SOL to cover for fees."},{"code":6042,"name":"BuySlippageBelowMinTokensOut","msg":"Slippage: Would buy less tokens than expected min_tokens_out"},{"code":6043,"name":"NameTooLong"},{"code":6044,"name":"SymbolTooLong"},{"code":6045,"name":"UriTooLong"},{"code":6046,"name":"CreateV2Disabled"},{"code":6047,"name":"CpitializeMayhemFailed"},{"code":6048,"name":"MayhemModeDisabled"},{"code":6049,"name":"CreatorMigratedToSharingConfig","msg":"creator has been migrated to sharing config, use pump_fees::reset_fee_sharing_config instead"},{"code":6050,"name":"UnableToDistributeCreatorVaultMigratedToSharingConfig","msg":"creator_vault has been migrated to sharing config, use pump:distribute_creator_fees instead"},{"code":6051,"name":"SharingConfigNotActive","msg":"Sharing config is not active"},{"code":6052,"name":"UnableToDistributeCreatorFeesToExecutableRecipient","msg":"The recipient account is executable, so it cannot receive lamports, remove it from the team first"},{"code":6053,"name":"BondingCurveAndSharingConfigCreatorMismatch","msg":"Bonding curve creator does not match sharing config"},{"code":6054,"name":"ShareholdersAndRemainingAccountsMismatch","msg":"Remaining accounts do not match shareholders, make sure to pass exactly the same pubkeys in the same order"},{"code":6055,"name":"InvalidShareBps","msg":"Share bps must be greater than 0"},{"code":6056,"name":"CashbackNotEnabled","msg":"Cashback is not enabled"},{"code":6057,"name":"BuybackFeeRecipientNotAuthorized","msg":"Buyback fee recipient not authorized"},{"code":6058,"name":"AllBuybackFeeRecipientsShouldBeNonZero"},{"code":6059,"name":"NotUniqueBuybackFeeRecipients"},{"code":6060,"name":"BuybackBasisPointsOutOfRange","msg":"buyback_basis_points must be <= 10_000"},{"code":6061,"name":"WrongBuybackFeeRecipientsCount","msg":"buyback fee recipients require exactly 8 remaining accounts (or none)"},{"code":6062,"name":"BuybackFeeRecipientMissing"},{"code":6063,"name":"UnsupportedQuoteMint","msg":"Unsupported quote mint"},{"code":6064,"name":"InvalidQuoteTokenProgram","msg":"Create v2: quote token program must be legacy SPL Token"},{"code":6065,"name":"InvalidAssociatedQuoteBondingCurve","msg":"Create v2: associated quote bonding curve address does not match derivation"},{"code":6066,"name":"QuoteMintWhitelistFull","msg":"Quote mint whitelist is full"},{"code":6067,"name":"QuoteMintAlreadyWhitelisted","msg":"Quote mint is already whitelisted"},{"code":6068,"name":"QuoteMintNotWhitelisted","msg":"Quote mint is not in the whitelist"},{"code":6069,"name":"QuoteMintNotEligibleForWhitelist","msg":"Quote mint cannot be added or removed via whitelist (default or native SOL mint)"},{"code":6070,"name":"UnableToDistributeCreatorFeesToUninitializedAccount","msg":"Unable to distribute creator fees to uninitialized account"},{"code":6071,"name":"MayhemModeQuoteMintNotAllowed","msg":"Mayhem mode quote mint not allowed"}],"types":[{"name":"AdminSetCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin_set_creator_authority","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"old_creator","type":"pubkey"},{"name":"new_creator","type":"pubkey"}]}},{"name":"AdminSetIdlAuthorityEvent","type":{"kind":"struct","fields":[{"name":"idl_authority","type":"pubkey"}]}},{"name":"AdminUpdateTokenIncentivesEvent","type":{"kind":"struct","fields":[{"name":"start_time","type":"i64"},{"name":"end_time","type":"i64"},{"name":"day_number","type":"u64"},{"name":"token_supply_per_day","type":"u64"},{"name":"mint","type":"pubkey"},{"name":"seconds_in_a_day","type":"i64"},{"name":"timestamp","type":"i64"}]}},{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"virtual_token_reserves","type":"u64"},{"name":"virtual_quote_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"real_quote_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"complete","type":"bool"},{"name":"creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_coin","type":"bool"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"ClaimCashbackEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"timestamp","type":"i64"},{"name":"total_claimed","type":"u64"},{"name":"total_cashback_earned","type":"u64"}]}},{"name":"ClaimTokenIncentivesEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"timestamp","type":"i64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"}]}},{"name":"CloseUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"}]}},{"name":"CollectCreatorFeeEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"creator","type":"pubkey"},{"name":"creator_fee","type":"u64"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"CompleteEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"CompletePumpAmmMigrationEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"mint_amount","type":"u64"},{"name":"sol_amount","type":"u64"},{"name":"pool_migration_fee","type":"u64"},{"name":"bonding_curve","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"pool","type":"pubkey"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"ConfigStatus","type":{"kind":"enum","variants":[{"name":"Paused"},{"name":"Active"}]}},{"name":"CreateEvent","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"virtual_token_reserves","type":"u64"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"token_program","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_enabled","type":"bool"},{"name":"quote_mint","type":"pubkey"},{"name":"virtual_quote_reserves","type":"u64"}]}},{"name":"DistributeCreatorFeesEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"sharing_config","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"distributed","type":"u64"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"ExtendAccountEvent","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"current_size","type":"u64"},{"name":"new_size","type":"u64"},{"name":"timestamp","type":"i64"}]}},{"name":"FeeConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"admin","type":"pubkey"},{"name":"flat_fees","type":{"defined":{"name":"Fees"}}},{"name":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"stable_fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}}]}},{"name":"FeeTier","type":{"kind":"struct","fields":[{"name":"market_cap_lamports_threshold","type":"u128"},{"name":"fees","type":{"defined":{"name":"Fees"}}}]}},{"name":"Fees","type":{"kind":"struct","fields":[{"name":"lp_fee_bps","type":"u64"},{"name":"protocol_fee_bps","type":"u64"},{"name":"creator_fee_bps","type":"u64"}]}},{"name":"Global","type":{"kind":"struct","fields":[{"name":"initialized","docs":["Unused"],"type":"bool"},{"name":"authority","type":"pubkey"},{"name":"fee_recipient","type":"pubkey"},{"name":"initial_virtual_token_reserves","type":"u64"},{"name":"initial_virtual_sol_reserves","type":"u64"},{"name":"initial_real_token_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"fee_basis_points","type":"u64"},{"name":"withdraw_authority","type":"pubkey"},{"name":"enable_migrate","docs":["Unused"],"type":"bool"},{"name":"pool_migration_fee","type":"u64"},{"name":"creator_fee_basis_points","type":"u64"},{"name":"fee_recipients","type":{"array":["pubkey",7]}},{"name":"set_creator_authority","type":"pubkey"},{"name":"admin_set_creator_authority","type":"pubkey"},{"name":"create_v2_enabled","type":"bool"},{"name":"whitelist_pda","type":"pubkey"},{"name":"reserved_fee_recipient","type":"pubkey"},{"name":"mayhem_mode_enabled","type":"bool"},{"name":"reserved_fee_recipients","type":{"array":["pubkey",7]}},{"name":"is_cashback_enabled","type":"bool"},{"name":"buyback_fee_recipients","type":{"array":["pubkey",8]}},{"name":"buyback_basis_points","type":"u64"},{"name":"initial_virtual_quote_reserves","type":"u64"},{"name":"whitelisted_quote_mints","type":{"array":["pubkey",1]}}]}},{"name":"GlobalVolumeAccumulator","type":{"kind":"struct","fields":[{"name":"start_time","type":"i64"},{"name":"end_time","type":"i64"},{"name":"seconds_in_a_day","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"total_token_supply","type":{"array":["u64",30]}},{"name":"sol_volumes","type":{"array":["u64",30]}}]}},{"name":"InitUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"payer","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"}]}},{"name":"MigrateBondingCurveCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"sharing_config","type":"pubkey"},{"name":"old_creator","type":"pubkey"},{"name":"new_creator","type":"pubkey"}]}},{"name":"MinimumDistributableFeeEvent","type":{"kind":"struct","fields":[{"name":"minimum_required","type":"u64"},{"name":"distributable_fees","type":"u64"},{"name":"can_distribute","type":"bool"}]}},{"name":"OptionBool","type":{"kind":"struct","fields":["bool"]}},{"name":"ReservedFeeRecipientsEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"reserved_fee_recipient","type":"pubkey"},{"name":"reserved_fee_recipients","type":{"array":["pubkey",7]}}]}},{"name":"SetCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"SetMetaplexCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"metadata","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"SetParamsEvent","type":{"kind":"struct","fields":[{"name":"initial_virtual_token_reserves","type":"u64"},{"name":"initial_virtual_sol_reserves","type":"u64"},{"name":"initial_real_token_reserves","type":"u64"},{"name":"final_real_sol_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"fee_basis_points","type":"u64"},{"name":"withdraw_authority","type":"pubkey"},{"name":"enable_migrate","type":"bool"},{"name":"pool_migration_fee","type":"u64"},{"name":"creator_fee_basis_points","type":"u64"},{"name":"fee_recipients","type":{"array":["pubkey",8]}},{"name":"timestamp","type":"i64"},{"name":"set_creator_authority","type":"pubkey"},{"name":"admin_set_creator_authority","type":"pubkey"}]}},{"name":"Shareholder","type":{"kind":"struct","fields":[{"name":"address","type":"pubkey"},{"name":"share_bps","type":"u16"}]}},{"name":"SharingConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"status","type":{"defined":{"name":"ConfigStatus"}}},{"name":"mint","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"admin_revoked","type":"bool"},{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}}]}},{"name":"SyncUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"total_claimed_tokens_before","type":"u64"},{"name":"total_claimed_tokens_after","type":"u64"},{"name":"timestamp","type":"i64"}]}},{"name":"TradeEvent","docs":["ix_name: \"buy\" | \"sell\" | \"buy_exact_sol_in\""],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"sol_amount","type":"u64"},{"name":"token_amount","type":"u64"},{"name":"is_buy","type":"bool"},{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"virtual_token_reserves","type":"u64"},{"name":"real_sol_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"fee_recipient","type":"pubkey"},{"name":"fee_basis_points","type":"u64"},{"name":"fee","type":"u64"},{"name":"creator","type":"pubkey"},{"name":"creator_fee_basis_points","type":"u64"},{"name":"creator_fee","type":"u64"},{"name":"track_volume","type":"bool"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"},{"name":"ix_name","type":"string"},{"name":"mayhem_mode","type":"bool"},{"name":"cashback_fee_basis_points","type":"u64"},{"name":"cashback","type":"u64"},{"name":"buyback_fee_basis_points","type":"u64"},{"name":"buyback_fee","type":"u64"},{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"quote_mint","type":"pubkey"},{"name":"quote_amount","type":"u64"},{"name":"virtual_quote_reserves","type":"u64"},{"name":"real_quote_reserves","type":"u64"}]}},{"name":"UpdateGlobalAuthorityEvent","type":{"kind":"struct","fields":[{"name":"global","type":"pubkey"},{"name":"authority","type":"pubkey"},{"name":"new_authority","type":"pubkey"},{"name":"timestamp","type":"i64"}]}},{"name":"UpdateMayhemVirtualParamsEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"virtual_token_reserves","type":"u64"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"new_virtual_token_reserves","type":"u64"},{"name":"new_virtual_sol_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"real_sol_reserves","type":"u64"}]}},{"name":"UserVolumeAccumulator","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"needs_claim","type":"bool"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"},{"name":"has_total_claimed_tokens","type":"bool"},{"name":"cashback_earned","type":"u64"},{"name":"total_cashback_claimed","type":"u64"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/pump_swap.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json b/olddocs/archivekbot2/idls/pump_swap.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json new file mode 100644 index 0000000..daf2337 --- /dev/null +++ b/olddocs/archivekbot2/idls/pump_swap.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json @@ -0,0 +1 @@ +{"address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA","metadata":{"name":"pump_amm","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"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","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":"enabled","type":"bool"}]},{"name":"toggle_mayhem_mode","discriminator":[1,9,111,208,100,31,255,163],"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":"enabled","type":"bool"}]},{"name":"transfer_creator_fees_to_pump","docs":["Transfer creator fees to pump creator vault","If coin creator fees are currently below rent.minimum_balance(TokenAccount::LEN)","The transfer will be skipped"],"discriminator":[139,52,134,85,228,229,108,241],"accounts":[{"name":"wsol_mint","docs":["Pump Canonical Pool are quoted in wSOL"]},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator"},{"name":"coin_creator_vault_authority","writable":true,"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":"token_program"},{"kind":"account","path":"wsol_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":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"coin_creator"}],"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":"transfer_creator_fees_to_pump_v2","discriminator":[1,33,78,185,33,67,44,92],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"quote_mint"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator"},{"name":"coin_creator_vault_authority","writable":true,"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":"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":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"coin_creator"}],"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":"pump_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"pump_creator_vault"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_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":"update_admin","discriminator":[161,176,40,213,60,184,179,228],"accounts":[{"name":"admin","signer":true,"relations":["global_config"]},{"name":"global_config","writable":true},{"name":"new_admin"},{"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":"update_buyback_config","discriminator":[251,224,171,146,160,26,113,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":"buyback_basis_points","type":{"option":"u64"}}]},{"name":"update_fee_config","discriminator":[104,184,103,242,88,151,107,20],"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":"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":"withdraw","discriminator":[183,18,70,156,148,109,161,34],"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_in","type":"u64"},{"name":"min_base_amount_out","type":"u64"},{"name":"min_quote_amount_out","type":"u64"}]}],"accounts":[{"name":"BondingCurve","discriminator":[23,183,248,55,96,216,172,96]},{"name":"FeeConfig","discriminator":[143,52,146,187,219,123,76,155]},{"name":"GlobalConfig","discriminator":[149,8,156,202,160,252,176,217]},{"name":"GlobalVolumeAccumulator","discriminator":[202,42,246,43,142,190,30,255]},{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"SharingConfig","discriminator":[216,74,9,0,56,140,93,75]},{"name":"UserVolumeAccumulator","discriminator":[86,255,112,14,102,53,154,250]}],"events":[{"name":"AdminSetCoinCreatorEvent","discriminator":[45,220,93,24,25,97,172,104]},{"name":"AdminUpdateTokenIncentivesEvent","discriminator":[147,250,108,120,247,29,67,222]},{"name":"BuyEvent","discriminator":[103,244,82,31,44,245,119,119]},{"name":"ClaimCashbackEvent","discriminator":[226,214,246,33,7,242,147,229]},{"name":"ClaimTokenIncentivesEvent","discriminator":[79,172,246,49,205,91,206,232]},{"name":"CloseUserVolumeAccumulatorEvent","discriminator":[146,159,189,172,146,88,56,244]},{"name":"CollectCoinCreatorFeeEvent","discriminator":[232,245,194,238,234,218,58,89]},{"name":"CreateConfigEvent","discriminator":[107,52,89,129,55,226,81,22]},{"name":"CreatePoolEvent","discriminator":[177,49,12,210,160,118,167,116]},{"name":"DepositEvent","discriminator":[120,248,61,83,31,142,107,144]},{"name":"DisableEvent","discriminator":[107,253,193,76,228,202,27,104]},{"name":"ExtendAccountEvent","discriminator":[97,97,215,144,93,146,22,124]},{"name":"InitUserVolumeAccumulatorEvent","discriminator":[134,36,13,72,232,101,130,216]},{"name":"MigratePoolCoinCreatorEvent","discriminator":[170,221,82,199,147,165,247,46]},{"name":"ReservedFeeRecipientsEvent","discriminator":[43,188,250,18,221,75,187,95]},{"name":"SellEvent","discriminator":[62,47,55,10,165,3,220,42]},{"name":"SetBondingCurveCoinCreatorEvent","discriminator":[242,231,235,102,65,99,189,211]},{"name":"SetMetaplexCoinCreatorEvent","discriminator":[150,107,199,123,124,207,102,228]},{"name":"SyncUserVolumeAccumulatorEvent","discriminator":[197,122,167,124,116,81,91,255]},{"name":"UpdateAdminEvent","discriminator":[225,152,171,87,246,63,66,234]},{"name":"UpdateFeeConfigEvent","discriminator":[90,23,65,35,62,244,188,208]},{"name":"WithdrawEvent","discriminator":[22,9,133,26,160,44,71,192]}],"errors":[{"code":6000,"name":"FeeBasisPointsExceedsMaximum"},{"code":6001,"name":"ZeroBaseAmount"},{"code":6002,"name":"ZeroQuoteAmount"},{"code":6003,"name":"TooLittlePoolTokenLiquidity"},{"code":6004,"name":"ExceededSlippage"},{"code":6005,"name":"InvalidAdmin"},{"code":6006,"name":"UnsupportedBaseMint"},{"code":6007,"name":"UnsupportedQuoteMint"},{"code":6008,"name":"InvalidBaseMint"},{"code":6009,"name":"InvalidQuoteMint"},{"code":6010,"name":"InvalidLpMint"},{"code":6011,"name":"AllProtocolFeeRecipientsShouldBeNonZero"},{"code":6012,"name":"UnsortedNotUniqueProtocolFeeRecipients"},{"code":6013,"name":"InvalidProtocolFeeRecipient"},{"code":6014,"name":"InvalidPoolBaseTokenAccount"},{"code":6015,"name":"InvalidPoolQuoteTokenAccount"},{"code":6016,"name":"BuyMoreBaseAmountThanPoolReserves"},{"code":6017,"name":"DisabledCreatePool"},{"code":6018,"name":"DisabledDeposit"},{"code":6019,"name":"DisabledWithdraw"},{"code":6020,"name":"DisabledBuy"},{"code":6021,"name":"DisabledSell"},{"code":6022,"name":"SameMint"},{"code":6023,"name":"Overflow"},{"code":6024,"name":"Truncation"},{"code":6025,"name":"DivisionByZero"},{"code":6026,"name":"NewSizeLessThanCurrentSize"},{"code":6027,"name":"AccountTypeNotSupported"},{"code":6028,"name":"OnlyCanonicalPumpPoolsCanHaveCoinCreator"},{"code":6029,"name":"InvalidAdminSetCoinCreatorAuthority"},{"code":6030,"name":"StartTimeInThePast"},{"code":6031,"name":"EndTimeInThePast"},{"code":6032,"name":"EndTimeBeforeStartTime"},{"code":6033,"name":"TimeRangeTooLarge"},{"code":6034,"name":"EndTimeBeforeCurrentDay"},{"code":6035,"name":"SupplyUpdateForFinishedRange"},{"code":6036,"name":"DayIndexAfterEndIndex"},{"code":6037,"name":"DayInActiveRange"},{"code":6038,"name":"InvalidIncentiveMint"},{"code":6039,"name":"BuyNotEnoughQuoteTokensToCoverFees","msg":"buy: Not enough quote tokens to cover for fees."},{"code":6040,"name":"BuySlippageBelowMinBaseAmountOut","msg":"buy: slippage - would buy less tokens than expected min_base_amount_out"},{"code":6041,"name":"MayhemModeDisabled"},{"code":6042,"name":"OnlyPumpPoolsMayhemMode"},{"code":6043,"name":"MayhemModeInDesiredState"},{"code":6044,"name":"NotEnoughRemainingAccounts"},{"code":6045,"name":"InvalidSharingConfigBaseMint"},{"code":6046,"name":"InvalidSharingConfigCoinCreator"},{"code":6047,"name":"CoinCreatorMigratedToSharingConfig","msg":"coin creator has been migrated to sharing config, use pump_fees::reset_fee_sharing_config instead"},{"code":6048,"name":"CreatorVaultMigratedToSharingConfig","msg":"creator_vault has been migrated to sharing config, use pump:distribute_creator_fees instead"},{"code":6049,"name":"CashbackNotEnabled","msg":"Cashback is disabled"},{"code":6050,"name":"OnlyPumpPoolsCashback"},{"code":6051,"name":"CashbackNotInDesiredState"},{"code":6052,"name":"TokensInVaultLessThanCashbackEarned"},{"code":6053,"name":"BuybackFeeRecipientNotAuthorized","msg":"Buyback fee recipient not authorized"},{"code":6054,"name":"AllBuybackFeeRecipientsShouldBeNonZero"},{"code":6055,"name":"NotUniqueBuybackFeeRecipients"},{"code":6056,"name":"BuybackBasisPointsOutOfRange","msg":"buyback_basis_points must be <= 10_000"},{"code":6057,"name":"WrongBuybackFeeRecipientsCount","msg":"buyback fee recipients require exactly 8 remaining accounts (or none)"},{"code":6058,"name":"BuybackFeeRecipientMissing"}],"types":[{"name":"AdminSetCoinCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin_set_coin_creator_authority","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"pool","type":"pubkey"},{"name":"old_coin_creator","type":"pubkey"},{"name":"new_coin_creator","type":"pubkey"}]}},{"name":"AdminUpdateTokenIncentivesEvent","type":{"kind":"struct","fields":[{"name":"start_time","type":"i64"},{"name":"end_time","type":"i64"},{"name":"day_number","type":"u64"},{"name":"token_supply_per_day","type":"u64"},{"name":"mint","type":"pubkey"},{"name":"seconds_in_a_day","type":"i64"},{"name":"timestamp","type":"i64"}]}},{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"virtual_token_reserves","type":"u64"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"real_sol_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"complete","type":"bool"},{"name":"creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_coin","type":"bool"}]}},{"name":"BuyEvent","docs":["ix_name: \"buy\" | \"buy_exact_quote_in\""],"type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"base_amount_out","type":"u64"},{"name":"max_quote_amount_in","type":"u64"},{"name":"user_base_token_reserves","type":"u64"},{"name":"user_quote_token_reserves","type":"u64"},{"name":"pool_base_token_reserves","type":"u64"},{"name":"pool_quote_token_reserves","type":"u64"},{"name":"quote_amount_in","type":"u64"},{"name":"lp_fee_basis_points","type":"u64"},{"name":"lp_fee","type":"u64"},{"name":"protocol_fee_basis_points","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"quote_amount_in_with_lp_fee","type":"u64"},{"name":"user_quote_amount_in","type":"u64"},{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"user_base_token_account","type":"pubkey"},{"name":"user_quote_token_account","type":"pubkey"},{"name":"protocol_fee_recipient","type":"pubkey"},{"name":"protocol_fee_recipient_token_account","type":"pubkey"},{"name":"coin_creator","type":"pubkey"},{"name":"coin_creator_fee_basis_points","type":"u64"},{"name":"coin_creator_fee","type":"u64"},{"name":"track_volume","type":"bool"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"},{"name":"min_base_amount_out","type":"u64"},{"name":"ix_name","type":"string"},{"name":"cashback_fee_basis_points","type":"u64"},{"name":"cashback","type":"u64"},{"name":"buyback_fee_basis_points","type":"u64"},{"name":"buyback_fee","type":"u64"}]}},{"name":"ClaimCashbackEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"timestamp","type":"i64"},{"name":"total_claimed","type":"u64"},{"name":"total_cashback_earned","type":"u64"}]}},{"name":"ClaimTokenIncentivesEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"timestamp","type":"i64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"}]}},{"name":"CloseUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"}]}},{"name":"CollectCoinCreatorFeeEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"coin_creator","type":"pubkey"},{"name":"coin_creator_fee","type":"u64"},{"name":"coin_creator_vault_ata","type":"pubkey"},{"name":"coin_creator_token_account","type":"pubkey"}]}},{"name":"ConfigStatus","type":{"kind":"enum","variants":[{"name":"Paused"},{"name":"Active"}]}},{"name":"CreateConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"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":"CreatePoolEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"index","type":"u16"},{"name":"creator","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"base_mint_decimals","type":"u8"},{"name":"quote_mint_decimals","type":"u8"},{"name":"base_amount_in","type":"u64"},{"name":"quote_amount_in","type":"u64"},{"name":"pool_base_amount","type":"u64"},{"name":"pool_quote_amount","type":"u64"},{"name":"minimum_liquidity","type":"u64"},{"name":"initial_liquidity","type":"u64"},{"name":"lp_token_amount_out","type":"u64"},{"name":"pool_bump","type":"u8"},{"name":"pool","type":"pubkey"},{"name":"lp_mint","type":"pubkey"},{"name":"user_base_token_account","type":"pubkey"},{"name":"user_quote_token_account","type":"pubkey"},{"name":"coin_creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"}]}},{"name":"DepositEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"lp_token_amount_out","type":"u64"},{"name":"max_base_amount_in","type":"u64"},{"name":"max_quote_amount_in","type":"u64"},{"name":"user_base_token_reserves","type":"u64"},{"name":"user_quote_token_reserves","type":"u64"},{"name":"pool_base_token_reserves","type":"u64"},{"name":"pool_quote_token_reserves","type":"u64"},{"name":"base_amount_in","type":"u64"},{"name":"quote_amount_in","type":"u64"},{"name":"lp_mint_supply","type":"u64"},{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"user_base_token_account","type":"pubkey"},{"name":"user_quote_token_account","type":"pubkey"},{"name":"user_pool_token_account","type":"pubkey"}]}},{"name":"DisableEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"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":"ExtendAccountEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"account","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"current_size","type":"u64"},{"name":"new_size","type":"u64"}]}},{"name":"FeeConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"admin","type":"pubkey"},{"name":"flat_fees","type":{"defined":{"name":"Fees"}}},{"name":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"stable_fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}}]}},{"name":"FeeTier","type":{"kind":"struct","fields":[{"name":"market_cap_lamports_threshold","type":"u128"},{"name":"fees","type":{"defined":{"name":"Fees"}}}]}},{"name":"Fees","type":{"kind":"struct","fields":[{"name":"lp_fee_bps","type":"u64"},{"name":"protocol_fee_bps","type":"u64"},{"name":"creator_fee_bps","type":"u64"}]}},{"name":"GlobalConfig","type":{"kind":"struct","fields":[{"name":"admin","docs":["The admin pubkey"],"type":"pubkey"},{"name":"lp_fee_basis_points","type":"u64"},{"name":"protocol_fee_basis_points","type":"u64"},{"name":"disable_flags","docs":["Flags to disable certain functionality","bit 0 - Disable create pool","bit 1 - Disable deposit","bit 2 - Disable withdraw","bit 3 - Disable buy","bit 4 - Disable sell"],"type":"u8"},{"name":"protocol_fee_recipients","docs":["Addresses of the protocol fee recipients"],"type":{"array":["pubkey",8]}},{"name":"coin_creator_fee_basis_points","type":"u64"},{"name":"admin_set_coin_creator_authority","docs":["The admin authority for setting coin creators"],"type":"pubkey"},{"name":"whitelist_pda","type":"pubkey"},{"name":"reserved_fee_recipient","type":"pubkey"},{"name":"mayhem_mode_enabled","type":"bool"},{"name":"reserved_fee_recipients","type":{"array":["pubkey",7]}},{"name":"is_cashback_enabled","type":"bool"},{"name":"buyback_fee_recipients","type":{"array":["pubkey",8]}},{"name":"buyback_basis_points","type":"u64"}]}},{"name":"GlobalVolumeAccumulator","type":{"kind":"struct","fields":[{"name":"start_time","type":"i64"},{"name":"end_time","type":"i64"},{"name":"seconds_in_a_day","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"total_token_supply","type":{"array":["u64",30]}},{"name":"sol_volumes","type":{"array":["u64",30]}}]}},{"name":"InitUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"payer","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"}]}},{"name":"MigratePoolCoinCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"base_mint","type":"pubkey"},{"name":"pool","type":"pubkey"},{"name":"sharing_config","type":"pubkey"},{"name":"old_coin_creator","type":"pubkey"},{"name":"new_coin_creator","type":"pubkey"}]}},{"name":"OptionBool","type":{"kind":"struct","fields":["bool"]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"pool_bump","type":"u8"},{"name":"index","type":"u16"},{"name":"creator","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"lp_mint","type":"pubkey"},{"name":"pool_base_token_account","type":"pubkey"},{"name":"pool_quote_token_account","type":"pubkey"},{"name":"lp_supply","docs":["True circulating supply without burns and lock-ups"],"type":"u64"},{"name":"coin_creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_coin","type":"bool"}]}},{"name":"ReservedFeeRecipientsEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"reserved_fee_recipient","type":"pubkey"},{"name":"reserved_fee_recipients","type":{"array":["pubkey",7]}}]}},{"name":"SellEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"base_amount_in","type":"u64"},{"name":"min_quote_amount_out","type":"u64"},{"name":"user_base_token_reserves","type":"u64"},{"name":"user_quote_token_reserves","type":"u64"},{"name":"pool_base_token_reserves","type":"u64"},{"name":"pool_quote_token_reserves","type":"u64"},{"name":"quote_amount_out","type":"u64"},{"name":"lp_fee_basis_points","type":"u64"},{"name":"lp_fee","type":"u64"},{"name":"protocol_fee_basis_points","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"quote_amount_out_without_lp_fee","type":"u64"},{"name":"user_quote_amount_out","type":"u64"},{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"user_base_token_account","type":"pubkey"},{"name":"user_quote_token_account","type":"pubkey"},{"name":"protocol_fee_recipient","type":"pubkey"},{"name":"protocol_fee_recipient_token_account","type":"pubkey"},{"name":"coin_creator","type":"pubkey"},{"name":"coin_creator_fee_basis_points","type":"u64"},{"name":"coin_creator_fee","type":"u64"},{"name":"cashback_fee_basis_points","type":"u64"},{"name":"cashback","type":"u64"},{"name":"buyback_fee_basis_points","type":"u64"},{"name":"buyback_fee","type":"u64"}]}},{"name":"SetBondingCurveCoinCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"base_mint","type":"pubkey"},{"name":"pool","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"coin_creator","type":"pubkey"}]}},{"name":"SetMetaplexCoinCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"base_mint","type":"pubkey"},{"name":"pool","type":"pubkey"},{"name":"metadata","type":"pubkey"},{"name":"coin_creator","type":"pubkey"}]}},{"name":"Shareholder","type":{"kind":"struct","fields":[{"name":"address","type":"pubkey"},{"name":"share_bps","type":"u16"}]}},{"name":"SharingConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"status","type":{"defined":{"name":"ConfigStatus"}}},{"name":"mint","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"admin_revoked","type":"bool"},{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}}]}},{"name":"SyncUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"total_claimed_tokens_before","type":"u64"},{"name":"total_claimed_tokens_after","type":"u64"},{"name":"timestamp","type":"i64"}]}},{"name":"UpdateAdminEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"new_admin","type":"pubkey"}]}},{"name":"UpdateFeeConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"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":"UserVolumeAccumulator","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"needs_claim","type":"bool"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"},{"name":"has_total_claimed_tokens","type":"bool"},{"name":"cashback_earned","type":"u64"},{"name":"total_cashback_claimed","type":"u64"}]}},{"name":"WithdrawEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"lp_token_amount_in","type":"u64"},{"name":"min_base_amount_out","type":"u64"},{"name":"min_quote_amount_out","type":"u64"},{"name":"user_base_token_reserves","type":"u64"},{"name":"user_quote_token_reserves","type":"u64"},{"name":"pool_base_token_reserves","type":"u64"},{"name":"pool_quote_token_reserves","type":"u64"},{"name":"base_amount_out","type":"u64"},{"name":"quote_amount_out","type":"u64"},{"name":"lp_mint_supply","type":"u64"},{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"user_base_token_account","type":"pubkey"},{"name":"user_quote_token_account","type":"pubkey"},{"name":"user_pool_token_account","type":"pubkey"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/pumpup.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.json b/olddocs/archivekbot2/idls/pumpup.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.json new file mode 100644 index 0000000..3230b1d --- /dev/null +++ b/olddocs/archivekbot2/idls/pumpup.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.json @@ -0,0 +1 @@ +{"address":"PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd","metadata":{"name":"pumpup","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_liquidity","discriminator":[181,157,89,67,143,182,52,72],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_a_vault","docs":["CHECK"],"writable":true},{"name":"token_b_vault","docs":["CHECK"],"writable":true},{"name":"lp_mint","docs":["CHECK"],"writable":true},{"name":"user_token_a","writable":true},{"name":"user_token_b","writable":true},{"name":"user_lp_token","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"user","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"},{"name":"minimum_lp_tokens","type":"u64"}]},{"name":"buy","discriminator":[102,6,61,18,1,218,235,234],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint"},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"ai_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"config"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"pumpup_fee","writable":true},{"name":"user_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"token_amount","type":"u64"},{"name":"max_sol_amount","type":"u64"}]},{"name":"create","discriminator":[24,30,200,40,5,28,7,119],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"metadata_account","writable":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"create_leverage","discriminator":[71,62,173,225,174,65,205,227],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"metadata_account","writable":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"feed","discriminator":[46,213,237,176,190,113,182,94],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint"},{"name":"original","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,111,114,105,103,105,110,97,108,46,100,97,116,97]},{"kind":"account","path":"mint"}]}},{"name":"migration_address","writable":true,"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":"datas","type":{"array":["f64",33]}}]},{"name":"inference","discriminator":[1,249,84,211,187,82,82,51],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint"},{"name":"original","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,111,114,105,103,105,110,97,108,46,100,97,116,97]},{"kind":"account","path":"mint"}]}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"migration_address","writable":true,"signer":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":"period","type":"u64"}]},{"name":"init_ai_token","discriminator":[195,26,226,86,175,143,32,58],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint"},{"name":"ai_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"config"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize","discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"fee_address","docs":["CHECK"],"writable":true},{"name":"migration_address","docs":["CHECK"],"writable":true},{"name":"mint_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority_address","writable":true,"signer":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"fee_rate","type":"u64"}]},{"name":"initialize_divide","discriminator":[82,21,35,146,161,99,102,28],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_b_mint"},{"name":"fee_address"},{"name":"fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_address"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_b_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":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"fee_rate","type":"u16"}]},{"name":"initialize_lp_token","discriminator":[124,21,221,232,250,37,120,35],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"lp_mint","docs":["LP代币Mint账户 - 用于铸造流动性提供者代币"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,108,112,95,109,105,110,116]},{"kind":"account","path":"pool"}]}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"initialize_pool","discriminator":[95,180,10,172,84,174,232,40],"accounts":[{"name":"pool","docs":["新的流动性池账户"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"token_a_mint"},{"kind":"account","path":"token_b_mint"}]}},{"name":"token_a_mint","docs":["代币A的Mint账户"]},{"name":"token_b_mint","docs":["代币B的Mint账户(USDT)"]},{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"fee_address"},{"name":"fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_address"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_b_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":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"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":"initialize_tokena","discriminator":[209,97,45,4,27,32,11,205],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_a_mint","docs":["代币Mint账户"]},{"name":"token_a_vault","docs":["代币的保险库账户 - 存储池中的对应代币A"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"token_a_mint"}]}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"initialize_tokenb","discriminator":[218,101,38,193,111,170,244,254],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_b_mint","docs":["代币B的Mint账户(USDT)"]},{"name":"token_b_vault","docs":["代币的保险库账户 - 存储池中的对应代币A"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"token_b_mint"}]}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"migrate_pool","discriminator":[55,170,171,123,210,69,39,172],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_b_mint"},{"name":"fee_address2"},{"name":"fee_recipient2","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_address2"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_b_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":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"quick_create","discriminator":[127,6,145,127,36,205,4,225],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"metadata_account","writable":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"quick_create_leverage","discriminator":[24,2,81,246,97,77,131,127],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"metadata_account","writable":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"remove_liquidity","docs":["移除流动性"],"discriminator":[80,85,209,72,24,206,177,108],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_a_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"pool.token_a_mint","account":"Pool"}]}},{"name":"token_b_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,108,112,95,109,105,110,116]},{"kind":"account","path":"pool"}]}},{"name":"user_token_a","writable":true},{"name":"user_token_b","writable":true},{"name":"user_lp_token","writable":true},{"name":"user","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"minimum_token_a","type":"u64"},{"name":"minimum_token_b","type":"u64"}]},{"name":"sell","discriminator":[51,230,133,164,1,127,131,173],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint"},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"ai_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"config"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"pumpup_fee","writable":true},{"name":"user_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"token_amount","type":"u64"},{"name":"min_sol_amount","type":"u64"}]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_a_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"pool.token_a_mint","account":"Pool"}]}},{"name":"token_b_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"fee_recipient_token","writable":true},{"name":"fee_recipient_token2","writable":true},{"name":"user","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"withdraw","discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint","writable":true},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"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":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"ai_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"config"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"pumpup_fee","writable":true},{"name":"to_sol_account","writable":true,"signer":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"launch_account","writable":true},{"name":"launch_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"launch_account"},{"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":"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":"pumpup_migration_amount","type":"u64"}]}],"accounts":[{"name":"AIOriginalDataAccount","discriminator":[125,158,65,141,197,244,39,160]},{"name":"BondingCurve","discriminator":[23,183,248,55,96,216,172,96]},{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"PumpupConfiguration","discriminator":[36,175,125,65,27,3,84,217]}],"events":[{"name":"CreateMintEvent","discriminator":[239,193,191,44,156,194,85,141]},{"name":"FeedEvent","discriminator":[250,174,105,83,244,245,23,11]},{"name":"MintLeverageEvent","discriminator":[64,149,175,150,7,170,9,69]},{"name":"RWAInitEvent","discriminator":[171,102,39,251,156,173,88,8]},{"name":"RWATradeEvent","discriminator":[163,38,91,101,120,148,151,90]},{"name":"TradeEvent","discriminator":[189,219,127,211,78,230,97,238]}],"errors":[{"code":6000,"name":"InvalidAmount","msg":"Invalid amount provided"},{"code":6001,"name":"InvalidFeeRecipient","msg":"Invalid fee recipient"},{"code":6002,"name":"InsufficientLiquidity","msg":"Insufficient liquidity in the pool"},{"code":6003,"name":"SlippageExceeded","msg":"Slippage tolerance exceeded"},{"code":6004,"name":"InvalidTokenMint","msg":"Invalid token mint"},{"code":6005,"name":"DuplicateTokens","msg":"Duplicate tokens"},{"code":6006,"name":"InvalidTokenAVault","msg":"Invalid token_a_vault account"},{"code":6007,"name":"InvalidTokenBVault","msg":"Invalid token_b_vault account"},{"code":6008,"name":"InvalidLpMint","msg":"Invalid lp_mint account"},{"code":6009,"name":"PoolPaused","msg":"Pool is paused"},{"code":6010,"name":"Unauthorized","msg":"Unauthorized access"},{"code":6011,"name":"InvalidFeeRate","msg":"Invalid fee rate"},{"code":6012,"name":"PoolAlreadyExists","msg":"Pool already exists"},{"code":6013,"name":"MathOverflow","msg":"Mathematical overflow"},{"code":6014,"name":"InvalidLpTokenAmount","msg":"Invalid LP token amount"},{"code":6015,"name":"MinimumLiquidityNotMet","msg":"Minimum liquidity not met"},{"code":6016,"name":"TokenBMustBeUsdt","msg":"Token B must be USDT"},{"code":6017,"name":"InvalidPayer","msg":"Invalid payer"}],"types":[{"name":"AIOriginalDataAccount","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"period","type":"u64"},{"name":"period_done","type":"bool"},{"name":"regulated","type":"bool"},{"name":"sol","type":"f64"},{"name":"datas","type":{"array":["f64",42]}}]}},{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"launch_token_surplus","type":"u64"},{"name":"virtual_sol","type":"u64"},{"name":"real_sol","type":"u64"},{"name":"pool_sol_reserves","type":"u64"},{"name":"pool_token_reserves","type":"u64"},{"name":"current_leverage_index","type":"u8"},{"name":"leverage","type":{"vec":{"array":["u64",3]}}}]}},{"name":"CreateMintEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"pool_sol_address","type":"pubkey"},{"name":"pool_token_address","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"launch_token_surplus","type":"u64"},{"name":"pool_sol_reserves","type":"u64"},{"name":"pool_token_reserves","type":"u64"},{"name":"is_leverage","type":"bool"}]}},{"name":"FeedEvent","type":{"kind":"struct","fields":[{"name":"period","type":"u64"}]}},{"name":"InitProgress","type":{"kind":"enum","variants":[{"name":"START"},{"name":"COMPLETED"}]}},{"name":"MintLeverageEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"period","type":"u64"},{"name":"regulated","type":"bool"},{"name":"timestamp","type":"i64"},{"name":"launch_token_surplus","type":"u64"},{"name":"pool_sol_reserves","type":"u64"},{"name":"pool_token_reserves","type":"u64"},{"name":"leverage","type":{"vec":{"array":["u64",3]}}}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"token_a_mint","docs":["代币A的mint地址"],"type":"pubkey"},{"name":"token_b_mint","docs":["代币B的mint地址(USDT)"],"type":"pubkey"},{"name":"token_a_vault","docs":["代币A金库账户"],"type":"pubkey"},{"name":"token_b_vault","docs":["代币B金库账户"],"type":"pubkey"},{"name":"lp_mint","docs":["LP代币mint"],"type":"pubkey"},{"name":"fee_recipient","docs":["手续费接收地址"],"type":"pubkey"},{"name":"token_a_reserve","docs":["代币A储备量"],"type":"u64"},{"name":"token_b_reserve","docs":["代币B储备量"],"type":"u64"},{"name":"lp_token_supply","docs":["LP代币总供应量"],"type":"u64"},{"name":"fee_rate","docs":["手续费率(基点,100=1%)"],"type":"u16"},{"name":"bump","docs":["PDA bump"],"type":"u8"},{"name":"fee_recipient2","type":"pubkey"},{"name":"fee_rate2","docs":["分润比(基点,100=1%)"],"type":"u16"}]}},{"name":"PumpupConfiguration","serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"fee_rate","type":"u64"},{"name":"authority_address","type":"pubkey"},{"name":"fee_address","type":"pubkey"},{"name":"migration_address","type":"pubkey"}]}},{"name":"RWAInitEvent","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"init_progress","type":{"defined":{"name":"InitProgress"}}},{"name":"token_a_mint","type":"pubkey"},{"name":"token_b_mint","type":"pubkey"},{"name":"token_a_vault","type":"pubkey"},{"name":"token_b_vault","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"lp_mint","type":"pubkey"},{"name":"fee_recipient","type":"pubkey"},{"name":"token_a_reserve","type":"u64"},{"name":"token_b_reserve","type":"u64"},{"name":"lp_token_supply","type":"u64"},{"name":"fee_rate","type":"u16"}]}},{"name":"RWATradeEvent","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"event_type","type":{"defined":{"name":"TradeEventType"}}},{"name":"token_a_mint","type":"pubkey"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_mint","type":"pubkey"},{"name":"token_b_amount","type":"u64"},{"name":"fee_amount","type":"u64"},{"name":"user","type":"pubkey"},{"name":"pool_tokena_reserves","type":"u64"},{"name":"pool_tokenb_reserves","type":"u64"},{"name":"timestamp","type":"i64"}]}},{"name":"TradeEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"sol_amount","type":"u64"},{"name":"token_amount","type":"u64"},{"name":"ai_token_amount","type":"u64"},{"name":"event_type","type":{"defined":{"name":"TradeEventType"}}},{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"pumpup_fee","type":"u64"},{"name":"pool_real_sol_amount","type":"u64"},{"name":"pool_sol_reserves","type":"u64"},{"name":"pool_token_reserves","type":"u64"}]}},{"name":"TradeEventType","type":{"kind":"enum","variants":[{"name":"BUY"},{"name":"SELL"},{"name":"WITHDRAW"},{"name":"RwaBuy"},{"name":"RwaSell"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/raydium_clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.json b/olddocs/archivekbot2/idls/raydium_clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.json new file mode 100644 index 0000000..de07bf6 --- /dev/null +++ b/olddocs/archivekbot2/idls/raydium_clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.json @@ -0,0 +1 @@ +{"address":"CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK","metadata":{"name":"raydium_clmm","version":"0.1.0","spec":"0.1.0","description":"Anchor client and source for Raydium concentrated liquidity AMM"},"instructions":[{"name":"close_limit_order","docs":["Close a limit order","Closes the limit order account when unfilled amount is zero","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[76,124,128,15,213,87,37,250],"accounts":[{"name":"signer","signer":true},{"name":"rent_receiver","writable":true},{"name":"limit_order","writable":true}],"args":[]},{"name":"close_position","docs":["Close the user's position and NFT account. If the NFT mint belongs to token2022, it will also be closed and the funds returned to the NFT owner.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"nft_owner","docs":["The position nft owner"],"writable":true,"signer":true},{"name":"position_nft_mint","docs":["Mint address bound to the personal position."],"writable":true},{"name":"position_nft_account","docs":["User token account where position NFT be minted to"],"writable":true},{"name":"personal_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"system_program","docs":["System program to close the position state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Token/Token2022 program to close token/mint account"]}],"args":[]},{"name":"close_protocol_position","docs":["The CLMM protocol decides to discard the protocol position account, which can reduce users' opening costs.","After the original protocol position account is closed, the gas fee will be refunded to the user who created it.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[201,117,152,144,85,85,108,178],"accounts":[{"name":"admin","writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"protocol_position","writable":true}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"owner","docs":["Only admin or fund_owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"owner","docs":["Only admin or config owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_remaining_rewards","docs":["Collect remaining reward token for reward founder","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - the index to reward info",""],"discriminator":[18,237,166,197,34,16,213,144],"accounts":[{"name":"reward_funder","docs":["The founder who init reward info previously"],"signer":true},{"name":"funder_token_account","docs":["The funder's reward token account"],"writable":true},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"reward_token_vault","docs":["Reward vault transfer remaining token to founder token account"],"writable":true},{"name":"reward_vault_mint","docs":["The mint of reward token vault"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"create_amm_config","docs":["# Arguments","","* `ctx` - The accounts needed by instruction.","* `index` - The index of amm config, there may be multiple config.","* `tick_spacing` - The tickspacing binding with config, cannot be changed.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within trade fee.","* `fund_fee_rate` - The rate of fund fee within trade fee.","* `limit_fee_rate` - The rate of limit order fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"amm_config","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"trade_fee_rate","type":"u32"},{"name":"protocol_fee_rate","type":"u32"},{"name":"fund_fee_rate","type":"u32"}]},{"name":"create_customizable_pool","docs":["Creates a pool for the given token pair with customizable parameters","","# Arguments","","* `ctx` - The context of accounts","* `customizable_params` - the customizable parameters",""],"discriminator":[43,68,212,167,89,47,164,1],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool"],"writable":true,"signer":true},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"customizable_params","type":{"defined":{"name":"CreateCustomizableParams"}}}]},{"name":"create_dynamic_fee_config","docs":["Create dynamic fee config","","# Arguments","","* `ctx` - The context of accounts","* `index` - The index of dynamic fee config","* `filter_period` - The period of filter","* `decay_period` - The period of decay","* `reduction_factor` - The reduction factor","* `adaptive_fee_control_factor` - The adaptive fee control factor","* `max_volatility_accumulator` - The max volatility accumulator","* `tick_group_size` - The tick group size"],"discriminator":[189,14,181,120,85,118,227,62],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"dynamic_fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,121,110,97,109,105,99,95,102,101,101,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"dynamic_fee_control","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"}]},{"name":"create_operation_account","docs":["Creates an operation account for the program","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[63,87,148,33,109,35,8,104],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_pool","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx` - The context of accounts","* `sqrt_price_x64` - the initial sqrt price (amount_token_1 / amount_token_0) of the pool as a Q64.64","Note: The open_time must be smaller than the current block_timestamp on chain."],"discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"sqrt_price_x64","type":"u128"},{"name":"open_time","type":"u64"}]},{"name":"create_support_mint_associated","docs":["Create support token22 mint account which can create pool and send rewards while ignoring unsupported extensions."],"discriminator":[17,251,65,92,136,242,14,169],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true},{"name":"token_mint","docs":["Support token mint"]},{"name":"support_mint_associated","docs":["Initialize support mint state account to store support mint address and bump."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,117,112,112,111,114,116,95,109,105,110,116]},{"kind":"account","path":"token_mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"decrease_limit_order","docs":["Decrease/Cancel a limit order","First settle the filled portion of the order; only the remaining unfilled amount can be decreased.","Even if the specified amount is very large, the decrease will not exceed the remaining unfilled order amount.","It is recommended to call the `settle_limit_order` instruction before invoking this instruction to settle any filled portions of the order.","Make sure to check your order's remaining unfilled amount.","# Arguments","","* `ctx` - The context of accounts","* `amount` - The decrease amount of the order,","* `amount_min` - The minimum amount of the order, which serves as a slippage check",""],"discriminator":[117,157,60,103,66,49,163,0],"accounts":[{"name":"owner","signer":true},{"name":"pool_state","writable":true},{"name":"tick_array","writable":true},{"name":"limit_order","writable":true},{"name":"input_token_account","docs":["The payer's limit order token account"],"writable":true},{"name":"output_token_account","docs":["The owner's output token account (opposite direction from input)"],"writable":true},{"name":"input_vault","docs":["The address that holds limit order token"],"writable":true},{"name":"output_vault","docs":["The address that holds output tokens"],"writable":true},{"name":"input_vault_mint","docs":["The mint of token vault"]},{"name":"output_vault_mint","docs":["The mint of output vault"]},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount","type":"u64"},{"name":"amount_min","type":"u64"}]},{"name":"decrease_liquidity","docs":["#[deprecated(note = \"Use `decrease_liquidity_v2` instead.\")]","Decreases liquidity for an existing position","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[160,38,208,111,104,91,44,1],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"decrease_liquidity_v2","docs":["Decreases liquidity for an existing position, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[58,127,188,62,79,82,196,96],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"increase_limit_order","docs":["Increase a limit order","","# Arguments","","* `ctx` - The context of accounts","* `amount` - The increase amount of the order","* `is_increase` - The direction of the order, true: increase, false: decrease",""],"discriminator":[177,144,89,236,250,186,125,99],"accounts":[{"name":"owner","signer":true},{"name":"pool_state"},{"name":"tick_array","writable":true},{"name":"limit_order","writable":true},{"name":"input_token_account","docs":["The payer's limit order token account"],"writable":true},{"name":"input_vault","docs":["The address that holds limit order token"],"writable":true},{"name":"input_vault_mint","docs":["The mint of token vault"]},{"name":"input_token_program","docs":["SPL-TOKEN / SPL-TOKEN2022 program for token transfers"]}],"args":[{"name":"amount","type":"u64"}]},{"name":"increase_liquidity","docs":["#[deprecated(note = \"Use `increase_liquidity_v2` instead.\")]","Increases liquidity for an existing position, with amount paid by `payer`","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, can't be zero","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[46,156,243,118,13,205,251,178],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"increase_liquidity_v2","docs":["Increases liquidity for an existing position, with amount paid by `payer`, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, if zero, calculate liquidity base amount_0 or amount_1 according base_flag","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `base_flag` - must be specified if liquidity is zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[133,29,89,223,69,238,176,10],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"initialize_reward","docs":["Initialize a reward info for a given pool and reward index","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - the index to reward info","* `open_time` - reward open timestamp","* `end_time` - reward end timestamp","* `emissions_per_second_x64` - Token reward per second are earned per unit of liquidity.",""],"discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"reward_funder","docs":["The founder deposit reward token to vault"],"writable":true,"signer":true},{"name":"funder_token_account","writable":true},{"name":"amm_config","docs":["For check the reward_funder authority"]},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"reward_token_mint","docs":["Reward mint"]},{"name":"reward_token_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,114,101,119,97,114,100,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_token_mint"}]}},{"name":"reward_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"param","type":{"defined":{"name":"InitializeRewardParam"}}}]},{"name":"open_limit_order","docs":["Place a limit order","# Arguments","","* `ctx` - The context of accounts","* `nonce_index` - The limit order nonce account index, used to create user's order nonce PDA account.","* `zero_for_one` - The direction of the order, true: zero for one, false: one for zero","* `tick_index` - The index of the tick","* `amount` - The amount of the order","* `with_metadata` - The flag indicating whether to create NFT mint metadata",""],"discriminator":[157,32,218,183,71,29,18,147],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"pool_state","docs":["The pool"],"writable":true},{"name":"tick_array","writable":true},{"name":"limit_order_nonce","docs":["The order nonce account PDA"],"writable":true},{"name":"limit_order","docs":["The order account PDA"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"limit_order_nonce"},{"kind":"account","path":"limit_order_nonce.order_nonce","account":"LimitOrderNonce"}]}},{"name":"input_token_account","docs":["The payer's limit order token account"],"writable":true},{"name":"input_vault","docs":["The address that holds limit order token"],"writable":true},{"name":"input_vault_mint","docs":["The mint of token vault"]},{"name":"input_token_program","docs":["SPL-TOKEN / SPL-TOKEN2022 program for input token transfers"]},{"name":"system_program","docs":["SPL program for system operations"],"address":"11111111111111111111111111111111"}],"args":[{"name":"nonce_index","type":"u8"},{"name":"zero_for_one","type":"bool"},{"name":"tick_index","type":"i32"},{"name":"amount","type":"u64"}]},{"name":"open_position","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which includes tick low","* `tick_array_upper_start_index` - The start index of tick array which includes tick upper","* `liquidity` - The liquidity to be added","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[135,128,47,77,15,152,240,49],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted","This account created in the contract by cpi to avoid large stack variables"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_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":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"open_position_v2","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which includes tick low","* `tick_array_upper_start_index` - The start index of tick array which includes tick upper","* `liquidity` - The liquidity to be added, if zero, and the base_flag is specified, calculate liquidity base amount_0_max or amount_1_max according base_flag, otherwise open position with zero liquidity","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,184,74,214,112,86,241,199],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_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":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program_2022","docs":["Program to create mint account and mint tokens"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"open_position_with_token22_nft","docs":["Creates a new position wrapped in a Token2022 NFT without relying on metadata_program and metadata_account, reduce the cost for user to create a personal position.","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which includes tick low","* `tick_array_upper_start_index` - The start index of tick array which includes tick upper","* `liquidity` - The liquidity to be added, if zero, and the base_flag is specified, calculate liquidity base amount_0_max or amount_1_max according base_flag, otherwise open position with zero liquidity","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,255,174,82,125,29,201,46],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address, initialize in contract"],"writable":true,"signer":true},{"name":"position_nft_account","writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to transfer for token account"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program_2022","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"set_reward_params","docs":["Reset reward param, start a new reward cycle or extend the current cycle.","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - The index of reward token in the pool.","* `emissions_per_second_x64` - The per second emission reward, when extend the current cycle,","new value can't be less than old value","* `open_time` - reward open timestamp, must be set when starting a new cycle","* `end_time` - reward end timestamp",""],"discriminator":[112,52,167,75,32,201,211,137],"accounts":[{"name":"authority","docs":["Address to be set as protocol owner. It pays to create factory state account."],"signer":true},{"name":"amm_config"},{"name":"pool_state","writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"token_program","docs":["Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"},{"name":"open_time","type":"u64"},{"name":"end_time","type":"u64"}]},{"name":"settle_limit_order","docs":["Settle a limit order","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[205,78,116,33,92,105,26,96],"accounts":[{"name":"signer","signer":true},{"name":"pool_state"},{"name":"tick_array"},{"name":"limit_order","writable":true},{"name":"output_token_account","docs":["The owner's output token account (opposite direction from input)"],"writable":true},{"name":"output_vault","docs":["The address that holds output tokens"],"writable":true},{"name":"output_vault_mint","docs":["The mint of output vault"]},{"name":"output_token_program","docs":["SPL-TOKEN / SPL-TOKEN2022 program for token transfers"]}],"args":[]},{"name":"swap","docs":["#[deprecated(note = \"Use `swap_v2` instead.\")]","Swaps one token for as much as possible of another token across a single pool","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"tick_array","writable":true}],"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":"swap_router_base_in","docs":["Swap token for as much as possible of another token across the path provided, base input","","# Arguments","","* `ctx` - The context of accounts","* `amount_in` - Token amount to be swapped in","* `amount_out_minimum` - Panic if output amount is below minimum amount. For slippage.",""],"discriminator":[69,125,115,218,245,186,242,196],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"input_token_account","docs":["The token account that pays input tokens for the swap"],"writable":true},{"name":"input_token_mint","docs":["The mint of input token"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"amount_in","type":"u64"},{"name":"amount_out_minimum","type":"u64"}]},{"name":"swap_v2","docs":["Swaps one token for as much as possible of another token across a single pool, support token program 2022","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"input_vault_mint","docs":["The mint of token vault 0"]},{"name":"output_vault_mint","docs":["The mint of token vault 1"]}],"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":"transfer_reward_owner","docs":["Transfer reward owner","","# Arguments","","* `ctx` - The context of accounts","* `new_owner` - new owner pubkey",""],"discriminator":[7,22,12,83,242,43,48,121],"accounts":[{"name":"authority","docs":["Address to be set as operation account owner."],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"pool_state","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"update_amm_config","docs":["Updates the owner of the amm config","Must be called by the current owner or admin","","# Arguments","","* `ctx` - The context of accounts","* `trade_fee_rate` - The new trade fee rate of amm config, be set when `param` is 0","* `protocol_fee_rate` - The new protocol fee rate of amm config, be set when `param` is 1","* `fund_fee_rate` - The new fund fee rate of amm config, be set when `param` is 2","* `new_owner` - The config's new owner, be set when `param` is 3","* `new_fund_owner` - The config's new fund owner, be set when `param` is 4","* `limit_protocol_fee_rate` - The new limit protocol fee rate of amm config, be set when `param` is 5","* `limit_fund_fee_rate` - The new limit fund fee rate of amm config, be set when `param` is 6","* `param` - The value can be 0 | 1 | 2 | 3 | 4 | 5 | 6, otherwise will report an error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The amm config owner or admin"],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"amm_config","docs":["Amm config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u32"}]},{"name":"update_dynamic_fee_config","docs":["Updates the dynamic fee configuration constants.","","This function allows updating the parameters that control dynamic fee calculation,","such as filter period, decay period, reduction factor, fee control factor, etc.","Only the admin or the amm config owner can update these settings.","","# Arguments","","* `ctx` - The context of accounts","* `filter_period` - Period that determines the high frequency trading time window (in seconds)","* `decay_period` - Period that determines when the dynamic fee starts to decrease (in seconds)","* `reduction_factor` - Dynamic fee rate decrement rate, used for volatility reference decay","* `dynamic_fee_control` - Factor used to scale the dynamic fee component","* `max_volatility_accumulator` - Maximum value for the volatility accumulator","* `create_pool_authority` - The new authority pubkey that can use this dynamic fee config to create pools"],"discriminator":[7,7,80,8,2,199,132,240],"accounts":[{"name":"owner","docs":["The admin has permission to update the config"],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"dynamic_fee_config","docs":["The dynamic fee config account to be updated"],"writable":true}],"args":[{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"dynamic_fee_control","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"}]},{"name":"update_operation_account","docs":["Update the operation account","","# Arguments","","* `ctx` - The context of accounts","* `param` - The value can be 0 | 1 | 2 | 3, otherwise will report an error","* `keys`- update operation owner when the `param` is 0","remove operation owner when the `param` is 1","update whitelist mint when the `param` is 2","remove whitelist mint when the `param` is 3",""],"discriminator":[127,70,119,40,188,227,61,7],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"param","type":"u8"},{"name":"keys","type":{"vec":"pubkey"}}]},{"name":"update_pool_status","docs":["Update pool status for given value","","# Arguments","","* `ctx` - The context of accounts","* `status` - The value of status",""],"discriminator":[130,87,108,6,46,224,117,123],"accounts":[{"name":"authority","signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"pool_state","writable":true}],"args":[{"name":"status","type":"u8"}]},{"name":"update_reward_infos","docs":["Update rewards info of the given pool, can be called for everyone","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[163,172,224,52,11,154,106,223],"accounts":[{"name":"pool_state","docs":["The liquidity pool for which reward info to update"],"writable":true}],"args":[]}],"accounts":[{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"DynamicFeeConfig","discriminator":[244,226,88,82,14,59,246,220]},{"name":"LimitOrderNonce","discriminator":[17,153,236,57,25,199,231,248]},{"name":"LimitOrderState","discriminator":[1,238,5,142,207,62,44,228]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"OperationState","discriminator":[19,236,58,237,81,222,183,252]},{"name":"PersonalPositionState","discriminator":[70,111,150,126,230,15,25,117]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"ProtocolPositionState","discriminator":[100,226,145,99,146,218,160,106]},{"name":"SupportMintAssociated","discriminator":[134,40,183,79,12,112,162,53]},{"name":"TickArrayBitmapExtension","discriminator":[60,150,36,219,97,128,139,153]},{"name":"TickArrayState","discriminator":[192,155,85,205,49,249,129,42]}],"events":[{"name":"CollectPersonalFeeEvent","discriminator":[166,174,105,192,81,161,83,105]},{"name":"CollectProtocolFeeEvent","discriminator":[206,87,17,79,45,41,213,61]},{"name":"ConfigChangeEvent","discriminator":[247,189,7,119,106,112,95,151]},{"name":"CreatePersonalPositionEvent","discriminator":[100,30,87,249,196,223,154,206]},{"name":"DecreaseLimitOrderEvent","discriminator":[70,48,40,221,219,237,212,163]},{"name":"DecreaseLiquidityEvent","discriminator":[58,222,86,58,68,50,85,56]},{"name":"IncreaseLimitOrderEvent","discriminator":[11,120,13,204,199,87,19,200]},{"name":"IncreaseLiquidityEvent","discriminator":[49,79,105,212,32,34,30,84]},{"name":"LiquidityCalculateEvent","discriminator":[237,112,148,230,57,84,180,162]},{"name":"LiquidityChangeEvent","discriminator":[126,240,175,206,158,88,153,107]},{"name":"OpenLimitOrderEvent","discriminator":[106,24,71,85,57,169,158,216]},{"name":"PoolCreatedEvent","discriminator":[25,94,75,47,112,99,53,63]},{"name":"SettleLimitOrderEvent","discriminator":[88,119,77,164,125,124,10,194]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"UpdateRewardInfosEvent","discriminator":[109,127,186,78,114,65,37,236]}],"errors":[{"code":6000,"name":"NotApproved","msg":"Not approved"},{"code":6001,"name":"InvalidUpdateConfigFlag","msg":"invalid update amm config flag"},{"code":6002,"name":"AccountLack","msg":"Account lack"},{"code":6003,"name":"ClosePositionErr","msg":"Remove liquidity, collect fees owed and reward then you can close position account"},{"code":6004,"name":"InvalidTickIndex","msg":"Tick out of range"},{"code":6005,"name":"TickInvalidOrder","msg":"The lower tick must be below the upper tick"},{"code":6006,"name":"TickLowerOverflow","msg":"The tick must be greater, or equal to the minimum tick(-443636)"},{"code":6007,"name":"TickUpperOverflow","msg":"The tick must be lesser than, or equal to the maximum tick(443636)"},{"code":6008,"name":"TickAndSpacingNotMatch","msg":"tick % tick_spacing must be zero"},{"code":6009,"name":"InvalidTickArray","msg":"Invalid tick array account"},{"code":6010,"name":"InvalidTickArrayBoundary","msg":"Invalid tick array boundary"},{"code":6011,"name":"SqrtPriceLimitOverflow","msg":"Square root price limit overflow"},{"code":6012,"name":"SqrtPriceX64","msg":"sqrt_price_x64 out of range"},{"code":6013,"name":"LiquiditySubValueErr","msg":"Liquidity sub delta L must be smaller than before"},{"code":6014,"name":"LiquidityAddValueErr","msg":"Liquidity add delta L must be greater, or equal to before"},{"code":6015,"name":"ForbidBothZeroForSupplyLiquidity","msg":"Both token amount must not be zero while supply liquidity"},{"code":6016,"name":"LiquidityInsufficient","msg":"Liquidity insufficient"},{"code":6017,"name":"PriceSlippageCheck","msg":"Price slippage check"},{"code":6018,"name":"TooLittleOutputReceived","msg":"Too little output received"},{"code":6019,"name":"TooMuchInputPaid","msg":"Too much input paid"},{"code":6020,"name":"ZeroAmountSpecified","msg":"Swap special amount can not be zero"},{"code":6021,"name":"InvalidInputPoolVault","msg":"Input pool vault is invalid"},{"code":6022,"name":"TooSmallInputOrOutputAmount","msg":"Swap input or output amount is too small"},{"code":6023,"name":"NotEnoughTickArrayAccount","msg":"Not enough tick array account"},{"code":6024,"name":"InvalidFirstTickArrayAccount","msg":"Invalid first tick array account"},{"code":6025,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6026,"name":"FullRewardInfo","msg":"The init reward token reach to the max"},{"code":6027,"name":"RewardTokenAlreadyInUse","msg":"The init reward token already in use"},{"code":6028,"name":"ExceptRewardMint","msg":"The reward tokens must contain one of pool vault mint except the last reward"},{"code":6029,"name":"InvalidRewardInitParam","msg":"Invalid reward init param"},{"code":6030,"name":"InvalidRewardInputAccountNumber","msg":"Invalid collect reward input account number"},{"code":6031,"name":"InvalidRewardPeriod","msg":"Invalid reward period"},{"code":6032,"name":"NotApproveUpdateRewardEmissions","msg":"Modification of emissions is allowed within 72 hours from the end of the previous cycle"},{"code":6033,"name":"UnInitializedRewardInfo","msg":"uninitialized reward info"},{"code":6034,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6035,"name":"MissingTickArrayBitmapExtensionAccount","msg":"Missing tickarray bitmap extension account"},{"code":6036,"name":"InsufficientLiquidityForDirection","msg":"Insufficient liquidity for this direction"},{"code":6037,"name":"MaxTokenOverflow","msg":"Max token overflow"},{"code":6038,"name":"CalculateOverflow","msg":"Calculate overflow"},{"code":6039,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"},{"code":6040,"name":"OrderAlreadyFilled","msg":"Order already fully filled, cannot modify"},{"code":6041,"name":"InvalidOrderPhase","msg":"Invalid order phase"},{"code":6042,"name":"InvalidLimitOrderAmount","msg":"Invalid limit order amount"},{"code":6043,"name":"OrderPhaseSaturated","msg":"Tick order phase saturated"},{"code":6044,"name":"InvalidDynamicFeeConfigParams","msg":"Invalid dynamic fee config params"},{"code":6045,"name":"InvalidFeeOn","msg":"Invalid fee on which token (must be 0, 1, or 2)"},{"code":6046,"name":"ZeroSqrtPrice","msg":"sqrt_price_x64 must be greater than 0"},{"code":6047,"name":"ZeroLiquidity","msg":"liquidity must be greater than 0"},{"code":6048,"name":"MissingBaseFlag","msg":"base_flag is required when liquidity is zero"},{"code":6049,"name":"MissingMintAccount","msg":"Mint account is required but not provided"},{"code":6050,"name":"MissingTokenProgram2022","msg":"Token-2022 program is required but not provided"}],"types":[{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"index","type":"u16"},{"name":"owner","docs":["Address of the protocol owner"],"type":"pubkey"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u32"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"tick_spacing","docs":["The tick spacing"],"type":"u16"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"padding_u32","type":"u32"},{"name":"fund_owner","docs":["The fund owner"],"type":"pubkey"},{"name":"padding","type":{"array":["u64",3]}}]}},{"name":"CollectFeeOn","type":{"kind":"enum","variants":[{"name":"FromInput"},{"name":"Token0Only"},{"name":"Token1Only"}]}},{"name":"CollectPersonalFeeEvent","docs":["Emitted when tokens are collected for a position"],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which underlying tokens were collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The token account that received the collected token_0 tokens"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The token account that received the collected token_1 tokens"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 owed to the position that was collected"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 owed to the position that was collected"],"type":"u64"}]}},{"name":"CollectProtocolFeeEvent","docs":["Emitted when the collected protocol fees are withdrawn by the factory owner"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool whose protocol fee is collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"}]}},{"name":"ConfigChangeEvent","docs":["Emitted when create or update a config"],"type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"owner","type":"pubkey"},{"name":"protocol_fee_rate","type":"u32"},{"name":"trade_fee_rate","type":"u32"},{"name":"tick_spacing","type":"u16"},{"name":"fund_fee_rate","type":"u32"},{"name":"fund_owner","type":"pubkey"}]}},{"name":"CreateCustomizableParams","type":{"kind":"struct","fields":[{"name":"sqrt_price_x64","type":"u128"},{"name":"collect_fee_on","type":{"defined":{"name":"CollectFeeOn"}}},{"name":"enable_dynamic_fee","type":"bool"}]}},{"name":"CreatePersonalPositionEvent","docs":["Emitted when create a new position"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which liquidity was added"],"type":"pubkey"},{"name":"minter","docs":["The address that create the position"],"type":"pubkey"},{"name":"nft_owner","docs":["The owner of the position and recipient of any minted liquidity"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity minted to the position range"],"type":"u128"},{"name":"deposit_amount_0","docs":["The amount of token_0 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_1","docs":["The amount of token_1 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_0_transfer_fee","docs":["The token transfer fee for deposit_amount_0"],"type":"u64"},{"name":"deposit_amount_1_transfer_fee","docs":["The token transfer fee for deposit_amount_1"],"type":"u64"}]}},{"name":"DecreaseLimitOrderEvent","type":{"kind":"struct","fields":[{"name":"pool_id","docs":["The pool whose limit order was decreased"],"type":"pubkey"},{"name":"limit_order","docs":["The limit order account"],"type":"pubkey"},{"name":"zero_for_one","docs":["Direction of the limit order (true if zero_for_one)"],"type":"bool"},{"name":"tick_index","docs":["Tick index of the limit order"],"type":"i32"},{"name":"total_amount","docs":["Total amount of the limit order"],"type":"u64"},{"name":"filled_amount","docs":["Filled amount of the limit order"],"type":"u64"},{"name":"settled_output_amount","docs":["Amount of output tokens settled (excluding fees)"],"type":"u64"},{"name":"decreased_amount","docs":["Amount of input tokens returned to user"],"type":"u64"}]}},{"name":"DecreaseLiquidityEvent","docs":["Emitted when liquidity is decreased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was decreased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the position was decreased"],"type":"u128"},{"name":"decrease_amount_0","docs":["The amount of token_0 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"decrease_amount_1","docs":["The amount of token_1 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"fee_amount_0","type":"u64"},{"name":"fee_amount_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"reward_amounts","docs":["The amount of rewards"],"type":{"array":["u64",3]}},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee"],"type":"u64"}]}},{"name":"DynamicFeeConfig","type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"dynamic_fee_control","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"DynamicFeeInfo","docs":["Dynamic fee information for pool configuration"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"filter_period","docs":["Period that determines the high frequency trading time window (in seconds)."],"type":"u16"},{"name":"decay_period","docs":["Period that determines when the dynamic fee starts to decrease (in seconds)."],"type":"u16"},{"name":"reduction_factor","docs":["Dynamic fee rate decrement rate, used for volatility reference decay."],"type":"u16"},{"name":"dynamic_fee_control","docs":["Factor used to scale the dynamic fee component in the fee rate calculation."],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum value for the volatility accumulator, used to cap the dynamic fee rate."],"type":"u32"},{"name":"tick_spacing_index_reference","docs":["Active tick spacing index at the last reference update."],"type":"i32"},{"name":"volatility_reference","docs":["Volatility reference value, stores the decayed volatility accumulator."],"type":"u32"},{"name":"volatility_accumulator","docs":["Volatility accumulator, used to calculate the dynamic fee rate."],"type":"u32"},{"name":"last_update_timestamp","docs":["Last timestamp (block time) when `volatility_reference` and `tick_spacing_index_reference` were updated."],"type":"u64"},{"name":"padding","docs":["Reserved for future upgrades."],"type":{"array":["u8",46]}}]}},{"name":"IncreaseLimitOrderEvent","type":{"kind":"struct","fields":[{"name":"pool_id","docs":["The pool whose limit order was increased"],"type":"pubkey"},{"name":"limit_order","docs":["The limit order account"],"type":"pubkey"},{"name":"zero_for_one","docs":["Direction of the limit order (true if zero_for_one)"],"type":"bool"},{"name":"tick_index","docs":["Tick index of the limit order"],"type":"i32"},{"name":"total_amount","docs":["Total amount of the limit order"],"type":"u64"},{"name":"increased_amount","docs":["Increased amount of the limit order"],"type":"u64"},{"name":"transfer_fee","docs":["Transfer fee of the limit order"],"type":"u64"}]}},{"name":"IncreaseLiquidityEvent","docs":["Emitted when liquidity is increased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was increased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the NFT position was increased"],"type":"u128"},{"name":"amount_0","docs":["The amount of token_0 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_0_transfer_fee","docs":["The token transfer fee for amount_0"],"type":"u64"},{"name":"amount_1_transfer_fee","docs":["The token transfer fee for amount_1"],"type":"u64"}]}},{"name":"InitializeRewardParam","type":{"kind":"struct","fields":[{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Token reward per second are earned per unit of liquidity"],"type":"u128"}]}},{"name":"LimitOrderNonce","type":{"kind":"struct","fields":[{"name":"user_wallet","type":"pubkey"},{"name":"nonce_index","type":"u8"},{"name":"order_nonce","type":"u64"},{"name":"padding","type":{"array":["u64",4]}}]}},{"name":"LimitOrderState","type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"owner","docs":["Owner of this limit order"],"type":"pubkey"},{"name":"tick_index","type":"i32"},{"name":"zero_for_one","type":"bool"},{"name":"order_phase","docs":["Order phase of this limit order, aligned with `TickState.order_phase` for FIFO semantics"],"type":"u64"},{"name":"total_amount","docs":["Total amount of the limit order"],"type":"u64"},{"name":"filled_amount","docs":["Filled amount of the limit order (informational, for events/display)"],"type":"u64"},{"name":"settle_base","docs":["The unfilled amount when the current computation segment started.","Set to total_amount on open, reset on decrease. Never updated during settle —","this avoids cascading floor-division error across multiple settles."],"type":"u64"},{"name":"settled_output","docs":["Cumulative output paid to user in the current segment. Reset on decrease.","Each settle computes total_output from the segment base and pays the diff","(total_output - settled_output), limiting dust deduction to once per segment."],"type":"u64"},{"name":"open_time","docs":["Order open time"],"type":"u64"},{"name":"unfilled_ratio_x64","docs":["Snapshot of `TickState.unfilled_ratio_x64` at the time this segment started (Q64.64).","Initialized to Q64 on open; reset to tick's current ratio on decrease."],"type":"u128"},{"name":"padding","type":{"array":["u64",4]}}]}},{"name":"LiquidityCalculateEvent","docs":["Emitted when liquidity decreased or increase."],"type":{"kind":"struct","fields":[{"name":"pool_liquidity","docs":["The pool liquidity before decrease or increase"],"type":"u128"},{"name":"pool_sqrt_price_x64","docs":["The pool price when decrease or increase in liquidity"],"type":"u128"},{"name":"pool_tick","docs":["The pool tick when decrease or increase in liquidity"],"type":"i32"},{"name":"calc_amount_0","docs":["The amount of token_0 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"calc_amount_1","docs":["The amount of token_1 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"trade_fee_owed_0","type":"u64"},{"name":"trade_fee_owed_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee without trade_fee_amount_0"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee without trade_fee_amount_0"],"type":"u64"}]}},{"name":"LiquidityChangeEvent","docs":["Emitted pool liquidity change when increase and decrease liquidity"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for swap"],"type":"pubkey"},{"name":"tick","docs":["The tick of the pool"],"type":"i32"},{"name":"tick_lower","docs":["The tick lower of position"],"type":"i32"},{"name":"tick_upper","docs":["The tick lower of position"],"type":"i32"},{"name":"liquidity_before","docs":["The liquidity of the pool before liquidity change"],"type":"u128"},{"name":"liquidity_after","docs":["The liquidity of the pool after liquidity change"],"type":"u128"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u32"},{"name":"tick_cumulative","docs":["the cumulative of tick during the duration time"],"type":"i64"},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is initialized"],"type":"bool"},{"name":"recent_epoch","docs":["recent update epoch"],"type":"u64"},{"name":"observation_index","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","docs":["belongs to which pool"],"type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"OpenLimitOrderEvent","docs":["Emitted when a limit order is opened"],"type":{"kind":"struct","fields":[{"name":"pool_id","docs":["The pool whose limit order was opened"],"type":"pubkey"},{"name":"limit_order","docs":["The limit order account"],"type":"pubkey"},{"name":"zero_for_one","docs":["Direction of the limit order (true if zero_for_one)"],"type":"bool"},{"name":"tick_index","docs":["Tick index of the limit order"],"type":"i32"},{"name":"total_amount","docs":["Total amount of the limit order"],"type":"u64"},{"name":"transfer_fee","docs":["Transfer fee of the limit order"],"type":"u64"}]}},{"name":"OperationState","docs":["Holds the current owner of the factory"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"operation_owners","docs":["Address of the operation owner"],"type":{"array":["pubkey",10]}},{"name":"whitelist_mints","docs":["The mint address of whitelist to emit reward"],"type":{"array":["pubkey",100]}}]}},{"name":"PersonalPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"nft_mint","docs":["Mint address of the tokenized position"],"type":"pubkey"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0, as of the last computation"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1, as of the last computation"],"type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"PositionRewardInfo"}},3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"PoolCreatedEvent","docs":["Emitted when a pool is created and initialized with a starting price",""],"type":{"kind":"struct","fields":[{"name":"token_mint_0","docs":["The first token of the pool by address sort order"],"type":"pubkey"},{"name":"token_mint_1","docs":["The second token of the pool by address sort order"],"type":"pubkey"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"pool_state","docs":["The address of the created pool"],"type":"pubkey"},{"name":"sqrt_price_x64","docs":["The initial sqrt price of the pool, as a Q64.64"],"type":"u128"},{"name":"tick","docs":["The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool"],"type":"i32"},{"name":"token_vault_0","docs":["Vault of token_0"],"type":"pubkey"},{"name":"token_vault_1","docs":["Vault of token_1"],"type":"pubkey"}]}},{"name":"PoolState","docs":["The pool state","","PDA of `[POOL_SEED, config, token_mint_0, token_mint_1]`",""],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"amm_config","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"token_mint_0","docs":["Token pair of the pool, where token_mint_0 address < token_mint_1 address"],"type":"pubkey"},{"name":"token_mint_1","type":"pubkey"},{"name":"token_vault_0","docs":["Token pair vault"],"type":"pubkey"},{"name":"token_vault_1","type":"pubkey"},{"name":"observation_key","docs":["observation account key"],"type":"pubkey"},{"name":"mint_decimals_0","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_decimals_1","type":"u8"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"liquidity","docs":["The currently in range liquidity available to the pool."],"type":"u128"},{"name":"sqrt_price_x64","docs":["The current price of the pool as a sqrt(token_1/token_0) Q64.64 value"],"type":"u128"},{"name":"tick_current","docs":["The current tick of the pool, i.e. according to the last tick transition that was run."],"type":"i32"},{"name":"padding3","type":"u16"},{"name":"padding4","type":"u16"},{"name":"fee_growth_global_0_x64","docs":["The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per","unit of liquidity for the entire life of the pool."],"type":"u128"},{"name":"fee_growth_global_1_x64","type":"u128"},{"name":"protocol_fees_token_0","docs":["The amounts of token_0 and token_1 that are owed to the protocol."],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"padding5","type":{"array":["u128",4]}},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable open position and increase liquidity, 0: normal","bit1, 1: disable decrease liquidity, 0: normal","bit2, 1: disable collect fee, 0: normal","bit3, 1: disable collect reward, 0: normal","bit4, 1: disable swap, 0: normal","bit5, 1: disable limit order, 0: normal"],"type":"u8"},{"name":"fee_on","docs":["Fee on which token (0 = FromInput, 1 = Token0Only, 2 = Token1Only)"],"type":"u8"},{"name":"padding","docs":["Leave blank for future use"],"type":{"array":["u8",6]}},{"name":"reward_infos","type":{"array":[{"defined":{"name":"RewardInfo"}},3]}},{"name":"tick_array_bitmap","docs":["Packed initialized tick array state"],"type":{"array":["u64",16]}},{"name":"padding6","type":{"array":["u64",4]}},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"recent_epoch","type":"u64"},{"name":"dynamic_fee_info","docs":["Dynamic fee info"],"type":{"defined":{"name":"DynamicFeeInfo"}}},{"name":"padding1","type":{"array":["u64",14]}},{"name":"padding2","type":{"array":["u64",32]}}]}},{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growth_inside_last_x64","type":"u128"},{"name":"reward_amount_owed","type":"u64"}]}},{"name":"ProtocolPositionState","docs":["Info stored for each user's position"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1"],"type":"u64"},{"name":"reward_growth_inside","docs":["The reward growth per unit of liquidity as of the last update to liquidity"],"type":{"array":["u128",3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"RewardInfo","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"reward_state","docs":["Reward state"],"type":"u8"},{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"last_update_time","docs":["Reward last update time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Q64.64 number indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"reward_total_emitted","docs":["The total amount of reward emitted"],"type":"u64"},{"name":"reward_claimed","docs":["The total amount of claimed reward"],"type":"u64"},{"name":"token_mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"token_vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"authority","docs":["The owner that has permission to set reward param"],"type":"pubkey"},{"name":"reward_growth_global_x64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"SettleLimitOrderEvent","docs":["Emitted when a limit order is settled and proceeds are transferred"],"type":{"kind":"struct","fields":[{"name":"pool_id","docs":["The pool whose limit order was settled"],"type":"pubkey"},{"name":"limit_order","docs":["The limit order account"],"type":"pubkey"},{"name":"zero_for_one","docs":["Direction of the limit order (true if zero_for_one)"],"type":"bool"},{"name":"tick_index","docs":["Tick index of the limit order"],"type":"i32"},{"name":"total_amount","docs":["Total amount of the limit order"],"type":"u64"},{"name":"filled_amount","docs":["Filled amount of the limit order"],"type":"u64"},{"name":"settled_amount_out","docs":["Amount of output tokens transferred (excluding fees)"],"type":"u64"}]}},{"name":"SupportMintAssociated","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"mint","docs":["Address of the supported token22 mint"],"type":"pubkey"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"SwapEvent","docs":["Emitted by when a swap is performed for a pool"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which token_0 and token_1 were swapped"],"type":"pubkey"},{"name":"sender","docs":["The address that initiated the swap call, and that received the callback"],"type":"pubkey"},{"name":"token_account_0","docs":["The payer token account in zero for one swaps, or the recipient token account","in one for zero swaps"],"type":"pubkey"},{"name":"token_account_1","docs":["The payer token account in one for zero swaps, or the recipient token account","in zero for one swaps"],"type":"pubkey"},{"name":"amount_0","docs":["The real delta amount of the token_0 of the pool or user"],"type":"u64"},{"name":"transfer_fee_0","docs":["The transfer fee charged by the withheld_amount of the token_0"],"type":"u64"},{"name":"amount_1","docs":["The real delta of the token_1 of the pool or user"],"type":"u64"},{"name":"transfer_fee_1","docs":["The transfer fee charged by the withheld_amount of the token_1"],"type":"u64"},{"name":"zero_for_one","docs":["if true, amount_0 is negtive and amount_1 is positive"],"type":"bool"},{"name":"sqrt_price_x64","docs":["The sqrt(price) of the pool after the swap, as a Q64.64"],"type":"u128"},{"name":"liquidity","docs":["The liquidity of the pool after the swap"],"type":"u128"},{"name":"tick","docs":["The log base 1.0001 of price of the pool after the swap"],"type":"i32"},{"name":"trade_fee_0","docs":["Total AMM trade fee (lp + protocol + fund) charged in token_0 during this swap"],"type":"u64"},{"name":"trade_fee_1","docs":["Total AMM trade fee (lp + protocol + fund) charged in token_1 during this swap"],"type":"u64"}]}},{"name":"TickArrayBitmapExtension","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"positive_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is positive"],"type":{"array":[{"array":["u64",8]},14]}},{"name":"negative_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is negitive"],"type":{"array":[{"array":["u64",8]},14]}}]}},{"name":"TickArrayState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"start_tick_index","type":"i32"},{"name":"ticks","type":{"array":[{"defined":{"name":"TickState"}},60]}},{"name":"initialized_tick_count","type":"u8"},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u8",107]}}]}},{"name":"TickState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"tick","type":"i32"},{"name":"liquidity_net","docs":["Amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left)"],"type":"i128"},{"name":"liquidity_gross","docs":["The total position liquidity that references this tick"],"type":"u128"},{"name":"fee_growth_outside_0_x64","docs":["Fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)","only has relative meaning, not absolute — the value depends on when the tick is initialized"],"type":"u128"},{"name":"fee_growth_outside_1_x64","type":"u128"},{"name":"reward_growths_outside_x64","docs":["Reward growth per unit of liquidity like fee, array of Q64.64"],"type":{"array":["u128",3]}},{"name":"order_phase","docs":["Order phase of the tick, used as a FIFO cohort index for limit orders"],"type":"u64"},{"name":"orders_amount","docs":["The amount of limit orders that have never been matched,","only counts newly opened orders, not partially filled ones"],"type":"u64"},{"name":"part_filled_orders_remaining","docs":["Remaining part filled orders amount"],"type":"u64"},{"name":"unfilled_ratio_x64","docs":["Cumulative unfilled ratio for the current part-filled cohort (Q64.64 format).","Starts at Q64(1) when a new cohort forms, multiplied down as fills occur."],"type":"u128"},{"name":"padding","type":{"array":["u32",3]}}]}},{"name":"UpdateRewardInfosEvent","docs":["Emitted when Reward are updated for a pool"],"type":{"kind":"struct","fields":[{"name":"reward_growth_global_x64","docs":["Reward info"],"type":{"array":["u128",3]}}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/raydium_cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.json b/olddocs/archivekbot2/idls/raydium_cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.json new file mode 100644 index 0000000..8499ebe --- /dev/null +++ b/olddocs/archivekbot2/idls/raydium_cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.json @@ -0,0 +1 @@ +{"address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C","metadata":{"name":"raydium_cp_swap","version":"0.2.0","spec":"0.1.0","description":"Raydium constant product AMM, supports Token2022 and without Openbook"},"instructions":[{"name":"close_permission_pda","docs":["Close a permission account","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[156,84,32,118,69,135,70,123],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"permission_authority"},{"name":"permission","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110]},{"kind":"account","path":"permission_authority"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"collect_creator_fee","docs":["Collect the creator fee","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[20,22,86,123,198,28,219,132],"accounts":[{"name":"creator","docs":["Only pool creator can collect fee"],"writable":true,"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"creator_token_0","docs":["The address that receives the collected token_0 fund fees"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"token_0_program"},{"kind":"account","path":"vault_0_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":"creator_token_1","docs":["The address that receives the collected token_1 fund fees"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"token_1_program"},{"kind":"account","path":"vault_1_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":"token_0_program","docs":["Spl token program or token program 2022"]},{"name":"token_1_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"owner","docs":["Only admin or fund_owner can collect fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"recipient_token_0_account","docs":["The address that receives the collected token_0 fund fees"],"writable":true},{"name":"recipient_token_1_account","docs":["The address that receives the collected token_1 fund fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"owner","docs":["Only admin or owner can collect fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores owner"]},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"recipient_token_0_account","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_1_account","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"create_amm_config","docs":["# Arguments","","* `ctx`- The accounts needed by instruction.","* `index` - The index of amm config, there may be multiple config.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within trade fee.","* `fund_fee_rate` - The rate of fund fee within trade fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"amm_config","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"trade_fee_rate","type":"u64"},{"name":"protocol_fee_rate","type":"u64"},{"name":"fund_fee_rate","type":"u64"},{"name":"create_pool_fee","type":"u64"},{"name":"creator_fee_rate","type":"u64"}]},{"name":"create_permission_pda","docs":["Create a permission account","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[135,136,2,216,137,169,181,202],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"permission_authority"},{"name":"permission","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110]},{"kind":"account","path":"permission_authority"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"deposit","docs":["Deposit lp token to the pool","","# Arguments","","* `ctx`- The context of accounts","* `lp_token_amount` - Increased number of LPs","* `maximum_token_0_amount` - Maximum token 0 amount to deposit, prevents excessive slippage","* `maximum_token_1_amount` - Maximum token 1 amount to deposit, prevents excessive slippage",""],"discriminator":[242,35,198,137,82,225,242,182],"accounts":[{"name":"owner","docs":["Pays to mint the position"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","writable":true},{"name":"owner_lp_token","docs":["Owner lp token account"],"writable":true},{"name":"token_0_account","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_1_account","docs":["The payer's token account for token_1"],"writable":true},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"lp_mint","docs":["Lp token mint"],"writable":true}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"maximum_token_0_amount","type":"u64"},{"name":"maximum_token_1_amount","type":"u64"}]},{"name":"initialize","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `init_amount_0` - the initial amount_0 to deposit","* `init_amount_1` - the initial amount_1 to deposit","* `open_time` - the timestamp allowed for swap",""],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"authority","docs":["pool vault and lp mint authority"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["PDA account:","seeds = [","POOL_SEED.as_bytes(),","amm_config.key().as_ref(),","token_0_mint.key().as_ref(),","token_1_mint.key().as_ref(),","],","","Or random account: must be signed by cli"],"writable":true},{"name":"token_0_mint","docs":["Token_0 mint, the key must smaller than token_1 mint."]},{"name":"token_1_mint","docs":["Token_1 mint, the key must grater then token_0 mint."]},{"name":"lp_mint","docs":["pool 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_state"}]}},{"name":"creator_token_0","docs":["payer token0 account"],"writable":true},{"name":"creator_token_1","docs":["creator token1 account"],"writable":true},{"name":"creator_lp_token","docs":["creator lp token account"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}]}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}]}},{"name":"create_pool_fee","docs":["create pool fee account"],"writable":true,"address":"DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"},{"name":"observation_state","docs":["an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_0_program","docs":["Spl token program or token program 2022"]},{"name":"token_1_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"init_amount_0","type":"u64"},{"name":"init_amount_1","type":"u64"},{"name":"open_time","type":"u64"}]},{"name":"initialize_with_permission","docs":["Create a pool with permission","","# Arguments","","* `ctx`- The context of accounts","* `init_amount_0` - the initial amount_0 to deposit","* `init_amount_1` - the initial amount_1 to deposit","* `open_time` - the timestamp allowed for swap","* `creator_fee_on` - creator fee model, 0:both token0 and token1 (depends on the input), 1: only token0, 2: only token1",""],"discriminator":[63,55,254,65,49,178,89,121],"accounts":[{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"creator"},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"authority","docs":["pool vault and lp mint authority"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["PDA account:","seeds = [","POOL_SEED.as_bytes(),","amm_config.key().as_ref(),","token_0_mint.key().as_ref(),","token_1_mint.key().as_ref(),","],","","Or random account: must be signed by cli"],"writable":true},{"name":"token_0_mint","docs":["Token_0 mint, the key must smaller than token_1 mint."]},{"name":"token_1_mint","docs":["Token_1 mint, the key must grater then token_0 mint."]},{"name":"lp_mint","docs":["pool 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_state"}]}},{"name":"payer_token_0","docs":["payer token0 account"],"writable":true},{"name":"payer_token_1","docs":["payer token1 account"],"writable":true},{"name":"payer_lp_token","docs":["payer lp token account"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"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":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}]}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}]}},{"name":"create_pool_fee","docs":["create pool fee account"],"writable":true,"address":"DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"},{"name":"observation_state","docs":["an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"permission","pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110]},{"kind":"account","path":"payer"}]}},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_0_program","docs":["Spl token program or token program 2022"]},{"name":"token_1_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"}],"args":[{"name":"init_amount_0","type":"u64"},{"name":"init_amount_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"creator_fee_on","type":{"defined":{"name":"CreatorFeeOn"}}}]},{"name":"swap_base_input","docs":["Swap the tokens in the pool base input amount","","# Arguments","","* `ctx`- The context of accounts","* `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate","* `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage",""],"discriminator":[143,190,90,218,196,30,51,222],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"input_token_program","docs":["SPL program for input token transfers"]},{"name":"output_token_program","docs":["SPL program for output token transfers"]},{"name":"input_token_mint","docs":["The mint of input token"]},{"name":"output_token_mint","docs":["The mint of output token"]},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true}],"args":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"swap_base_output","docs":["Swap the tokens in the pool base output amount","","# Arguments","","* `ctx`- The context of accounts","* `max_amount_in` - input amount prevents excessive slippage","* `amount_out` - amount of output token",""],"discriminator":[55,217,98,86,163,74,180,173],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"input_token_program","docs":["SPL program for input token transfers"]},{"name":"output_token_program","docs":["SPL program for output token transfers"]},{"name":"input_token_mint","docs":["The mint of input token"]},{"name":"output_token_mint","docs":["The mint of output token"]},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true}],"args":[{"name":"max_amount_in","type":"u64"},{"name":"amount_out","type":"u64"}]},{"name":"update_amm_config","docs":["Updates the owner of the amm config","Must be called by the current owner or admin","","# Arguments","","* `ctx`- The context of accounts","* `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0","* `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1","* `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2","* `new_owner`- The config's new owner, be set when `param` is 3","* `new_fund_owner`- The config's new fund owner, be set when `param` is 4","* `param`- The value can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The amm config owner or admin"],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"amm_config","docs":["Amm config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u64"}]},{"name":"update_pool_status","docs":["Update pool status for given value","","# Arguments","","* `ctx`- The context of accounts","* `status` - The value of status",""],"discriminator":[130,87,108,6,46,224,117,123],"accounts":[{"name":"authority","signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"pool_state","writable":true}],"args":[{"name":"status","type":"u8"}]},{"name":"withdraw","docs":["Withdraw lp for token0 and token1","","# Arguments","","* `ctx`- The context of accounts","* `lp_token_amount` - Amount of pool tokens to burn. User receives an output of token a and b based on the percentage of the pool tokens that are returned.","* `minimum_token_0_amount` - Minimum amount of token 0 to receive, prevents excessive slippage","* `minimum_token_1_amount` - Minimum amount of token 1 to receive, prevents excessive slippage",""],"discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"owner","docs":["Pays to mint the position"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state account"],"writable":true},{"name":"owner_lp_token","docs":["Owner lp token account"],"writable":true},{"name":"token_0_account","docs":["The token account for receive token_0,"],"writable":true},{"name":"token_1_account","docs":["The token account for receive token_1"],"writable":true},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"lp_mint","docs":["Pool lp token mint"],"writable":true},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"minimum_token_0_amount","type":"u64"},{"name":"minimum_token_1_amount","type":"u64"}]}],"accounts":[{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"Permission","discriminator":[224,83,28,79,10,253,161,28]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]}],"events":[{"name":"LpChangeEvent","discriminator":[121,163,205,201,57,218,117,60]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]}],"errors":[{"code":6000,"name":"NotApproved","msg":"Not approved"},{"code":6001,"name":"InvalidOwner","msg":"Input account owner is not the program address"},{"code":6002,"name":"EmptySupply","msg":"Input token account empty"},{"code":6003,"name":"InvalidInput","msg":"InvalidInput"},{"code":6004,"name":"IncorrectLpMint","msg":"Address of the provided lp token mint is incorrect"},{"code":6005,"name":"ExceededSlippage","msg":"Exceeds desired slippage limit"},{"code":6006,"name":"ZeroTradingTokens","msg":"Given pool token amount results in zero trading tokens"},{"code":6007,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6008,"name":"InvalidVault","msg":"invaild vault"},{"code":6009,"name":"InitLpAmountTooLess","msg":"Init lp amount is too less(Because 100 amount lp will be locked)"},{"code":6010,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"},{"code":6011,"name":"MathOverflow","msg":"Math overflow"},{"code":6012,"name":"InsufficientVault","msg":"Insufficient vault"},{"code":6013,"name":"InvalidFeeModel","msg":"Invalid fee model"},{"code":6014,"name":"NoFeeCollect","msg":"Fee is zero"}],"types":[{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"disable_create_pool","docs":["Status to control if new pool can be create"],"type":"bool"},{"name":"index","docs":["Config index"],"type":"u16"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u64"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"create_pool_fee","docs":["Fee for create a new pool"],"type":"u64"},{"name":"protocol_owner","docs":["Address of the protocol fee owner"],"type":"pubkey"},{"name":"fund_owner","docs":["Address of the fund fee owner"],"type":"pubkey"},{"name":"creator_fee_rate","docs":["The pool creator fee, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"padding","docs":["padding"],"type":{"array":["u64",15]}}]}},{"name":"CreatorFeeOn","type":{"kind":"enum","variants":[{"name":"BothToken"},{"name":"OnlyToken0"},{"name":"OnlyToken1"}]}},{"name":"LpChangeEvent","docs":["Emitted when deposit and withdraw"],"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"lp_amount_before","type":"u64"},{"name":"token_0_vault_before","docs":["pool vault sub trade fees"],"type":"u64"},{"name":"token_1_vault_before","docs":["pool vault sub trade fees"],"type":"u64"},{"name":"token_0_amount","docs":["calculate result without transfer fee"],"type":"u64"},{"name":"token_1_amount","docs":["calculate result without transfer fee"],"type":"u64"},{"name":"token_0_transfer_fee","type":"u64"},{"name":"token_1_transfer_fee","type":"u64"},{"name":"change_type","type":"u8"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u64"},{"name":"cumulative_token_0_price_x32","docs":["the cumulative of token0 price during the duration time, Q32.32, the remaining 64 bit for overflow"],"type":"u128"},{"name":"cumulative_token_1_price_x32","docs":["the cumulative of token1 price during the duration time, Q32.32, the remaining 64 bit for overflow"],"type":"u128"}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is initialized"],"type":"bool"},{"name":"observation_index","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"Permission","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"authority","docs":["authority"],"type":"pubkey"},{"name":"padding","docs":["padding"],"type":{"array":["u64",30]}}]}},{"name":"PoolState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"amm_config","docs":["Which config the pool belongs"],"type":"pubkey"},{"name":"pool_creator","docs":["pool creator"],"type":"pubkey"},{"name":"token_0_vault","docs":["Token A"],"type":"pubkey"},{"name":"token_1_vault","docs":["Token B"],"type":"pubkey"},{"name":"lp_mint","docs":["Pool tokens are issued when A or B tokens are deposited.","Pool tokens can be withdrawn back to the original A or B token."],"type":"pubkey"},{"name":"token_0_mint","docs":["Mint information for token A"],"type":"pubkey"},{"name":"token_1_mint","docs":["Mint information for token B"],"type":"pubkey"},{"name":"token_0_program","docs":["token_0 program"],"type":"pubkey"},{"name":"token_1_program","docs":["token_1 program"],"type":"pubkey"},{"name":"observation_key","docs":["observation account to store oracle data"],"type":"pubkey"},{"name":"auth_bump","type":"u8"},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable deposit(value is 1), 0: normal","bit1, 1: disable withdraw(value is 2), 0: normal","bit2, 1: disable swap(value is 4), 0: normal"],"type":"u8"},{"name":"lp_mint_decimals","type":"u8"},{"name":"mint_0_decimals","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_1_decimals","type":"u8"},{"name":"lp_supply","docs":["True circulating supply without burns and lock ups"],"type":"u64"},{"name":"protocol_fees_token_0","docs":["The amounts of token_0 and token_1 that are owed to the liquidity provider."],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","docs":["The timestamp allowed for swap in the pool."],"type":"u64"},{"name":"recent_epoch","docs":["recent epoch"],"type":"u64"},{"name":"creator_fee_on","docs":["Creator fee collect mode","0: both token_0 and token_1 can be used as trade fees. It depends on what the input token is when swapping","1: only token_0 as trade fee","2: only token_1 as trade fee"],"type":"u8"},{"name":"enable_creator_fee","type":"bool"},{"name":"padding1","type":{"array":["u8",6]}},{"name":"creator_fees_token_0","type":"u64"},{"name":"creator_fees_token_1","type":"u64"},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u64",28]}}]}},{"name":"SwapEvent","docs":["Emitted when swap"],"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"input_vault_before","docs":["pool vault sub trade fees"],"type":"u64"},{"name":"output_vault_before","docs":["pool vault sub trade fees"],"type":"u64"},{"name":"input_amount","docs":["calculate result without transfer fee"],"type":"u64"},{"name":"output_amount","docs":["calculate result without transfer fee"],"type":"u64"},{"name":"input_transfer_fee","type":"u64"},{"name":"output_transfer_fee","type":"u64"},{"name":"base_input","type":"bool"},{"name":"input_mint","type":"pubkey"},{"name":"output_mint","type":"pubkey"},{"name":"trade_fee","type":"u64"},{"name":"creator_fee","docs":["Amount of fee tokens going to creator"],"type":"u64"},{"name":"creator_fee_on_input","type":"bool"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/raydium_launchlab.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.json b/olddocs/archivekbot2/idls/raydium_launchlab.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.json new file mode 100644 index 0000000..52f4970 --- /dev/null +++ b/olddocs/archivekbot2/idls/raydium_launchlab.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.json @@ -0,0 +1 @@ +{"address":"LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj","metadata":{"name":"raydium_launchpad","version":"0.2.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"buy_exact_in","docs":["Use the given amount of quote tokens to purchase base tokens.","# Arguments","","* `ctx` - The context of accounts","* `amount_in` - Amount of quote token to purchase","* `minimum_amount_out` - Minimum amount of base token to receive (slippage protection)","* `share_fee_rate` - Fee rate for the share",""],"discriminator":[250,234,13,123,213,156,19,236],"accounts":[{"name":"payer","docs":["The user performing the swap operation","Must sign the transaction and pay for fees"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Used to read protocol fee rates and curve type"]},{"name":"platform_config","docs":["Platform configuration account containing platform-wide settings","Used to read platform fee rate"]},{"name":"pool_state","docs":["The pool state account where the swap will be performed","Contains current pool parameters and balances"],"writable":true},{"name":"user_base_token","docs":["The user's token account for base tokens (tokens being bought)","Will receive the output tokens after the swap"],"writable":true},{"name":"user_quote_token","docs":["The user's token account for quote tokens (tokens being sold)","Will be debited for the input amount"],"writable":true},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be debited to send tokens to the user"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will receive the input tokens from the user"],"writable":true},{"name":"base_token_mint","docs":["The mint of the base token","Used for transfer fee calculations if applicable"]},{"name":"quote_token_mint","docs":["The mint of the quote token"]},{"name":"base_token_program","docs":["SPL Token program for base token transfers"]},{"name":"quote_token_program","docs":["SPL Token program for quote token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"},{"name":"share_fee_rate","type":"u64"}]},{"name":"buy_exact_out","docs":["Use quote tokens to purchase the given amount of base tokens.","# Arguments","","* `ctx` - The context of accounts","* `amount_out` - Amount of base token to receive","* `maximum_amount_in` - Maximum amount of quote token to purchase (slippage protection)","* `share_fee_rate` - Fee rate for the share"],"discriminator":[24,211,116,40,105,3,153,56],"accounts":[{"name":"payer","docs":["The user performing the swap operation","Must sign the transaction and pay for fees"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Used to read protocol fee rates and curve type"]},{"name":"platform_config","docs":["Platform configuration account containing platform-wide settings","Used to read platform fee rate"]},{"name":"pool_state","docs":["The pool state account where the swap will be performed","Contains current pool parameters and balances"],"writable":true},{"name":"user_base_token","docs":["The user's token account for base tokens (tokens being bought)","Will receive the output tokens after the swap"],"writable":true},{"name":"user_quote_token","docs":["The user's token account for quote tokens (tokens being sold)","Will be debited for the input amount"],"writable":true},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be debited to send tokens to the user"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will receive the input tokens from the user"],"writable":true},{"name":"base_token_mint","docs":["The mint of the base token","Used for transfer fee calculations if applicable"]},{"name":"quote_token_mint","docs":["The mint of the quote token"]},{"name":"base_token_program","docs":["SPL Token program for base token transfers"]},{"name":"quote_token_program","docs":["SPL Token program for quote token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_out","type":"u64"},{"name":"maximum_amount_in","type":"u64"},{"name":"share_fee_rate","type":"u64"}]},{"name":"claim_creator_fee","docs":["Claim the fee from the exclusive creator fee vault.","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[26,97,138,203,132,171,141,252],"accounts":[{"name":"creator","docs":["The pool creator"],"writable":true,"signer":true},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,102,101,101,95,118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"creator_fee_vault","docs":["The creator fee vault"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"quote_mint"}]}},{"name":"recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"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":"quote_mint","docs":["The mint for the quote token"]},{"name":"token_program","docs":["SPL Token program for the quote token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Required for associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"claim_platform_fee","docs":["Claim platform fee","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[156,39,208,135,76,237,61,72],"accounts":[{"name":"platform_fee_wallet","docs":["Only the wallet stored in platform_config can collect platform fees"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault and mint operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true},{"name":"platform_config","docs":["The platform config account"]},{"name":"quote_vault","writable":true},{"name":"recipient_token_account","docs":["The address that receives the collected quote token fees"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_fee_wallet"},{"kind":"account","path":"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":"quote_mint","docs":["The mint of quote token vault"]},{"name":"token_program","docs":["SPL program for input token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Required for associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"claim_platform_fee_from_vault","docs":["Claim the fee from the exclusive platform fee vault.","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[117,241,198,168,248,218,80,29],"accounts":[{"name":"platform_fee_wallet","docs":["Only the wallet stored in platform_config can collect platform fees"],"writable":true,"signer":true},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,102,101,101,95,118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"platform_config","docs":["The platform config account"]},{"name":"platform_fee_vault","docs":["The platform fee vault"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_config"},{"kind":"account","path":"quote_mint"}]}},{"name":"recipient_token_account","docs":["The address that receives the collected quote token fees"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_fee_wallet"},{"kind":"account","path":"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":"quote_mint","docs":["The mint of quote token vault"]},{"name":"token_program","docs":["SPL program for input token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Required for associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"claim_vested_token","docs":["Claim vested token","# Arguments"],"discriminator":[49,33,104,30,189,157,79,35],"accounts":[{"name":"beneficiary","docs":["The beneficiary of the vesting account"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault and mint operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true},{"name":"vesting_record","docs":["The vesting record account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,101,115,116,105,110,103]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"beneficiary"}]}},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be debited to send tokens to the user"],"writable":true},{"name":"user_base_token","writable":true,"pda":{"seeds":[{"kind":"account","path":"beneficiary"},{"kind":"account","path":"base_token_program"},{"kind":"account","path":"base_token_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_mint","docs":["The mint for the base token (token being sold)","Created in this instruction with specified decimals"]},{"name":"base_token_program","docs":["SPL Token program for the base token","Must be the standard Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Required for associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"close_platform_global_access","docs":["Close a platform's permission to use a global config."],"discriminator":[123,180,184,129,111,185,187,59],"accounts":[{"name":"owner","signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"global_config"},{"name":"platform_config"},{"name":"platform_global_access","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,103,108,111,98,97,108,95,97,99,99,101,115,115]},{"kind":"account","path":"platform_config"},{"kind":"account","path":"global_config"}]}}],"args":[]},{"name":"collect_fee","docs":["Collects accumulated fees from the pool","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[60,173,247,103,4,93,130,48],"accounts":[{"name":"owner","docs":["Only protocol_fee_owner saved in global_config can collect protocol fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"global_config","docs":["Global config account stores owner"]},{"name":"quote_vault","docs":["The address that holds pool tokens for quote token"],"writable":true},{"name":"quote_mint","docs":["The mint of quote token vault"]},{"name":"recipient_token_account","docs":["The address that receives the collected quote token fees"],"writable":true},{"name":"token_program","docs":["SPL program for input token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"collect_migrate_fee","docs":["Collects migrate fees from the pool","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[255,186,150,223,235,118,201,186],"accounts":[{"name":"owner","docs":["Only migrate_fee_owner saved in global_config can collect migrate fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"global_config","docs":["Global config account stores owner"]},{"name":"quote_vault","docs":["The address that holds pool tokens for quote token"],"writable":true},{"name":"quote_mint","docs":["The mint of quote token vault"]},{"name":"recipient_token_account","docs":["The address that receives the collected quote token fees"],"writable":true},{"name":"token_program","docs":["SPL program for input token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"create_config","docs":["Creates a new configuration","# Arguments","","* `ctx` - The accounts needed by instruction","* `curve_type` - The type of bonding curve (0: ConstantProduct)","* `index` - The index of config, there may be multiple config with the same curve type.","* `trade_fee_rate` - Trade fee rate, must be less than RATE_DENOMINATOR_VALUE",""],"discriminator":[201,207,243,114,75,111,47,189],"accounts":[{"name":"owner","docs":["The protocol owner/admin account","Must match the predefined admin address","Has authority to create and modify protocol configurations"],"writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"global_config","docs":["Global configuration account that stores protocol-wide settings","PDA generated using GLOBAL_CONFIG_SEED, quote token mint, and curve type","Stores fee rates and protocol parameters"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,99,111,110,102,105,103]},{"kind":"account","path":"quote_token_mint"},{"kind":"arg","path":"curve_type"},{"kind":"arg","path":"index"}]}},{"name":"quote_token_mint","docs":["The mint address of the quote token (token used for buying)","This will be the standard token used for all pools with this config"]},{"name":"protocol_fee_owner","docs":["Account that will receive protocol fees"]},{"name":"migrate_fee_owner","docs":["Account that will receive migrate fees"]},{"name":"migrate_to_amm_wallet","docs":["The control wallet address for migrating to amm"]},{"name":"migrate_to_cpswap_wallet","docs":["The control wallet address for migrating to cpswap"]},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"}],"args":[{"name":"curve_type","type":"u8"},{"name":"index","type":"u16"},{"name":"migrate_fee","type":"u64"},{"name":"trade_fee_rate","type":"u64"}]},{"name":"create_platform_config","docs":["Create platform config account","# Arguments","","* `ctx` - The context of accounts","# Fields","* `fee_rate` - Fee rate of the platform","* `name` - Name of the platform","* `web` - Website of the platform","* `img` - Image link of the platform",""],"discriminator":[176,90,196,175,253,113,220,20],"accounts":[{"name":"platform_admin","docs":["The account paying for the initialization costs"],"writable":true,"signer":true},{"name":"platform_fee_wallet"},{"name":"platform_nft_wallet"},{"name":"platform_config","docs":["The platform config account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,99,111,110,102,105,103]},{"kind":"account","path":"platform_admin"}]}},{"name":"cpswap_config"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"transfer_fee_extension_authority"},{"name":"platform_vesting_wallet"}],"args":[{"name":"platform_params","type":{"defined":{"name":"PlatformParams"}}}]},{"name":"create_platform_global_access","docs":["Create a platform permission to use a global config when authorization is enabled."],"discriminator":[162,91,146,199,93,133,234,237],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"global_config"},{"name":"platform_config"},{"name":"platform_global_access","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,103,108,111,98,97,108,95,97,99,99,101,115,115]},{"kind":"account","path":"platform_config"},{"kind":"account","path":"global_config"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_platform_vesting_account","docs":["Create vesting account","# Arguments","","* `ctx` - The context of accounts","* `share` - The share amount of base token to be vested",""],"discriminator":[146,71,173,69,98,19,15,106],"accounts":[{"name":"platform_vesting_wallet","docs":["The account paying for the initialization costs","This can be any account with sufficient SOL to cover the transaction"],"writable":true,"signer":true},{"name":"beneficiary","docs":["The beneficiary is used to receive the allocated linear release of tokens.","Once this account is set, it cannot be modified, so please ensure the validity of this account,","otherwise, the unlocked tokens will not be claimable."],"writable":true},{"name":"platform_config","docs":["Platform config account to be changed"]},{"name":"pool_state","docs":["The pool state account"],"writable":true},{"name":"platform_vesting_record","docs":["The vesting record account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,101,115,116,105,110,103]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"beneficiary"}]}},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_vesting_account","docs":["Create vesting account","# Arguments","","* `ctx` - The context of accounts","* `share` - The share amount of base token to be vested",""],"discriminator":[129,178,2,13,217,172,230,218],"accounts":[{"name":"creator","docs":["The account paying for the initialization costs","This can be any account with sufficient SOL to cover the transaction"],"writable":true,"signer":true},{"name":"beneficiary","docs":["The beneficiary is used to receive the allocated linear release of tokens.","Once this account is set, it cannot be modified, so please ensure the validity of this account,","otherwise, the unlocked tokens will not be claimable."],"writable":true},{"name":"pool_state","docs":["The pool state account"],"writable":true},{"name":"vesting_record","docs":["The vesting record account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,101,115,116,105,110,103]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"beneficiary"}]}},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"}],"args":[{"name":"share_amount","type":"u64"}]},{"name":"initialize","docs":["Initializes a new trading pool","# Arguments","","* `ctx` - The context of accounts containing pool and token information",""],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"payer","docs":["The account paying for the initialization costs","This can be any account with sufficient SOL to cover the transaction"],"writable":true,"signer":true},{"name":"creator"},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Includes settings like quote token mint and fee parameters"]},{"name":"platform_config","docs":["Platform configuration account containing platform info","Includes settings like the fee_rate, name, web, img of the platform"]},{"name":"authority","docs":["PDA that acts as the authority for pool vault and mint operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"base_mint","docs":["The mint for the base token (token being sold)","Created in this instruction with specified decimals"],"writable":true,"signer":true},{"name":"quote_mint","docs":["The mint for the quote token (token used to buy)","Must match the quote_mint specified in global config"]},{"name":"base_vault","docs":["Token account that holds the pool's base tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"base_mint"}]}},{"name":"quote_vault","docs":["Token account that holds the pool's quote tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"quote_mint"}]}},{"name":"metadata_account","docs":["Account to store the base token's metadata","Created using Metaplex metadata program"],"writable":true},{"name":"base_token_program","docs":["SPL Token program for the base token","Must be the standard Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"quote_token_program","docs":["SPL Token program for the quote token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"metadata_program","docs":["Metaplex Token Metadata program","Used to create metadata for the base token"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"rent_program","docs":["Required for rent exempt calculations"],"address":"SysvarRent111111111111111111111111111111111"},{"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":"base_mint_param","type":{"defined":{"name":"MintParams"}}},{"name":"curve_param","type":{"defined":{"name":"CurveParams"}}},{"name":"vesting_param","type":{"defined":{"name":"VestingParams"}}}]},{"name":"initialize_v2","docs":["Initializes a new trading pool","# Arguments","","* `ctx` - The context of accounts containing pool and token information",""],"discriminator":[67,153,175,39,218,16,38,32],"accounts":[{"name":"payer","docs":["The account paying for the initialization costs","This can be any account with sufficient SOL to cover the transaction"],"writable":true,"signer":true},{"name":"creator"},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Includes settings like quote token mint and fee parameters"]},{"name":"platform_config","docs":["Platform configuration account containing platform info","Includes settings like the fee_rate, name, web, img of the platform"]},{"name":"authority","docs":["PDA that acts as the authority for pool vault and mint operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"base_mint","docs":["The mint for the base token (token being sold)","Created in this instruction with specified decimals"],"writable":true,"signer":true},{"name":"quote_mint","docs":["The mint for the quote token (token used to buy)","Must match the quote_mint specified in global config"]},{"name":"base_vault","docs":["Token account that holds the pool's base tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"base_mint"}]}},{"name":"quote_vault","docs":["Token account that holds the pool's quote tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"quote_mint"}]}},{"name":"metadata_account","docs":["Account to store the base token's metadata","Created using Metaplex metadata program"],"writable":true},{"name":"base_token_program","docs":["SPL Token program for the base token","Must be the standard Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"quote_token_program","docs":["SPL Token program for the quote token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"metadata_program","docs":["Metaplex Token Metadata program","Used to create metadata for the base token"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"rent_program","docs":["Required for rent exempt calculations"],"address":"SysvarRent111111111111111111111111111111111"},{"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":"base_mint_param","type":{"defined":{"name":"MintParams"}}},{"name":"curve_param","type":{"defined":{"name":"CurveParams"}}},{"name":"vesting_param","type":{"defined":{"name":"VestingParams"}}},{"name":"amm_fee_on","type":{"defined":{"name":"AmmCreatorFeeOn"}}}]},{"name":"initialize_with_token_2022","docs":["Initializes a new trading pool with base token belongs to spl-token-2022,","pool created by this instruction must be migrated to cpswap after fundraising ends, i.e., curve_param.migrate_type = 1","# Arguments","","* `ctx` - The context of accounts containing pool and token information",""],"discriminator":[37,190,126,222,44,154,171,17],"accounts":[{"name":"payer","docs":["The account paying for the initialization costs","This can be any account with sufficient SOL to cover the transaction"],"writable":true,"signer":true},{"name":"creator"},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Includes settings like quote token mint and fee parameters"]},{"name":"platform_config","docs":["Platform configuration account containing platform info","Includes settings like the fee_rate, name, web, img of the platform"]},{"name":"authority","docs":["PDA that acts as the authority for pool vault and mint operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"base_mint","docs":["The mint for the base token (token being sold)","Created in this instruction with specified decimals"],"writable":true,"signer":true},{"name":"quote_mint","docs":["The mint for the quote token (token used to buy)","Must match the quote_mint specified in global config"]},{"name":"base_vault","docs":["Token account that holds the pool's base tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"base_mint"}]}},{"name":"quote_vault","docs":["Token account that holds the pool's quote tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"quote_mint"}]}},{"name":"base_token_program","docs":["SPL Token program for the base token"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["SPL Token program for the quote token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["Required for account creation"],"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":"base_mint_param","type":{"defined":{"name":"MintParams"}}},{"name":"curve_param","type":{"defined":{"name":"CurveParams"}}},{"name":"vesting_param","type":{"defined":{"name":"VestingParams"}}},{"name":"amm_fee_on","type":{"defined":{"name":"AmmCreatorFeeOn"}}},{"name":"transfer_fee_extension_param","type":{"option":{"defined":{"name":"TransferFeeExtensionParams"}}}}]},{"name":"migrate_to_amm","docs":["# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[207,82,192,145,254,207,145,223],"accounts":[{"name":"payer","docs":["Only migrate_to_amm_wallet can migrate to cpswap pool","This signer must match the migrate_to_amm_wallet saved in global_config"],"writable":true,"signer":true},{"name":"base_mint","docs":["The mint for the base token (token being sold)"]},{"name":"quote_mint","docs":["The mint for the quote token (token used to buy)"]},{"name":"openbook_program","address":"srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX"},{"name":"market","docs":["Account created and asigned to openbook_program but not been initialized"],"writable":true},{"name":"request_queue","docs":["Account created and asigned to openbook_program but not been initialized"],"writable":true},{"name":"event_queue","docs":["Account created and asigned to openbook_program but not been initialized"],"writable":true},{"name":"bids","docs":["Account created and asigned to openbook_program but not been initialized"],"writable":true},{"name":"asks","docs":["Account created and asigned to openbook_program but not been initialized"],"writable":true},{"name":"market_vault_signer"},{"name":"market_base_vault","docs":["Token account that holds the market's base tokens"],"writable":true},{"name":"market_quote_vault","docs":["Token account that holds the market's quote tokens"],"writable":true},{"name":"amm_program","address":"675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"},{"name":"amm_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[97,109,109,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_authority","pda":{"seeds":[{"kind":"const","value":[97,109,109,32,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_open_orders","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[111,112,101,110,95,111,114,100,101,114,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[108,112,95,109,105,110,116,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_base_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[99,111,105,110,95,118,97,117,108,116,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_quote_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[112,99,95,118,97,117,108,116,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_target_orders","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[116,97,114,103,101,116,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_config","pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103,95,97,99,99,111,117,110,116,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_create_fee_destination","writable":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"global_config","docs":["Global config account stores owner"]},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be fully drained during migration"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will be fully drained during migration"],"writable":true},{"name":"pool_lp_token","writable":true},{"name":"spl_token_program","docs":["SPL Token program for the base token","Must be the standard Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving fee NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"rent_program","docs":["Required for rent exempt calculations"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"base_lot_size","type":"u64"},{"name":"quote_lot_size","type":"u64"},{"name":"market_vault_signer_nonce","type":"u8"}]},{"name":"migrate_to_cpswap","docs":["# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[136,92,200,103,28,218,144,140],"accounts":[{"name":"payer","docs":["Only migrate_to_cpswap_wallet can migrate to cpswap pool","This signer must match the migrate_to_cpswap_wallet saved in global_config"],"writable":true,"signer":true},{"name":"base_mint","docs":["The mint for the base token (token being sold)"],"writable":true},{"name":"quote_mint","docs":["The mint for the quote token (token used to buy)"]},{"name":"platform_config","docs":["Platform configuration account containing platform-wide settings","Used to read platform fee rate"]},{"name":"cpswap_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"cpswap_pool","docs":["PDA account:","seeds = [","b\"pool\",","cpswap_config.key().as_ref(),","token_0_mint.key().as_ref(),","token_1_mint.key().as_ref(),","],","seeds::program = cpswap_program,","","Or random account: must be signed by cli"],"writable":true},{"name":"cpswap_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"account","path":"cpswap_program"}}},{"name":"cpswap_lp_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,108,112,95,109,105,110,116]},{"kind":"account","path":"cpswap_pool"}],"program":{"kind":"account","path":"cpswap_program"}}},{"name":"cpswap_base_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"cpswap_pool"},{"kind":"account","path":"base_mint"}],"program":{"kind":"account","path":"cpswap_program"}}},{"name":"cpswap_quote_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"cpswap_pool"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"cpswap_program"}}},{"name":"cpswap_config"},{"name":"cpswap_create_pool_fee","writable":true},{"name":"cpswap_observation","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"cpswap_pool"}],"program":{"kind":"account","path":"cpswap_program"}}},{"name":"lock_program","address":"LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"},{"name":"lock_authority","pda":{"seeds":[{"kind":"const","value":[108,111,99,107,95,99,112,95,97,117,116,104,111,114,105,116,121,95,115,101,101,100]}],"program":{"kind":"account","path":"lock_program"}}},{"name":"lock_lp_vault","writable":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"global_config","docs":["Global config account stores owner"]},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be fully drained during migration"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will be fully drained during migration"],"writable":true},{"name":"pool_lp_token","writable":true},{"name":"base_token_program","docs":["SPL Token program for the base token","Must be the standard Token program"]},{"name":"quote_token_program","docs":["SPL Token program for the quote token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving fee NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"rent_program","docs":["Required for rent exempt calculations"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"metadata_program","docs":["Program to create NFT metadata accunt"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[]},{"name":"remove_platform_curve_param","docs":["Remove platform launch param","# Arguments","","* `ctx` - The context of accounts","* `index` - The index of the curve param to remove",""],"discriminator":[27,30,62,169,93,224,24,145],"accounts":[{"name":"platform_admin","docs":["The account paying for the initialization costs"],"signer":true},{"name":"platform_config","docs":["Platform config account to be changed"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,99,111,110,102,105,103]},{"kind":"account","path":"platform_admin"}]}}],"args":[{"name":"index","type":"u8"}]},{"name":"sell_exact_in","docs":["Use the given amount of base tokens to sell for quote tokens.","# Arguments","","* `ctx` - The context of accounts","* `amount_in` - Amount of base token to sell","* `minimum_amount_out` - Minimum amount of quote token to receive (slippage protection)","* `share_fee_rate` - Fee rate for the share",""],"discriminator":[149,39,222,155,211,124,152,26],"accounts":[{"name":"payer","docs":["The user performing the swap operation","Must sign the transaction and pay for fees"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Used to read protocol fee rates and curve type"]},{"name":"platform_config","docs":["Platform configuration account containing platform-wide settings","Used to read platform fee rate"]},{"name":"pool_state","docs":["The pool state account where the swap will be performed","Contains current pool parameters and balances"],"writable":true},{"name":"user_base_token","docs":["The user's token account for base tokens (tokens being bought)","Will receive the output tokens after the swap"],"writable":true},{"name":"user_quote_token","docs":["The user's token account for quote tokens (tokens being sold)","Will be debited for the input amount"],"writable":true},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be debited to send tokens to the user"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will receive the input tokens from the user"],"writable":true},{"name":"base_token_mint","docs":["The mint of the base token","Used for transfer fee calculations if applicable"]},{"name":"quote_token_mint","docs":["The mint of the quote token"]},{"name":"base_token_program","docs":["SPL Token program for base token transfers"]},{"name":"quote_token_program","docs":["SPL Token program for quote token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"},{"name":"share_fee_rate","type":"u64"}]},{"name":"sell_exact_out","docs":["Sell base tokens for the given amount of quote tokens.","# Arguments","","* `ctx` - The context of accounts","* `amount_out` - Amount of quote token to receive","* `maximum_amount_in` - Maximum amount of base token to purchase (slippage protection)","* `share_fee_rate` - Fee rate for the share",""],"discriminator":[95,200,71,34,8,9,11,166],"accounts":[{"name":"payer","docs":["The user performing the swap operation","Must sign the transaction and pay for fees"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Used to read protocol fee rates and curve type"]},{"name":"platform_config","docs":["Platform configuration account containing platform-wide settings","Used to read platform fee rate"]},{"name":"pool_state","docs":["The pool state account where the swap will be performed","Contains current pool parameters and balances"],"writable":true},{"name":"user_base_token","docs":["The user's token account for base tokens (tokens being bought)","Will receive the output tokens after the swap"],"writable":true},{"name":"user_quote_token","docs":["The user's token account for quote tokens (tokens being sold)","Will be debited for the input amount"],"writable":true},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be debited to send tokens to the user"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will receive the input tokens from the user"],"writable":true},{"name":"base_token_mint","docs":["The mint of the base token","Used for transfer fee calculations if applicable"]},{"name":"quote_token_mint","docs":["The mint of the quote token"]},{"name":"base_token_program","docs":["SPL Token program for base token transfers"]},{"name":"quote_token_program","docs":["SPL Token program for quote token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_out","type":"u64"},{"name":"maximum_amount_in","type":"u64"},{"name":"share_fee_rate","type":"u64"}]},{"name":"update_config","docs":["Updates configuration parameters","# Arguments","","* `ctx` - The context of accounts","* `param` - Parameter to update:","- 0: Update trade_fee_rate","- 1: Update fee owner","- 12: Toggle whether explicit platform authorization is required","* `value` - New value for the selected parameter",""],"discriminator":[29,158,252,191,10,83,219,99],"accounts":[{"name":"owner","docs":["The global config owner or admin"],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"global_config","docs":["Global config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u64"}]},{"name":"update_platform_config","docs":["Update platform config","# Arguments","","* `ctx` - The context of accounts","* `param` - Parameter to update",""],"discriminator":[195,60,76,129,146,45,67,143],"accounts":[{"name":"platform_admin","docs":["The account paying for the initialization costs"],"signer":true},{"name":"platform_config","docs":["Platform config account to be changed"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,99,111,110,102,105,103]},{"kind":"account","path":"platform_admin"}]}}],"args":[{"name":"param","type":{"defined":{"name":"PlatformConfigParam"}}}]},{"name":"update_platform_curve_param","docs":["Update platform launch param","# Arguments","","* `ctx` - The context of accounts","* `bonding_curve_param` - Parameter to update",""],"discriminator":[138,144,138,250,220,128,4,57],"accounts":[{"name":"platform_admin","docs":["The account paying for the initialization costs"],"writable":true,"signer":true},{"name":"platform_config","docs":["Platform config account to be changed"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,99,111,110,102,105,103]},{"kind":"account","path":"platform_admin"}]}},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Includes settings like quote token mint and fee parameters"]},{"name":"system_program","docs":["System program for lamport transfers"],"address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u8"},{"name":"bonding_curve_param","type":{"defined":{"name":"BondingCurveParam"}}}]}],"accounts":[{"name":"GlobalConfig","discriminator":[149,8,156,202,160,252,176,217]},{"name":"PlatformConfig","discriminator":[160,78,128,0,248,83,230,160]},{"name":"PlatformGlobalAccess","discriminator":[174,147,132,240,137,219,243,16]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"VestingRecord","discriminator":[106,243,221,205,230,126,85,83]}],"events":[{"name":"ClaimVestedEvent","discriminator":[21,194,114,87,120,211,226,32]},{"name":"CreateVestingEvent","discriminator":[150,152,11,179,52,210,191,125]},{"name":"PoolCreateEvent","discriminator":[151,215,226,9,118,161,115,174]},{"name":"TradeEvent","discriminator":[189,219,127,211,78,230,97,238]}],"errors":[{"code":6000,"name":"NotApproved","msg":"Not approved"},{"code":6001,"name":"InvalidOwner","msg":"Input account owner is not the program address"},{"code":6002,"name":"InvalidInput","msg":"InvalidInput"},{"code":6003,"name":"InputNotMatchCurveConfig","msg":"The input params are not match with curve type in config"},{"code":6004,"name":"ExceededSlippage","msg":"Exceeds desired slippage limit"},{"code":6005,"name":"PoolFunding","msg":"Pool funding"},{"code":6006,"name":"PoolMigrated","msg":"Pool migrated"},{"code":6007,"name":"MigrateTypeNotMatch","msg":"Migrate type not match"},{"code":6008,"name":"MathOverflow","msg":"Math overflow"},{"code":6009,"name":"NoAssetsToCollect","msg":"No assets to collect"},{"code":6010,"name":"VestingRatioTooHigh","msg":"Vesting ratio too high"},{"code":6011,"name":"VestingSettingEnded","msg":"Vesting setting ended"},{"code":6012,"name":"VestingNotStarted","msg":"Vesting not started"},{"code":6013,"name":"NoVestingSchedule","msg":"No vesting schedule"},{"code":6014,"name":"InvalidPlatformInfo","msg":"The platform info input is invalid"},{"code":6015,"name":"PoolNotMigrated","msg":"Pool not migrated"},{"code":6016,"name":"InvalidCpSwapConfig","msg":"The input cp swap config account is invalid"},{"code":6017,"name":"NoSupportExtension","msg":"No support extension"},{"code":6018,"name":"NotEnoughRemainingAccounts","msg":"Not enough remaining accounts"},{"code":6019,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"},{"code":6020,"name":"CurveParamIsNotExist","msg":"Curve param is not exist"},{"code":6021,"name":"InvalidTotalLockedAmount","msg":"Total locked amount must great or equal to the platform vesting share amount"},{"code":6022,"name":"PlatformGlobalAccessDenied","msg":"Platform is not authorized to use this global config"},{"code":6023,"name":"InvalidPlatformGlobalAccess","msg":"Invalid platform-global access account"}],"types":[{"name":"AmmCreatorFeeOn","docs":["migrate to cpmm, creator fee on quote token or both token"],"type":{"kind":"enum","variants":[{"name":"QuoteToken"},{"name":"BothToken"}]}},{"name":"BondingCurveParam","type":{"kind":"struct","fields":[{"name":"migrate_type","docs":["Migrate to AMM or CpSwap, 0: amm, 1: cpswap,","Neither 0 nor 1: invalid"],"type":"u8"},{"name":"migrate_cpmm_fee_on","docs":["The migrate fee on, 0 means fee on the quote token, 1 means fee on both token","Neither 0 nor 1: invalid"],"type":"u8"},{"name":"supply","docs":["The supply of the token,","0: invalid"],"type":"u64"},{"name":"total_base_sell","docs":["The total base sell of the token","0: invalid"],"type":"u64"},{"name":"total_quote_fund_raising","docs":["The total quote fund raising of the token","0: invalid"],"type":"u64"},{"name":"total_locked_amount","docs":["total amount of tokens to be unlocked","u64::MAX: invalid"],"type":"u64"},{"name":"cliff_period","docs":["Waiting time in seconds before unlocking after fundraising ends","u64::MAX: invalid"],"type":"u64"},{"name":"unlock_period","docs":["Unlocking period in seconds","u64::MAX: invalid"],"type":"u64"}]}},{"name":"ClaimVestedEvent","docs":["Emitted when vesting token claimed by beneficiary"],"type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"beneficiary","type":"pubkey"},{"name":"claim_amount","type":"u64"}]}},{"name":"ConstantCurve","type":{"kind":"struct","fields":[{"name":"supply","type":"u64"},{"name":"total_base_sell","type":"u64"},{"name":"total_quote_fund_raising","type":"u64"},{"name":"migrate_type","type":"u8"}]}},{"name":"CreateVestingEvent","docs":["Emitted when vest_account created"],"type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"beneficiary","type":"pubkey"},{"name":"share_amount","type":"u64"}]}},{"name":"CurveParams","type":{"kind":"enum","variants":[{"name":"Constant","fields":[{"name":"data","type":{"defined":{"name":"ConstantCurve"}}}]},{"name":"Fixed","fields":[{"name":"data","type":{"defined":{"name":"FixedCurve"}}}]},{"name":"Linear","fields":[{"name":"data","type":{"defined":{"name":"LinearCurve"}}}]}]}},{"name":"FixedCurve","type":{"kind":"struct","fields":[{"name":"supply","type":"u64"},{"name":"total_quote_fund_raising","type":"u64"},{"name":"migrate_type","type":"u8"}]}},{"name":"GlobalConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"epoch","docs":["Account update epoch"],"type":"u64"},{"name":"curve_type","docs":["0: Constant Product Curve","1: Fixed Price Curve","2: Linear Price Curve"],"type":"u8"},{"name":"index","docs":["Config index"],"type":"u16"},{"name":"migrate_fee","docs":["The fee of migrate to amm"],"type":"u64"},{"name":"trade_fee_rate","docs":["The trade fee rate, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"max_share_fee_rate","docs":["The maximum share fee rate, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"min_base_supply","docs":["The minimum base supply, the value without decimals"],"type":"u64"},{"name":"max_lock_rate","docs":["The maximum lock rate, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"min_base_sell_rate","docs":["The minimum base sell rate, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"min_base_migrate_rate","docs":["The minimum base migrate rate, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"min_quote_fund_raising","docs":["The minimum quote fund raising, the value with decimals"],"type":"u64"},{"name":"quote_mint","docs":["Mint information for quote token"],"type":"pubkey"},{"name":"protocol_fee_owner","docs":["Protocol Fee owner"],"type":"pubkey"},{"name":"migrate_fee_owner","docs":["Migrate Fee owner"],"type":"pubkey"},{"name":"migrate_to_amm_wallet","docs":["Migrate to amm control wallet"],"type":"pubkey"},{"name":"migrate_to_cpswap_wallet","docs":["Migrate to cpswap wallet"],"type":"pubkey"},{"name":"requires_platform_auth","docs":["Whether a platform must be explicitly authorized before using this global config"],"type":"u8"},{"name":"padding_alignment","docs":["padding alignment"],"type":{"array":["u8",7]}},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u64",15]}}]}},{"name":"LinearCurve","type":{"kind":"struct","fields":[{"name":"supply","type":"u64"},{"name":"total_quote_fund_raising","type":"u64"},{"name":"migrate_type","type":"u8"}]}},{"name":"MigrateNftInfo","docs":["Represents the parameters for initializing a platform config account(Only support MigrateType::CPSWAP)","# Fields","* `platform_scale` - Scale of the platform liquidity quantity rights will be converted into NFT","* `creator_scale` - Scale of the token creator liquidity quantity rights will be converted into NFT","* `burn_scale` - Scale of liquidity directly to burn","","* platform_scale + creator_scale + burn_scale = RATE_DENOMINATOR_VALUE"],"type":{"kind":"struct","fields":[{"name":"platform_scale","type":"u64"},{"name":"creator_scale","type":"u64"},{"name":"burn_scale","type":"u64"}]}},{"name":"MintParams","docs":["Represents the parameters for initializing a new token mint","# Fields","* `decimals` - Number of decimal places for the token","* `name` - Name of the token","* `symbol` - Symbol/ticker of the token","* `uri` - URI pointing to token metadata"],"type":{"kind":"struct","fields":[{"name":"decimals","type":"u8"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"PlatformConfig","type":{"kind":"struct","fields":[{"name":"epoch","docs":["The epoch for update interval"],"type":"u64"},{"name":"platform_fee_wallet","docs":["The platform fee wallet"],"type":"pubkey"},{"name":"platform_nft_wallet","docs":["The platform nft wallet to receive the platform NFT after migration if platform_scale is not 0(Only support MigrateType::CPSWAP)"],"type":"pubkey"},{"name":"platform_scale","docs":["Scale of the platform liquidity quantity rights will be converted into NFT(Only support MigrateType::CPSWAP)"],"type":"u64"},{"name":"creator_scale","docs":["Scale of the token creator liquidity quantity rights will be converted into NFT(Only support MigrateType::CPSWAP)"],"type":"u64"},{"name":"burn_scale","docs":["Scale of liquidity directly to burn"],"type":"u64"},{"name":"fee_rate","docs":["The platform fee rate"],"type":"u64"},{"name":"name","docs":["The platform name"],"type":{"array":["u8",64]}},{"name":"web","docs":["The platform website"],"type":{"array":["u8",256]}},{"name":"img","docs":["The platform img link"],"type":{"array":["u8",256]}},{"name":"cpswap_config","docs":["The platform specifies the trade fee rate after migration to cp swap"],"type":"pubkey"},{"name":"creator_fee_rate","docs":["Creator fee rate"],"type":"u64"},{"name":"transfer_fee_extension_auth","docs":["If the base token belongs to token2022, then you can choose to support the transferfeeConfig extension, which includes permissions such as `transfer_fee_config_authority`` and `withdraw_withheld_authority`.","When initializing mint, `withdraw_withheld_authority` and `transfer_fee_config_authority` both belongs to the contract.","Once the token is migrated to AMM, the authorities will be reset to this value"],"type":"pubkey"},{"name":"platform_vesting_wallet","type":"pubkey"},{"name":"platform_vesting_scale","type":"u64"},{"name":"platform_cp_creator","docs":["If a valid platform_cp_creator is configured for the platform,","it will be used as the creator for the AMM pool during migration to cpswap pool."],"type":"pubkey"},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u8",108]}},{"name":"curve_params","docs":["The parameters for launching the pool"],"type":{"vec":{"defined":{"name":"PlatformCurveParam"}}}}]}},{"name":"PlatformConfigInfo","type":{"kind":"struct","fields":[{"name":"fee_wallet","type":"pubkey"},{"name":"nft_wallet","type":"pubkey"},{"name":"migrate_nft_info","type":{"defined":{"name":"MigrateNftInfo"}}},{"name":"fee_rate","type":"u64"},{"name":"name","type":"string"},{"name":"web","type":"string"},{"name":"img","type":"string"},{"name":"transfer_fee_extension_auth","type":"pubkey"},{"name":"creator_fee_rate","type":"u64"},{"name":"platform_vesting_scale","type":"u64"},{"name":"vesting_wallet","type":"pubkey"}]}},{"name":"PlatformConfigParam","type":{"kind":"enum","variants":[{"name":"FeeWallet","fields":["pubkey"]},{"name":"NFTWallet","fields":["pubkey"]},{"name":"MigrateNftInfo","fields":[{"defined":{"name":"MigrateNftInfo"}}]},{"name":"FeeRate","fields":["u64"]},{"name":"Name","fields":["string"]},{"name":"Web","fields":["string"]},{"name":"Img","fields":["string"]},{"name":"CpSwapConfig"},{"name":"AllInfo","fields":[{"defined":{"name":"PlatformConfigInfo"}}]},{"name":"VestingWallet","fields":["pubkey"]},{"name":"PlatformVestingScale","fields":["u64"]},{"name":"PlatformCPCreator","fields":["pubkey"]}]}},{"name":"PlatformCurveParam","type":{"kind":"struct","fields":[{"name":"epoch","docs":["The epoch for update interval, 0 means not update"],"type":"u64"},{"name":"index","docs":["The curve params index"],"type":"u8"},{"name":"global_config","docs":["The global config address"],"type":"pubkey"},{"name":"bonding_curve_param","docs":["bonding curve param"],"type":{"defined":{"name":"BondingCurveParam"}}},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u64",50]}}]}},{"name":"PlatformGlobalAccess","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"global_config","type":"pubkey"},{"name":"platform_config","type":"pubkey"},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u64",8]}}]}},{"name":"PlatformParams","docs":["Represents the parameters for initializing a platform config account","# Fields","* `migrate_nft_info` - The platform configures liquidity info during migration(Only support MigrateType::CPSWAP)","* `fee_rate` - Fee rate of the platform","* `name` - Name of the platform","* `web` - Website of the platform","* `img` - Image link of the platform","/// * `creator_fee_rate` - The fee rate charged by the creator for each transaction."],"type":{"kind":"struct","fields":[{"name":"migrate_nft_info","type":{"defined":{"name":"MigrateNftInfo"}}},{"name":"fee_rate","type":"u64"},{"name":"name","type":"string"},{"name":"web","type":"string"},{"name":"img","type":"string"},{"name":"creator_fee_rate","type":"u64"},{"name":"platform_vesting_scale","type":"u64"}]}},{"name":"PoolCreateEvent","docs":["Emitted when pool created"],"type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"config","type":"pubkey"},{"name":"base_mint_param","type":{"defined":{"name":"MintParams"}}},{"name":"curve_param","type":{"defined":{"name":"CurveParams"}}},{"name":"vesting_param","type":{"defined":{"name":"VestingParams"}}},{"name":"amm_fee_on","type":{"defined":{"name":"AmmCreatorFeeOn"}}}]}},{"name":"PoolState","docs":["Represents the state of a trading pool in the protocol","Stores all essential information about pool balances, fees, and configuration"],"type":{"kind":"struct","fields":[{"name":"epoch","docs":["Account update epoch"],"type":"u64"},{"name":"auth_bump","docs":["Bump seed used for PDA address derivation"],"type":"u8"},{"name":"status","docs":["Current status of the pool","* 0: Pool is funding","* 1: Pool funding is end, waiting for migration","* 2: Pool migration is done"],"type":"u8"},{"name":"base_decimals","docs":["Decimals of the pool base token"],"type":"u8"},{"name":"quote_decimals","docs":["Decimals of the pool quote token"],"type":"u8"},{"name":"migrate_type","docs":["Migrate to AMM or CpSwap, 0: amm, 1: cpswap"],"type":"u8"},{"name":"supply","docs":["Supply of the pool base token"],"type":"u64"},{"name":"total_base_sell","docs":["Total sell amount of the base token"],"type":"u64"},{"name":"virtual_base","docs":["For different curves, virtual_base and virtual_quote have different meanings","For constant product curve, virtual_base and virtual_quote are virtual liquidity, virtual_quote/virtual_base is the initial price","For linear price curve, virtual_base is the price slope parameter a, virtual_quote has no effect","For fixed price curve, virtual_quote/virtual_base is the initial price"],"type":"u64"},{"name":"virtual_quote","type":"u64"},{"name":"real_base","docs":["Actual base token amount in the pool","Represents the real tokens available for trading"],"type":"u64"},{"name":"real_quote","docs":["Actual quote token amount in the pool","Represents the real tokens available for trading"],"type":"u64"},{"name":"total_quote_fund_raising","docs":["The total quote fund raising of the pool"],"type":"u64"},{"name":"quote_protocol_fee","docs":["Accumulated trading fees in quote tokens","Can be collected by the protocol fee owner"],"type":"u64"},{"name":"platform_fee","docs":["Accumulated platform fees in quote tokens","Can be collected by the platform wallet stored in platform config"],"type":"u64"},{"name":"migrate_fee","docs":["The fee of migrate to amm"],"type":"u64"},{"name":"vesting_schedule","docs":["Vesting schedule for the base token"],"type":{"defined":{"name":"VestingSchedule"}}},{"name":"global_config","docs":["Public key of the global configuration account","Contains protocol-wide settings this pool adheres to"],"type":"pubkey"},{"name":"platform_config","docs":["Public key of the platform configuration account","Contains platform-wide settings this pool adheres to"],"type":"pubkey"},{"name":"base_mint","docs":["Public key of the base mint address"],"type":"pubkey"},{"name":"quote_mint","docs":["Public key of the quote mint address"],"type":"pubkey"},{"name":"base_vault","docs":["Public key of the base token vault","Holds the actual base tokens owned by the pool"],"type":"pubkey"},{"name":"quote_vault","docs":["Public key of the quote token vault","Holds the actual quote tokens owned by the pool"],"type":"pubkey"},{"name":"creator","docs":["The creator of base token"],"type":"pubkey"},{"name":"token_program_flag","docs":["token program bits","bit0: base token program flag","0: spl_token_program","1: token_program_2022","","bit1: quote token program flag","0: spl_token_program","1: token_program_2022"],"type":"u8"},{"name":"amm_creator_fee_on","docs":["migrate to cpmm, creator fee on quote token or both token"],"type":{"defined":{"name":"AmmCreatorFeeOn"}}},{"name":"platform_vesting_share","docs":["platform vesting token amount"],"type":"u64"},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u8",54]}}]}},{"name":"PoolStatus","docs":["Represents the different states a pool can be in","* Fund - Initial state where pool is accepting funds","* Migrate - Pool funding has ended and waiting for migration","* Trade - Pool migration is complete and amm trading is enabled"],"type":{"kind":"enum","variants":[{"name":"Fund"},{"name":"Migrate"},{"name":"Trade"}]}},{"name":"TradeDirection","docs":["Specifies the direction of a trade in the bonding curve","This is important because curves can treat tokens differently through weights or offsets"],"type":{"kind":"enum","variants":[{"name":"Buy"},{"name":"Sell"}]}},{"name":"TradeEvent","docs":["Emitted when trade process"],"type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"total_base_sell","type":"u64"},{"name":"virtual_base","type":"u64"},{"name":"virtual_quote","type":"u64"},{"name":"real_base_before","type":"u64"},{"name":"real_quote_before","type":"u64"},{"name":"real_base_after","type":"u64"},{"name":"real_quote_after","type":"u64"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"platform_fee","type":"u64"},{"name":"creator_fee","type":"u64"},{"name":"share_fee","type":"u64"},{"name":"trade_direction","type":{"defined":{"name":"TradeDirection"}}},{"name":"pool_status","type":{"defined":{"name":"PoolStatus"}}},{"name":"exact_in","type":"bool"}]}},{"name":"TransferFeeExtensionParams","type":{"kind":"struct","fields":[{"name":"transfer_fee_basis_points","docs":["denominator is 10000, currently, this value cannot exceed 5%, which is 500."],"type":"u16"},{"name":"maximum_fee","docs":["Maximum fee on each transfers, the value must exceed supply * transfer_fee_basis_points / 10000"],"type":"u64"}]}},{"name":"VestingParams","type":{"kind":"struct","fields":[{"name":"total_locked_amount","type":"u64"},{"name":"cliff_period","type":"u64"},{"name":"unlock_period","type":"u64"}]}},{"name":"VestingRecord","type":{"kind":"struct","fields":[{"name":"epoch","docs":["Account update epoch"],"type":"u64"},{"name":"pool","docs":["The pool state account"],"type":"pubkey"},{"name":"beneficiary","docs":["The beneficiary of the vesting account"],"type":"pubkey"},{"name":"claimed_amount","docs":["The amount of tokens claimed"],"type":"u64"},{"name":"token_share_amount","docs":["The share amount of the token to be vested"],"type":"u64"},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u64",8]}}]}},{"name":"VestingSchedule","type":{"kind":"struct","fields":[{"name":"total_locked_amount","type":"u64"},{"name":"cliff_period","type":"u64"},{"name":"unlock_period","type":"u64"},{"name":"start_time","type":"u64"},{"name":"allocated_share_amount","docs":["Total allocated share amount of the base token, not greater than total_locked_amount"],"type":"u64"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/raydium_lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.json b/olddocs/archivekbot2/idls/raydium_lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.json new file mode 100644 index 0000000..eeb48fa --- /dev/null +++ b/olddocs/archivekbot2/idls/raydium_lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"raydium_liquidity_locking","instructions":[{"name":"lockClmmPosition","docs":["Lock an existing clmm's position","","# Arguments","","* `ctx` - The context of accounts","* `with_metadata` - Create NFT with metadata or not",""],"accounts":[{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true,"docs":["Pay to create account lamports"]},{"name":"positionNftOwner","isMut":false,"isSigner":true,"docs":["The position NFT owner"]},{"name":"feeNftOwner","isMut":false,"isSigner":false},{"name":"positionNftAccount","isMut":true,"isSigner":false,"docs":["The token account for the tokenized position"]},{"name":"personalPosition","isMut":false,"isSigner":false,"docs":["Lock personal position associated with position_nft_account's mint"]},{"name":"positionNftMint","isMut":false,"isSigner":false,"docs":["Position NFT mint to create a ATA `locked_nft_account` belongs to program"]},{"name":"lockedNftAccount","isMut":true,"isSigner":false,"docs":["Program's token account where `position_nft_account` will transfer to"]},{"name":"lockedPosition","isMut":true,"isSigner":false,"docs":["Store the locked information of the personal position"]},{"name":"feeNftMint","isMut":true,"isSigner":true,"docs":["Create a unique fee nft mint"]},{"name":"feeNftAccount","isMut":true,"isSigner":false,"docs":["Token account where fee nft will be minted to"]},{"name":"metadataAccount","isMut":true,"isSigner":false,"docs":["To store metaplex metadata"]},{"name":"metadataProgram","isMut":false,"isSigner":false,"docs":["Program to create NFT metadata account"]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Program to create an ATA for receiving fee NFT"]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Sysvar for token mint and ATA creation"]},{"name":"feeNftTokenProgram","isMut":false,"isSigner":false,"docs":["Token program fee NFT mint/account belongs to"]},{"name":"lockedNftTokenProgram","isMut":false,"isSigner":false,"docs":["Token program position NFT mint/account belongs to"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["Program to create new account"]}],"args":[{"name":"withMetadata","type":"bool"}]},{"name":"collectClmmFeesAndRewards","docs":["collect clmm locked postion fees and rewards","# Arguments","","* `ctx` - The context of accounts",""],"accounts":[{"name":"authority","isMut":false,"isSigner":false},{"name":"feeNftOwner","isMut":false,"isSigner":true,"docs":["The owner who has fee nft account"]},{"name":"feeNftAccount","isMut":false,"isSigner":false,"docs":["Fee token account"]},{"name":"lockedPosition","isMut":false,"isSigner":false,"docs":["Store the locked the information of position"]},{"name":"clmmProgram","isMut":false,"isSigner":false,"docs":["clmm program"]},{"name":"lockedNftAccount","isMut":true,"isSigner":false,"docs":["Program ATA locked NFT account or user ATA position NFT account"]},{"name":"personalPosition","isMut":true,"isSigner":false,"docs":["Decrease liquidity for this position"]},{"name":"poolState","isMut":true,"isSigner":false},{"name":"protocolPosition","isMut":true,"isSigner":false},{"name":"token0Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_0"]},{"name":"token1Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_1"]},{"name":"tickArrayLower","isMut":true,"isSigner":false,"docs":["Stores init state for the lower tick"]},{"name":"tickArrayUpper","isMut":true,"isSigner":false,"docs":["Stores init state for the upper tick"]},{"name":"recipientToken0Account","isMut":true,"isSigner":false,"docs":["The destination token account for receive amount_0"]},{"name":"recipientToken1Account","isMut":true,"isSigner":false,"docs":["The destination token account for receive amount_1"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["SPL program to transfer out tokens"]},{"name":"tokenProgram2022","isMut":false,"isSigner":false,"docs":["Token program 2022"]},{"name":"memoProgram","isMut":false,"isSigner":false,"docs":["memo program"]},{"name":"vault0Mint","isMut":false,"isSigner":false,"docs":["The mint of token vault 0"]},{"name":"vault1Mint","isMut":false,"isSigner":false,"docs":["The mint of token vault 1"]}],"args":[]},{"name":"lockCpLiquidity","docs":["Lock cpSwap liquidity and mint a nft to collect locked liquidity's fee.","","# Arguments","","* `ctx` - The context of accounts","* `lp_amount` - The lp amount to lock","* `with_metadata` - Create NFT with metadata or not",""],"accounts":[{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true,"docs":["Pay to create account lamports"]},{"name":"liquidityOwner","isMut":false,"isSigner":true,"docs":["who want to lock liquidity"]},{"name":"feeNftOwner","isMut":false,"isSigner":false},{"name":"feeNftMint","isMut":true,"isSigner":true,"docs":["Create a unique fee nft mint"]},{"name":"feeNftAccount","isMut":true,"isSigner":false,"docs":["Token account where fee nft will be minted to"]},{"name":"poolState","isMut":false,"isSigner":false,"docs":["Indicates which pool the locked liquidity belong to"]},{"name":"lockedLiquidity","isMut":true,"isSigner":false,"docs":["Store the locked information of liquidity"]},{"name":"lpMint","isMut":false,"isSigner":false,"docs":["The mint of liquidity token"]},{"name":"liquidityOwnerLp","isMut":true,"isSigner":false,"docs":["liquidity owner lp token account"]},{"name":"lockedLpVault","isMut":true,"isSigner":false,"docs":["Locked lp token deposit to"]},{"name":"token0Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_0"]},{"name":"token1Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_1"]},{"name":"metadataAccount","isMut":true,"isSigner":false,"docs":["To store metaplex metadata"]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Sysvar for token mint and ATA creation"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["Program to create the new account"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Program to create/transfer mint/token account"]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Program to create an ATA for receiving fee NFT"]},{"name":"metadataProgram","isMut":false,"isSigner":false,"docs":["Program to create NFT metadata accunt"]}],"args":[{"name":"lpAmount","type":"u64"},{"name":"withMetadata","type":"bool"}]},{"name":"collectCpFees","docs":["collect cpSwap locked liquidity's fees","# Arguments","","* `ctx` - The context of accounts","* `fee_lp_amount` - The amount lp want to claim",""],"accounts":[{"name":"authority","isMut":false,"isSigner":false},{"name":"feeNftOwner","isMut":false,"isSigner":true,"docs":["Fee nft owner who is allowed to receive fees"]},{"name":"feeNftAccount","isMut":false,"isSigner":false,"docs":["Fee token account"]},{"name":"lockedLiquidity","isMut":true,"isSigner":false,"docs":["Store the locked the information of liquidity"]},{"name":"cpSwapProgram","isMut":false,"isSigner":false,"docs":["cpswap program"]},{"name":"cpAuthority","isMut":false,"isSigner":false},{"name":"poolState","isMut":true,"isSigner":false,"docs":["Pool state account"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp mint"]},{"name":"recipientToken0Account","isMut":true,"isSigner":false,"docs":["The token account for receive token_0"]},{"name":"recipientToken1Account","isMut":true,"isSigner":false,"docs":["The token account for receive token_1"]},{"name":"token0Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_0"]},{"name":"token1Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_1"]},{"name":"vault0Mint","isMut":false,"isSigner":false,"docs":["The mint of token_0 vault"]},{"name":"vault1Mint","isMut":false,"isSigner":false,"docs":["The mint of token_1 vault"]},{"name":"lockedLpVault","isMut":true,"isSigner":false,"docs":["locked lp token account"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token Program"]},{"name":"tokenProgram2022","isMut":false,"isSigner":false,"docs":["Token program 2022"]},{"name":"memoProgram","isMut":false,"isSigner":false,"docs":["memo program"]}],"args":[{"name":"feeLpAmount","type":"u64"}]}],"accounts":[{"name":"LockedCpLiquidityState","type":{"kind":"struct","fields":[{"name":"lockedLpAmount","docs":["The Locked liquidity amount without claimed lp fee"],"type":"u64"},{"name":"claimedLpAmount","docs":["Claimed lp fee amount"],"type":"u64"},{"name":"unclaimedLpAmount","docs":["Unclaimed lp fee amount"],"type":"u64"},{"name":"lastLp","docs":["Last updated cp pool lp total supply"],"type":"u64"},{"name":"lastK","docs":["Last updated cp pool k"],"type":"u128"},{"name":"recentEpoch","docs":["Account update recent epoch"],"type":"u64"},{"name":"poolId","docs":["The ID of the pool with which this record is connected"],"type":"publicKey"},{"name":"feeNftMint","docs":["nft mint to check who has authority to collect fee"],"type":"publicKey"},{"name":"lockedOwner","docs":["The owner who has locked liquidity"],"type":"publicKey"},{"name":"lockedLpMint","docs":["The mint of locked lp token"],"type":"publicKey"},{"name":"padding","docs":["Unused bytes for future upgrades."],"type":{"array":["u64",8]}}]}},{"name":"LockedClmmPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"positionOwner","docs":["The owner who has locked clmm NFT"],"type":"publicKey"},{"name":"poolId","docs":["The ID of the pool with which this record is connected"],"type":"publicKey"},{"name":"positionId","docs":["The ID of the position with which this record is connected"],"type":"publicKey"},{"name":"lockedNftAccount","docs":["Program ATA locked NFT account or user ATA position NFT account"],"type":"publicKey"},{"name":"feeNftMint","docs":["nft mint to check who has authority to collect fee"],"type":"publicKey"},{"name":"recentEpoch","docs":["account update recent epoch"],"type":"u64"},{"name":"padding","docs":["Unused bytes for future upgrades."],"type":{"array":["u64",8]}}]}}],"events":[{"name":"SettleCpFeeEvent","fields":[{"name":"deltaAmount","type":"u64","index":false},{"name":"unclaimedAmount","type":"u64","index":false},{"name":"lockedAmount","type":"u64","index":false},{"name":"currPoolLp","type":"u64","index":false},{"name":"lastPoolLp","type":"u64","index":false},{"name":"currK","type":"u128","index":false},{"name":"lastK","type":"u128","index":false}]}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/saber_decimal.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.json b/olddocs/archivekbot2/idls/saber_decimal.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.json new file mode 100644 index 0000000..e827bc7 --- /dev/null +++ b/olddocs/archivekbot2/idls/saber_decimal.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.json @@ -0,0 +1 @@ +{"version":"0.0.0","name":"add_decimals","instructions":[{"name":"initializeWrapper","accounts":[{"name":"wrapper","isMut":true,"isSigner":false},{"name":"wrapperUnderlyingTokens","isMut":false,"isSigner":false},{"name":"underlyingMint","isMut":false,"isSigner":false},{"name":"wrapperMint","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"deposit","accounts":[{"name":"wrapper","isMut":false,"isSigner":false},{"name":"wrapperMint","isMut":true,"isSigner":false},{"name":"wrapperUnderlyingTokens","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"userUnderlyingTokens","isMut":true,"isSigner":false},{"name":"userWrappedTokens","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"depositAmount","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"wrapper","isMut":false,"isSigner":false},{"name":"wrapperMint","isMut":true,"isSigner":false},{"name":"wrapperUnderlyingTokens","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"userUnderlyingTokens","isMut":true,"isSigner":false},{"name":"userWrappedTokens","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxBurnAmount","type":"u64"}]}],"accounts":[{"name":"WrappedToken","type":{"kind":"struct","fields":[{"name":"decimals","type":"u8"},{"name":"multiplier","type":"u64"},{"name":"wrapperUnderlyingMint","type":"publicKey"},{"name":"wrapperUnderlyingTokens","type":"publicKey"},{"name":"wrapperMint","type":"publicKey"}]}}],"events":[{"name":"InitEvent","fields":[{"name":"payer","type":"publicKey","index":false},{"name":"decimals","type":"u8","index":false},{"name":"multiplier","type":"u64","index":false},{"name":"wrapperUnderlyingMint","type":"publicKey","index":false},{"name":"wrapperUnderlyingTokens","type":"publicKey","index":false},{"name":"wrapperMint","type":"publicKey","index":false}]},{"name":"DepositEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"underlyingMint","type":"publicKey","index":false},{"name":"wrappedMint","type":"publicKey","index":false},{"name":"depositAmount","type":"u64","index":false},{"name":"mintAmount","type":"u64","index":false}]},{"name":"WithdrawEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"underlyingMint","type":"publicKey","index":false},{"name":"wrappedMint","type":"publicKey","index":false},{"name":"withdrawAmount","type":"u64","index":false},{"name":"burnAmount","type":"u64","index":false},{"name":"dustAmount","type":"u64","index":false}]}],"errors":[{"code":300,"name":"InitNonEmptyAccount","msg":"Wrapper underlying tokens account must be empty."},{"code":301,"name":"InitWrapperSupplyNonZero","msg":"Supply of the wrapper mint is non-zero"},{"code":302,"name":"InitWrapperUnderlyingOwnerMismatch","msg":"Owner of the wrapper underlying tokens account must be the wrapper"},{"code":303,"name":"InitWrapperUnderlyingMintMismatch","msg":"Underlying mint does not match underlying tokens account mint"},{"code":304,"name":"InitMintAuthorityMismatch","msg":"Mint authority mismatch"},{"code":305,"name":"InitMultiplierOverflow","msg":"Initial decimals too high"},{"code":306,"name":"InitWrapperDecimalsTooLow","msg":"The number of target decimals must be greater than or equal to the underlying asset's decimals."},{"code":307,"name":"MintAmountOverflow","msg":"Mint amount overflow. This error happens when the token cannot support this many decimals added to the token."},{"code":308,"name":"InvalidBurnAmount","msg":"Failed to convert burn amount from withdraw amount."},{"code":309,"name":"InvalidWithdrawAmount","msg":"Failed to convert withdraw amount from wrapped amount."},{"code":310,"name":"InsufficientUnderlyingBalance","msg":"User does not have enough underlying tokens"},{"code":311,"name":"InsufficientWrappedBalance","msg":"User does not have enough wrapped tokens"},{"code":312,"name":"ZeroAmount","msg":"Cannot send zero tokens"},{"code":313,"name":"UnknownAction","msg":"Unknown router action"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/squads.SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.json b/olddocs/archivekbot2/idls/squads.SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.json new file mode 100644 index 0000000..92bcbac --- /dev/null +++ b/olddocs/archivekbot2/idls/squads.SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.json @@ -0,0 +1 @@ +{"version":"2.0.0","name":"squads_multisig_program","instructions":[{"name":"programConfigInit","docs":["Initialize the program config."],"accounts":[{"name":"programConfig","isMut":true,"isSigner":false},{"name":"initializer","isMut":true,"isSigner":true,"docs":["The hard-coded account that is used to initialize the program config once."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ProgramConfigInitArgs"}}]},{"name":"programConfigSetAuthority","docs":["Set the `authority` parameter of the program config."],"accounts":[{"name":"programConfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"ProgramConfigSetAuthorityArgs"}}]},{"name":"programConfigSetMultisigCreationFee","docs":["Set the `multisig_creation_fee` parameter of the program config."],"accounts":[{"name":"programConfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"ProgramConfigSetMultisigCreationFeeArgs"}}]},{"name":"programConfigSetTreasury","docs":["Set the `treasury` parameter of the program config."],"accounts":[{"name":"programConfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"ProgramConfigSetTreasuryArgs"}}]},{"name":"multisigCreate","docs":["Create a multisig."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"createKey","isMut":false,"isSigner":true,"docs":["An ephemeral signer that is used as a seed for the Multisig PDA.","Must be a signer to prevent front-running attack by someone else but the original creator."]},{"name":"creator","isMut":true,"isSigner":true,"docs":["The creator of the multisig."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MultisigCreateArgs"}}]},{"name":"multisigCreateV2","docs":["Create a multisig."],"accounts":[{"name":"programConfig","isMut":false,"isSigner":false,"docs":["Global program config account."]},{"name":"treasury","isMut":true,"isSigner":false,"docs":["The treasury where the creation fee is transferred to."]},{"name":"multisig","isMut":true,"isSigner":false},{"name":"createKey","isMut":false,"isSigner":true,"docs":["An ephemeral signer that is used as a seed for the Multisig PDA.","Must be a signer to prevent front-running attack by someone else but the original creator."]},{"name":"creator","isMut":true,"isSigner":true,"docs":["The creator of the multisig."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MultisigCreateArgsV2"}}]},{"name":"multisigAddMember","docs":["Add a new member to the controlled multisig."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigAddMemberArgs"}}]},{"name":"multisigRemoveMember","docs":["Remove a member/key from the controlled multisig."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigRemoveMemberArgs"}}]},{"name":"multisigSetTimeLock","docs":["Set the `time_lock` config parameter for the controlled multisig."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigSetTimeLockArgs"}}]},{"name":"multisigChangeThreshold","docs":["Set the `threshold` config parameter for the controlled multisig."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigChangeThresholdArgs"}}]},{"name":"multisigSetConfigAuthority","docs":["Set the multisig `config_authority`."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigSetConfigAuthorityArgs"}}]},{"name":"multisigSetRentCollector","docs":["Set the multisig `rent_collector`."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigSetRentCollectorArgs"}}]},{"name":"multisigAddSpendingLimit","docs":["Create a new spending limit for the controlled multisig."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"spendingLimit","isMut":true,"isSigner":false},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MultisigAddSpendingLimitArgs"}}]},{"name":"multisigRemoveSpendingLimit","docs":["Remove the spending limit from the controlled multisig."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"spendingLimit","isMut":true,"isSigner":false},{"name":"rentCollector","isMut":true,"isSigner":false,"docs":["This is usually the same as `config_authority`, but can be a different account if needed."]}],"args":[{"name":"args","type":{"defined":"MultisigRemoveSpendingLimitArgs"}}]},{"name":"configTransactionCreate","docs":["Create a new config transaction."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"transaction","isMut":true,"isSigner":false},{"name":"creator","isMut":false,"isSigner":true,"docs":["The member of the multisig that is creating the transaction."]},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["The payer for the transaction account rent."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ConfigTransactionCreateArgs"}}]},{"name":"configTransactionExecute","docs":["Execute a config transaction.","The transaction must be `Approved`."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false,"docs":["The multisig account that owns the transaction."]},{"name":"member","isMut":false,"isSigner":true,"docs":["One of the multisig members with `Execute` permission."]},{"name":"proposal","isMut":true,"isSigner":false,"docs":["The proposal account associated with the transaction."]},{"name":"transaction","isMut":false,"isSigner":false,"docs":["The transaction to execute."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged/credited in case the config transaction causes space reallocation,","for example when adding a new member, adding or removing a spending limit.","This is usually the same as `member`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[]},{"name":"vaultTransactionCreate","docs":["Create a new vault transaction."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"transaction","isMut":true,"isSigner":false},{"name":"creator","isMut":false,"isSigner":true,"docs":["The member of the multisig that is creating the transaction."]},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["The payer for the transaction account rent."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"VaultTransactionCreateArgs"}}]},{"name":"vaultTransactionExecute","docs":["Execute a vault transaction.","The transaction must be `Approved`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":true,"isSigner":false,"docs":["The proposal account associated with the transaction."]},{"name":"transaction","isMut":false,"isSigner":false,"docs":["The transaction to execute."]},{"name":"member","isMut":false,"isSigner":true}],"args":[]},{"name":"batchCreate","docs":["Create a new batch."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"batch","isMut":true,"isSigner":false},{"name":"creator","isMut":false,"isSigner":true,"docs":["The member of the multisig that is creating the batch."]},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["The payer for the batch account rent."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"BatchCreateArgs"}}]},{"name":"batchAddTransaction","docs":["Add a transaction to the batch."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false,"docs":["Multisig account this batch belongs to."]},{"name":"proposal","isMut":false,"isSigner":false,"docs":["The proposal account associated with the batch."]},{"name":"batch","isMut":true,"isSigner":false},{"name":"transaction","isMut":true,"isSigner":false,"docs":["`VaultBatchTransaction` account to initialize and add to the `batch`."]},{"name":"member","isMut":false,"isSigner":true,"docs":["Member of the multisig."]},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["The payer for the batch transaction account rent."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"BatchAddTransactionArgs"}}]},{"name":"batchExecuteTransaction","docs":["Execute a transaction from the batch."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false,"docs":["Multisig account this batch belongs to."]},{"name":"member","isMut":false,"isSigner":true,"docs":["Member of the multisig."]},{"name":"proposal","isMut":true,"isSigner":false,"docs":["The proposal account associated with the batch.","If `transaction` is the last in the batch, the `proposal` status will be set to `Executed`."]},{"name":"batch","isMut":true,"isSigner":false},{"name":"transaction","isMut":false,"isSigner":false,"docs":["Batch transaction to execute."]}],"args":[]},{"name":"proposalCreate","docs":["Create a new multisig proposal."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":true,"isSigner":false},{"name":"creator","isMut":false,"isSigner":true,"docs":["The member of the multisig that is creating the proposal."]},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["The payer for the proposal account rent."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ProposalCreateArgs"}}]},{"name":"proposalActivate","docs":["Update status of a multisig proposal from `Draft` to `Active`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"member","isMut":true,"isSigner":true},{"name":"proposal","isMut":true,"isSigner":false}],"args":[]},{"name":"proposalApprove","docs":["Approve a multisig proposal on behalf of the `member`.","The proposal must be `Active`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"member","isMut":true,"isSigner":true},{"name":"proposal","isMut":true,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ProposalVoteArgs"}}]},{"name":"proposalReject","docs":["Reject a multisig proposal on behalf of the `member`.","The proposal must be `Active`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"member","isMut":true,"isSigner":true},{"name":"proposal","isMut":true,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ProposalVoteArgs"}}]},{"name":"proposalCancel","docs":["Cancel a multisig proposal on behalf of the `member`.","The proposal must be `Approved`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"member","isMut":true,"isSigner":true},{"name":"proposal","isMut":true,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ProposalVoteArgs"}}]},{"name":"spendingLimitUse","docs":["Use a spending limit to transfer tokens from a multisig vault to a destination account."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false,"docs":["The multisig account the `spending_limit` is for."]},{"name":"member","isMut":false,"isSigner":true},{"name":"spendingLimit","isMut":true,"isSigner":false,"docs":["The SpendingLimit account to use."]},{"name":"vault","isMut":true,"isSigner":false,"docs":["Multisig vault account to transfer tokens from."]},{"name":"destination","isMut":true,"isSigner":false,"docs":["Destination account to transfer tokens to."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["In case `spending_limit.mint` is SOL."]},{"name":"mint","isMut":false,"isSigner":false,"isOptional":true,"docs":["The mint of the tokens to transfer in case `spending_limit.mint` is an SPL token."]},{"name":"vaultTokenAccount","isMut":true,"isSigner":false,"isOptional":true,"docs":["Multisig vault token account to transfer tokens from in case `spending_limit.mint` is an SPL token."]},{"name":"destinationTokenAccount","isMut":true,"isSigner":false,"isOptional":true,"docs":["Destination token account in case `spending_limit.mint` is an SPL token."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["In case `spending_limit.mint` is an SPL token."]}],"args":[{"name":"args","type":{"defined":"SpendingLimitUseArgs"}}]},{"name":"configTransactionAccountsClose","docs":["Closes a `ConfigTransaction` and the corresponding `Proposal`.","`transaction` can be closed if either:","- the `proposal` is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.","- the `proposal` is stale."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":true,"isSigner":false},{"name":"transaction","isMut":true,"isSigner":false,"docs":["ConfigTransaction corresponding to the `proposal`."]},{"name":"rentCollector","isMut":true,"isSigner":false,"docs":["The rent collector."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"vaultTransactionAccountsClose","docs":["Closes a `VaultTransaction` and the corresponding `Proposal`.","`transaction` can be closed if either:","- the `proposal` is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.","- the `proposal` is stale and not `Approved`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":true,"isSigner":false},{"name":"transaction","isMut":true,"isSigner":false,"docs":["VaultTransaction corresponding to the `proposal`."]},{"name":"rentCollector","isMut":true,"isSigner":false,"docs":["The rent collector."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"vaultBatchTransactionAccountClose","docs":["Closes a `VaultBatchTransaction` belonging to the `batch` and `proposal`.","`transaction` can be closed if either:","- it's marked as executed within the `batch`;","- the `proposal` is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.","- the `proposal` is stale and not `Approved`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":false,"isSigner":false},{"name":"batch","isMut":true,"isSigner":false,"docs":["`Batch` corresponding to the `proposal`."]},{"name":"transaction","isMut":true,"isSigner":false,"docs":["`VaultBatchTransaction` account to close.","The transaction must be the current last one in the batch."]},{"name":"rentCollector","isMut":true,"isSigner":false,"docs":["The rent collector."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"batchAccountsClose","docs":["Closes Batch and the corresponding Proposal accounts for proposals in terminal states:","`Executed`, `Rejected`, or `Cancelled` or stale proposals that aren't `Approved`.","","This instruction is only allowed to be executed when all `VaultBatchTransaction` accounts","in the `batch` are already closed: `batch.size == 0`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":true,"isSigner":false},{"name":"batch","isMut":true,"isSigner":false,"docs":["`Batch` corresponding to the `proposal`."]},{"name":"rentCollector","isMut":true,"isSigner":false,"docs":["The rent collector."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Batch","docs":["Stores data required for serial execution of a batch of multisig vault transactions.","Vault transaction is a transaction that's executed on behalf of the multisig vault PDA","and wraps arbitrary Solana instructions, typically calling into other Solana programs.","The transactions themselves are stored in separate PDAs associated with the this account."],"type":{"kind":"struct","fields":[{"name":"multisig","docs":["The multisig this belongs to."],"type":"publicKey"},{"name":"creator","docs":["Member of the Multisig who submitted the batch."],"type":"publicKey"},{"name":"index","docs":["Index of this batch within the multisig transactions."],"type":"u64"},{"name":"bump","docs":["PDA bump."],"type":"u8"},{"name":"vaultIndex","docs":["Index of the vault this batch belongs to."],"type":"u8"},{"name":"vaultBump","docs":["Derivation bump of the vault PDA this batch belongs to."],"type":"u8"},{"name":"size","docs":["Number of transactions in the batch."],"type":"u32"},{"name":"executedTransactionIndex","docs":["Index of the last executed transaction within the batch.","0 means that no transactions have been executed yet."],"type":"u32"}]}},{"name":"VaultBatchTransaction","docs":["Stores data required for execution of one transaction from a batch."],"type":{"kind":"struct","fields":[{"name":"bump","docs":["PDA bump."],"type":"u8"},{"name":"ephemeralSignerBumps","docs":["Derivation bumps for additional signers.","Some transactions require multiple signers. Often these additional signers are \"ephemeral\" keypairs","that are generated on the client with a sole purpose of signing the transaction and be discarded immediately after.","When wrapping such transactions into multisig ones, we replace these \"ephemeral\" signing keypairs","with PDAs derived from the transaction's `transaction_index` and controlled by the Multisig Program;","during execution the program includes the seeds of these PDAs into the `invoke_signed` calls,","thus \"signing\" on behalf of these PDAs."],"type":"bytes"},{"name":"message","docs":["data required for executing the transaction."],"type":{"defined":"VaultTransactionMessage"}}]}},{"name":"ConfigTransaction","docs":["Stores data required for execution of a multisig configuration transaction.","Config transaction can perform a predefined set of actions on the Multisig PDA, such as adding/removing members,","changing the threshold, etc."],"type":{"kind":"struct","fields":[{"name":"multisig","docs":["The multisig this belongs to."],"type":"publicKey"},{"name":"creator","docs":["Member of the Multisig who submitted the transaction."],"type":"publicKey"},{"name":"index","docs":["Index of this transaction within the multisig."],"type":"u64"},{"name":"bump","docs":["bump for the transaction seeds."],"type":"u8"},{"name":"actions","docs":["Action to be performed on the multisig."],"type":{"vec":{"defined":"ConfigAction"}}}]}},{"name":"Multisig","type":{"kind":"struct","fields":[{"name":"createKey","docs":["Key that is used to seed the multisig PDA."],"type":"publicKey"},{"name":"configAuthority","docs":["The authority that can change the multisig config.","This is a very important parameter as this authority can change the members and threshold.","","The convention is to set this to `Pubkey::default()`.","In this case, the multisig becomes autonomous, so every config change goes through","the normal process of voting by the members.","","However, if this parameter is set to any other key, all the config changes for this multisig","will need to be signed by the `config_authority`. We call such a multisig a \"controlled multisig\"."],"type":"publicKey"},{"name":"threshold","docs":["Threshold for signatures."],"type":"u16"},{"name":"timeLock","docs":["How many seconds must pass between transaction voting settlement and execution."],"type":"u32"},{"name":"transactionIndex","docs":["Last transaction index. 0 means no transactions have been created."],"type":"u64"},{"name":"staleTransactionIndex","docs":["Last stale transaction index. All transactions up until this index are stale.","This index is updated when multisig config (members/threshold/time_lock) changes."],"type":"u64"},{"name":"rentCollector","docs":["The address where the rent for the accounts related to executed, rejected, or cancelled","transactions can be reclaimed. If set to `None`, the rent reclamation feature is turned off."],"type":{"option":"publicKey"}},{"name":"bump","docs":["Bump for the multisig PDA seed."],"type":"u8"},{"name":"members","docs":["Members of the multisig."],"type":{"vec":{"defined":"Member"}}}]}},{"name":"ProgramConfig","docs":["Global program configuration account."],"type":{"kind":"struct","fields":[{"name":"authority","docs":["The authority which can update the config."],"type":"publicKey"},{"name":"multisigCreationFee","docs":["The lamports amount charged for creating a new multisig account.","This fee is sent to the `treasury` account."],"type":"u64"},{"name":"treasury","docs":["The treasury account to send charged fees to."],"type":"publicKey"},{"name":"reserved","docs":["Reserved for future use."],"type":{"array":["u8",64]}}]}},{"name":"Proposal","docs":["Stores the data required for tracking the status of a multisig proposal.","Each `Proposal` has a 1:1 association with a transaction account, e.g. a `VaultTransaction` or a `ConfigTransaction`;","the latter can be executed only after the `Proposal` has been approved and its time lock is released."],"type":{"kind":"struct","fields":[{"name":"multisig","docs":["The multisig this belongs to."],"type":"publicKey"},{"name":"transactionIndex","docs":["Index of the multisig transaction this proposal is associated with."],"type":"u64"},{"name":"status","docs":["The status of the transaction."],"type":{"defined":"ProposalStatus"}},{"name":"bump","docs":["PDA bump."],"type":"u8"},{"name":"approved","docs":["Keys that have approved/signed."],"type":{"vec":"publicKey"}},{"name":"rejected","docs":["Keys that have rejected."],"type":{"vec":"publicKey"}},{"name":"cancelled","docs":["Keys that have cancelled (Approved only)."],"type":{"vec":"publicKey"}}]}},{"name":"SpendingLimit","type":{"kind":"struct","fields":[{"name":"multisig","docs":["The multisig this belongs to."],"type":"publicKey"},{"name":"createKey","docs":["Key that is used to seed the SpendingLimit PDA."],"type":"publicKey"},{"name":"vaultIndex","docs":["The index of the vault that the spending limit is for."],"type":"u8"},{"name":"mint","docs":["The token mint the spending limit is for.","Pubkey::default() means SOL.","use NATIVE_MINT for Wrapped SOL."],"type":"publicKey"},{"name":"amount","docs":["The amount of tokens that can be spent in a period.","This amount is in decimals of the mint,","so 1 SOL would be `1_000_000_000` and 1 USDC would be `1_000_000`."],"type":"u64"},{"name":"period","docs":["The reset period of the spending limit.","When it passes, the remaining amount is reset, unless it's `Period::OneTime`."],"type":{"defined":"Period"}},{"name":"remainingAmount","docs":["The remaining amount of tokens that can be spent in the current period.","When reaches 0, the spending limit cannot be used anymore until the period reset."],"type":"u64"},{"name":"lastReset","docs":["Unix timestamp marking the last time the spending limit was reset (or created)."],"type":"i64"},{"name":"bump","docs":["PDA bump."],"type":"u8"},{"name":"members","docs":["Members of the multisig that can use the spending limit.","In case a member is removed from the multisig, the spending limit will remain existent","(until explicitly deleted), but the removed member will not be able to use it anymore."],"type":{"vec":"publicKey"}},{"name":"destinations","docs":["The destination addresses the spending limit is allowed to sent funds to.","If empty, funds can be sent to any address."],"type":{"vec":"publicKey"}}]}},{"name":"VaultTransaction","docs":["Stores data required for tracking the voting and execution status of a vault transaction.","Vault transaction is a transaction that's executed on behalf of the multisig vault PDA","and wraps arbitrary Solana instructions, typically calling into other Solana programs."],"type":{"kind":"struct","fields":[{"name":"multisig","docs":["The multisig this belongs to."],"type":"publicKey"},{"name":"creator","docs":["Member of the Multisig who submitted the transaction."],"type":"publicKey"},{"name":"index","docs":["Index of this transaction within the multisig."],"type":"u64"},{"name":"bump","docs":["bump for the transaction seeds."],"type":"u8"},{"name":"vaultIndex","docs":["Index of the vault this transaction belongs to."],"type":"u8"},{"name":"vaultBump","docs":["Derivation bump of the vault PDA this transaction belongs to."],"type":"u8"},{"name":"ephemeralSignerBumps","docs":["Derivation bumps for additional signers.","Some transactions require multiple signers. Often these additional signers are \"ephemeral\" keypairs","that are generated on the client with a sole purpose of signing the transaction and be discarded immediately after.","When wrapping such transactions into multisig ones, we replace these \"ephemeral\" signing keypairs","with PDAs derived from the MultisigTransaction's `transaction_index` and controlled by the Multisig Program;","during execution the program includes the seeds of these PDAs into the `invoke_signed` calls,","thus \"signing\" on behalf of these PDAs."],"type":"bytes"},{"name":"message","docs":["data required for executing the transaction."],"type":{"defined":"VaultTransactionMessage"}}]}}],"types":[{"name":"BatchAddTransactionArgs","type":{"kind":"struct","fields":[{"name":"ephemeralSigners","docs":["Number of ephemeral signing PDAs required by the transaction."],"type":"u8"},{"name":"transactionMessage","type":"bytes"}]}},{"name":"BatchCreateArgs","type":{"kind":"struct","fields":[{"name":"vaultIndex","docs":["Index of the vault this transaction belongs to."],"type":"u8"},{"name":"memo","type":{"option":"string"}}]}},{"name":"ConfigTransactionCreateArgs","type":{"kind":"struct","fields":[{"name":"actions","type":{"vec":{"defined":"ConfigAction"}}},{"name":"memo","type":{"option":"string"}}]}},{"name":"MultisigAddSpendingLimitArgs","type":{"kind":"struct","fields":[{"name":"createKey","docs":["Key that is used to seed the SpendingLimit PDA."],"type":"publicKey"},{"name":"vaultIndex","docs":["The index of the vault that the spending limit is for."],"type":"u8"},{"name":"mint","docs":["The token mint the spending limit is for."],"type":"publicKey"},{"name":"amount","docs":["The amount of tokens that can be spent in a period.","This amount is in decimals of the mint,","so 1 SOL would be `1_000_000_000` and 1 USDC would be `1_000_000`."],"type":"u64"},{"name":"period","docs":["The reset period of the spending limit.","When it passes, the remaining amount is reset, unless it's `Period::OneTime`."],"type":{"defined":"Period"}},{"name":"members","docs":["Members of the multisig that can use the spending limit.","In case a member is removed from the multisig, the spending limit will remain existent","(until explicitly deleted), but the removed member will not be able to use it anymore."],"type":{"vec":"publicKey"}},{"name":"destinations","docs":["The destination addresses the spending limit is allowed to sent funds to.","If empty, funds can be sent to any address."],"type":{"vec":"publicKey"}},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigAddMemberArgs","type":{"kind":"struct","fields":[{"name":"newMember","type":{"defined":"Member"}},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigRemoveMemberArgs","type":{"kind":"struct","fields":[{"name":"oldMember","type":"publicKey"},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigChangeThresholdArgs","type":{"kind":"struct","fields":[{"name":"newThreshold","type":"u16"},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigSetTimeLockArgs","type":{"kind":"struct","fields":[{"name":"timeLock","type":"u32"},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigSetConfigAuthorityArgs","type":{"kind":"struct","fields":[{"name":"configAuthority","type":"publicKey"},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigSetRentCollectorArgs","type":{"kind":"struct","fields":[{"name":"rentCollector","type":{"option":"publicKey"}},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigCreateArgs","type":{"kind":"struct","fields":[{"name":"configAuthority","docs":["The authority that can configure the multisig: add/remove members, change the threshold, etc.","Should be set to `None` for autonomous multisigs."],"type":{"option":"publicKey"}},{"name":"threshold","docs":["The number of signatures required to execute a transaction."],"type":"u16"},{"name":"members","docs":["The members of the multisig."],"type":{"vec":{"defined":"Member"}}},{"name":"timeLock","docs":["How many seconds must pass between transaction voting, settlement, and execution."],"type":"u32"},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigCreateArgsV2","type":{"kind":"struct","fields":[{"name":"configAuthority","docs":["The authority that can configure the multisig: add/remove members, change the threshold, etc.","Should be set to `None` for autonomous multisigs."],"type":{"option":"publicKey"}},{"name":"threshold","docs":["The number of signatures required to execute a transaction."],"type":"u16"},{"name":"members","docs":["The members of the multisig."],"type":{"vec":{"defined":"Member"}}},{"name":"timeLock","docs":["How many seconds must pass between transaction voting, settlement, and execution."],"type":"u32"},{"name":"rentCollector","docs":["The address where the rent for the accounts related to executed, rejected, or cancelled","transactions can be reclaimed. If set to `None`, the rent reclamation feature is turned off."],"type":{"option":"publicKey"}},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigRemoveSpendingLimitArgs","type":{"kind":"struct","fields":[{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"ProgramConfigInitArgs","type":{"kind":"struct","fields":[{"name":"authority","docs":["The authority that can configure the program config: change the treasury, etc."],"type":"publicKey"},{"name":"multisigCreationFee","docs":["The fee that is charged for creating a new multisig."],"type":"u64"},{"name":"treasury","docs":["The treasury where the creation fee is transferred to."],"type":"publicKey"}]}},{"name":"ProgramConfigSetAuthorityArgs","type":{"kind":"struct","fields":[{"name":"newAuthority","type":"publicKey"}]}},{"name":"ProgramConfigSetMultisigCreationFeeArgs","type":{"kind":"struct","fields":[{"name":"newMultisigCreationFee","type":"u64"}]}},{"name":"ProgramConfigSetTreasuryArgs","type":{"kind":"struct","fields":[{"name":"newTreasury","type":"publicKey"}]}},{"name":"ProposalCreateArgs","type":{"kind":"struct","fields":[{"name":"transactionIndex","docs":["Index of the multisig transaction this proposal is associated with."],"type":"u64"},{"name":"draft","docs":["Whether the proposal should be initialized with status `Draft`."],"type":"bool"}]}},{"name":"ProposalVoteArgs","type":{"kind":"struct","fields":[{"name":"memo","type":{"option":"string"}}]}},{"name":"SpendingLimitUseArgs","type":{"kind":"struct","fields":[{"name":"amount","docs":["Amount of tokens to transfer."],"type":"u64"},{"name":"decimals","docs":["Decimals of the token mint. Used for double-checking against incorrect order of magnitude of `amount`."],"type":"u8"},{"name":"memo","docs":["Memo used for indexing."],"type":{"option":"string"}}]}},{"name":"VaultTransactionCreateArgs","type":{"kind":"struct","fields":[{"name":"vaultIndex","docs":["Index of the vault this transaction belongs to."],"type":"u8"},{"name":"ephemeralSigners","docs":["Number of ephemeral signing PDAs required by the transaction."],"type":"u8"},{"name":"transactionMessage","type":"bytes"},{"name":"memo","type":{"option":"string"}}]}},{"name":"TransactionMessage","docs":["Unvalidated instruction data, must be treated as untrusted."],"type":{"kind":"struct","fields":[{"name":"numSigners","docs":["The number of signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"numWritableSigners","docs":["The number of writable signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"numWritableNonSigners","docs":["The number of writable non-signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"accountKeys","docs":["The list of unique account public keys (including program IDs) that will be used in the provided instructions."],"type":{"defined":"SmallVec"}},{"name":"instructions","docs":["The list of instructions to execute."],"type":{"defined":"SmallVec"}},{"name":"addressTableLookups","docs":["List of address table lookups used to load additional accounts","for this transaction."],"type":{"defined":"SmallVec"}}]}},{"name":"CompiledInstruction","type":{"kind":"struct","fields":[{"name":"programIdIndex","type":"u8"},{"name":"accountIndexes","docs":["Indices into the tx's `account_keys` list indicating which accounts to pass to the instruction."],"type":{"defined":"SmallVec"}},{"name":"data","docs":["Instruction data."],"type":{"defined":"SmallVec"}}]}},{"name":"MessageAddressTableLookup","docs":["Address table lookups describe an on-chain address lookup table to use","for loading more readonly and writable accounts in a single tx."],"type":{"kind":"struct","fields":[{"name":"accountKey","docs":["Address lookup table account key"],"type":"publicKey"},{"name":"writableIndexes","docs":["List of indexes used to load writable account addresses"],"type":{"defined":"SmallVec"}},{"name":"readonlyIndexes","docs":["List of indexes used to load readonly account addresses"],"type":{"defined":"SmallVec"}}]}},{"name":"Member","type":{"kind":"struct","fields":[{"name":"key","type":"publicKey"},{"name":"permissions","type":{"defined":"Permissions"}}]}},{"name":"Permissions","docs":["Bitmask for permissions."],"type":{"kind":"struct","fields":[{"name":"mask","type":"u8"}]}},{"name":"VaultTransactionMessage","type":{"kind":"struct","fields":[{"name":"numSigners","docs":["The number of signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"numWritableSigners","docs":["The number of writable signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"numWritableNonSigners","docs":["The number of writable non-signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"accountKeys","docs":["Unique account pubkeys (including program IDs) required for execution of the tx.","The signer pubkeys appear at the beginning of the vec, with writable pubkeys first, and read-only pubkeys following.","The non-signer pubkeys follow with writable pubkeys first and read-only ones following.","Program IDs are also stored at the end of the vec along with other non-signer non-writable pubkeys:","","```plaintext","[pubkey1, pubkey2, pubkey3, pubkey4, pubkey5, pubkey6, pubkey7, pubkey8]","|---writable---| |---readonly---| |---writable---| |---readonly---|","|------------signers-------------| |----------non-singers-----------|","```"],"type":{"vec":"publicKey"}},{"name":"instructions","docs":["List of instructions making up the tx."],"type":{"vec":{"defined":"MultisigCompiledInstruction"}}},{"name":"addressTableLookups","docs":["List of address table lookups used to load additional accounts","for this transaction."],"type":{"vec":{"defined":"MultisigMessageAddressTableLookup"}}}]}},{"name":"MultisigCompiledInstruction","docs":["Concise serialization schema for instructions that make up a transaction.","Closely mimics the Solana transaction wire format."],"type":{"kind":"struct","fields":[{"name":"programIdIndex","type":"u8"},{"name":"accountIndexes","docs":["Indices into the tx's `account_keys` list indicating which accounts to pass to the instruction."],"type":"bytes"},{"name":"data","docs":["Instruction data."],"type":"bytes"}]}},{"name":"MultisigMessageAddressTableLookup","docs":["Address table lookups describe an on-chain address lookup table to use","for loading more readonly and writable accounts into a transaction."],"type":{"kind":"struct","fields":[{"name":"accountKey","docs":["Address lookup table account key."],"type":"publicKey"},{"name":"writableIndexes","docs":["List of indexes used to load writable accounts."],"type":"bytes"},{"name":"readonlyIndexes","docs":["List of indexes used to load readonly accounts."],"type":"bytes"}]}},{"name":"Vote","type":{"kind":"enum","variants":[{"name":"Approve"},{"name":"Reject"},{"name":"Cancel"}]}},{"name":"ConfigAction","type":{"kind":"enum","variants":[{"name":"AddMember","fields":[{"name":"newMember","type":{"defined":"Member"}}]},{"name":"RemoveMember","fields":[{"name":"oldMember","type":"publicKey"}]},{"name":"ChangeThreshold","fields":[{"name":"newThreshold","type":"u16"}]},{"name":"SetTimeLock","fields":[{"name":"newTimeLock","type":"u32"}]},{"name":"AddSpendingLimit","fields":[{"name":"createKey","docs":["Key that is used to seed the SpendingLimit PDA."],"type":"publicKey"},{"name":"vaultIndex","docs":["The index of the vault that the spending limit is for."],"type":"u8"},{"name":"mint","docs":["The token mint the spending limit is for."],"type":"publicKey"},{"name":"amount","docs":["The amount of tokens that can be spent in a period.","This amount is in decimals of the mint,","so 1 SOL would be `1_000_000_000` and 1 USDC would be `1_000_000`."],"type":"u64"},{"name":"period","docs":["The reset period of the spending limit.","When it passes, the remaining amount is reset, unless it's `Period::OneTime`."],"type":{"defined":"Period"}},{"name":"members","docs":["Members of the multisig that can use the spending limit.","In case a member is removed from the multisig, the spending limit will remain existent","(until explicitly deleted), but the removed member will not be able to use it anymore."],"type":{"vec":"publicKey"}},{"name":"destinations","docs":["The destination addresses the spending limit is allowed to sent funds to.","If empty, funds can be sent to any address."],"type":{"vec":"publicKey"}}]},{"name":"RemoveSpendingLimit","fields":[{"name":"spendingLimit","type":"publicKey"}]},{"name":"SetRentCollector","fields":[{"name":"newRentCollector","type":{"option":"publicKey"}}]}]}},{"name":"Permission","type":{"kind":"enum","variants":[{"name":"Initiate"},{"name":"Vote"},{"name":"Execute"}]}},{"name":"ProposalStatus","docs":["The status of a proposal.","Each variant wraps a timestamp of when the status was set."],"type":{"kind":"enum","variants":[{"name":"Draft","fields":[{"name":"timestamp","type":"i64"}]},{"name":"Active","fields":[{"name":"timestamp","type":"i64"}]},{"name":"Rejected","fields":[{"name":"timestamp","type":"i64"}]},{"name":"Approved","fields":[{"name":"timestamp","type":"i64"}]},{"name":"Executing"},{"name":"Executed","fields":[{"name":"timestamp","type":"i64"}]},{"name":"Cancelled","fields":[{"name":"timestamp","type":"i64"}]}]}},{"name":"Period","docs":["The reset period of the spending limit."],"type":{"kind":"enum","variants":[{"name":"OneTime"},{"name":"Day"},{"name":"Week"},{"name":"Month"}]}}],"errors":[{"code":6000,"name":"DuplicateMember","msg":"Found multiple members with the same pubkey"},{"code":6001,"name":"EmptyMembers","msg":"Members array is empty"},{"code":6002,"name":"TooManyMembers","msg":"Too many members, can be up to 65535"},{"code":6003,"name":"InvalidThreshold","msg":"Invalid threshold, must be between 1 and number of members with Vote permission"},{"code":6004,"name":"Unauthorized","msg":"Attempted to perform an unauthorized action"},{"code":6005,"name":"NotAMember","msg":"Provided pubkey is not a member of multisig"},{"code":6006,"name":"InvalidTransactionMessage","msg":"TransactionMessage is malformed."},{"code":6007,"name":"StaleProposal","msg":"Proposal is stale"},{"code":6008,"name":"InvalidProposalStatus","msg":"Invalid proposal status"},{"code":6009,"name":"InvalidTransactionIndex","msg":"Invalid transaction index"},{"code":6010,"name":"AlreadyApproved","msg":"Member already approved the transaction"},{"code":6011,"name":"AlreadyRejected","msg":"Member already rejected the transaction"},{"code":6012,"name":"AlreadyCancelled","msg":"Member already cancelled the transaction"},{"code":6013,"name":"InvalidNumberOfAccounts","msg":"Wrong number of accounts provided"},{"code":6014,"name":"InvalidAccount","msg":"Invalid account provided"},{"code":6015,"name":"RemoveLastMember","msg":"Cannot remove last member"},{"code":6016,"name":"NoVoters","msg":"Members don't include any voters"},{"code":6017,"name":"NoProposers","msg":"Members don't include any proposers"},{"code":6018,"name":"NoExecutors","msg":"Members don't include any executors"},{"code":6019,"name":"InvalidStaleTransactionIndex","msg":"`stale_transaction_index` must be <= `transaction_index`"},{"code":6020,"name":"NotSupportedForControlled","msg":"Instruction not supported for controlled multisig"},{"code":6021,"name":"TimeLockNotReleased","msg":"Proposal time lock has not been released"},{"code":6022,"name":"NoActions","msg":"Config transaction must have at least one action"},{"code":6023,"name":"MissingAccount","msg":"Missing account"},{"code":6024,"name":"InvalidMint","msg":"Invalid mint"},{"code":6025,"name":"InvalidDestination","msg":"Invalid destination"},{"code":6026,"name":"SpendingLimitExceeded","msg":"Spending limit exceeded"},{"code":6027,"name":"DecimalsMismatch","msg":"Decimals don't match the mint"},{"code":6028,"name":"UnknownPermission","msg":"Member has unknown permission"},{"code":6029,"name":"ProtectedAccount","msg":"Account is protected, it cannot be passed into a CPI as writable"},{"code":6030,"name":"TimeLockExceedsMaxAllowed","msg":"Time lock exceeds the maximum allowed (90 days)"},{"code":6031,"name":"IllegalAccountOwner","msg":"Account is not owned by Multisig program"},{"code":6032,"name":"RentReclamationDisabled","msg":"Rent reclamation is disabled for this multisig"},{"code":6033,"name":"InvalidRentCollector","msg":"Invalid rent collector address"},{"code":6034,"name":"ProposalForAnotherMultisig","msg":"Proposal is for another multisig"},{"code":6035,"name":"TransactionForAnotherMultisig","msg":"Transaction is for another multisig"},{"code":6036,"name":"TransactionNotMatchingProposal","msg":"Transaction doesn't match proposal"},{"code":6037,"name":"TransactionNotLastInBatch","msg":"Transaction is not last in batch"},{"code":6038,"name":"BatchNotEmpty","msg":"Batch is not empty"},{"code":6039,"name":"SpendingLimitInvalidAmount","msg":"Invalid SpendingLimit amount"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/stabble_clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.json b/olddocs/archivekbot2/idls/stabble_clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.json new file mode 100644 index 0000000..24a105f --- /dev/null +++ b/olddocs/archivekbot2/idls/stabble_clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.json @@ -0,0 +1 @@ +{"address":"6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6","metadata":{"name":"amm_v3","version":"0.1.0","spec":"0.1.0","description":"Anchor client and source for Raydium concentrated liquidity AMM"},"instructions":[{"name":"close_position","docs":["Close the user's position and NFT account. If the NFT mint belongs to token2022, it will also be closed and the funds returned to the NFT owner.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"nft_owner","docs":["The position nft owner"],"writable":true,"signer":true},{"name":"position_nft_mint","docs":["Mint address bound to the personal position."],"writable":true},{"name":"position_nft_account","docs":["User token account where position NFT be minted to"],"writable":true},{"name":"personal_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"system_program","docs":["System program to close the position state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Token/Token2022 program to close token/mint account"]}],"args":[]},{"name":"close_protocol_position","docs":["The CLMM protocol decides to discard the protocol position account, which can reduce users' opening costs.","After the original protocol position account is closed, the gas fee will be refunded to the user who created it.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[201,117,152,144,85,85,108,178],"accounts":[{"name":"admin","writable":true,"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"protocol_position","writable":true}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"owner","docs":["Only admin or fund_owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"owner","docs":["Only admin or config owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_remaining_rewards","docs":["Collect remaining reward token for reward founder","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info",""],"discriminator":[18,237,166,197,34,16,213,144],"accounts":[{"name":"reward_funder","docs":["The founder who init reward info previously"],"signer":true},{"name":"funder_token_account","docs":["The funder's reward token account"],"writable":true},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"reward_token_vault","docs":["Reward vault transfer remaining token to founder token account"],"writable":true},{"name":"reward_vault_mint","docs":["The mint of reward token vault"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"create_amm_config","docs":["# Arguments","","* `ctx`- The accounts needed by instruction.","* `index` - The index of clmm config, there may be multiple config.","* `tick_spacing` - The tickspacing binding with config, cannot be changed.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within trade fee.","* `fund_fee_rate` - The rate of fund fee within trade fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"amm_config","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"trade_fee_rate","type":"u32"},{"name":"protocol_fee_rate","type":"u32"},{"name":"fund_fee_rate","type":"u32"}]},{"name":"create_operation_account","docs":["Creates an operation account for the program","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[63,87,148,33,109,35,8,104],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"writable":true,"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_pool","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `sqrt_price_x64` - the initial sqrt price (amount_token_1 / amount_token_0) of the pool as a Q64.64","Note: The open_time must be smaller than the current block_timestamp on chain."],"discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"sqrt_price_x64","type":"u128"},{"name":"open_time","type":"u64"}]},{"name":"create_support_mint_associated","docs":["Create support token22 mint account which can create pool and send rewards with ignoring the not support extensions."],"discriminator":[17,251,65,92,136,242,14,169],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true},{"name":"token_mint","docs":["Support token mint"]},{"name":"support_mint_associated","docs":["Initialize support mint state account to store support mint address and bump."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,117,112,112,111,114,116,95,109,105,110,116]},{"kind":"account","path":"token_mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"decrease_liquidity_v2","docs":["Decreases liquidity for an existing position, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[58,127,188,62,79,82,196,96],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"increase_liquidity_v2","docs":["Increases liquidity for an existing position, with amount paid by `payer`, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, if zero, calculate liquidity base amount_0 or amount_1 according base_flag","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `base_flag` - must be specified if liquidity is zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[133,29,89,223,69,238,176,10],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"initialize_reward","docs":["Initialize a reward info for a given pool and reward index","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info","* `open_time` - reward open timestamp","* `end_time` - reward end timestamp","* `emissions_per_second_x64` - Token reward per second are earned per unit of liquidity.",""],"discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"reward_funder","docs":["The founder deposit reward token to vault"],"writable":true,"signer":true},{"name":"funder_token_account","writable":true},{"name":"amm_config","docs":["For check the reward_funder authority"]},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"reward_token_mint","docs":["Reward mint"]},{"name":"reward_token_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,114,101,119,97,114,100,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_token_mint"}]}},{"name":"reward_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"param","type":{"defined":{"name":"InitializeRewardParam"}}}]},{"name":"open_position_with_token22_nft","docs":["Creates a new position wrapped in a Token2022 NFT without relying on metadata_program and metadata_account, reduce the cost for user to create a personal position.","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `liquidity` - The liquidity to be added, if zero, and the base_flag is specified, calculate liquidity base amount_0_max or amount_1_max according base_flag, otherwise open position with zero liquidity","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,255,174,82,125,29,201,46],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address, initialize in contract"],"writable":true,"signer":true},{"name":"position_nft_account","writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to transfer for token account"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program_2022","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"set_reward_params","docs":["Reset reward param, start a new reward cycle or extend the current cycle.","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - The index of reward token in the pool.","* `emissions_per_second_x64` - The per second emission reward, when extend the current cycle,","new value can't be less than old value","* `open_time` - reward open timestamp, must be set when starting a new cycle","* `end_time` - reward end timestamp",""],"discriminator":[112,52,167,75,32,201,211,137],"accounts":[{"name":"authority","docs":["Address to be set as protocol owner. It pays to create factory state account."],"signer":true},{"name":"amm_config"},{"name":"pool_state","writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"token_program","docs":["Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"},{"name":"open_time","type":"u64"},{"name":"end_time","type":"u64"}]},{"name":"swap_router_base_in","docs":["Swap token for as much as possible of another token across the path provided, base input","","# Arguments","","* `ctx` - The context of accounts","* `amount_in` - Token amount to be swapped in","* `amount_out_minimum` - Panic if output amount is below minimum amount. For slippage.",""],"discriminator":[69,125,115,218,245,186,242,196],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"input_token_account","docs":["The token account that pays input tokens for the swap"],"writable":true},{"name":"input_token_mint","docs":["The mint of input token"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"amount_in","type":"u64"},{"name":"amount_out_minimum","type":"u64"}]},{"name":"swap_v2","docs":["Swaps one token for as much as possible of another token across a single pool, support token program 2022","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"input_vault_mint","docs":["The mint of token vault 0"]},{"name":"output_vault_mint","docs":["The mint of token vault 1"]}],"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":"transfer_reward_owner","docs":["Transfer reward owner","","# Arguments","","* `ctx`- The context of accounts","* `new_owner`- new owner pubkey",""],"discriminator":[7,22,12,83,242,43,48,121],"accounts":[{"name":"authority","docs":["Address to be set as operation account owner."],"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"pool_state","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"update_amm_config","docs":["Updates the owner of the clmm config","Must be called by the current owner or admin","","# Arguments","","* `ctx`- The context of accounts","* `trade_fee_rate`- The new trade fee rate of clmm config, be set when `param` is 0","* `protocol_fee_rate`- The new protocol fee rate of clmm config, be set when `param` is 1","* `fund_fee_rate`- The new fund fee rate of clmm config, be set when `param` is 2","* `new_owner`- The config's new owner, be set when `param` is 3","* `new_fund_owner`- The config's new fund owner, be set when `param` is 4","* `param`- The value can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The clmm config owner or admin"],"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"amm_config","docs":["Amm config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u32"}]},{"name":"update_operation_account","docs":["Update the operation account","","# Arguments","","* `ctx`- The context of accounts","* `param`- The value can be 0 | 1 | 2 | 3, otherwise will report a error","* `keys`- update operation owner when the `param` is 0","remove operation owner when the `param` is 1","update whitelist mint when the `param` is 2","remove whitelist mint when the `param` is 3",""],"discriminator":[127,70,119,40,188,227,61,7],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"param","type":"u8"},{"name":"keys","type":{"vec":"pubkey"}}]},{"name":"update_pool_status","docs":["Update pool status for given value","","# Arguments","","* `ctx`- The context of accounts","* `status` - The value of status",""],"discriminator":[130,87,108,6,46,224,117,123],"accounts":[{"name":"authority","signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"pool_state","writable":true}],"args":[{"name":"status","type":"u8"}]},{"name":"update_reward_infos","docs":["Update rewards info of the given pool, can be called for everyone","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[163,172,224,52,11,154,106,223],"accounts":[{"name":"pool_state","docs":["The liquidity pool for which reward info to update"],"writable":true}],"args":[]}],"accounts":[{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"OperationState","discriminator":[19,236,58,237,81,222,183,252]},{"name":"PersonalPositionState","discriminator":[70,111,150,126,230,15,25,117]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"ProtocolPositionState","discriminator":[100,226,145,99,146,218,160,106]},{"name":"SupportMintAssociated","discriminator":[134,40,183,79,12,112,162,53]},{"name":"TickArrayBitmapExtension","discriminator":[60,150,36,219,97,128,139,153]},{"name":"TickArrayState","discriminator":[192,155,85,205,49,249,129,42]}],"events":[{"name":"CollectPersonalFeeEvent","discriminator":[166,174,105,192,81,161,83,105]},{"name":"CollectProtocolFeeEvent","discriminator":[206,87,17,79,45,41,213,61]},{"name":"ConfigChangeEvent","discriminator":[247,189,7,119,106,112,95,151]},{"name":"CreatePersonalPositionEvent","discriminator":[100,30,87,249,196,223,154,206]},{"name":"DecreaseLiquidityEvent","discriminator":[58,222,86,58,68,50,85,56]},{"name":"IncreaseLiquidityEvent","discriminator":[49,79,105,212,32,34,30,84]},{"name":"LiquidityCalculateEvent","discriminator":[237,112,148,230,57,84,180,162]},{"name":"LiquidityChangeEvent","discriminator":[126,240,175,206,158,88,153,107]},{"name":"PoolCreatedEvent","discriminator":[25,94,75,47,112,99,53,63]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"UpdateRewardInfosEvent","discriminator":[109,127,186,78,114,65,37,236]}],"errors":[{"code":6000,"name":"LOK","msg":"LOK"},{"code":6001,"name":"NotApproved","msg":"Not approved"},{"code":6002,"name":"InvalidUpdateConfigFlag","msg":"invalid update clmm config flag"},{"code":6003,"name":"AccountLack","msg":"Account lack"},{"code":6004,"name":"ClosePositionErr","msg":"Remove liquitity, collect fees owed and reward then you can close position account"},{"code":6005,"name":"ZeroMintAmount","msg":"Minting amount should be greater than 0"},{"code":6006,"name":"InvalidTickIndex","msg":"Tick out of range"},{"code":6007,"name":"TickInvalidOrder","msg":"The lower tick must be below the upper tick"},{"code":6008,"name":"TickLowerOverflow","msg":"The tick must be greater, or equal to the minimum tick(-443636)"},{"code":6009,"name":"TickUpperOverflow","msg":"The tick must be lesser than, or equal to the maximum tick(443636)"},{"code":6010,"name":"TickAndSpacingNotMatch","msg":"tick % tick_spacing must be zero"},{"code":6011,"name":"InvalidTickArray","msg":"Invalid tick array account"},{"code":6012,"name":"InvalidTickArrayBoundary","msg":"Invalid tick array boundary"},{"code":6013,"name":"SqrtPriceLimitOverflow","msg":"Square root price limit overflow"},{"code":6014,"name":"SqrtPriceX64","msg":"sqrt_price_x64 out of range"},{"code":6015,"name":"LiquiditySubValueErr","msg":"Liquidity sub delta L must be smaller than before"},{"code":6016,"name":"LiquidityAddValueErr","msg":"Liquidity add delta L must be greater, or equal to before"},{"code":6017,"name":"InvalidLiquidity","msg":"Invalid liquidity when update position"},{"code":6018,"name":"ForbidBothZeroForSupplyLiquidity","msg":"Both token amount must not be zero while supply liquidity"},{"code":6019,"name":"LiquidityInsufficient","msg":"Liquidity insufficient"},{"code":6020,"name":"TransactionTooOld","msg":"Transaction too old"},{"code":6021,"name":"PriceSlippageCheck","msg":"Price slippage check"},{"code":6022,"name":"TooLittleOutputReceived","msg":"Too little output received"},{"code":6023,"name":"TooMuchInputPaid","msg":"Too much input paid"},{"code":6024,"name":"ZeroAmountSpecified","msg":"Swap special amount can not be zero"},{"code":6025,"name":"InvalidInputPoolVault","msg":"Input pool vault is invalid"},{"code":6026,"name":"TooSmallInputOrOutputAmount","msg":"Swap input or output amount is too small"},{"code":6027,"name":"NotEnoughTickArrayAccount","msg":"Not enought tick array account"},{"code":6028,"name":"InvalidFirstTickArrayAccount","msg":"Invalid first tick array account"},{"code":6029,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6030,"name":"FullRewardInfo","msg":"The init reward token reach to the max"},{"code":6031,"name":"RewardTokenAlreadyInUse","msg":"The init reward token already in use"},{"code":6032,"name":"ExceptRewardMint","msg":"The reward tokens must contain one of pool vault mint except the last reward"},{"code":6033,"name":"InvalidRewardInitParam","msg":"Invalid reward init param"},{"code":6034,"name":"InvalidRewardDesiredAmount","msg":"Invalid collect reward desired amount"},{"code":6035,"name":"InvalidRewardInputAccountNumber","msg":"Invalid collect reward input account number"},{"code":6036,"name":"InvalidRewardPeriod","msg":"Invalid reward period"},{"code":6037,"name":"NotApproveUpdateRewardEmissiones","msg":"Modification of emissiones is allowed within 72 hours from the end of the previous cycle"},{"code":6038,"name":"UnInitializedRewardInfo","msg":"uninitialized reward info"},{"code":6039,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6040,"name":"MissingTickArrayBitmapExtensionAccount","msg":"Missing tickarray bitmap extension account"},{"code":6041,"name":"InsufficientLiquidityForDirection","msg":"Insufficient liquidity for this direction"},{"code":6042,"name":"MaxTokenOverflow","msg":"Max token overflow"},{"code":6043,"name":"CalculateOverflow","msg":"Calculate overflow"},{"code":6044,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"}],"types":[{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"index","type":"u16"},{"name":"owner","docs":["Address of the protocol owner"],"type":"pubkey"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u32"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"tick_spacing","docs":["The tick spacing"],"type":"u16"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"padding_u32","type":"u32"},{"name":"fund_owner","type":"pubkey"},{"name":"padding","type":{"array":["u64",3]}}]}},{"name":"CollectPersonalFeeEvent","docs":["Emitted when tokens are collected for a position"],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which underlying tokens were collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The token account that received the collected token_0 tokens"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The token account that received the collected token_1 tokens"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 owed to the position that was collected"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 owed to the position that was collected"],"type":"u64"}]}},{"name":"CollectProtocolFeeEvent","docs":["Emitted when the collected protocol fees are withdrawn by the factory owner"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool whose protocol fee is collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"}]}},{"name":"ConfigChangeEvent","docs":["Emitted when create or update a config"],"type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"owner","type":"pubkey"},{"name":"protocol_fee_rate","type":"u32"},{"name":"trade_fee_rate","type":"u32"},{"name":"tick_spacing","type":"u16"},{"name":"fund_fee_rate","type":"u32"},{"name":"fund_owner","type":"pubkey"}]}},{"name":"CreatePersonalPositionEvent","docs":["Emitted when create a new position"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which liquidity was added"],"type":"pubkey"},{"name":"personal_position","docs":["The personal position"],"type":"pubkey"},{"name":"nft_mint","docs":["The nft mint address for the position"],"type":"pubkey"},{"name":"minter","docs":["The address that create the position"],"type":"pubkey"},{"name":"nft_owner","docs":["The owner of the position and recipient of any minted liquidity"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity minted to the position range"],"type":"u128"},{"name":"deposit_amount_0","docs":["The amount of token_0 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_1","docs":["The amount of token_1 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_0_transfer_fee","docs":["The token transfer fee for deposit_amount_0"],"type":"u64"},{"name":"deposit_amount_1_transfer_fee","docs":["The token transfer fee for deposit_amount_1"],"type":"u64"}]}},{"name":"DecreaseLiquidityEvent","docs":["Emitted when liquidity is decreased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was decreased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the position was decreased"],"type":"u128"},{"name":"decrease_amount_0","docs":["The amount of token_0 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"decrease_amount_1","docs":["The amount of token_1 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"fee_amount_0","type":"u64"},{"name":"fee_amount_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"reward_amounts","docs":["The amount of rewards"],"type":{"array":["u64",3]}},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee"],"type":"u64"}]}},{"name":"IncreaseLiquidityEvent","docs":["Emitted when liquidity is increased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was increased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the NFT position was increased"],"type":"u128"},{"name":"amount_0","docs":["The amount of token_0 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_0_transfer_fee","docs":["The token transfer fee for amount_0"],"type":"u64"},{"name":"amount_1_transfer_fee","docs":["The token transfer fee for amount_1"],"type":"u64"}]}},{"name":"InitializeRewardParam","type":{"kind":"struct","fields":[{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Token reward per second are earned per unit of liquidity"],"type":"u128"}]}},{"name":"LiquidityCalculateEvent","docs":["Emitted when liquidity decreased or increase."],"type":{"kind":"struct","fields":[{"name":"pool_liquidity","docs":["The pool liquidity before decrease or increase"],"type":"u128"},{"name":"pool_sqrt_price_x64","docs":["The pool price when decrease or increase in liquidity"],"type":"u128"},{"name":"pool_tick","docs":["The pool tick when decrease or increase in liquidity"],"type":"i32"},{"name":"calc_amount_0","docs":["The amount of token_0 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"calc_amount_1","docs":["The amount of token_1 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"trade_fee_owed_0","type":"u64"},{"name":"trade_fee_owed_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee without trade_fee_amount_0"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee without trade_fee_amount_0"],"type":"u64"}]}},{"name":"LiquidityChangeEvent","docs":["Emitted pool liquidity change when increase and decrease liquidity"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for swap"],"type":"pubkey"},{"name":"tick","docs":["The tick of the pool"],"type":"i32"},{"name":"tick_lower","docs":["The tick lower of position"],"type":"i32"},{"name":"tick_upper","docs":["The tick lower of position"],"type":"i32"},{"name":"liquidity_before","docs":["The liquidity of the pool before liquidity change"],"type":"u128"},{"name":"liquidity_after","docs":["The liquidity of the pool after liquidity change"],"type":"u128"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u32"},{"name":"tick_cumulative","docs":["the cumulative of tick during the duration time"],"type":"i64"},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is initialized"],"type":"bool"},{"name":"recent_epoch","docs":["recent update epoch"],"type":"u64"},{"name":"observation_index","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","docs":["belongs to which pool"],"type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"OperationState","docs":["Holds the current owner of the factory"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"operation_owners","docs":["Address of the operation owner"],"type":{"array":["pubkey",10]}},{"name":"whitelist_mints","docs":["The mint address of whitelist to emit reward"],"type":{"array":["pubkey",100]}}]}},{"name":"PersonalPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"nft_mint","docs":["Mint address of the tokenized position"],"type":"pubkey"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0, as of the last computation"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1, as of the last computation"],"type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"PositionRewardInfo"}},3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"PoolCreatedEvent","docs":["Emitted when a pool is created and initialized with a starting price",""],"type":{"kind":"struct","fields":[{"name":"token_mint_0","docs":["The first token of the pool by address sort order"],"type":"pubkey"},{"name":"token_mint_1","docs":["The second token of the pool by address sort order"],"type":"pubkey"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"pool_state","docs":["The address of the created pool"],"type":"pubkey"},{"name":"sqrt_price_x64","docs":["The initial sqrt price of the pool, as a Q64.64"],"type":"u128"},{"name":"tick","docs":["The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool"],"type":"i32"},{"name":"token_vault_0","docs":["Vault of token_0"],"type":"pubkey"},{"name":"token_vault_1","docs":["Vault of token_1"],"type":"pubkey"},{"name":"amm_config","docs":["The PublicKey of the config account with fee rates etc"],"type":"pubkey"}]}},{"name":"PoolState","docs":["The pool state","","PDA of `[POOL_SEED, config, token_mint_0, token_mint_1]`",""],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"amm_config","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"token_mint_0","docs":["Token pair of the pool, where token_mint_0 address < token_mint_1 address"],"type":"pubkey"},{"name":"token_mint_1","type":"pubkey"},{"name":"token_vault_0","docs":["Token pair vault"],"type":"pubkey"},{"name":"token_vault_1","type":"pubkey"},{"name":"observation_key","docs":["observation account key"],"type":"pubkey"},{"name":"mint_decimals_0","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_decimals_1","type":"u8"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"liquidity","docs":["The currently in range liquidity available to the pool."],"type":"u128"},{"name":"sqrt_price_x64","docs":["The current price of the pool as a sqrt(token_1/token_0) Q64.64 value"],"type":"u128"},{"name":"tick_current","docs":["The current tick of the pool, i.e. according to the last tick transition that was run."],"type":"i32"},{"name":"padding3","type":"u16"},{"name":"padding4","type":"u16"},{"name":"fee_growth_global_0_x64","docs":["The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per","unit of liquidity for the entire life of the pool."],"type":"u128"},{"name":"fee_growth_global_1_x64","type":"u128"},{"name":"protocol_fees_token_0","docs":["The amounts of token_0 and token_1 that are owed to the protocol."],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"swap_in_amount_token_0","docs":["The amounts in and out of swap token_0 and token_1"],"type":"u128"},{"name":"swap_out_amount_token_1","type":"u128"},{"name":"swap_in_amount_token_1","type":"u128"},{"name":"swap_out_amount_token_0","type":"u128"},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable open position and increase liquidity, 0: normal","bit1, 1: disable decrease liquidity, 0: normal","bit2, 1: disable collect fee, 0: normal","bit3, 1: disable collect reward, 0: normal","bit4, 1: disable swap, 0: normal"],"type":"u8"},{"name":"padding","docs":["Leave blank for future use"],"type":{"array":["u8",7]}},{"name":"reward_infos","type":{"array":[{"defined":{"name":"RewardInfo"}},3]}},{"name":"tick_array_bitmap","docs":["Packed initialized tick array state"],"type":{"array":["u64",16]}},{"name":"total_fees_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_claimed_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_token_1","type":"u64"},{"name":"total_fees_claimed_token_1","type":"u64"},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"recent_epoch","type":"u64"},{"name":"padding1","type":{"array":["u64",24]}},{"name":"padding2","type":{"array":["u64",32]}}]}},{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growth_inside_last_x64","type":"u128"},{"name":"reward_amount_owed","type":"u64"}]}},{"name":"ProtocolPositionState","docs":["Info stored for each user's position"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1"],"type":"u64"},{"name":"reward_growth_inside","docs":["The reward growth per unit of liquidity as of the last update to liquidity"],"type":{"array":["u128",3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"RewardInfo","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"reward_state","docs":["Reward state"],"type":"u8"},{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"last_update_time","docs":["Reward last update time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Q64.64 number indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"reward_total_emissioned","docs":["The total amount of reward emissioned"],"type":"u64"},{"name":"reward_claimed","docs":["The total amount of claimed reward"],"type":"u64"},{"name":"token_mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"token_vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"authority","docs":["The owner that has permission to set reward param"],"type":"pubkey"},{"name":"reward_growth_global_x64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"SupportMintAssociated","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"mint","docs":["Address of the supported token22 mint"],"type":"pubkey"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"SwapEvent","docs":["Emitted by when a swap is performed for a pool"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which token_0 and token_1 were swapped"],"type":"pubkey"},{"name":"sender","docs":["The address that initiated the swap call, and that received the callback"],"type":"pubkey"},{"name":"token_account_0","docs":["The payer token account in zero for one swaps, or the recipient token account","in one for zero swaps"],"type":"pubkey"},{"name":"token_account_1","docs":["The payer token account in one for zero swaps, or the recipient token account","in zero for one swaps"],"type":"pubkey"},{"name":"amount_0","docs":["The real delta amount of the token_0 of the pool or user"],"type":"u64"},{"name":"transfer_fee_0","docs":["The transfer fee charged by the withheld_amount of the token_0"],"type":"u64"},{"name":"amount_1","docs":["The real delta of the token_1 of the pool or user"],"type":"u64"},{"name":"transfer_fee_1","docs":["The transfer fee charged by the withheld_amount of the token_1"],"type":"u64"},{"name":"zero_for_one","docs":["if true, amount_0 is negtive and amount_1 is positive"],"type":"bool"},{"name":"sqrt_price_x64","docs":["The sqrt(price) of the pool after the swap, as a Q64.64"],"type":"u128"},{"name":"liquidity","docs":["The liquidity of the pool after the swap"],"type":"u128"},{"name":"tick","docs":["The log base 1.0001 of price of the pool after the swap"],"type":"i32"}]}},{"name":"TickArrayBitmapExtension","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"positive_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is positive"],"type":{"array":[{"array":["u64",8]},14]}},{"name":"negative_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is negitive"],"type":{"array":[{"array":["u64",8]},14]}}]}},{"name":"TickArrayState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"start_tick_index","type":"i32"},{"name":"ticks","type":{"array":[{"defined":{"name":"TickState"}},60]}},{"name":"initialized_tick_count","type":"u8"},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u8",107]}}]}},{"name":"TickState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"tick","type":"i32"},{"name":"liquidity_net","docs":["Amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left)"],"type":"i128"},{"name":"liquidity_gross","docs":["The total position liquidity that references this tick"],"type":"u128"},{"name":"fee_growth_outside_0_x64","docs":["Fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)","only has relative meaning, not absolute — the value depends on when the tick is initialized"],"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":"UpdateRewardInfosEvent","docs":["Emitted when Reward are updated for a pool"],"type":{"kind":"struct","fields":[{"name":"reward_growth_global_x64","docs":["Reward info"],"type":{"array":["u128",3]}}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/stabble_stable_swap.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.json b/olddocs/archivekbot2/idls/stabble_stable_swap.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.json new file mode 100644 index 0000000..77d460f --- /dev/null +++ b/olddocs/archivekbot2/idls/stabble_stable_swap.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.json @@ -0,0 +1 @@ +{"address":"swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ","metadata":{"name":"stable_swap","version":"1.5.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"accept_owner","discriminator":[176,23,41,28,23,111,8,4],"accounts":[{"name":"pending_owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"approve_strategy","discriminator":[7,141,162,60,71,115,26,146],"accounts":[{"name":"admin_only","accounts":[{"name":"pool","writable":true},{"name":"vault"},{"name":"admin","signer":true}]},{"name":"strategy","writable":true}],"args":[]},{"name":"change_amp_factor","discriminator":[56,238,189,35,200,157,42,66],"accounts":[{"name":"pool","writable":true},{"name":"vault"},{"name":"admin","signer":true}],"args":[{"name":"new_amp_factor","type":"u16"},{"name":"ramp_duration","type":"u32"}]},{"name":"change_max_supply","discriminator":[93,176,0,205,69,63,87,80],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[{"name":"new_max_supply","type":"u64"}]},{"name":"change_swap_fee","discriminator":[231,15,132,51,132,165,64,170],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[{"name":"new_swap_fee","type":"u64"}]},{"name":"change_swap_fee_privileged","discriminator":[155,200,14,91,105,38,220,119],"accounts":[{"name":"pool","writable":true},{"name":"vault"},{"name":"admin","signer":true}],"args":[{"name":"new_swap_fee","type":"u64"}]},{"name":"close_strategy","discriminator":[56,247,170,246,89,221,134,200],"accounts":[{"name":"owner_only","accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}]},{"name":"strategy","writable":true},{"name":"rent_collector","writable":true}],"args":[]},{"name":"create_strategy","discriminator":[152,160,107,148,245,190,127,224],"accounts":[{"name":"owner_only","accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}]},{"name":"strategy","writable":true}],"args":[{"name":"amp_min_factor","type":"u16"},{"name":"amp_max_factor","type":"u16"},{"name":"ramp_min_step","type":"u16"},{"name":"ramp_max_step","type":"u16"},{"name":"ramp_min_duration","type":"u32"},{"name":"ramp_max_duration","type":"u32"}]},{"name":"deposit","docs":["add liquidity"],"discriminator":[242,35,198,137,82,225,242,182],"accounts":[{"name":"user","signer":true},{"name":"user_pool_token","writable":true},{"name":"mint","writable":true},{"name":"pool","writable":true},{"name":"pool_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"token_program"},{"name":"token_program_2022"}],"args":[{"name":"amounts","type":{"vec":"u64"}},{"name":"minimum_amount_out","type":"u64"}]},{"name":"exec_strategy","discriminator":[249,46,55,57,31,38,61,27],"accounts":[{"name":"strategy"},{"name":"pool","writable":true}],"args":[{"name":"ramp_step","type":"u16"},{"name":"ramp_duration","type":"u32"}]},{"name":"initialize","docs":["initialize a pool"],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"owner","signer":true},{"name":"mint"},{"name":"pool","writable":true},{"name":"pool_authority"},{"name":"withdraw_authority"},{"name":"vault"}],"args":[{"name":"amp_factor","type":"u16"},{"name":"swap_fee","type":"u64"},{"name":"max_caps","type":{"vec":"u64"}}]},{"name":"pause","discriminator":[211,22,221,251,74,121,193,47],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"reject_owner","discriminator":[238,206,198,215,51,178,133,228],"accounts":[{"name":"pending_owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"shutdown","docs":["shutdown the zero-liquidity pool"],"discriminator":[146,204,241,213,86,21,253,211],"accounts":[{"name":"owner","writable":true},{"name":"pool","writable":true}],"args":[]},{"name":"swap","docs":["swap"],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"user","signer":true},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"vault_token_in","writable":true},{"name":"vault_token_out","writable":true},{"name":"beneficiary_token_out","writable":true},{"name":"pool","writable":true},{"name":"withdraw_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"vault_program"},{"name":"token_program"}],"args":[{"name":"amount_in","type":{"option":"u64"}},{"name":"minimum_amount_out","type":"u64"}]},{"name":"swap_v2","discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"user","signer":true},{"name":"mint_in"},{"name":"mint_out"},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"vault_token_in","writable":true},{"name":"vault_token_out","writable":true},{"name":"beneficiary_token_out","writable":true},{"name":"pool","writable":true},{"name":"withdraw_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"vault_program"},{"name":"token_program"},{"name":"token_2022_program"}],"args":[{"name":"amount_in","type":{"option":"u64"}},{"name":"minimum_amount_out","type":"u64"}]},{"name":"transfer_owner","discriminator":[245,25,221,175,106,229,225,45],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"unpause","discriminator":[169,144,4,38,10,141,188,255],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"withdraw","docs":["remove liquidity"],"discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"user","signer":true},{"name":"user_pool_token","writable":true},{"name":"mint","writable":true},{"name":"pool","writable":true},{"name":"withdraw_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"vault_program"},{"name":"token_program"},{"name":"token_program_2022"}],"args":[{"name":"amount","type":"u64"},{"name":"minimum_amounts_out","type":{"vec":"u64"}}]}],"accounts":[{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"Strategy","discriminator":[174,110,39,119,82,106,169,102]},{"name":"Vault","discriminator":[211,8,232,43,2,152,117,119]}],"events":[{"name":"PoolBalanceUpdatedEvent","discriminator":[172,82,114,207,27,103,211,4]},{"name":"PoolUpdatedEvent","discriminator":[128,39,94,221,230,222,127,141]}],"types":[{"name":"Pool","type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"authority_bump","type":"u8"},{"name":"is_active","type":"bool"},{"name":"amp_initial_factor","type":"u16"},{"name":"amp_target_factor","type":"u16"},{"name":"ramp_start_ts","type":"i64"},{"name":"ramp_stop_ts","type":"i64"},{"name":"swap_fee","type":"u64"},{"name":"tokens","type":{"vec":{"defined":{"name":"PoolToken"}}}},{"name":"pending_owner","type":{"option":"pubkey"}},{"name":"max_supply","type":"u64"}]}},{"name":"PoolBalanceUpdatedData","type":{"kind":"struct","fields":[{"name":"balances","type":{"vec":"u64"}}]}},{"name":"PoolBalanceUpdatedEvent","type":{"kind":"struct","fields":[{"name":"pubkey","type":"pubkey"},{"name":"data","type":{"defined":{"name":"PoolBalanceUpdatedData"}}}]}},{"name":"PoolToken","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"decimals","type":"u8"},{"name":"scaling_up","type":"bool"},{"name":"scaling_factor","type":"u64"},{"name":"balance","type":"u64"}]}},{"name":"PoolUpdatedData","type":{"kind":"struct","fields":[{"name":"is_active","type":"bool"},{"name":"amp_initial_factor","type":"u16"},{"name":"amp_target_factor","type":"u16"},{"name":"ramp_start_ts","type":"i64"},{"name":"ramp_stop_ts","type":"i64"},{"name":"swap_fee","type":"u64"},{"name":"max_supply","type":"u64"}]}},{"name":"PoolUpdatedEvent","type":{"kind":"struct","fields":[{"name":"pubkey","type":"pubkey"},{"name":"data","type":{"defined":{"name":"PoolUpdatedData"}}}]}},{"name":"Strategy","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"is_active","type":"bool"},{"name":"amp_min_factor","type":"u16"},{"name":"amp_max_factor","type":"u16"},{"name":"ramp_min_step","type":"u16"},{"name":"ramp_max_step","type":"u16"},{"name":"ramp_min_duration","type":"u32"},{"name":"ramp_max_duration","type":"u32"}]}},{"name":"Vault","type":{"kind":"struct","fields":[{"name":"admin","type":"pubkey"},{"name":"withdraw_authority","docs":["PDA of pool programs seeded by vault address"],"type":"pubkey"},{"name":"withdraw_authority_bump","docs":["bump seed of withdraw_authority PDA"],"type":"u8"},{"name":"authority_bump","docs":["bump seed of vault_authority PDA"],"type":"u8"},{"name":"is_active","type":"bool"},{"name":"beneficiary","type":"pubkey"},{"name":"beneficiary_fee","type":"u64"},{"name":"pending_admin","type":{"option":"pubkey"}}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/stabble_weighted_swap.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.json b/olddocs/archivekbot2/idls/stabble_weighted_swap.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.json new file mode 100644 index 0000000..d735135 --- /dev/null +++ b/olddocs/archivekbot2/idls/stabble_weighted_swap.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.json @@ -0,0 +1 @@ +{"address":"swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW","metadata":{"name":"weighted_swap","version":"1.5.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"accept_owner","discriminator":[176,23,41,28,23,111,8,4],"accounts":[{"name":"pending_owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"change_max_supply","discriminator":[93,176,0,205,69,63,87,80],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[{"name":"new_max_supply","type":"u64"}]},{"name":"change_swap_fee","discriminator":[231,15,132,51,132,165,64,170],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[{"name":"new_swap_fee","type":"u64"}]},{"name":"deposit","docs":["add liquidity"],"discriminator":[242,35,198,137,82,225,242,182],"accounts":[{"name":"user","signer":true},{"name":"user_pool_token","writable":true},{"name":"mint","writable":true},{"name":"pool","writable":true},{"name":"pool_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"token_program"},{"name":"token_program_2022"}],"args":[{"name":"amounts","type":{"vec":"u64"}},{"name":"minimum_amount_out","type":"u64"}]},{"name":"initialize","docs":["initialize a pool"],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"owner","signer":true},{"name":"mint"},{"name":"pool","writable":true},{"name":"pool_authority"},{"name":"withdraw_authority"},{"name":"vault"}],"args":[{"name":"swap_fee","type":"u64"},{"name":"weights","type":{"vec":"u64"}},{"name":"max_caps","type":{"vec":"u64"}}]},{"name":"pause","discriminator":[211,22,221,251,74,121,193,47],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"reject_owner","discriminator":[238,206,198,215,51,178,133,228],"accounts":[{"name":"pending_owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"shutdown","docs":["shutdown the zero-liquidity pool"],"discriminator":[146,204,241,213,86,21,253,211],"accounts":[{"name":"owner","writable":true},{"name":"pool","writable":true}],"args":[]},{"name":"swap","docs":["swap"],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"user","signer":true},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"vault_token_in","writable":true},{"name":"vault_token_out","writable":true},{"name":"beneficiary_token_out","writable":true},{"name":"pool","writable":true},{"name":"withdraw_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"vault_program"},{"name":"token_program"}],"args":[{"name":"amount_in","type":{"option":"u64"}},{"name":"minimum_amount_out","type":"u64"}]},{"name":"swap_v2","discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"user","signer":true},{"name":"mint_in"},{"name":"mint_out"},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"vault_token_in","writable":true},{"name":"vault_token_out","writable":true},{"name":"beneficiary_token_out","writable":true},{"name":"pool","writable":true},{"name":"withdraw_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"vault_program"},{"name":"token_program"},{"name":"token_2022_program"}],"args":[{"name":"amount_in","type":{"option":"u64"}},{"name":"minimum_amount_out","type":"u64"}]},{"name":"transfer_owner","discriminator":[245,25,221,175,106,229,225,45],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"unpause","discriminator":[169,144,4,38,10,141,188,255],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"withdraw","docs":["remove liquidity"],"discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"user","signer":true},{"name":"user_pool_token","writable":true},{"name":"mint","writable":true},{"name":"pool","writable":true},{"name":"withdraw_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"vault_program"},{"name":"token_program"},{"name":"token_program_2022"}],"args":[{"name":"amount","type":"u64"},{"name":"minimum_amounts_out","type":{"vec":"u64"}}]}],"accounts":[{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"Vault","discriminator":[211,8,232,43,2,152,117,119]}],"events":[{"name":"PoolBalanceUpdatedEvent","discriminator":[172,82,114,207,27,103,211,4]},{"name":"PoolUpdatedEvent","discriminator":[128,39,94,221,230,222,127,141]}],"types":[{"name":"Pool","type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"authority_bump","type":"u8"},{"name":"is_active","type":"bool"},{"name":"invariant","type":"u64"},{"name":"swap_fee","type":"u64"},{"name":"tokens","type":{"vec":{"defined":{"name":"PoolToken"}}}},{"name":"pending_owner","type":{"option":"pubkey"}},{"name":"max_supply","type":"u64"}]}},{"name":"PoolBalanceUpdatedData","type":{"kind":"struct","fields":[{"name":"balances","type":{"vec":"u64"}}]}},{"name":"PoolBalanceUpdatedEvent","type":{"kind":"struct","fields":[{"name":"pubkey","type":"pubkey"},{"name":"data","type":{"defined":{"name":"PoolBalanceUpdatedData"}}}]}},{"name":"PoolToken","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"decimals","type":"u8"},{"name":"scaling_up","type":"bool"},{"name":"scaling_factor","type":"u64"},{"name":"balance","type":"u64"},{"name":"weight","type":"u64"}]}},{"name":"PoolUpdatedData","type":{"kind":"struct","fields":[{"name":"is_active","type":"bool"},{"name":"swap_fee","type":"u64"},{"name":"max_supply","type":"u64"}]}},{"name":"PoolUpdatedEvent","type":{"kind":"struct","fields":[{"name":"pubkey","type":"pubkey"},{"name":"data","type":{"defined":{"name":"PoolUpdatedData"}}}]}},{"name":"Vault","type":{"kind":"struct","fields":[{"name":"admin","type":"pubkey"},{"name":"withdraw_authority","docs":["PDA of pool programs seeded by vault address"],"type":"pubkey"},{"name":"withdraw_authority_bump","docs":["bump seed of withdraw_authority PDA"],"type":"u8"},{"name":"authority_bump","docs":["bump seed of vault_authority PDA"],"type":"u8"},{"name":"is_active","type":"bool"},{"name":"beneficiary","type":"pubkey"},{"name":"beneficiary_fee","type":"u64"},{"name":"pending_admin","type":{"option":"pubkey"}}]}}]} diff --git a/olddocs/archivekbot2/idls/streamflow.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.json b/olddocs/archivekbot2/idls/streamflow.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.json new file mode 100644 index 0000000..3068154 --- /dev/null +++ b/olddocs/archivekbot2/idls/streamflow.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"timelock","instructions":[{"name":"create","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokens","isMut":true,"isSigner":false},{"name":"recipient","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":true},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"recipientTokens","isMut":true,"isSigner":false},{"name":"streamflowTreasury","isMut":true,"isSigner":false},{"name":"streamflowTreasuryTokens","isMut":true,"isSigner":false},{"name":"withdrawor","isMut":true,"isSigner":false},{"name":"partner","isMut":true,"isSigner":false},{"name":"partnerTokens","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"feeOracle","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"timelockProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"startTime","type":"u64"},{"name":"netAmountDeposited","type":"u64"},{"name":"period","type":"u64"},{"name":"amountPerPeriod","type":"u64"},{"name":"cliff","type":"u64"},{"name":"cliffAmount","type":"u64"},{"name":"cancelableBySender","type":"bool"},{"name":"cancelableByRecipient","type":"bool"},{"name":"automaticWithdrawal","type":"bool"},{"name":"transferableBySender","type":"bool"},{"name":"transferableByRecipient","type":"bool"},{"name":"canTopup","type":"bool"},{"name":"streamName","type":{"array":["u8",64]}},{"name":"withdrawFrequency","type":"u64"},{"name":"pausable","type":{"option":"bool"}},{"name":"canUpdateRate","type":{"option":"bool"}}]},{"name":"createUnchecked","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"withdrawor","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"feeOracle","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"timelockProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"startTime","type":"u64"},{"name":"netAmountDeposited","type":"u64"},{"name":"period","type":"u64"},{"name":"amountPerPeriod","type":"u64"},{"name":"cliff","type":"u64"},{"name":"cliffAmount","type":"u64"},{"name":"cancelableBySender","type":"bool"},{"name":"cancelableByRecipient","type":"bool"},{"name":"automaticWithdrawal","type":"bool"},{"name":"transferableBySender","type":"bool"},{"name":"transferableByRecipient","type":"bool"},{"name":"canTopup","type":"bool"},{"name":"streamName","type":{"array":["u8",64]}},{"name":"withdrawFrequency","type":"u64"},{"name":"recipient","type":"publicKey"},{"name":"partner","type":"publicKey"},{"name":"pausable","type":"bool"},{"name":"canUpdateRate","type":"bool"}]},{"name":"createUncheckedWithPayer","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"withdrawor","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"feeOracle","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"timelockProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"startTime","type":"u64"},{"name":"netAmountDeposited","type":"u64"},{"name":"period","type":"u64"},{"name":"amountPerPeriod","type":"u64"},{"name":"cliff","type":"u64"},{"name":"cliffAmount","type":"u64"},{"name":"cancelableBySender","type":"bool"},{"name":"cancelableByRecipient","type":"bool"},{"name":"automaticWithdrawal","type":"bool"},{"name":"transferableBySender","type":"bool"},{"name":"transferableByRecipient","type":"bool"},{"name":"canTopup","type":"bool"},{"name":"streamName","type":{"array":["u8",64]}},{"name":"withdrawFrequency","type":"u64"},{"name":"recipient","type":"publicKey"},{"name":"partner","type":"publicKey"},{"name":"pausable","type":"bool"},{"name":"canUpdateRate","type":"bool"}]},{"name":"withdraw","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"recipient","isMut":true,"isSigner":false},{"name":"recipientTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"streamflowTreasury","isMut":true,"isSigner":false},{"name":"streamflowTreasuryTokens","isMut":true,"isSigner":false},{"name":"partner","isMut":true,"isSigner":false},{"name":"partnerTokens","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"cancel","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"sender","isMut":true,"isSigner":false},{"name":"senderTokens","isMut":true,"isSigner":false},{"name":"recipient","isMut":true,"isSigner":false},{"name":"recipientTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"streamflowTreasury","isMut":true,"isSigner":false},{"name":"streamflowTreasuryTokens","isMut":true,"isSigner":false},{"name":"partner","isMut":true,"isSigner":false},{"name":"partnerTokens","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"transferRecipient","accounts":[{"name":"authority","isMut":true,"isSigner":true},{"name":"newRecipient","isMut":true,"isSigner":false},{"name":"newRecipientTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"topup","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"streamflowTreasury","isMut":true,"isSigner":false},{"name":"streamflowTreasuryTokens","isMut":true,"isSigner":false},{"name":"withdrawor","isMut":true,"isSigner":false},{"name":"partner","isMut":true,"isSigner":false},{"name":"partnerTokens","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"pause","accounts":[{"name":"sender","isMut":false,"isSigner":true},{"name":"metadata","isMut":true,"isSigner":false}],"args":[]},{"name":"unpause","accounts":[{"name":"sender","isMut":false,"isSigner":true},{"name":"metadata","isMut":true,"isSigner":false}],"args":[]},{"name":"update","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"metadata","isMut":true,"isSigner":false},{"name":"withdrawor","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"enableAutomaticWithdrawal","type":{"option":"bool"}},{"name":"withdrawFrequency","type":{"option":"u64"}},{"name":"amountPerPeriod","type":{"option":"u64"}}]}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/tensor-cnft.TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.json b/olddocs/archivekbot2/idls/tensor-cnft.TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.json new file mode 100644 index 0000000..088d031 --- /dev/null +++ b/olddocs/archivekbot2/idls/tensor-cnft.TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.json @@ -0,0 +1 @@ +{"version":"2.0.1","name":"tcomp","constants":[{"name":"CURRENT_TCOMP_VERSION","type":"u8","value":"1"},{"name":"TCOMP_FEE_BPS","type":"u16","value":"150"},{"name":"MAX_EXPIRY_SEC","type":"i64","value":"31536000"},{"name":"MAKER_BROKER_PCT","type":"u16","value":"0"},{"name":"LIST_STATE_SIZE","type":{"defined":"usize"},"value":"8 + 1 + 1 + (32 * 2) + 8 + 33 + 8 + (33 * 2) + 128"},{"name":"BID_STATE_SIZE","type":{"defined":"usize"},"value":"8 + 1 + 1 + (32 * 2) + 1 + 32 + 2 + 33 + 4 * 2 + 8 + 33 + 8 + (33 * 3) + 128"}],"instructions":[{"name":"tcompNoop","accounts":[{"name":"tcompSigner","isMut":false,"isSigner":true}],"args":[{"name":"event","type":{"defined":"TcompEvent"}}]},{"name":"withdrawFees","accounts":[{"name":"tswap","isMut":true,"isSigner":false},{"name":"tcomp","isMut":true,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true,"docs":["We ask also for a signature just to make sure this wallet can actually sign things"]},{"name":"owner","isMut":true,"isSigner":true},{"name":"destination","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"buy","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"listState","isMut":true,"isSigner":false},{"name":"buyer","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"metaHash","type":{"array":["u8",32]}},{"name":"creatorShares","type":"bytes"},{"name":"creatorVerified","type":{"vec":"bool"}},{"name":"sellerFeeBasisPoints","type":"u16"},{"name":"maxAmount","type":"u64"},{"name":"optionalRoyaltyPct","type":{"option":"u16"}}]},{"name":"buySpl","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"tcompAta","isMut":true,"isSigner":false},{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"listState","isMut":true,"isSigner":false},{"name":"buyer","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"payerSource","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":false},{"name":"ownerDest","isMut":true,"isSigner":false},{"name":"currency","isMut":false,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"takerBrokerAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBrokerAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"rentDest","isMut":true,"isSigner":false},{"name":"rentPayer","isMut":true,"isSigner":true}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"metaHash","type":{"array":["u8",32]}},{"name":"creatorShares","type":"bytes"},{"name":"creatorVerified","type":{"vec":"bool"}},{"name":"sellerFeeBasisPoints","type":"u16"},{"name":"maxAmount","type":"u64"},{"name":"optionalRoyaltyPct","type":{"option":"u16"}}]},{"name":"buyCore","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"listState","isMut":true,"isSigner":false},{"name":"asset","isMut":true,"isSigner":false},{"name":"collection","isMut":false,"isSigner":false,"isOptional":true},{"name":"buyer","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"rentDest","isMut":true,"isSigner":false},{"name":"mplCoreProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"list","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"owner","isMut":false,"isSigner":false},{"name":"delegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"listState","isMut":true,"isSigner":false},{"name":"rentPayer","isMut":true,"isSigner":true}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"amount","type":"u64"},{"name":"expireInSec","type":{"option":"u64"}},{"name":"currency","type":{"option":"publicKey"}},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}}]},{"name":"delist","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"listState","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}}]},{"name":"edit","accounts":[{"name":"listState","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"tcompProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"expireInSec","type":{"option":"u64"}},{"name":"currency","type":{"option":"publicKey"}},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}}]},{"name":"listCore","accounts":[{"name":"asset","isMut":true,"isSigner":false},{"name":"collection","isMut":false,"isSigner":false,"isOptional":true},{"name":"listState","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"mplCoreProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true}],"args":[{"name":"amount","type":"u64"},{"name":"expireInSec","type":{"option":"u64"}},{"name":"currency","type":{"option":"publicKey"}},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}}]},{"name":"delistCore","accounts":[{"name":"asset","isMut":true,"isSigner":false},{"name":"collection","isMut":false,"isSigner":false,"isOptional":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"listState","isMut":true,"isSigner":false},{"name":"mplCoreProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":true}],"args":[]},{"name":"bid","accounts":[{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"rentPayer","isMut":true,"isSigner":true}],"args":[{"name":"bidId","type":"publicKey"},{"name":"target","type":{"defined":"Target"}},{"name":"targetId","type":"publicKey"},{"name":"field","type":{"option":{"defined":"Field"}}},{"name":"fieldId","type":{"option":"publicKey"}},{"name":"amount","type":"u64"},{"name":"quantity","type":"u32"},{"name":"expireInSec","type":{"option":"u64"}},{"name":"currency","type":{"option":"publicKey"}},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}}]},{"name":"cancelBid","accounts":[{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[]},{"name":"closeExpiredBid","accounts":[{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[]},{"name":"closeExpiredListing","accounts":[{"name":"listState","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}}]},{"name":"closeExpiredListingCore","accounts":[{"name":"listState","isMut":true,"isSigner":false},{"name":"asset","isMut":true,"isSigner":false},{"name":"collection","isMut":false,"isSigner":false,"isOptional":true},{"name":"owner","isMut":false,"isSigner":false},{"name":"mplCoreProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[]},{"name":"takeBidMetaHash","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"seller","isMut":true,"isSigner":false},{"name":"delegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"metaHash","type":{"array":["u8",32]}},{"name":"creatorShares","type":"bytes"},{"name":"creatorVerified","type":{"vec":"bool"}},{"name":"sellerFeeBasisPoints","type":"u16"},{"name":"minAmount","type":"u64"},{"name":"optionalRoyaltyPct","type":{"option":"u16"}}]},{"name":"takeBidFullMeta","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"seller","isMut":true,"isSigner":false},{"name":"delegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"metaArgs","type":{"defined":"TMetadataArgs"}},{"name":"minAmount","type":"u64"},{"name":"optionalRoyaltyPct","type":{"option":"u16"}}]},{"name":"takeBidLegacy","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"seller","isMut":true,"isSigner":true},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"nftSellerAcc","isMut":true,"isSigner":false},{"name":"nftMint","isMut":false,"isSigner":false},{"name":"nftMetadata","isMut":true,"isSigner":false},{"name":"ownerAtaAcc","isMut":true,"isSigner":false},{"name":"nftEdition","isMut":false,"isSigner":false},{"name":"ownerTokenRecord","isMut":true,"isSigner":false},{"name":"destTokenRecord","isMut":true,"isSigner":false},{"name":"pnftShared","accounts":[{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false},{"name":"authorizationRulesProgram","isMut":false,"isSigner":false}]},{"name":"nftEscrow","isMut":true,"isSigner":false,"docs":["Implicitly checked via transfer. Will fail if wrong account"]},{"name":"tempEscrowTokenRecord","isMut":true,"isSigner":false},{"name":"authRules","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"mintProof","isMut":false,"isSigner":false,"docs":["intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification"]},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"minAmount","type":"u64"},{"name":"optionalRoyaltyPct","type":{"option":"u16"}},{"name":"rulesAccPresent","type":"bool"},{"name":"authorizationData","type":{"option":{"defined":"AuthorizationDataLocal"}}}]},{"name":"takeBidT22","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"seller","isMut":true,"isSigner":true},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"nftSellerAcc","isMut":true,"isSigner":false},{"name":"nftMint","isMut":false,"isSigner":false},{"name":"ownerAtaAcc","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"mintProof","isMut":false,"isSigner":false,"docs":["intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification"]},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"minAmount","type":"u64"}]},{"name":"takeBidWns","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"seller","isMut":true,"isSigner":true},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"nftSellerAcc","isMut":true,"isSigner":false},{"name":"nftMint","isMut":false,"isSigner":false},{"name":"ownerAtaAcc","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"mintProof","isMut":false,"isSigner":false,"docs":["intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification"]},{"name":"rentDest","isMut":true,"isSigner":false},{"name":"approveAccount","isMut":true,"isSigner":false},{"name":"distribution","isMut":true,"isSigner":false},{"name":"wnsProgram","isMut":false,"isSigner":false},{"name":"distributionProgram","isMut":false,"isSigner":false},{"name":"extraMetas","isMut":false,"isSigner":false}],"args":[{"name":"minAmount","type":"u64"}]},{"name":"takeBidCore","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"seller","isMut":true,"isSigner":true},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"asset","isMut":true,"isSigner":false},{"name":"collection","isMut":false,"isSigner":false,"isOptional":true},{"name":"mplCoreProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"mintProof","isMut":false,"isSigner":false,"docs":["intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification"]},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"minAmount","type":"u64"}]}],"accounts":[{"name":"ListState","type":{"kind":"struct","fields":[{"name":"version","type":"u8"},{"name":"bump","type":{"array":["u8",1]}},{"name":"owner","type":"publicKey"},{"name":"assetId","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"currency","type":{"option":"publicKey"}},{"name":"expiry","type":"i64"},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}},{"name":"rentPayer","docs":["owner is the rent payer when this is PublicKey::default"],"type":"publicKey"},{"name":"reserved","type":{"array":["u8",32]}},{"name":"reserved1","type":{"array":["u8",64]}}]}},{"name":"BidState","type":{"kind":"struct","fields":[{"name":"version","type":"u8"},{"name":"bump","type":{"array":["u8",1]}},{"name":"owner","type":"publicKey"},{"name":"bidId","docs":["Randomly picked pubkey used in bid seeds. To avoid dangling bids can use assetId here."],"type":"publicKey"},{"name":"target","type":{"defined":"Target"}},{"name":"targetId","type":"publicKey"},{"name":"field","type":{"option":{"defined":"Field"}}},{"name":"fieldId","type":{"option":"publicKey"}},{"name":"quantity","type":"u32"},{"name":"filledQuantity","type":"u32"},{"name":"amount","type":"u64"},{"name":"currency","type":{"option":"publicKey"}},{"name":"expiry","type":"i64"},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}},{"name":"margin","type":{"option":"publicKey"}},{"name":"updatedAt","type":"i64"},{"name":"cosigner","type":"publicKey"},{"name":"rentPayer","docs":["owner is the rent payer when this is PublicKey::default"],"type":"publicKey"},{"name":"reserved","type":{"array":["u8",8]}},{"name":"reserved1","type":{"array":["u8",16]}},{"name":"reserved2","type":{"array":["u8",32]}}]}}],"types":[{"name":"TUses","type":{"kind":"struct","fields":[{"name":"useMethod","type":{"defined":"TUseMethod"}},{"name":"remaining","type":"u64"},{"name":"total","type":"u64"}]}},{"name":"TCollection","type":{"kind":"struct","fields":[{"name":"verified","type":"bool"},{"name":"key","type":"publicKey"}]}},{"name":"TMetadataArgs","type":{"kind":"struct","fields":[{"name":"name","docs":["The name of the asset"],"type":"string"},{"name":"symbol","docs":["The symbol for the asset"],"type":"string"},{"name":"uri","docs":["URI pointing to JSON representing the asset"],"type":"string"},{"name":"sellerFeeBasisPoints","docs":["Royalty basis points that goes to creators in secondary sales (0-10000)"],"type":"u16"},{"name":"primarySaleHappened","type":"bool"},{"name":"isMutable","type":"bool"},{"name":"editionNonce","docs":["nonce for easy calculation of editions, if present"],"type":{"option":"u8"}},{"name":"tokenStandard","docs":["Since we cannot easily change Metadata, we add the new DataV2 fields here at the end."],"type":{"option":{"defined":"TTokenStandard"}}},{"name":"collection","docs":["Collection"],"type":{"option":{"defined":"TCollection"}}},{"name":"uses","docs":["Uses"],"type":{"option":{"defined":"TUses"}}},{"name":"tokenProgramVersion","type":{"defined":"TTokenProgramVersion"}},{"name":"creatorShares","type":"bytes"},{"name":"creatorVerified","type":{"vec":"bool"}}]}},{"name":"MakeEvent","type":{"kind":"struct","fields":[{"name":"maker","type":"publicKey"},{"name":"bidId","type":{"option":"publicKey"}},{"name":"target","type":{"defined":"Target"}},{"name":"targetId","type":"publicKey"},{"name":"field","type":{"option":{"defined":"Field"}}},{"name":"fieldId","type":{"option":"publicKey"}},{"name":"amount","type":"u64"},{"name":"quantity","type":"u32"},{"name":"currency","type":{"option":"publicKey"}},{"name":"expiry","type":"i64"},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"assetId","type":{"option":"publicKey"}}]}},{"name":"TakeEvent","type":{"kind":"struct","fields":[{"name":"taker","type":"publicKey"},{"name":"bidId","type":{"option":"publicKey"}},{"name":"target","type":{"defined":"Target"}},{"name":"targetId","type":"publicKey"},{"name":"field","type":{"option":{"defined":"Field"}}},{"name":"fieldId","type":{"option":"publicKey"}},{"name":"amount","type":"u64"},{"name":"quantity","type":"u32"},{"name":"tcompFee","type":"u64"},{"name":"takerBrokerFee","type":"u64"},{"name":"makerBrokerFee","type":"u64"},{"name":"creatorFee","type":"u64"},{"name":"currency","type":{"option":"publicKey"}},{"name":"assetId","type":{"option":"publicKey"}}]}},{"name":"AuthorizationDataLocal","type":{"kind":"struct","fields":[{"name":"payload","type":{"vec":{"defined":"TaggedPayload"}}}]}},{"name":"TaggedPayload","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"payload","type":{"defined":"PayloadTypeLocal"}}]}},{"name":"SeedsVecLocal","type":{"kind":"struct","fields":[{"name":"seeds","docs":["The vector of derivation seeds."],"type":{"vec":"bytes"}}]}},{"name":"ProofInfoLocal","type":{"kind":"struct","fields":[{"name":"proof","docs":["The merkle proof."],"type":{"vec":{"array":["u8",32]}}}]}},{"name":"TTokenProgramVersion","type":{"kind":"enum","variants":[{"name":"Original"},{"name":"Token2022"}]}},{"name":"TTokenStandard","type":{"kind":"enum","variants":[{"name":"NonFungible"},{"name":"FungibleAsset"},{"name":"Fungible"},{"name":"NonFungibleEdition"}]}},{"name":"TUseMethod","type":{"kind":"enum","variants":[{"name":"Burn"},{"name":"Multiple"},{"name":"Single"}]}},{"name":"TcompEvent","type":{"kind":"enum","variants":[{"name":"Maker","fields":[{"defined":"MakeEvent"}]},{"name":"Taker","fields":[{"defined":"TakeEvent"}]}]}},{"name":"PayloadTypeLocal","type":{"kind":"enum","variants":[{"name":"Pubkey","fields":["publicKey"]},{"name":"Seeds","fields":[{"defined":"SeedsVecLocal"}]},{"name":"MerkleProof","fields":[{"defined":"ProofInfoLocal"}]},{"name":"Number","fields":["u64"]}]}},{"name":"Target","type":{"kind":"enum","variants":[{"name":"AssetId"},{"name":"Whitelist"}]}},{"name":"Field","type":{"kind":"enum","variants":[{"name":"Name"}]}}],"errors":[{"code":6100,"name":"ArithmeticError","msg":"arithmetic error"},{"code":6101,"name":"ExpiryTooLarge","msg":"expiry too large"},{"code":6102,"name":"BadOwner","msg":"bad owner"},{"code":6103,"name":"BadListState","msg":"bad list state"},{"code":6104,"name":"BadRoyaltiesPct","msg":"royalties pct must be between 0 and 100"},{"code":6105,"name":"PriceMismatch","msg":"price mismatch"},{"code":6106,"name":"CreatorMismatch","msg":"creator mismatch"},{"code":6107,"name":"InsufficientBalance","msg":"insufficient balance"},{"code":6108,"name":"BidExpired","msg":"bid has expired"},{"code":6109,"name":"TakerNotAllowed","msg":"taker not allowed"},{"code":6110,"name":"BadBidField","msg":"cannot pass bid field"},{"code":6111,"name":"BidNotYetExpired","msg":"bid not yet expired"},{"code":6112,"name":"BadMargin","msg":"bad margin"},{"code":6113,"name":"WrongIxForBidTarget","msg":"wrong ix for bid target called"},{"code":6114,"name":"WrongTargetId","msg":"wrong target id"},{"code":6115,"name":"MissingFvc","msg":"creator array missing first verified creator"},{"code":6116,"name":"MissingCollection","msg":"metadata missing collection"},{"code":6117,"name":"CannotModifyTarget","msg":"cannot modify bid target, create a new bid"},{"code":6118,"name":"TargetIdMustEqualBidId","msg":"target id and bid id must be the same for single bids"},{"code":6119,"name":"CurrencyNotYetEnabled","msg":"currency not yet enabled"},{"code":6120,"name":"MakerBrokerNotYetEnabled","msg":"maker broker not yet enabled"},{"code":6121,"name":"OptionalRoyaltiesNotYetEnabled","msg":"optional royalties not yet enabled"},{"code":6122,"name":"WrongStateVersion","msg":"wrong state version"},{"code":6123,"name":"WrongBidFieldId","msg":"wrong field id"},{"code":6124,"name":"BrokerMismatch","msg":"broker mismatch"},{"code":6125,"name":"AssetIdMismatch","msg":"asset id mismatch"},{"code":6126,"name":"ListingExpired","msg":"listing has expired"},{"code":6127,"name":"ListingNotYetExpired","msg":"listing not yet expired"},{"code":6128,"name":"BadQuantity","msg":"bad quantity passed in"},{"code":6129,"name":"BidFullyFilled","msg":"bid fully filled"},{"code":6130,"name":"BadWhitelist","msg":"bad whitelist"},{"code":6131,"name":"ForbiddenCollection","msg":"forbidden collection"},{"code":6132,"name":"BadCosigner","msg":"bad cosigner"},{"code":6133,"name":"BadMintProof","msg":"bad mint proof"},{"code":6134,"name":"CurrencyMismatch","msg":"Currency mismatch"},{"code":6135,"name":"BidBalanceNotEmptied","msg":"The bid balance was not emptied"},{"code":6136,"name":"BadRentDest","msg":"Bad rent dest."},{"code":6137,"name":"CurrencyNotYetWhitelisted","msg":"currency not yet whitelisted"},{"code":6138,"name":"MakerBrokerNotYetWhitelisted","msg":"maker broker not yet whitelisted"},{"code":6139,"name":"WrongTokenRecordDerivation","msg":"token record derivation is wrong"}]} diff --git a/olddocs/archivekbot2/idls/vertigo.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.json b/olddocs/archivekbot2/idls/vertigo.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.json new file mode 100644 index 0000000..4998453 --- /dev/null +++ b/olddocs/archivekbot2/idls/vertigo.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.json @@ -0,0 +1 @@ +{"address":"vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ","metadata":{"name":"amm","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"buy","discriminator":[102,6,61,18,1,218,235,234],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"owner"},{"kind":"account","path":"mint_a"},{"kind":"account","path":"mint_b"}]}},{"name":"user","signer":true},{"name":"owner"},{"name":"mint_a"},{"name":"mint_b"},{"name":"user_ta_a","docs":["Can be any token account owned by the user for this mint"],"writable":true},{"name":"user_ta_b","docs":["Can be any token account owned by the user for this mint"],"writable":true},{"name":"vault_a","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_a"}]}},{"name":"vault_b","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_b"}]}},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program","address":"vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ"}],"args":[{"name":"params","type":{"defined":{"name":"SwapParams"}}}]},{"name":"claim","discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"pool","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"claimer","signer":true},{"name":"mint_a","docs":["The token mint of the tokens used in the pool."]},{"name":"vault_a","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_a"}]}},{"name":"receiver_ta_a","docs":["Can be any token account owned by the user for this mint"],"writable":true},{"name":"token_program_a"}],"args":[]},{"name":"create","discriminator":[24,30,200,40,5,28,7,119],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner","signer":true},{"name":"token_wallet_authority","signer":true},{"name":"mint_a"},{"name":"mint_b"},{"name":"token_wallet_b","docs":["Token wallet that funds the pool with token B."],"writable":true},{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"owner"},{"kind":"account","path":"mint_a"},{"kind":"account","path":"mint_b"}]}},{"name":"vault_a","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_a"}]}},{"name":"vault_b","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_b"}]}},{"name":"token_program_a","docs":["Required programs and sysvars"]},{"name":"token_program_b"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"CreateParams"}}}]},{"name":"quote_buy","discriminator":[83,9,231,110,146,31,40,12],"accounts":[{"name":"pool","pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"owner"},{"kind":"account","path":"mint_a"},{"kind":"account","path":"mint_b"}]}},{"name":"owner"},{"name":"user"},{"name":"mint_a"},{"name":"mint_b"},{"name":"program","address":"vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ"}],"args":[{"name":"params","type":{"defined":{"name":"SwapParams"}}}],"returns":{"defined":{"name":"SwapResult"}}},{"name":"quote_sell","discriminator":[5,178,49,206,140,231,131,145],"accounts":[{"name":"pool","pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"owner"},{"kind":"account","path":"mint_a"},{"kind":"account","path":"mint_b"}]}},{"name":"owner"},{"name":"user"},{"name":"mint_a"},{"name":"mint_b"},{"name":"program","address":"vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ"}],"args":[{"name":"params","type":{"defined":{"name":"SwapParams"}}}],"returns":{"defined":{"name":"SwapResult"}}},{"name":"sell","discriminator":[51,230,133,164,1,127,131,173],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"owner"},{"kind":"account","path":"mint_a"},{"kind":"account","path":"mint_b"}]}},{"name":"user","signer":true},{"name":"owner"},{"name":"mint_a"},{"name":"mint_b"},{"name":"user_ta_a","docs":["Can be any token account owned by the user for this mint"],"writable":true},{"name":"user_ta_b","docs":["Can be any token account owned by the user for this mint"],"writable":true},{"name":"vault_a","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_a"}]}},{"name":"vault_b","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_b"}]}},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program","address":"vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ"}],"args":[{"name":"params","type":{"defined":{"name":"SwapParams"}}}]}],"accounts":[{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]}],"events":[{"name":"BuyEvent","discriminator":[103,244,82,31,44,245,119,119]},{"name":"PoolCreated","discriminator":[202,44,41,88,104,220,157,82]},{"name":"SellEvent","discriminator":[62,47,55,10,165,3,220,42]}],"errors":[{"code":6000,"name":"PoolDisabled","msg":"Pool Disabled"},{"code":6001,"name":"OwnerMustBeSystemAccount","msg":"Owner must be a system account (wallet), not a PDA"},{"code":6002,"name":"InvalidFeeDecay","msg":"Invalid Fee Decay"},{"code":6003,"name":"InvalidInitialTokenReserves","msg":"Initial token reserves must be greater than 0"},{"code":6004,"name":"InvalidMint","msg":"Invalid Mint"},{"code":6005,"name":"InvalidTokenAccount","msg":"Invalid Token Account"},{"code":6006,"name":"InsufficientFunds","msg":"Insufficient Funds"},{"code":6007,"name":"InvalidShift","msg":"Shift must be greater than 0"},{"code":6008,"name":"InvalidFees","msg":"Fees must be between 0 and 10000 basis points"},{"code":6009,"name":"MathOverflow","msg":"MathOverflow"},{"code":6010,"name":"InsufficientOutput","msg":"Insufficient output"},{"code":6011,"name":"InsufficientInput","msg":"Insufficient input"},{"code":6012,"name":"IllegalClaimant","msg":"Illegal Claimant"},{"code":6013,"name":"PoolEmpty","msg":"Pool Empty"}],"types":[{"name":"BuyEvent","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"amount_a","type":"u64"},{"name":"amount_b","type":"u64"},{"name":"new_reserves_a","type":"u128"},{"name":"new_reserves_b","type":"u128"},{"name":"fee_a","type":"u64"}]}},{"name":"CreateParams","type":{"kind":"struct","fields":[{"name":"shift","type":"u128"},{"name":"initial_token_b_reserves","type":"u64"},{"name":"fee_params","type":{"defined":{"name":"FeeParams"}}}]}},{"name":"FeeParams","type":{"kind":"struct","fields":[{"name":"normalization_period","docs":["The normalization period in slots.","During this period, the fee will decay from 100% to the base fee."],"type":"u64"},{"name":"decay","docs":["Normalization period fee decay rate.","Higher values decay faster."],"type":"f64"},{"name":"reference","docs":["Reference slot for the fee calculation."],"type":"u64"},{"name":"royalties_bps","docs":["Royalties in basis points."],"type":"u16"},{"name":"privileged_swapper","docs":["Number of fee exempt buys."],"type":{"option":"pubkey"}}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"enabled","type":"bool"},{"name":"owner","type":"pubkey"},{"name":"mint_a","type":"pubkey"},{"name":"mint_b","type":"pubkey"},{"name":"token_a_reserves","type":"u128"},{"name":"token_b_reserves","type":"u128"},{"name":"shift","type":"u128"},{"name":"royalties","type":"u64"},{"name":"vertigo_fees","type":"u64"},{"name":"bump","type":"u8"},{"name":"fee_params","type":{"defined":{"name":"FeeParams"}}}]}},{"name":"PoolCreated","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"mint_a","type":"pubkey"},{"name":"mint_b","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"initial_token_reserves","type":"u64"},{"name":"shift","type":"u128"},{"name":"fee_params","type":{"defined":{"name":"FeeParams"}}}]}},{"name":"SellEvent","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"amount_a","type":"u64"},{"name":"amount_b","type":"u64"},{"name":"new_reserves_a","type":"u128"},{"name":"new_reserves_b","type":"u128"},{"name":"fee_a","type":"u64"}]}},{"name":"SwapParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"limit","type":"u64"}]}},{"name":"SwapResult","type":{"kind":"struct","fields":[{"name":"new_reserves_a","type":"u128"},{"name":"new_reserves_b","type":"u128"},{"name":"amount_a","type":"u64"},{"name":"amount_b","type":"u64"},{"name":"fee_a","type":"u64"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/virtuals.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.json b/olddocs/archivekbot2/idls/virtuals.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.json new file mode 100644 index 0000000..c0c7861 --- /dev/null +++ b/olddocs/archivekbot2/idls/virtuals.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.json @@ -0,0 +1 @@ +{"address":"5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki","metadata":{"name":"virtuals_program","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"buy","discriminator":[102,6,61,18,1,218,235,234],"accounts":[{"name":"user","signer":true},{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"token_mint"},{"name":"user_virtuals_ata","writable":true},{"name":"user_token_ata","writable":true},{"name":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_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":"platform_prototype","writable":true,"address":"933jV351WDG23QTcHPqLFJxyYRrEPWRTR3qoPWi3jwEL"},{"name":"platform_prototype_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_prototype"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"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":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"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":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"amount","type":"u64"},{"name":"max_amount_out","type":"u64"}]},{"name":"claim_fees","discriminator":[82,251,233,156,12,52,184,202],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"virtuals_mint","address":"3iQL8BFS2vE7mww4ehAqQHAsbmRNCrPxizWAT2Zfyr9y"},{"name":"token_mint"},{"name":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_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":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_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":"platform","writable":true,"address":"FxKXqCKXdxPbfYau83ZkGUXgcZWhKBTfAjGg2KzYSopS"},{"name":"platform_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"platform"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_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":"platform_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"platform"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_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":"creator_virtuals_ata","writable":true},{"name":"creator_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool.creator","account":"VirtualsPool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_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","writable":true},{"name":"lp_mint","writable":true},{"name":"lock_escrow","writable":true},{"name":"escrow_vault","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"virtuals_vault","writable":true},{"name":"token_vault","writable":true},{"name":"virtuals_token_vault","writable":true},{"name":"token_token_vault","writable":true},{"name":"virtuals_vault_lp_mint","writable":true},{"name":"token_vault_lp_mint","writable":true},{"name":"virtuals_vault_lp","writable":true},{"name":"token_vault_lp","writable":true},{"name":"vault_program","address":"24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"dynamic_amm_program","address":"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"}],"args":[]},{"name":"create_meteora_pool","discriminator":[246,254,33,37,225,176,41,232],"accounts":[{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"meteora_deployer","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,101,111,114,97,95,100,101,112,108,111,121,101,114]}]}},{"name":"meteora_deployer_virtuals_ata","writable":true},{"name":"meteora_deployer_token_ata","writable":true},{"name":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_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":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_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":"lock_escrow","writable":true},{"name":"escrow_vault","writable":true},{"name":"pool","writable":true},{"name":"config","address":"B6FT4AHhQJ7BttrC1i223km5bYRUA2nVwBR7k5TVwLtx"},{"name":"lp_mint","writable":true},{"name":"virtuals_mint","address":"3iQL8BFS2vE7mww4ehAqQHAsbmRNCrPxizWAT2Zfyr9y"},{"name":"token_mint"},{"name":"virtuals_vault","writable":true},{"name":"token_vault","writable":true},{"name":"virtuals_token_vault","writable":true},{"name":"token_token_vault","writable":true},{"name":"virtuals_vault_lp_mint","writable":true},{"name":"token_vault_lp_mint","writable":true},{"name":"virtuals_vault_lp","writable":true},{"name":"token_vault_lp","writable":true},{"name":"pool_virtuals_ata","writable":true},{"name":"pool_token_ata","writable":true},{"name":"meteora_deployer_pool_lp","writable":true},{"name":"protocol_virtuals_fee","writable":true},{"name":"protocol_token_fee","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"token_metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"account","path":"metadata_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"account","path":"metadata_program"}}},{"name":"rent","docs":["Rent account."],"address":"SysvarRent111111111111111111111111111111111"},{"name":"mint_metadata","writable":true},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"vault_program","address":"24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi"},{"name":"token_program","docs":["Token program."],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Associated token program."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"},{"name":"dynamic_amm_program","address":"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"}],"args":[]},{"name":"initialize","docs":["# Initialize Pool","","This is where Virtuals creates a new mint address and pool and mints the initial 1,000,000,000 tokens.","This enabels Virtuals to premine addresses and \\","sell\\\\","them to customers without any delays of mining the","address. While this instruction could be permissioned, it is currently permissionless. As such, we make","sure to handle all the necessary checks such as: address suffix, zero supply, 6 decimals, correct mint","authority."],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"virtuals_mint","address":"3iQL8BFS2vE7mww4ehAqQHAsbmRNCrPxizWAT2Zfyr9y"},{"name":"token_mint","writable":true},{"name":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_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":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_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":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize_meteora_accounts","discriminator":[53,12,118,158,253,239,185,214],"accounts":[{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"meteora_deployer","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,101,111,114,97,95,100,101,112,108,111,121,101,114]}]}},{"name":"meteora_deployer_virtuals_ata","writable":true},{"name":"meteora_deployer_token_ata","writable":true},{"name":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_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":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_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":"lock_escrow","writable":true},{"name":"escrow_vault","writable":true},{"name":"pool","writable":true},{"name":"config","address":"B6FT4AHhQJ7BttrC1i223km5bYRUA2nVwBR7k5TVwLtx"},{"name":"lp_mint","writable":true},{"name":"virtuals_mint","address":"3iQL8BFS2vE7mww4ehAqQHAsbmRNCrPxizWAT2Zfyr9y"},{"name":"token_mint"},{"name":"virtuals_vault","writable":true},{"name":"token_vault","writable":true},{"name":"virtuals_token_vault","writable":true},{"name":"token_token_vault","writable":true},{"name":"virtuals_vault_lp_mint","writable":true},{"name":"token_vault_lp_mint","writable":true},{"name":"virtuals_vault_lp","writable":true},{"name":"token_vault_lp","writable":true},{"name":"pool_virtuals_ata","writable":true},{"name":"pool_token_ata","writable":true},{"name":"meteora_deployer_pool_lp","writable":true},{"name":"protocol_virtuals_fee","writable":true},{"name":"protocol_token_fee","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"token_metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"account","path":"metadata_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"account","path":"metadata_program"}}},{"name":"rent","docs":["Rent account."],"address":"SysvarRent111111111111111111111111111111111"},{"name":"mint_metadata","writable":true},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"vault_program","address":"24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi"},{"name":"token_program","docs":["Token program."],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Associated token program."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"},{"name":"dynamic_amm_program","address":"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"}],"args":[]},{"name":"launch","docs":["","This is where a user comes along and purchases a mint address and pool. The user will provide a name,","symbol and URI containing offchain metadata. The contract will initialize a new onchain metadata","account containing these values, then revoke the mint authority.",""],"discriminator":[153,241,93,225,22,69,74,61],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"creator_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"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":"token_mint","writable":true},{"name":"platform_prototype","writable":true,"address":"933jV351WDG23QTcHPqLFJxyYRrEPWRTR3qoPWi3jwEL"},{"name":"platform_prototype_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_prototype"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"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":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"token_metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"account","path":"metadata_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"account","path":"metadata_program"}}},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"symbol","type":"string"},{"name":"name","type":"string"},{"name":"uri","type":"string"}]},{"name":"sell","discriminator":[51,230,133,164,1,127,131,173],"accounts":[{"name":"user","signer":true},{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"token_mint"},{"name":"user_virtuals_ata","writable":true},{"name":"user_token_ata","writable":true},{"name":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_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":"platform_prototype","writable":true,"address":"933jV351WDG23QTcHPqLFJxyYRrEPWRTR3qoPWi3jwEL"},{"name":"platform_prototype_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_prototype"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"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":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"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":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"amount","type":"u64"},{"name":"min_amount_out","type":"u64"}]},{"name":"update_pool_creator","discriminator":[113,225,166,185,94,231,96,28],"accounts":[{"name":"creator","writable":true,"signer":true,"relations":["vpool"]},{"name":"new_creator"},{"name":"virtuals_mint","address":"3iQL8BFS2vE7mww4ehAqQHAsbmRNCrPxizWAT2Zfyr9y"},{"name":"token_mint"},{"name":"new_creator_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"new_creator"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_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":"new_creator_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"new_creator"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_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":"vpool","pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]}],"accounts":[{"name":"VirtualsPool","discriminator":[71,118,5,203,5,98,135,116]}],"events":[{"name":"BuyEvent","discriminator":[103,244,82,31,44,245,119,119]},{"name":"GraduationEvent","discriminator":[10,246,223,127,48,98,149,55]},{"name":"LaunchEvent","discriminator":[27,193,47,130,115,92,239,94]},{"name":"SellEvent","discriminator":[62,47,55,10,165,3,220,42]}],"errors":[{"code":6000,"name":"InvalidMintAddress","msg":"Invalid mint address"},{"code":6001,"name":"InvalidMintParams","msg":"Invalid mint params"},{"code":6002,"name":"CurveError","msg":"Curve error"},{"code":6003,"name":"InvalidFee","msg":"Fee cannot exceed 100%"},{"code":6004,"name":"NameTooLong","msg":"Name too long. Max length = 20"},{"code":6005,"name":"SymbolTooLong","msg":"Symbol too long. Max length = 10"},{"code":6006,"name":"URITooLong","msg":"URI too long. Max length = 200"},{"code":6007,"name":"InvalidAmount","msg":"Amount must be >0"},{"code":6008,"name":"SlippageExceeded","msg":"Slippage exceeded"},{"code":6009,"name":"InvalidVPoolState","msg":"Invalid vpool state"},{"code":6010,"name":"InvalidName","msg":"Invalid name"},{"code":6011,"name":"InvalidSymbol","msg":"Invalid symbol"},{"code":6012,"name":"InvalidURI","msg":"Invalid URI"}],"types":[{"name":"BuyEvent","type":{"kind":"struct","fields":[{"name":"buy_amount","type":"u64"},{"name":"virtuals_amount","type":"u64"}]}},{"name":"GraduationEvent","type":{"kind":"struct","fields":[{"name":"vpool","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"balance","type":"u64"}]}},{"name":"LaunchEvent","type":{"kind":"struct","fields":[{"name":"vpool","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"PoolState","type":{"kind":"enum","variants":[{"name":"Initialized"},{"name":"Active"},{"name":"Graduated"},{"name":"Migrated"}]}},{"name":"SellEvent","type":{"kind":"struct","fields":[{"name":"sell_amount","type":"u64"},{"name":"virtuals_amount","type":"u64"}]}},{"name":"VirtualsPool","type":{"kind":"struct","fields":[{"name":"creator","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"virtual_y","type":"u64"},{"name":"graduation_x","type":"u64"},{"name":"state","type":{"defined":{"name":"PoolState"}}},{"name":"bump","type":"u8"}]}}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/woofi.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.json b/olddocs/archivekbot2/idls/woofi.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.json new file mode 100644 index 0000000..dd5fa49 --- /dev/null +++ b/olddocs/archivekbot2/idls/woofi.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"woofi","instructions":[{"name":"createConfig","accounts":[{"name":"authority","isMut":true,"isSigner":true},{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createWooracle","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"feedAccount","isMut":false,"isSigner":false},{"name":"priceUpdate","isMut":false,"isSigner":false},{"name":"quoteTokenMint","isMut":false,"isSigner":false},{"name":"quoteFeedAccount","isMut":false,"isSigner":false},{"name":"quotePriceUpdate","isMut":false,"isSigner":false}],"args":[{"name":"maximumAge","type":"u64"}]},{"name":"setOracleMaximumAge","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"maximumAge","type":"u64"}]},{"name":"setStaleDuration","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"staleDuration","type":"i64"}]},{"name":"setWooBound","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"bound","type":"u64"}]},{"name":"setWooRange","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"rangeMin","type":"u128"},{"name":"rangeMax","type":"u128"}]},{"name":"setWooPrice","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"price","type":"u128"}]},{"name":"setWooCoeff","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"coeff","type":"u64"}]},{"name":"setWooSpread","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"spread","type":"u64"}]},{"name":"setWooAdmin","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"adminAuthority","type":{"vec":"publicKey"}}]},{"name":"setGuardianAdmin","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"guardianAuthority","type":{"vec":"publicKey"}}]},{"name":"setLendingManager","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"lendingManagers","type":{"vec":"publicKey"}}]},{"name":"setSuperchargerVaultWhitelist","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"superchargerVaults","type":{"vec":"publicKey"}}]},{"name":"setWooState","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"price","type":"u128"},{"name":"coeff","type":"u64"},{"name":"spread","type":"u64"}]},{"name":"getPrice","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"priceUpdate","isMut":false,"isSigner":false},{"name":"quotePriceUpdate","isMut":false,"isSigner":false}],"args":[],"returns":{"defined":"GetPriceResult"}},{"name":"createPool","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"quoteTokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":true},{"name":"wooracle","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createWooAmmPool","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"wooammpool","isMut":true,"isSigner":false},{"name":"wooracleA","isMut":false,"isSigner":false},{"name":"woopoolA","isMut":false,"isSigner":false},{"name":"wooracleB","isMut":false,"isSigner":false},{"name":"woopoolB","isMut":false,"isSigner":false},{"name":"woopoolQuote","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"setPoolAdmin","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"adminAuthority","type":{"vec":"publicKey"}}]},{"name":"setFeeAdmin","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"feeAuthority","type":{"vec":"publicKey"}}]},{"name":"setPauseRole","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"pauseAuthority","type":{"vec":"publicKey"}}]},{"name":"pause","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"unpause","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"setPoolFeeRate","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"feeRate","type":"u16"}]},{"name":"setPoolMaxGamma","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"maxGamma","type":"u128"}]},{"name":"setPoolMaxNotionalSwap","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"maxNotionalSwap","type":"u128"}]},{"name":"setPoolCapBal","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"capBal","type":"u128"}]},{"name":"setPoolMinSwapAmount","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"minSwapAmount","type":"u128"}]},{"name":"tryQuery","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracleFrom","isMut":false,"isSigner":false},{"name":"woopoolFrom","isMut":false,"isSigner":false},{"name":"priceUpdateFrom","isMut":true,"isSigner":false},{"name":"wooracleTo","isMut":false,"isSigner":false},{"name":"woopoolTo","isMut":false,"isSigner":false},{"name":"priceUpdateTo","isMut":true,"isSigner":false},{"name":"quotePriceUpdate","isMut":false,"isSigner":false}],"args":[{"name":"fromAmount","type":"u128"}],"returns":{"defined":"QueryResult"}},{"name":"query","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracleFrom","isMut":false,"isSigner":false},{"name":"woopoolFrom","isMut":false,"isSigner":false},{"name":"tokenVaultFrom","isMut":true,"isSigner":false},{"name":"priceUpdateFrom","isMut":true,"isSigner":false},{"name":"wooracleTo","isMut":false,"isSigner":false},{"name":"woopoolTo","isMut":false,"isSigner":false},{"name":"tokenVaultTo","isMut":false,"isSigner":false},{"name":"priceUpdateTo","isMut":true,"isSigner":false},{"name":"woopoolQuote","isMut":false,"isSigner":false},{"name":"quotePriceUpdate","isMut":false,"isSigner":false},{"name":"quoteTokenVault","isMut":false,"isSigner":false}],"args":[{"name":"fromAmount","type":"u128"},{"name":"minToAmount","type":"u128"}],"returns":{"defined":"QueryResult"}},{"name":"swap","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"wooracleFrom","isMut":true,"isSigner":false},{"name":"woopoolFrom","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountFrom","isMut":true,"isSigner":false},{"name":"tokenVaultFrom","isMut":true,"isSigner":false},{"name":"priceUpdateFrom","isMut":true,"isSigner":false},{"name":"wooracleTo","isMut":true,"isSigner":false},{"name":"woopoolTo","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountTo","isMut":true,"isSigner":false},{"name":"tokenVaultTo","isMut":true,"isSigner":false},{"name":"priceUpdateTo","isMut":true,"isSigner":false},{"name":"woopoolQuote","isMut":true,"isSigner":false},{"name":"quotePriceUpdate","isMut":false,"isSigner":false},{"name":"quoteTokenVault","isMut":true,"isSigner":false},{"name":"rebateTo","isMut":false,"isSigner":false}],"args":[{"name":"fromAmount","type":"u128"},{"name":"minToAmount","type":"u128"}]},{"name":"deposit","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenOwnerAccount","isMut":true,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u128"}]},{"name":"withdraw","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"toTokenAccount","isMut":true,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u128"}]},{"name":"claimFee","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"claimFeeToAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"claimFeeAmount","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"claimFeeToAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"claimAmount","type":"u128"}]},{"name":"incaseTokenGotStuck","accounts":[{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"toTokenAccount","isMut":true,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u128"}]},{"name":"setWooconfigNewAuthority","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"newAuthority","isMut":false,"isSigner":false}],"args":[]},{"name":"claimWooconfigAuthority","accounts":[{"name":"newAuthority","isMut":false,"isSigner":true},{"name":"wooconfig","isMut":true,"isSigner":false}],"args":[]},{"name":"claimWooracleAuthority","accounts":[{"name":"newAuthority","isMut":false,"isSigner":true},{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false}],"args":[]},{"name":"claimWoopoolAuthority","accounts":[{"name":"newAuthority","isMut":false,"isSigner":true},{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false}],"args":[]},{"name":"claimWooammpoolAuthority","accounts":[{"name":"newAuthority","isMut":false,"isSigner":true},{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooammpool","isMut":true,"isSigner":false}],"args":[]},{"name":"repayByLendingManager","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"superChargerVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"repayAmount","type":"u128"}]}],"accounts":[{"name":"WooAmmPool","type":{"kind":"struct","fields":[{"name":"wooconfig","type":"publicKey"},{"name":"wooammpoolBump","type":{"array":["u8",1]}},{"name":"authority","type":"publicKey"},{"name":"wooracleA","type":"publicKey"},{"name":"woopoolA","type":"publicKey"},{"name":"feedAccountA","type":"publicKey"},{"name":"priceUpdateA","type":"publicKey"},{"name":"tokenMintA","type":"publicKey"},{"name":"tokenVaultA","type":"publicKey"},{"name":"wooracleB","type":"publicKey"},{"name":"woopoolB","type":"publicKey"},{"name":"feedAccountB","type":"publicKey"},{"name":"priceUpdateB","type":"publicKey"},{"name":"tokenMintB","type":"publicKey"},{"name":"tokenVaultB","type":"publicKey"},{"name":"quoteTokenMint","type":"publicKey"},{"name":"quoteFeedAccount","type":"publicKey"},{"name":"quotePriceUpdate","type":"publicKey"},{"name":"quoteWoopool","type":"publicKey"},{"name":"quoteVault","type":"publicKey"}]}},{"name":"WooConfig","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"paused","type":"bool"},{"name":"woopoolAdminAuthority","type":{"vec":"publicKey"}},{"name":"wooracleAdminAuthority","type":{"vec":"publicKey"}},{"name":"feeAuthority","type":{"vec":"publicKey"}},{"name":"guardianAuthority","type":{"vec":"publicKey"}},{"name":"pauseAuthority","type":{"vec":"publicKey"}},{"name":"lendingManagerAuthority","type":{"vec":"publicKey"}},{"name":"superchargerVaultWhitelist","type":{"vec":"publicKey"}},{"name":"newAuthority","type":"publicKey"}]}},{"name":"WooPool","type":{"kind":"struct","fields":[{"name":"wooconfig","type":"publicKey"},{"name":"woopoolBump","type":{"array":["u8",1]}},{"name":"authority","type":"publicKey"},{"name":"wooracle","type":"publicKey"},{"name":"feeRate","type":"u16"},{"name":"maxGamma","type":"u128"},{"name":"maxNotionalSwap","type":"u128"},{"name":"capBal","type":"u128"},{"name":"minSwapAmount","type":"u128"},{"name":"unclaimedFee","type":"u128"},{"name":"tokenMint","type":"publicKey"},{"name":"tokenVault","type":"publicKey"},{"name":"quoteTokenMint","type":"publicKey"},{"name":"baseDecimals","type":"u8"}]}},{"name":"Wooracle","type":{"kind":"struct","fields":[{"name":"wooconfig","type":"publicKey"},{"name":"authority","type":"publicKey"},{"name":"tokenMint","type":"publicKey"},{"name":"feedAccount","type":"publicKey"},{"name":"priceUpdate","type":"publicKey"},{"name":"maximumAge","type":"u64"},{"name":"priceDecimals","type":"u8"},{"name":"quoteDecimals","type":"u8"},{"name":"baseDecimals","type":"u8"},{"name":"updatedAt","type":"i64"},{"name":"staleDuration","type":"i64"},{"name":"bound","type":"u64"},{"name":"price","type":"u128"},{"name":"coeff","type":"u64"},{"name":"spread","type":"u64"},{"name":"rangeMin","type":"u128"},{"name":"rangeMax","type":"u128"},{"name":"quoteTokenMint","type":"publicKey"},{"name":"quoteFeedAccount","type":"publicKey"},{"name":"quotePriceUpdate","type":"publicKey"}]}}],"types":[{"name":"GetPriceResult","type":{"kind":"struct","fields":[{"name":"priceOut","type":"u128"},{"name":"feasibleOut","type":"bool"}]}},{"name":"GetStateResult","type":{"kind":"struct","fields":[{"name":"priceOut","type":"u128"},{"name":"spread","type":"u64"},{"name":"coeff","type":"u64"},{"name":"feasibleOut","type":"bool"}]}},{"name":"QueryResult","type":{"kind":"struct","fields":[{"name":"toAmount","type":"u128"},{"name":"swapFee","type":"u128"}]}}],"events":[{"name":"PauseEvent","fields":[{"name":"wooconfig","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false}]},{"name":"UnPauseEvent","fields":[{"name":"wooconfig","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false}]},{"name":"DepositEvent","fields":[{"name":"tokenMint","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"depositAmount","type":"u128","index":false}]},{"name":"WithdrawEvent","fields":[{"name":"tokenMint","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"withdrawAmount","type":"u128","index":false}]},{"name":"RepayEvent","fields":[{"name":"tokenMint","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"repayAmount","type":"u128","index":false}]},{"name":"ClaimFeeEvent","fields":[{"name":"quoteTokenMint","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"claimFeeToAccount","type":"publicKey","index":false},{"name":"claimAmount","type":"u128","index":false}]},{"name":"WooPoolAdminUpdatedEvent","fields":[{"name":"wooconfig","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"admins","type":{"vec":"publicKey"},"index":false}]},{"name":"FeeAdminUpdatedEvent","fields":[{"name":"wooconfig","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"feeAdmins","type":{"vec":"publicKey"},"index":false}]},{"name":"PauseRoleUpdatedEvent","fields":[{"name":"wooconfig","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"pauseRoles","type":{"vec":"publicKey"},"index":false}]},{"name":"SwapEvent","fields":[{"name":"sender","type":"publicKey","index":false},{"name":"fromTokenMint","type":"publicKey","index":false},{"name":"toTokenMint","type":"publicKey","index":false},{"name":"fromAmount","type":"u128","index":false},{"name":"toAmount","type":"u128","index":false},{"name":"fromAccount","type":"publicKey","index":false},{"name":"toAccount","type":"publicKey","index":false},{"name":"rebateTo","type":"publicKey","index":false},{"name":"swapVol","type":"u128","index":false},{"name":"swapFee","type":"u128","index":false}]}],"errors":[{"code":6000,"name":"DivideByZero","msg":"Unable to divide by zero"},{"code":6001,"name":"NumberCastError","msg":"Unable to cast number into BigInt"},{"code":6002,"name":"FeeRateMaxExceeded","msg":"Exceeded max fee rate"},{"code":6003,"name":"MathOverflow","msg":"Mathematical operation with overflow"},{"code":6004,"name":"MulDivOverflow","msg":"Muldiv overflow"},{"code":6005,"name":"ProtocolFeeMaxExceeded","msg":"Exceeded max protocol fee"},{"code":6006,"name":"ProtocolFeeNotEnough","msg":"Protocol fee not enough"},{"code":6007,"name":"RebateFeeMaxExceeded","msg":"Exceeded max rebate fee"},{"code":6008,"name":"RebateFeeNotEnough","msg":"Rebate fee not enough"},{"code":6009,"name":"ReserveMaxExceeded","msg":"Exceeded max reserve"},{"code":6010,"name":"ReserveNotEnough","msg":"Reserve not enough"},{"code":6011,"name":"ReserveLessThanFee","msg":"Reserve less than fee"},{"code":6012,"name":"TooManyAuthorities","msg":"Too Many Authorities"},{"code":6013,"name":"WooOracleBoundLimit","msg":"Woo oracle bound exceed limit"},{"code":6014,"name":"WooOracleNotFeasible","msg":"Woo oracle is not feasible"},{"code":6015,"name":"WooOraclePriceNotValid","msg":"Woo oracle price is not valid"},{"code":6016,"name":"WooOraclePriceRangeMin","msg":"Woo oracle price below range MIN"},{"code":6017,"name":"WooOraclePriceRangeMax","msg":"Woo oracle price exceed range MAX"},{"code":6018,"name":"WooOracleSpreadExceed","msg":"Woo oracle spread exceed 1E18"},{"code":6019,"name":"WooPoolExceedMaxNotionalValue","msg":"Woo pp exceed max notional value"},{"code":6020,"name":"WooPoolExceedMaxGamma","msg":"Woo pp exceed max gamma"},{"code":6021,"name":"NotEnoughBalance","msg":"Src Balance < LP Deposit Amount."},{"code":6022,"name":"NotEnoughOut","msg":"Not enough out"},{"code":6023,"name":"AmountOutBelowMinimum","msg":"Amount out below minimum threshold"},{"code":6024,"name":"BalanceCapExceeds","msg":"Amount exceeds max balance cap"},{"code":6025,"name":"SwapPoolInvalid","msg":"Swap pool invalid"},{"code":6026,"name":"InvalidAuthority","msg":"invalid authority"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/idls/zeta.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.json b/olddocs/archivekbot2/idls/zeta.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.json new file mode 100644 index 0000000..789b291 --- /dev/null +++ b/olddocs/archivekbot2/idls/zeta.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"zeta","instructions":[{"name":"initializeZetaPricing","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[{"name":"args","type":{"defined":"InitializeZetaPricingArgs"}}]},{"name":"updateZetaPricingPubkeys","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateZetaPricingPubkeysArgs"}}]},{"name":"initializeZetaGroup","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"underlyingMint","isMut":false,"isSigner":false},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"greeks","isMut":true,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false},{"name":"underlying","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeZetaGroupArgs"}}]},{"name":"overrideExpiry","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"zetaGroup","isMut":true,"isSigner":false}],"args":[{"name":"args","type":{"defined":"OverrideExpiryArgs"}}]},{"name":"migrateToCrossMarginAccount","accounts":[{"name":"crossMarginAccount","isMut":true,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"initializeCrossMarginAccountManager","accounts":[{"name":"crossMarginAccountManager","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeCrossMarginAccount","accounts":[{"name":"crossMarginAccount","isMut":true,"isSigner":false},{"name":"crossMarginAccountManager","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"subaccountIndex","type":"u8"}]},{"name":"initializeMarginAccount","accounts":[{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeSpreadAccount","accounts":[{"name":"spreadAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false}],"args":[]},{"name":"closeCrossMarginAccountManager","accounts":[{"name":"crossMarginAccountManager","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"closeCrossMarginAccount","accounts":[{"name":"crossMarginAccount","isMut":true,"isSigner":false},{"name":"crossMarginAccountManager","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true}],"args":[{"name":"subaccountIndex","type":"u8"}]},{"name":"closeMarginAccount","accounts":[{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"zetaGroup","isMut":false,"isSigner":false}],"args":[]},{"name":"closeSpreadAccount","accounts":[{"name":"spreadAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"zetaGroup","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeUnderlying","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"underlying","isMut":true,"isSigner":false},{"name":"underlyingMint","isMut":false,"isSigner":false}],"args":[{"name":"flexUnderlying","type":"bool"}]},{"name":"initializePerpSyncQueue","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"initializeMarketIndexes","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marketIndexes","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"initializeMarketNode","accounts":[{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marketNode","isMut":true,"isSigner":false},{"name":"greeks","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeMarketNodeArgs"}}]},{"name":"halt","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"unhalt","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"updateHaltState","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"HaltStateArgs"}}]},{"name":"updateVolatility","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"greeks","isMut":true,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateVolatilityArgs"}}]},{"name":"updateInterestRate","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"greeks","isMut":true,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateInterestRateArgs"}}]},{"name":"addPerpMarketIndex","accounts":[{"name":"marketIndexes","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"addMarketIndexes","accounts":[{"name":"marketIndexes","isMut":true,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false}],"args":[]},{"name":"initializeZetaState","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"treasuryWallet","isMut":true,"isSigner":false},{"name":"referralsAdmin","isMut":false,"isSigner":false},{"name":"referralsRewardsWallet","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"secondaryAdmin","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeStateArgs"}}]},{"name":"initializeZetaTreasuryWallet","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"treasuryWallet","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[]},{"name":"initializeZetaReferralsRewardsWallet","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"referralsRewardsWallet","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[]},{"name":"updateAdmin","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"newAdmin","isMut":true,"isSigner":true}],"args":[]},{"name":"updateSecondaryAdmin","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"newAdmin","isMut":true,"isSigner":true}],"args":[]},{"name":"updateReferralsAdmin","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"newAdmin","isMut":true,"isSigner":true}],"args":[]},{"name":"updateZetaState","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateStateArgs"}}]},{"name":"updateOracle","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"oracle","isMut":false,"isSigner":false}],"args":[]},{"name":"updateOracleBackupFeed","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"oracle","isMut":false,"isSigner":false}],"args":[]},{"name":"updatePricingParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdatePricingParametersArgs"}}]},{"name":"updateMarginParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateMarginParametersArgs"}},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"updateZetaGroupMarginParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateMarginParametersArgs"}}]},{"name":"updatePerpParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdatePerpParametersArgs"}},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"updateZetaGroupPerpParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdatePerpParametersArgs"}}]},{"name":"updateZetaGroupExpiryParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateZetaGroupExpiryArgs"}}]},{"name":"toggleZetaGroupPerpsOnly","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[]},{"name":"cleanZetaMarkets","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false}],"args":[]},{"name":"cleanZetaMarketHalted","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"bids","isMut":false,"isSigner":false},{"name":"asks","isMut":false,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"settlePositionsHalted","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"initializeMarketStrikes","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"expireSeriesOverride","accounts":[],"args":[{"name":"args","type":{"defined":"ExpireSeriesOverrideArgs"}}]},{"name":"expireSeries","accounts":[],"args":[{"name":"settlementNonce","type":"u8"}]},{"name":"initializeZetaMarket","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marketIndexes","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"baseMint","isMut":true,"isSigner":false},{"name":"quoteMint","isMut":true,"isSigner":false},{"name":"zetaBaseVault","isMut":true,"isSigner":false},{"name":"zetaQuoteVault","isMut":true,"isSigner":false},{"name":"dexBaseVault","isMut":true,"isSigner":false},{"name":"dexQuoteVault","isMut":true,"isSigner":false},{"name":"vaultOwner","isMut":false,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeMarketArgs"}}]},{"name":"initializeMarketTifEpochCycle","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"market","isMut":true,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false}],"args":[{"name":"epochLength","type":"u16"}]},{"name":"updatePricingV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":false,"isSigner":false},{"name":"perpBids","isMut":false,"isSigner":false},{"name":"perpAsks","isMut":false,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"applyPerpFunding","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"deposit","accounts":[{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositV2","accounts":[{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositInsuranceVault","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"insuranceDepositAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"zetaVault","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositInsuranceVaultV2","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"insuranceDepositAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"zetaVault","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"greeks","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"socializedLossAccount","isMut":true,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawInsuranceVault","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"insuranceDepositAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"percentageAmount","type":"u64"}]},{"name":"withdrawInsuranceVaultV2","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"insuranceDepositAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"percentageAmount","type":"u64"}]},{"name":"initializeOpenOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeOpenOrdersV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeOpenOrdersV3","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"crossMarginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"closeOpenOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false}],"args":[{"name":"mapNonce","type":"u8"}]},{"name":"closeOpenOrdersV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false}],"args":[{"name":"mapNonce","type":"u8"}]},{"name":"closeOpenOrdersV3","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"crossMarginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false}],"args":[{"name":"mapNonce","type":"u8"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"initializeWhitelistDepositAccount","accounts":[{"name":"whitelistDepositAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"user","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeWhitelistInsuranceAccount","accounts":[{"name":"whitelistInsuranceAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"user","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeWhitelistTradingFeesAccount","accounts":[{"name":"whitelistTradingFeesAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"user","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeInsuranceDepositAccount","accounts":[{"name":"insuranceDepositAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"whitelistInsuranceAccount","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeCombinedInsuranceVault","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeCombinedVault","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeCombinedSocializedLossAccount","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"placeOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketNode","isMut":true,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"clientOrderId","type":{"option":"u64"}}]},{"name":"placeOrderV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketNode","isMut":true,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}}]},{"name":"placeOrderV3","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketNode","isMut":true,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}},{"name":"tag","type":{"option":"string"}}]},{"name":"placePerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}},{"name":"tag","type":{"option":"string"}}]},{"name":"placePerpOrderV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}},{"name":"tag","type":{"option":"string"}},{"name":"tifOffset","type":{"option":"u16"}}]},{"name":"placeOrderV4","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketNode","isMut":true,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}},{"name":"tag","type":{"option":"string"}},{"name":"tifOffset","type":{"option":"u16"}}]},{"name":"placePerpOrderV3","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}},{"name":"tag","type":{"option":"string"}},{"name":"tifOffset","type":{"option":"u16"}},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelOrder","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"side","type":{"defined":"Side"}},{"name":"orderId","type":"u128"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelOrderNoError","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"side","type":{"defined":"Side"}},{"name":"orderId","type":"u128"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelAllMarketOrders","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelOrderHalted","accounts":[{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"side","type":{"defined":"Side"}},{"name":"orderId","type":"u128"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelOrderByClientOrderId","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"clientOrderId","type":"u64"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelOrderByClientOrderIdNoError","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"clientOrderId","type":"u64"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"pruneExpiredTifOrders","accounts":[{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}],"args":[]},{"name":"forceCancelOrderByOrderIdV2","accounts":[{"name":"pricing","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"side","type":{"defined":"Side"}},{"name":"orderId","type":"u128"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"forceCancelOrderByOrderId","accounts":[{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"side","type":{"defined":"Side"}},{"name":"orderId","type":"u128"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"forceCancelOrdersV2","accounts":[{"name":"pricing","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"forceCancelOrders","accounts":[{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"crankEventQueue","docs":["The only events that need to be cranked are maker fills."],"accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"collectTreasuryFunds","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"treasuryWallet","isMut":true,"isSigner":false},{"name":"collectionTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"amount","type":"u64"}]},{"name":"treasuryMovement","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"treasuryWallet","isMut":true,"isSigner":false},{"name":"referralsRewardsWallet","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"treasuryMovementType","type":{"defined":"TreasuryMovementType"}},{"name":"amount","type":"u64"}]},{"name":"rebalanceInsuranceVault","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaVault","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"treasuryWallet","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"liquidateV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"liquidator","isMut":false,"isSigner":true},{"name":"liquidatorAccount","isMut":true,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"liquidatedAccount","isMut":true,"isSigner":false}],"args":[{"name":"size","type":"u64"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"liquidate","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"liquidator","isMut":false,"isSigner":true},{"name":"liquidatorMarginAccount","isMut":true,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"liquidatedMarginAccount","isMut":true,"isSigner":false}],"args":[{"name":"size","type":"u64"}]},{"name":"burnVaultTokens","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"settleDexFunds","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"zetaBaseVault","isMut":true,"isSigner":false},{"name":"zetaQuoteVault","isMut":true,"isSigner":false},{"name":"dexBaseVault","isMut":true,"isSigner":false},{"name":"dexQuoteVault","isMut":true,"isSigner":false},{"name":"vaultOwner","isMut":false,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"positionMovement","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"spreadAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"greeks","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false}],"args":[{"name":"movementType","type":{"defined":"MovementType"}},{"name":"movements","type":{"vec":{"defined":"PositionMovementArg"}}}]},{"name":"transferExcessSpreadBalance","accounts":[{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"spreadAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"toggleMarketMaker","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"marginAccount","isMut":true,"isSigner":false}],"args":[{"name":"isMarketMaker","type":"bool"}]},{"name":"initializeReferrerAccount","accounts":[{"name":"referrer","isMut":true,"isSigner":true},{"name":"referrerAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"referUser","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"referrerAccount","isMut":false,"isSigner":false},{"name":"referralAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeReferrerAlias","accounts":[{"name":"referrer","isMut":true,"isSigner":true},{"name":"referrerAlias","isMut":true,"isSigner":false},{"name":"referrerAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"alias","type":"string"}]},{"name":"setReferralsRewards","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"referralsAdmin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"vec":{"defined":"SetReferralsRewardsArgs"}}}]},{"name":"claimReferralsRewards","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"referralsRewardsWallet","isMut":true,"isSigner":false},{"name":"userReferralsAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"user","isMut":false,"isSigner":true}],"args":[]},{"name":"editDelegatedPubkey","accounts":[{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"newKey","type":"publicKey"}]},{"name":"resetNumFlexUnderlyings","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[]}],"accounts":[{"name":"Pricing","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"markPrices","type":{"array":["u64",5]}},{"name":"markPricesPadding","type":{"array":["u64",20]}},{"name":"updateTimestamps","type":{"array":["u64",5]}},{"name":"updateTimestampsPadding","type":{"array":["u64",20]}},{"name":"fundingDeltas","type":{"array":[{"defined":"AnchorDecimal"},5]}},{"name":"fundingDeltasPadding","type":{"array":[{"defined":"AnchorDecimal"},20]}},{"name":"latestFundingRates","type":{"array":[{"defined":"AnchorDecimal"},5]}},{"name":"latestFundingRatesPadding","type":{"array":[{"defined":"AnchorDecimal"},20]}},{"name":"latestMidpoints","type":{"array":["u64",5]}},{"name":"latestMidpointsPadding","type":{"array":["u64",20]}},{"name":"oracles","type":{"array":["publicKey",5]}},{"name":"oraclesPadding","type":{"array":["publicKey",20]}},{"name":"oracleBackupFeeds","type":{"array":["publicKey",5]}},{"name":"oracleBackupFeedsPadding","type":{"array":["publicKey",20]}},{"name":"markets","type":{"array":["publicKey",5]}},{"name":"marketsPadding","type":{"array":["publicKey",20]}},{"name":"perpSyncQueues","type":{"array":["publicKey",5]}},{"name":"perpSyncQueuesPadding","type":{"array":["publicKey",20]}},{"name":"perpParameters","type":{"array":[{"defined":"PerpParameters"},5]}},{"name":"perpParametersPadding","type":{"array":[{"defined":"PerpParameters"},20]}},{"name":"marginParameters","type":{"array":[{"defined":"MarginParameters"},5]}},{"name":"marginParametersPadding","type":{"array":[{"defined":"MarginParameters"},20]}},{"name":"products","type":{"array":[{"defined":"Product"},5]}},{"name":"productsPadding","type":{"array":[{"defined":"Product"},20]}},{"name":"zetaGroupKeys","type":{"array":["publicKey",5]}},{"name":"zetaGroupKeysPadding","type":{"array":["publicKey",20]}},{"name":"totalInsuranceVaultDeposits","type":"u64"},{"name":"lastWithdrawTimestamp","type":"u64"},{"name":"netOutflowSum","type":"i64"},{"name":"haltForcePricing","type":{"array":["bool",5]}},{"name":"haltForcePricingPadding","type":{"array":["bool",20]}},{"name":"padding","type":{"array":["u8",2707]}}]}},{"name":"Greeks","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"markPrices","type":{"array":["u64",46]}},{"name":"markPricesPadding","type":{"array":["u64",91]}},{"name":"perpMarkPrice","type":"u64"},{"name":"productGreeks","type":{"array":[{"defined":"ProductGreeks"},22]}},{"name":"productGreeksPadding","type":{"array":[{"defined":"ProductGreeks"},44]}},{"name":"updateTimestamp","type":{"array":["u64",2]}},{"name":"updateTimestampPadding","type":{"array":["u64",4]}},{"name":"retreatExpirationTimestamp","type":{"array":["u64",2]}},{"name":"retreatExpirationTimestampPadding","type":{"array":["u64",4]}},{"name":"interestRate","type":{"array":["i64",2]}},{"name":"interestRatePadding","type":{"array":["i64",4]}},{"name":"nodes","type":{"array":["u64",5]}},{"name":"volatility","type":{"array":["u64",10]}},{"name":"volatilityPadding","type":{"array":["u64",20]}},{"name":"nodeKeys","type":{"array":["publicKey",138]}},{"name":"haltForcePricing","type":{"array":["bool",6]}},{"name":"perpUpdateTimestamp","type":"u64"},{"name":"perpFundingDelta","type":{"defined":"AnchorDecimal"}},{"name":"perpLatestFundingRate","type":{"defined":"AnchorDecimal"}},{"name":"perpLatestMidpoint","type":"u64"},{"name":"padding","type":{"array":["u8",1593]}}]}},{"name":"MarketIndexes","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"initialized","type":"bool"},{"name":"indexes","type":{"array":["u8",138]}}]}},{"name":"OpenOrdersMap","type":{"kind":"struct","fields":[{"name":"userKey","type":"publicKey"}]}},{"name":"CrossOpenOrdersMap","type":{"kind":"struct","fields":[{"name":"userKey","type":"publicKey"},{"name":"subaccountIndex","type":"u8"}]}},{"name":"State","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"stateNonce","type":"u8"},{"name":"serumNonce","type":"u8"},{"name":"mintAuthNonce","type":"u8"},{"name":"numUnderlyings","type":"u8"},{"name":"numFlexUnderlyings","type":"u8"},{"name":"null","type":{"array":["u8",7]}},{"name":"strikeInitializationThresholdSeconds","type":"u32"},{"name":"pricingFrequencySeconds","type":"u32"},{"name":"liquidatorLiquidationPercentage","type":"u32"},{"name":"insuranceVaultLiquidationPercentage","type":"u32"},{"name":"nativeD1TradeFeePercentage","type":"u64"},{"name":"nativeD1UnderlyingFeePercentage","type":"u64"},{"name":"nativeWhitelistUnderlyingFeePercentage","type":"u64"},{"name":"nativeDepositLimit","type":"u64"},{"name":"expirationThresholdSeconds","type":"u32"},{"name":"positionMovementFeeBps","type":"u8"},{"name":"marginConcessionPercentage","type":"u8"},{"name":"treasuryWalletNonce","type":"u8"},{"name":"nativeOptionTradeFeePercentage","type":"u64"},{"name":"nativeOptionUnderlyingFeePercentage","type":"u64"},{"name":"referralsAdmin","type":"publicKey"},{"name":"referralsRewardsWalletNonce","type":"u8"},{"name":"maxPerpDeltaAge","type":"u16"},{"name":"secondaryAdmin","type":"publicKey"},{"name":"vaultNonce","type":"u8"},{"name":"insuranceVaultNonce","type":"u8"},{"name":"deprecatedTotalInsuranceVaultDeposits","type":"u64"},{"name":"nativeWithdrawLimit","type":"u64"},{"name":"withdrawLimitEpochSeconds","type":"u32"},{"name":"nativeOpenInterestLimit","type":"u64"},{"name":"haltStates","type":{"array":[{"defined":"HaltStateV2"},5]}},{"name":"haltStatesPadding","type":{"array":[{"defined":"HaltStateV2"},20]}},{"name":"padding","type":{"array":["u8",338]}}]}},{"name":"Underlying","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"}]}},{"name":"SettlementAccount","type":{"kind":"struct","fields":[{"name":"settlementPrice","type":"u64"},{"name":"strikes","type":{"array":["u64",23]}}]}},{"name":"PerpSyncQueue","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"head","type":"u16"},{"name":"length","type":"u16"},{"name":"queue","type":{"array":[{"defined":"AnchorDecimal"},600]}}]}},{"name":"ZetaGroup","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"noncePadding","type":{"array":["u8",2]}},{"name":"frontExpiryIndex","type":"u8"},{"name":"haltState","type":{"defined":"HaltState"}},{"name":"underlyingMint","type":"publicKey"},{"name":"oracle","type":"publicKey"},{"name":"greeks","type":"publicKey"},{"name":"pricingParameters","type":{"defined":"PricingParameters"}},{"name":"marginParameters","type":{"defined":"MarginParameters"}},{"name":"marginParametersPadding","type":{"array":["u8",104]}},{"name":"products","type":{"array":[{"defined":"Product"},46]}},{"name":"productsPadding","type":{"array":[{"defined":"Product"},91]}},{"name":"perp","type":{"defined":"Product"}},{"name":"expirySeries","type":{"array":[{"defined":"ExpirySeries"},2]}},{"name":"expirySeriesPadding","type":{"array":[{"defined":"ExpirySeries"},4]}},{"name":"deprecatedPadding","type":{"array":["u8",8]}},{"name":"asset","type":{"defined":"Asset"}},{"name":"expiryIntervalSeconds","type":"u32"},{"name":"newExpiryThresholdSeconds","type":"u32"},{"name":"perpParameters","type":{"defined":"PerpParameters"}},{"name":"perpSyncQueue","type":"publicKey"},{"name":"oracleBackupFeed","type":"publicKey"},{"name":"perpsOnly","type":"bool"},{"name":"flexUnderlying","type":"bool"},{"name":"padding","type":{"array":["u8",964]}}]}},{"name":"MarketNode","type":{"kind":"struct","fields":[{"name":"index","type":"u8"},{"name":"nonce","type":"u8"},{"name":"nodeUpdates","type":{"array":["i64",5]}},{"name":"interestUpdate","type":"i64"}]}},{"name":"SpreadAccount","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"nonce","type":"u8"},{"name":"balance","type":"u64"},{"name":"seriesExpiry","type":{"array":["u64",5]}},{"name":"seriesExpiryPadding","type":"u64"},{"name":"positions","type":{"array":[{"defined":"Position"},46]}},{"name":"positionsPadding","type":{"array":[{"defined":"Position"},92]}},{"name":"asset","type":{"defined":"Asset"}},{"name":"padding","type":{"array":["u8",262]}}]}},{"name":"CrossMarginAccountManager","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"authority","type":"publicKey"},{"name":"accounts","type":{"array":[{"defined":"CrossMarginAccountInfo"},25]}}]}},{"name":"CrossMarginAccount","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"delegatedPubkey","type":"publicKey"},{"name":"balance","type":"u64"},{"name":"subaccountIndex","type":"u8"},{"name":"nonce","type":"u8"},{"name":"forceCancelFlag","type":"bool"},{"name":"accountType","type":{"defined":"MarginAccountType"}},{"name":"openOrdersNonces","type":{"array":["u8",5]}},{"name":"openOrdersNoncesPadding","type":{"array":["u8",20]}},{"name":"rebalanceAmount","type":"i64"},{"name":"lastFundingDeltas","type":{"array":[{"defined":"AnchorDecimal"},5]}},{"name":"lastFundingDeltasPadding","type":{"array":[{"defined":"AnchorDecimal"},20]}},{"name":"productLedgers","type":{"array":[{"defined":"ProductLedger"},5]}},{"name":"productLedgersPadding","type":{"array":[{"defined":"ProductLedger"},20]}},{"name":"padding","type":{"array":["u8",2000]}}]}},{"name":"MarginAccount","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"nonce","type":"u8"},{"name":"balance","type":"u64"},{"name":"forceCancelFlag","type":"bool"},{"name":"openOrdersNonce","type":{"array":["u8",138]}},{"name":"seriesExpiry","type":{"array":["u64",5]}},{"name":"seriesExpiryPadding","type":"u64"},{"name":"productLedgers","type":{"array":[{"defined":"ProductLedger"},46]}},{"name":"productLedgersPadding","type":{"array":[{"defined":"ProductLedger"},91]}},{"name":"perpProductLedger","type":{"defined":"ProductLedger"}},{"name":"rebalanceAmount","type":"i64"},{"name":"asset","type":{"defined":"Asset"}},{"name":"accountType","type":{"defined":"MarginAccountType"}},{"name":"lastFundingDelta","type":{"defined":"AnchorDecimal"}},{"name":"delegatedPubkey","type":"publicKey"},{"name":"padding","type":{"array":["u8",338]}}]}},{"name":"SocializedLossAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"overbankruptAmount","type":"u64"}]}},{"name":"WhitelistDepositAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"userKey","type":"publicKey"}]}},{"name":"WhitelistInsuranceAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"userKey","type":"publicKey"}]}},{"name":"InsuranceDepositAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"amount","type":"u64"}]}},{"name":"WhitelistTradingFeesAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"userKey","type":"publicKey"}]}},{"name":"ReferrerAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"hasAlias","type":"bool"},{"name":"referrer","type":"publicKey"},{"name":"pendingRewards","type":"u64"},{"name":"claimedRewards","type":"u64"}]}},{"name":"ReferralAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"referrer","type":"publicKey"},{"name":"user","type":"publicKey"},{"name":"timestamp","type":"u64"},{"name":"pendingRewards","type":"u64"},{"name":"claimedRewards","type":"u64"}]}},{"name":"ReferrerAlias","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"alias","type":{"array":["u8",15]}},{"name":"referrer","type":"publicKey"}]}}],"types":[{"name":"ProductGreeks","type":{"kind":"struct","fields":[{"name":"delta","type":"u64"},{"name":"vega","type":{"defined":"AnchorDecimal"}},{"name":"volatility","type":{"defined":"AnchorDecimal"}}]}},{"name":"AnchorDecimal","type":{"kind":"struct","fields":[{"name":"flags","type":"u32"},{"name":"hi","type":"u32"},{"name":"lo","type":"u32"},{"name":"mid","type":"u32"}]}},{"name":"HaltStateV2","type":{"kind":"struct","fields":[{"name":"halted","type":"bool"},{"name":"timestamp","type":"u64"},{"name":"spotPrice","type":"u64"},{"name":"marketCleaned","type":"bool"}]}},{"name":"HaltState","type":{"kind":"struct","fields":[{"name":"halted","type":"bool"},{"name":"spotPrice","type":"u64"},{"name":"timestamp","type":"u64"},{"name":"markPricesSet","type":{"array":["bool",2]}},{"name":"markPricesSetPadding","type":{"array":["bool",3]}},{"name":"perpMarkPriceSet","type":"bool"},{"name":"marketNodesCleaned","type":{"array":["bool",2]}},{"name":"marketNodesCleanedPadding","type":{"array":["bool",4]}},{"name":"marketCleaned","type":{"array":["bool",46]}},{"name":"marketCleanedPadding","type":{"array":["bool",91]}},{"name":"perpMarketCleaned","type":"bool"}]}},{"name":"PricingParameters","type":{"kind":"struct","fields":[{"name":"optionTradeNormalizer","type":{"defined":"AnchorDecimal"}},{"name":"futureTradeNormalizer","type":{"defined":"AnchorDecimal"}},{"name":"maxVolatilityRetreat","type":{"defined":"AnchorDecimal"}},{"name":"maxInterestRetreat","type":{"defined":"AnchorDecimal"}},{"name":"maxDelta","type":"u64"},{"name":"minDelta","type":"u64"},{"name":"minVolatility","type":"u64"},{"name":"maxVolatility","type":"u64"},{"name":"minInterestRate","type":"i64"},{"name":"maxInterestRate","type":"i64"}]}},{"name":"MarginParameters","type":{"kind":"struct","fields":[{"name":"futureMarginInitial","type":"u64"},{"name":"futureMarginMaintenance","type":"u64"}]}},{"name":"PerpParameters","type":{"kind":"struct","fields":[{"name":"minFundingRatePercent","type":"i64"},{"name":"maxFundingRatePercent","type":"i64"},{"name":"impactCashDelta","type":"u64"}]}},{"name":"ExpirySeries","type":{"kind":"struct","fields":[{"name":"activeTs","type":"u64"},{"name":"expiryTs","type":"u64"},{"name":"dirty","type":"bool"},{"name":"padding","type":{"array":["u8",15]}}]}},{"name":"Strike","type":{"kind":"struct","fields":[{"name":"isSet","type":"bool"},{"name":"value","type":"u64"}]}},{"name":"Product","type":{"kind":"struct","fields":[{"name":"market","type":"publicKey"},{"name":"strike","type":{"defined":"Strike"}},{"name":"dirty","type":"bool"},{"name":"kind","type":{"defined":"Kind"}}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"size","type":"i64"},{"name":"costOfTrades","type":"u64"}]}},{"name":"OrderState","type":{"kind":"struct","fields":[{"name":"closingOrders","type":"u64"},{"name":"openingOrders","type":{"array":["u64",2]}}]}},{"name":"ProductLedger","type":{"kind":"struct","fields":[{"name":"position","type":{"defined":"Position"}},{"name":"orderState","type":{"defined":"OrderState"}}]}},{"name":"CrossMarginAccountInfo","type":{"kind":"struct","fields":[{"name":"initialized","type":"bool"},{"name":"name","type":{"array":["u8",10]}}]}},{"name":"HaltStateArgs","type":{"kind":"struct","fields":[{"name":"asset","type":{"defined":"Asset"}},{"name":"spotPrice","type":"u64"},{"name":"timestamp","type":"u64"}]}},{"name":"HaltArgs","type":{"kind":"struct","fields":[{"name":"spotPrices","type":{"array":["u64",5]}},{"name":"timestamp","type":"u64"}]}},{"name":"UpdateVolatilityArgs","type":{"kind":"struct","fields":[{"name":"expiryIndex","type":"u8"},{"name":"volatility","type":{"array":["u64",5]}}]}},{"name":"UpdateInterestRateArgs","type":{"kind":"struct","fields":[{"name":"expiryIndex","type":"u8"},{"name":"interestRate","type":"i64"}]}},{"name":"SetReferralsRewardsArgs","type":{"kind":"struct","fields":[{"name":"referralsAccountKey","type":"publicKey"},{"name":"pendingRewards","type":"u64"},{"name":"overwrite","type":"bool"}]}},{"name":"ExpireSeriesOverrideArgs","type":{"kind":"struct","fields":[{"name":"settlementNonce","type":"u8"},{"name":"settlementPrice","type":"u64"}]}},{"name":"InitializeMarketArgs","type":{"kind":"struct","fields":[{"name":"asset","type":{"defined":"Asset"}},{"name":"marketNonce","type":"u8"},{"name":"baseMintNonce","type":"u8"},{"name":"quoteMintNonce","type":"u8"},{"name":"zetaBaseVaultNonce","type":"u8"},{"name":"zetaQuoteVaultNonce","type":"u8"},{"name":"dexBaseVaultNonce","type":"u8"},{"name":"dexQuoteVaultNonce","type":"u8"},{"name":"vaultSignerNonce","type":"u64"}]}},{"name":"InitializeStateArgs","type":{"kind":"struct","fields":[{"name":"stateNonce","type":"u8"},{"name":"serumNonce","type":"u8"},{"name":"mintAuthNonce","type":"u8"},{"name":"strikeInitializationThresholdSeconds","type":"u32"},{"name":"pricingFrequencySeconds","type":"u32"},{"name":"liquidatorLiquidationPercentage","type":"u32"},{"name":"insuranceVaultLiquidationPercentage","type":"u32"},{"name":"nativeD1TradeFeePercentage","type":"u64"},{"name":"nativeD1UnderlyingFeePercentage","type":"u64"},{"name":"nativeOptionTradeFeePercentage","type":"u64"},{"name":"nativeOptionUnderlyingFeePercentage","type":"u64"},{"name":"nativeWhitelistUnderlyingFeePercentage","type":"u64"},{"name":"nativeDepositLimit","type":"u64"},{"name":"expirationThresholdSeconds","type":"u32"},{"name":"positionMovementFeeBps","type":"u8"},{"name":"marginConcessionPercentage","type":"u8"},{"name":"maxPerpDeltaAgeSeconds","type":"u16"},{"name":"nativeWithdrawLimit","type":"u64"},{"name":"withdrawLimitEpochSeconds","type":"u32"},{"name":"nativeOpenInterestLimit","type":"u64"}]}},{"name":"InitializeMarketNodeArgs","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"index","type":"u8"}]}},{"name":"OverrideExpiryArgs","type":{"kind":"struct","fields":[{"name":"expiryIndex","type":"u8"},{"name":"activeTs","type":"u64"},{"name":"expiryTs","type":"u64"}]}},{"name":"UpdateStateArgs","type":{"kind":"struct","fields":[{"name":"strikeInitializationThresholdSeconds","type":"u32"},{"name":"pricingFrequencySeconds","type":"u32"},{"name":"liquidatorLiquidationPercentage","type":"u32"},{"name":"insuranceVaultLiquidationPercentage","type":"u32"},{"name":"nativeD1TradeFeePercentage","type":"u64"},{"name":"nativeD1UnderlyingFeePercentage","type":"u64"},{"name":"nativeOptionTradeFeePercentage","type":"u64"},{"name":"nativeOptionUnderlyingFeePercentage","type":"u64"},{"name":"nativeWhitelistUnderlyingFeePercentage","type":"u64"},{"name":"nativeDepositLimit","type":"u64"},{"name":"expirationThresholdSeconds","type":"u32"},{"name":"positionMovementFeeBps","type":"u8"},{"name":"marginConcessionPercentage","type":"u8"},{"name":"maxPerpDeltaAgeSeconds","type":"u16"},{"name":"nativeWithdrawLimit","type":"u64"},{"name":"withdrawLimitEpochSeconds","type":"u32"},{"name":"nativeOpenInterestLimit","type":"u64"}]}},{"name":"UpdatePricingParametersArgs","type":{"kind":"struct","fields":[{"name":"optionTradeNormalizer","type":"u64"},{"name":"futureTradeNormalizer","type":"u64"},{"name":"maxVolatilityRetreat","type":"u64"},{"name":"maxInterestRetreat","type":"u64"},{"name":"minDelta","type":"u64"},{"name":"maxDelta","type":"u64"},{"name":"minInterestRate","type":"i64"},{"name":"maxInterestRate","type":"i64"},{"name":"minVolatility","type":"u64"},{"name":"maxVolatility","type":"u64"}]}},{"name":"UpdateMarginParametersArgs","type":{"kind":"struct","fields":[{"name":"futureMarginInitial","type":"u64"},{"name":"futureMarginMaintenance","type":"u64"}]}},{"name":"UpdatePerpParametersArgs","type":{"kind":"struct","fields":[{"name":"minFundingRatePercent","type":"i64"},{"name":"maxFundingRatePercent","type":"i64"},{"name":"perpImpactCashDelta","type":"u64"}]}},{"name":"InitializeZetaGroupArgs","type":{"kind":"struct","fields":[{"name":"perpsOnly","type":"bool"},{"name":"flexUnderlying","type":"bool"},{"name":"assetOverride","type":{"option":{"defined":"Asset"}}},{"name":"zetaGroupNonce","type":"u8"},{"name":"underlyingNonce","type":"u8"},{"name":"greeksNonce","type":"u8"},{"name":"vaultNonce","type":"u8"},{"name":"insuranceVaultNonce","type":"u8"},{"name":"socializedLossAccountNonce","type":"u8"},{"name":"perpSyncQueueNonce","type":"u8"},{"name":"interestRate","type":"i64"},{"name":"volatility","type":{"array":["u64",5]}},{"name":"optionTradeNormalizer","type":"u64"},{"name":"futureTradeNormalizer","type":"u64"},{"name":"maxVolatilityRetreat","type":"u64"},{"name":"maxInterestRetreat","type":"u64"},{"name":"maxDelta","type":"u64"},{"name":"minDelta","type":"u64"},{"name":"minInterestRate","type":"i64"},{"name":"maxInterestRate","type":"i64"},{"name":"minVolatility","type":"u64"},{"name":"maxVolatility","type":"u64"},{"name":"futureMarginInitial","type":"u64"},{"name":"futureMarginMaintenance","type":"u64"},{"name":"expiryIntervalSeconds","type":"u32"},{"name":"newExpiryThresholdSeconds","type":"u32"},{"name":"minFundingRatePercent","type":"i64"},{"name":"maxFundingRatePercent","type":"i64"},{"name":"perpImpactCashDelta","type":"u64"}]}},{"name":"UpdateZetaGroupExpiryArgs","type":{"kind":"struct","fields":[{"name":"expiryIntervalSeconds","type":"u32"},{"name":"newExpiryThresholdSeconds","type":"u32"}]}},{"name":"UpdateGreeksArgs","type":{"kind":"struct","fields":[{"name":"index","type":"u8"},{"name":"theo","type":"u64"},{"name":"delta","type":"u32"},{"name":"gamma","type":"u32"},{"name":"volatility","type":"u32"}]}},{"name":"PositionMovementArg","type":{"kind":"struct","fields":[{"name":"index","type":"u8"},{"name":"size","type":"i64"}]}},{"name":"UpdateZetaPricingPubkeysArgs","type":{"kind":"struct","fields":[{"name":"asset","type":{"defined":"Asset"}},{"name":"oracle","type":"publicKey"},{"name":"oracleBackupFeed","type":"publicKey"},{"name":"market","type":"publicKey"},{"name":"perpSyncQueue","type":"publicKey"},{"name":"zetaGroupKey","type":"publicKey"}]}},{"name":"InitializeZetaPricingArgs","type":{"kind":"struct","fields":[{"name":"minFundingRatePercent","type":"i64"},{"name":"maxFundingRatePercent","type":"i64"},{"name":"perpImpactCashDelta","type":"u64"},{"name":"marginInitial","type":"u64"},{"name":"marginMaintenance","type":"u64"},{"name":"pricingNonce","type":"u8"}]}},{"name":"ExpirySeriesStatus","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Initialized"},{"name":"Live"},{"name":"Expired"},{"name":"ExpiredDirty"}]}},{"name":"Kind","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Call"},{"name":"Put"},{"name":"Future"},{"name":"Perp"}]}},{"name":"OrderType","type":{"kind":"enum","variants":[{"name":"Limit"},{"name":"PostOnly"},{"name":"FillOrKill"},{"name":"ImmediateOrCancel"},{"name":"PostOnlySlide"}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Bid"},{"name":"Ask"}]}},{"name":"Asset","type":{"kind":"enum","variants":[{"name":"SOL"},{"name":"BTC"},{"name":"ETH"},{"name":"APT"},{"name":"ARB"},{"name":"UNDEFINED"}]}},{"name":"MovementType","type":{"kind":"enum","variants":[{"name":"Undefined"},{"name":"Lock"},{"name":"Unlock"}]}},{"name":"TreasuryMovementType","type":{"kind":"enum","variants":[{"name":"Undefined"},{"name":"ToTreasuryFromInsurance"},{"name":"ToInsuranceFromTreasury"},{"name":"ToTreasuryFromReferralsRewards"},{"name":"ToReferralsRewardsFromTreasury"}]}},{"name":"OrderCompleteType","type":{"kind":"enum","variants":[{"name":"Cancel"},{"name":"Fill"},{"name":"Booted"}]}},{"name":"MarginRequirement","type":{"kind":"enum","variants":[{"name":"Initial"},{"name":"Maintenance"},{"name":"MaintenanceIncludingOrders"},{"name":"MarketMakerConcession"}]}},{"name":"MarginAccountType","type":{"kind":"enum","variants":[{"name":"Normal"},{"name":"MarketMaker"}]}},{"name":"PlaceOrderType","type":{"kind":"enum","variants":[{"name":"PlaceOrder"},{"name":"PlacePerpOrder"}]}},{"name":"ValidationType","type":{"kind":"enum","variants":[{"name":"Place"},{"name":"Cancel"},{"name":"OpenOrders"}]}},{"name":"TraitType","type":{"kind":"enum","variants":[{"name":"MarginAccount"},{"name":"CrossMarginAccount"}]}}],"events":[{"name":"TradeEvent","fields":[{"name":"marginAccount","type":"publicKey","index":false},{"name":"index","type":"u8","index":false},{"name":"size","type":"u64","index":false},{"name":"costOfTrades","type":"u64","index":false},{"name":"isBid","type":"bool","index":false},{"name":"clientOrderId","type":"u64","index":false},{"name":"orderId","type":"u128","index":false}]},{"name":"TradeEventV2","fields":[{"name":"marginAccount","type":"publicKey","index":false},{"name":"index","type":"u8","index":false},{"name":"size","type":"u64","index":false},{"name":"costOfTrades","type":"u64","index":false},{"name":"isBid","type":"bool","index":false},{"name":"clientOrderId","type":"u64","index":false},{"name":"orderId","type":"u128","index":false},{"name":"asset","type":"u8","index":false},{"name":"user","type":"publicKey","index":false},{"name":"isTaker","type":"bool","index":false},{"name":"sequenceNumber","type":"u64","index":false}]},{"name":"TradeEventV3","fields":[{"name":"marginAccount","type":"publicKey","index":false},{"name":"index","type":"u8","index":false},{"name":"size","type":"u64","index":false},{"name":"costOfTrades","type":"u64","index":false},{"name":"isBid","type":"bool","index":false},{"name":"clientOrderId","type":"u64","index":false},{"name":"orderId","type":"u128","index":false},{"name":"asset","type":{"defined":"Asset"},"index":false},{"name":"user","type":"publicKey","index":false},{"name":"isTaker","type":"bool","index":false},{"name":"sequenceNumber","type":"u64","index":false}]},{"name":"PositionMovementEvent","fields":[{"name":"netBalanceTransfer","type":"i64","index":false},{"name":"marginAccountBalance","type":"u64","index":false},{"name":"spreadAccountBalance","type":"u64","index":false},{"name":"movementFees","type":"u64","index":false}]},{"name":"PlaceOrderEvent","fields":[{"name":"fee","type":"u64","index":false},{"name":"oraclePrice","type":"u64","index":false},{"name":"orderId","type":"u128","index":false},{"name":"expiryTs","type":"u64","index":false}]},{"name":"LiquidationEvent","fields":[{"name":"liquidatorReward","type":"u64","index":false},{"name":"insuranceReward","type":"u64","index":false},{"name":"costOfTrades","type":"u64","index":false},{"name":"size","type":"i64","index":false},{"name":"remainingLiquidateeBalance","type":"u64","index":false},{"name":"remainingLiquidatorBalance","type":"u64","index":false},{"name":"markPrice","type":"u64","index":false},{"name":"underlyingPrice","type":"u64","index":false},{"name":"liquidatee","type":"publicKey","index":false},{"name":"liquidator","type":"publicKey","index":false},{"name":"asset","type":{"defined":"Asset"},"index":false}]},{"name":"OrderCompleteEvent","fields":[{"name":"marginAccount","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"asset","type":{"defined":"Asset"},"index":false},{"name":"marketIndex","type":"u8","index":false},{"name":"side","type":{"defined":"Side"},"index":false},{"name":"unfilledSize","type":"u64","index":false},{"name":"orderId","type":"u128","index":false},{"name":"clientOrderId","type":"u64","index":false},{"name":"orderCompleteType","type":{"defined":"OrderCompleteType"},"index":false}]},{"name":"ApplyFundingEvent","fields":[{"name":"marginAccount","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"asset","type":{"defined":"Asset"},"index":false},{"name":"balanceChange","type":"i64","index":false},{"name":"remainingBalance","type":"u64","index":false},{"name":"fundingRate","type":"i64","index":false},{"name":"oraclePrice","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"DepositOverflow","msg":"Deposit overflow"},{"code":6001,"name":"Unreachable","msg":"Unreachable"},{"code":6002,"name":"FailedInitialMarginRequirement","msg":"Failed initial margin requirement"},{"code":6003,"name":"LiquidatorFailedMarginRequirement","msg":"Liquidator failed margin requirement"},{"code":6004,"name":"CannotLiquidateOwnAccount","msg":"Cannot liquidate own account"},{"code":6005,"name":"CrankInvalidRemainingAccounts","msg":"Invalid cranking remaining accounts"},{"code":6006,"name":"IncorrectTickSize","msg":"Incorrect tick size"},{"code":6007,"name":"ZeroPrice","msg":"ZeroPrice"},{"code":6008,"name":"ZeroSize","msg":"ZeroSize"},{"code":6009,"name":"ZeroWithdrawableBalance","msg":"Zero withdrawable balance"},{"code":6010,"name":"DepositAmountExceeded","msg":"Deposit amount exceeds limit and user is not whitelisted"},{"code":6011,"name":"WithdrawalAmountExceedsWithdrawableBalance","msg":"Withdrawal amount exceeds withdrawable balance"},{"code":6012,"name":"AccountHasSufficientMarginPostCancels","msg":"Account has sufficient margin post cancels"},{"code":6013,"name":"OverBankrupt","msg":"Over bankrupt"},{"code":6014,"name":"AccountHasSufficientMargin","msg":"Account has sufficient margin"},{"code":6015,"name":"UserHasNoActiveOrders","msg":"User has no active orders"},{"code":6016,"name":"InvalidExpirationInterval","msg":"Invalid expiration interval"},{"code":6017,"name":"ProductMarketsAlreadyInitialized","msg":"Product markets already initialized"},{"code":6018,"name":"InvalidProductMarketKey","msg":"Invalid product market key"},{"code":6019,"name":"MarketNotLive","msg":"Market not live"},{"code":6020,"name":"MarketPricingNotReady","msg":"Market pricing not ready"},{"code":6021,"name":"UserHasRemainingOrdersOnExpiredMarket","msg":"User has remaining orders on expired market"},{"code":6022,"name":"InvalidSeriesExpiration","msg":"Invalid series expiration"},{"code":6023,"name":"InvalidExpiredOrderCancel","msg":"Invalid expired order cancel"},{"code":6024,"name":"NoMarketsToAdd","msg":"No markets to add"},{"code":6025,"name":"UserHasUnsettledPositions","msg":"User has unsettled positions"},{"code":6026,"name":"NoMarginAccountsToSettle","msg":"No margin accounts to settle"},{"code":6027,"name":"CannotSettleUserWithActiveOrders","msg":"Cannot settle users with active orders"},{"code":6028,"name":"OrderbookNotEmpty","msg":"Orderbook not empty"},{"code":6029,"name":"InvalidNumberOfAccounts","msg":"Invalid number of accounts"},{"code":6030,"name":"InvalidMarketAccounts","msg":"Bids or Asks don't match the Market"},{"code":6031,"name":"ProductStrikeUninitialized","msg":"Product strike uninitialized"},{"code":6032,"name":"PricingNotUpToDate","msg":"Pricing not up to date"},{"code":6033,"name":"RetreatsAreStale","msg":"Retreats are stale"},{"code":6034,"name":"ProductDirty","msg":"Product dirty"},{"code":6035,"name":"ProductStrikesInitialized","msg":"Product strikes initialized"},{"code":6036,"name":"StrikeInitializationNotReady","msg":"Strike initialization not ready"},{"code":6037,"name":"UnsupportedKind","msg":"Unsupported kind"},{"code":6038,"name":"InvalidZetaGroup","msg":"Invalid zeta group"},{"code":6039,"name":"InvalidMarginAccount","msg":"Invalid margin account"},{"code":6040,"name":"InvalidGreeksAccount","msg":"Invalid greeks account"},{"code":6041,"name":"InvalidSettlementAccount","msg":"Invalid settlement account"},{"code":6042,"name":"InvalidCancelAuthority","msg":"Invalid cancel authority"},{"code":6043,"name":"CannotUpdatePricingAfterExpiry","msg":"Cannot update pricing after expiry"},{"code":6044,"name":"LoadAccountDiscriminatorAlreadySet","msg":"Account discriminator already set"},{"code":6045,"name":"AccountAlreadyInitialized","msg":"Account already initialized"},{"code":6046,"name":"GreeksAccountSeedsMismatch","msg":"Greeks account seeds mismatch"},{"code":6047,"name":"ZetaGroupAccountSeedsMismatch","msg":"Zeta group account seeds mismatch"},{"code":6048,"name":"MarginAccountSeedsMismatch","msg":"Margin account seeds mismatch"},{"code":6049,"name":"OpenOrdersAccountSeedsMismatch","msg":"Open orders account seeds mismatch"},{"code":6050,"name":"MarketNodeAccountSeedsMismatch","msg":"Market node seeds mismatch"},{"code":6051,"name":"UserTradingFeeWhitelistAccountSeedsMismatch","msg":"User trading fee whitelist account seeds mismatch"},{"code":6052,"name":"UserDepositWhitelistAccountSeedsMismatch","msg":"User deposit whitelist account seeds mismatch"},{"code":6053,"name":"MarketIndexesUninitialized","msg":"Market indexes uninitialized"},{"code":6054,"name":"MarketIndexesAlreadyInitialized","msg":"Market indexes already initialized"},{"code":6055,"name":"CannotGetUnsetStrike","msg":"Cannot get unset strike"},{"code":6056,"name":"CannotSetInitializedStrike","msg":"Cannot set initialized strike"},{"code":6057,"name":"CannotResetUninitializedStrike","msg":"Cannot set initialized strike"},{"code":6058,"name":"CrankMarginAccountNotMutable","msg":"CrankMarginAccountNotMutable"},{"code":6059,"name":"InvalidAdminSigner","msg":"InvalidAdminSigner"},{"code":6060,"name":"UserHasActiveOrders","msg":"User still has active orders"},{"code":6061,"name":"UserForceCancelInProgress","msg":"User has a force cancel in progress"},{"code":6062,"name":"FailedPriceBandCheck","msg":"Failed price band check"},{"code":6063,"name":"UnsortedOpenOrdersAccounts","msg":"Unsorted open orders accounts"},{"code":6064,"name":"AccountNotMutable","msg":"Account not mutable"},{"code":6065,"name":"AccountDiscriminatorMismatch","msg":"Account discriminator mismatch"},{"code":6066,"name":"InvalidMarketNodeIndex","msg":"Invalid market node index"},{"code":6067,"name":"InvalidMarketNode","msg":"Invalid market node"},{"code":6068,"name":"LUTOutOfBounds","msg":"Lut out of bounds"},{"code":6069,"name":"RebalanceInsuranceInvalidRemainingAccounts","msg":"Rebalance insurance vault with no margin accounts"},{"code":6070,"name":"InvalidMintDecimals","msg":"Invalid mint decimals"},{"code":6071,"name":"InvalidZetaGroupOracle","msg":"Invalid oracle for this zeta group"},{"code":6072,"name":"InvalidZetaGroupDepositMint","msg":"Invalid zeta group deposit mint"},{"code":6073,"name":"InvalidZetaGroupRebalanceMint","msg":"Invalid zeta group rebalance insurance vault mint"},{"code":6074,"name":"InvalidDepositAmount","msg":"Invalid deposit amount"},{"code":6075,"name":"InvalidTokenAccountOwner","msg":"Invalid token account owner"},{"code":6076,"name":"InvalidWithdrawAmount","msg":"Invalid withdraw amount"},{"code":6077,"name":"InvalidDepositRemainingAccounts","msg":"Invalid number of remaining accounts in deposit"},{"code":6078,"name":"InvalidPlaceOrderRemainingAccounts","msg":"Invalid number of remaining accounts in place order"},{"code":6079,"name":"ClientOrderIdCannotBeZero","msg":"ClientOrderIdCannotBeZero"},{"code":6080,"name":"ZetaGroupHalted","msg":"Zeta group halted"},{"code":6081,"name":"ZetaGroupNotHalted","msg":"Zeta group not halted"},{"code":6082,"name":"HaltMarkPriceNotSet","msg":"Halt mark price not set"},{"code":6083,"name":"HaltMarketsNotCleaned","msg":"Halt markets not cleaned"},{"code":6084,"name":"HaltMarketNodesNotCleaned","msg":"Halt market nodes not cleaned"},{"code":6085,"name":"CannotExpireOptionsAfterExpirationThreshold","msg":"Cannot expire options after expiration threshold"},{"code":6086,"name":"PostOnlyInCross","msg":"Post only order in cross"},{"code":6087,"name":"FillOrKillNotFullSize","msg":"Fill or kill order was not filled for full size"},{"code":6088,"name":"InvalidOpenOrdersMapOwner","msg":"Invalid open orders map owner"},{"code":6089,"name":"AccountDidNotSerialize","msg":"Failed to serialize the account"},{"code":6090,"name":"OpenOrdersWithNonEmptyPositions","msg":"Cannot close open orders account with non empty positions"},{"code":6091,"name":"CannotCloseNonEmptyMarginAccount","msg":"Cannot close margin account that is not empty"},{"code":6092,"name":"InvalidTagLength","msg":"Invalid tag length"},{"code":6093,"name":"NakedShortCallIsNotAllowed","msg":"Naked short call is not allowed"},{"code":6094,"name":"InvalidSpreadAccount","msg":"Invalid spread account"},{"code":6095,"name":"CannotCloseNonEmptySpreadAccount","msg":"Cannot close non empty spread account"},{"code":6096,"name":"SpreadAccountSeedsMismatch","msg":"Spread account seeds mismatch"},{"code":6097,"name":"SpreadAccountHasUnsettledPositions","msg":"Spread account seeds mismatch"},{"code":6098,"name":"SpreadAccountInvalidExpirySeriesState","msg":"Spread account invalid expiry series state"},{"code":6099,"name":"InsufficientFundsToCollateralizeSpreadAccount","msg":"Insufficient funds to collateralize spread account"},{"code":6100,"name":"FailedMaintenanceMarginRequirement","msg":"Failed maintenance margin requirement"},{"code":6101,"name":"InvalidMovement","msg":"Invalid movement"},{"code":6102,"name":"MovementOnExpiredSeries","msg":"Movement on expired series"},{"code":6103,"name":"InvalidMovementSize","msg":"Invalid movement size"},{"code":6104,"name":"ExceededMaxPositionMovements","msg":"Exceeded max position movements"},{"code":6105,"name":"ExceededMaxSpreadAccountContracts","msg":"Exceeded max spread account contracts"},{"code":6106,"name":"OraclePriceIsInvalid","msg":"Fetched oracle price is invalid"},{"code":6107,"name":"InvalidUnderlyingMint","msg":"Provided underlying mint address is invalid"},{"code":6108,"name":"InvalidReferrerAlias","msg":"Invalid referrer alias - Invalid length"},{"code":6109,"name":"ReferrerAlreadyHasAlias","msg":"Referrer already has alias"},{"code":6110,"name":"InvalidTreasuryMovementAmount","msg":"Invalid treasury movement amount"},{"code":6111,"name":"InvalidReferralsAdminSigner","msg":"Invalid referrals admin signer"},{"code":6112,"name":"InvalidSetReferralsRewardsRemainingAccounts","msg":"Invalid set referrals rewards remaining accounts"},{"code":6113,"name":"SetReferralsRewardsAccountNotMutable","msg":"Referrals account not mutable"},{"code":6114,"name":"InvalidClaimReferralsRewardsAmount","msg":"Invalid claim referrals rewards: not enough in refererals rewards wallet"},{"code":6115,"name":"InvalidClaimReferralsRewardsAccount","msg":"Invalid claim referrals rewards: referrals account is not a referral or referrer account"},{"code":6116,"name":"ReferralAccountSeedsMismatch","msg":"Referral account seeds mismatch"},{"code":6117,"name":"ReferrerAccountSeedsMismatch","msg":"Referrer account seeds mismatch"},{"code":6118,"name":"ProtectedMmMarginAccount","msg":"Market maker accounts are protected from liquidation"},{"code":6119,"name":"CannotWithdrawWithOpenOrders","msg":"Cannot withdraw with open orders"},{"code":6120,"name":"FundingRateNotUpToDate","msg":"Perp funding rate not up to date"},{"code":6121,"name":"PerpSyncQueueFull","msg":"Perp taker/maker sync queue is full"},{"code":6122,"name":"PerpSyncQueueAccountSeedsMismatch","msg":"PerpSyncQueue account seeds mismatch"},{"code":6123,"name":"PerpSyncQueueEmpty","msg":"Program tried to pop from an empty perpSyncQueue"},{"code":6124,"name":"InvalidNonPerpMarket","msg":"Perp product index given in placeOrder, use placePerpOrder"},{"code":6125,"name":"InvalidPerpMarket","msg":"Non-perp product index given in placePerpOrder, use placeOrder"},{"code":6126,"name":"CannotInitializePerpMarketNode","msg":"Not allowed to initialize market node for a perp market"},{"code":6127,"name":"DeprecatedInstruction","msg":"Instruction is deprecated, please use the newer version"},{"code":6128,"name":"ForceCancelExpiredTIFOrdersOnly","msg":"Can only force cancel expired TIF orders"},{"code":6129,"name":"InvalidPlaceOrderAuthority","msg":"Invalid place order authority"},{"code":6130,"name":"InvalidOpenOrdersAuthority","msg":"Invalid open orders authority"},{"code":6131,"name":"InsuranceVaultSeedsMismatch","msg":"Insurance vault seeds mismatch"},{"code":6132,"name":"OpenInterestLimitBreach","msg":"Open interest limit breach, decrease your position"},{"code":6133,"name":"WithdrawLimitBreach","msg":"Withdraw limit breach, wait to withdraw more"},{"code":6134,"name":"InvalidPricingOracle","msg":"Invalid oracle for this pricing account"},{"code":6135,"name":"PricingAccountSeedsMismatch","msg":"Pricing account seeds mismatch"},{"code":6136,"name":"ZetaHalted","msg":"Zeta exchange is halted"},{"code":6137,"name":"ZetaNotHalted","msg":"Zeta exchange is not halted"},{"code":6138,"name":"NotFreshCrossMarginAccount","msg":"Cross margin account is not unused, close it and make a new one"},{"code":6139,"name":"CannotCloseNonEmptyMarginAccountManager","msg":"Cannot close margin account manager that is not empty"},{"code":6140,"name":"CannotMigrateWithOpenOrders","msg":"Cannot migrate to cross margin account with open orders, close all open orders"},{"code":6141,"name":"InvalidMarginAccountType","msg":"Invalid margin account type - account is not MarginAccount or CrossMarginAccount"},{"code":6142,"name":"MarginAccountAssetMismatch","msg":"Margin account asset mismatched with instruction argument asset"},{"code":6143,"name":"FeatureUnavailable","msg":"Feature is not available yet"},{"code":6144,"name":"MarginAccountCannotLiquidateCrossMarginAccount","msg":"MarginAccount cannot liquidate CrossMarginAccount"}]} \ No newline at end of file diff --git a/olddocs/archivekbot2/kb_app_cli/README.md b/olddocs/archivekbot2/kb_app_cli/README.md new file mode 100644 index 0000000..8025523 --- /dev/null +++ b/olddocs/archivekbot2/kb_app_cli/README.md @@ -0,0 +1,17 @@ + + + +# kb_app_cli + +Ce crate fournit les commandes CLI de contrôle, replay et diagnostic. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_app_demo/README.md b/olddocs/archivekbot2/kb_app_demo/README.md new file mode 100644 index 0000000..b039a7d --- /dev/null +++ b/olddocs/archivekbot2/kb_app_demo/README.md @@ -0,0 +1,144 @@ + + + +# kb_app_demo + +Application Tauri de démonstration pour valider progressivement les briques runtime de `khadhroony-bot2`. + +## Fenêtres disponibles + +- `main` : accueil et rendu du README workspace ; +- `demo_config` : configuration active, profil actif et schéma JSON ; +- `demo_http` : test manuel du pool HTTP JSON-RPC standard ; +- `demo_ws` : test manuel des neuf subscriptions standard via la session persistante typée de `kb_rpc` ; +- `demo_backfill` : campagnes HTTP bornées par signatures, programme, token ou pool ; +- `demo_core_extraction` : extraction canonique vers core par signatures, pending, plage de slots ou program id ; +- `demo_decode_replay` : replay commun de décodage et matérialisation par signatures, programme, état et instruction path ; +- `demo_execution_solana_core` : fenêtre unique de simulation et d’exécution System transfer, SPL Memo v4, SPL Token `TransferChecked` ou création ATA sur Devnet, avec wallet persistant, confirmation opérateur et replay post-exécution ; +- `demo_sql_diag`, `demo_sql_pg_raw`, `demo_sql_pg_core` : diagnostics PostgreSQL ; +- `demo_sql_replay_candidates` : filtres read-only et exports de signatures, programmes et entités ; +- `splash` : écran de chargement. + +## Commande de développement + +```bash +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + + +## Démo WebSocket `0.4.2-pre.025` + +`demo_ws` est désormais un adaptateur Tauri mince vers `kb_rpc::WsSession`. La fenêtre sélectionne un rôle et une méthode, convertit les champs UI en `StandardWsRequest`, affiche les souscriptions actives et relaie les événements typés avec une limitation de débit vers la WebView. Elle ne gère plus directement la socket, les IDs JSON-RPC, les réponses subscribe/unsubscribe, les timeouts, la reconnexion ou le réabonnement. + +La même connexion reste partagée entre les subscriptions compatibles d’un endpoint. Les trois méthodes instables ne sont disponibles que lorsque la configuration de l’endpoint annonce explicitement leur request kind. Si le nœud rejette une de ces méthodes comme absente ou non activée, `kb_rpc` désactive automatiquement sa capacité pour la session. Les IDs distants affichés sont actualisés après un réabonnement ; l’identifiant local stable reste interne à la bibliothèque. + +Les payloads Tauri actifs utilisent des nombres JSON et non des `BigInt`. Le frontend refuse tout identifiant d’unsubscribe qui n’est pas un entier sûr JavaScript avant d’appeler `invoke`. + +## Démo backfill `0.3.3` + +`demo_backfill` construit des requêtes bornées vers le moteur réutilisable de `kb_pipeline`, affiche les événements de progression et permet un arrêt coopératif. La fenêtre n’implémente elle-même ni pagination RPC ni persistance. + +## Démo extraction core `0.3.4` + +`demo_core_extraction` réutilise le template global et des accordéons Bootstrap 5. Elle expose : + +- signatures explicites ; +- lot raw en état `received` ; +- plage inclusive de slots ; +- replay par program id déjà présent dans core ; +- limite, concurrence, force replay par signatures et mode explicite « toutes les signatures » ; +- version du processor ; +- journal borné, résumé JSON et arrêt coopératif. + +La logique profonde reste dans `kb_pipeline`. Tauri ne construit que la requête, connecte `kb_store_pg` et relaie les événements. + +## Démo candidats replay SQL `0.3.4` + +`demo_sql_replay_candidates` utilise DataTables avec les intégrations Bootstrap 5 et Select. Elle expose cinq tableaux indépendants : + +- transactions/signatures filtrables par raw, ledger, slots, programme et entité ; +- programmes agrégés depuis outer instructions, inner instructions et logs reliés ; +- mints issus des balance changes core ; +- owners issus des balance changes core ; +- account keys issus des comptes résolus core. + +Les requêtes PostgreSQL sont statiques, paramétrées et bornées. Chaque ligne possède une case à cocher et le header permet de sélectionner ou désélectionner toutes les lignes filtrées. DataTables affiche dix lignes par défaut. Les lignes sélectionnées, ou à défaut les lignes correspondant au filtre local, peuvent être copiées sous forme multiligne ou exportées en CSV. Le frontend produit un CSV UTF-8 avec BOM et séparateur point-virgule, puis une commande Rust l’écrit sous `./data/exports_csv/` sans écraser un fichier existant. LibreOffice Calc peut conserver son dialogue d’import de texte, car CSV ne transporte pas de métadonnées normalisées d’encodage ou de séparateur. Le sélecteur de programmes connus est alimenté par le registre énumérable de `kb_program_ids`. La copie des signatures est directement réutilisable dans `demo_core_extraction`. + +Les tableaux mints, owners et comptes exposent les transactions distinctes, les occurrences core, le ratio occurrences par transaction, les slots minimum et maximum et leur étendue. Les headers documentent ces métriques avec des tooltips Bootstrap 5. + +Les cartes de filtres possèdent un bouton `Réinitialiser` qui restaure leurs valeurs par défaut, efface le filtre local DataTables, annule la sélection courante et recharge le tableau. Les limites sont contrôlées contre `maximumLimit` avant l’invocation Tauri ; une valeur supérieure à la borne backend n’est plus envoyée à PostgreSQL. Les signatures, program IDs, mints, owners et account keys sont tronqués visuellement pour conserver des tableaux lisibles. Leur valeur complète reste accessible par tooltip et par une action de copie individuelle directement dans la cellule, en complément des copies multiligne. + +## Politique future pour les transactions Solana échouées + +Les futures étapes de décodage doivent traiter les transactions confirmées dont `meta.err` est renseigné. Leur message, leurs instructions, leurs inner instructions disponibles, leurs logs, leur erreur et leur consommation de ressources restent des données d’observation importantes. Elles doivent être décodées avec un statut explicite d’échec on-chain et ne doivent pas être confondues avec un échec du pipeline. + +La matérialisation doit rester prudente : aucune mutation métier supposée réussie ne doit être produite à partir d’une transaction atomiquement annulée. Les événements d’intention, d’échec, d’audit, de diagnostic et les frais réellement prélevés peuvent en revanche être conservés dans des familles dédiées. + +## Démo replay decode `0.4.0` + +`demo_decode_replay` consomme les inputs contextualisés déjà présents dans core. La fenêtre expose les signatures copiées depuis `demo_sql_replay_candidates`, le program ID, les états d’instruction, les instruction paths, les décodeurs disponibles, leur version, la concurrence bornée, le force replay sécurisé, l’arrêt coopératif et la matérialisation optionnelle uniquement lorsqu’un matérialiseur est enregistré. Elle affiche les événements de progression, le résumé par processor ainsi que des diagnostics read-only sur les tables decode, mat, ledger et couverture. Elle propose aussi un journal borné des annotations de transaction commitées, filtrable par signature ; cette vue typée ne donne pas accès au JSON libre ni aux autres familles matérialisées. + +Pour valider Memo sur un corpus réel, l’opérateur enchaîne `demo_backfill`, `demo_core_extraction`, la sélection dans `demo_sql_replay_candidates`, puis `demo_decode_replay` avec `spl_memo` et l’option de matérialisation. Le journal d’annotations doit alors afficher la signature et le path attendus. Un second replay sans force doit être compté comme `skipped` et ne doit créer aucune annotation supplémentaire. + +À partir de `pre.020`, la démo enregistre trois matérialiseurs natifs : lifecycle, admin et compliance audit. `0.4.3-pre.002` ajoute staking et les annotations de transaction Memo. Le pipeline sélectionne chacun par surface/entrée exacte ; une observation non pertinente ne crée ni ledger ni refus artificiel. + +La première implémentation concrète est le classifieur `solana_core_native`, qui reconnaît toutes les surfaces natives enregistrées et les classe `unsupported` tant que leur décodage maximal n’est pas implémenté en `0.4.1`. Cette classification volontaire évite tout faux événement tout en alimentant la couverture observée. + +## Démo exécution Solana Core `0.4.2-pre.010` + +`demo_execution_solana_core` est un adaptateur Tauri mince vers `kb_pipeline::execute_devnet_system_transfer`. La fenêtre ne propose que les profils Devnet dont le wallet temporaire est activé et persistant. Elle permet : + +- de générer une adresse destinataire jetable sans exposer sa clé privée ; +- de simuler le message exact sans signature ni envoi ; +- de signer et envoyer après confirmation opérateur explicite ; +- d’afficher le plan, les comptes et signataires requis, les plafonds, l’erreur et les logs de simulation ; +- de suivre l’envoi, la confirmation, l’insertion canonique, l’extraction core et le decode replay ciblé ; +- de demander une annulation coopérative entre deux étapes. + +Le backend vérifie l’existence du destinataire et refuse un transfert inférieur au minimum rent-exempt lorsque l’adresse est neuve. Les secrets restent confinés dans `kb_wallet`; les payloads TS-rs ne contiennent que des clés publiques et des diagnostics. Les opérations administratives natives plus dangereuses restent hors de cette fenêtre même lorsqu’elles seront disponibles dans les bibliothèques. + +`0.4.3-pre.005` ajoute dans cette même fenêtre un panneau SPL Memo v4, sans nouvelle WebView. Il appelle `kb_pipeline::execute_devnet_memo`, reste en simulation seule par défaut et réutilise le verrou, le profil et la confirmation opérateur du parcours System. Après un envoi autorisé, le résumé affiche la signature, la confirmation, l’insertion canonique, l’extraction core, le decode replay, le nombre d’annotations `transaction_annotation` et la validation du second replay idempotent. Les soldes et frais Memo sont sérialisés en chaînes décimales afin de préserver leur exactitude aux frontières JSON Tauri. + +La validation Tauri réelle a couvert le refus d’envoi sans confirmation, une simulation Memo réussie et trois envois v4 confirmés. Chaque résumé terminal a indiqué `annotationCount=1` et `idempotenceValidated=true`. Le clic accidentel sur le bouton System sans destinataire produit indépendamment le refus attendu « Le destinataire est obligatoire » et ne concerne pas le parcours Memo. + +`0.4.4-pre.007` ajoute dans la même WebView un panneau SPL Token limité à `TransferChecked`, choisi comme parcours opérateur représentatif et non destructif. Le montant brut reste une chaîne décimale, le mint et les decimals sont explicites, et le backend affiche séparément préflight stateful, plan, simulation, confirmation, extraction, decode, nombre de matérialisations et second replay idempotent. La simulation reste le comportement par défaut ; l’envoi exige la confirmation commune et une autorité résolue par le wallet du profil. + +La même fenêtre expose un journal read-only de `kb_sol_mat_events` borné à 500 lignes. Les filtres de signature, mint, compte, famille et opération sont contrôlés ; mint, compte et opération sont comparés exactement au payload typé après la requête PostgreSQL bornée. Le tableau montre slot, opération, famille, montant brut et signature, puis le payload JSON complet de la ligne sélectionnée. Il ne reconstruit ni snapshot final, ni solde, ni OHLC. + +La validation Tauri du 15 juillet 2026 a démarré Vite et l'application, initialisé le schéma +PostgreSQL, puis réussi le préflight et la simulation Token. Le bouton d'envoi a d'abord été refusé +sans confirmation opérateur, puis refusé avec un diagnostic exact lorsque l'autorité Token fournie +ne correspondait pas au wallet persistant du profil. Ce comportement est attendu : la WebView ne +transporte aucune clé externe et l'orchestrateur ne peut signer qu'avec le wallet sélectionné. Un +envoi depuis cette fenêtre exige donc des comptes dont l'autorité est ce wallet ; le parcours +backend Devnet aligné a déjà validé l'envoi et la matérialisation complets. + +`0.4.5-pre.005` ajoute dans la même fenêtre le panneau SPL Associated Token Account. Il sélectionne +le Token Program classique ou Token-2022, dérive l'ATA readonly depuis wallet, programme et mint, +puis propose `Create` ou `CreateIdempotent`. Le backend conserve simulation seule par défaut, +affiche préflight, plafond rent/frais et postconditions, et exige la confirmation commune avant +l'envoi. Après confirmation, il hydrate la transaction, extrait le core, décode les instructions +ATA et CPI Token, matérialise leurs faits propriétaires puis vérifie un second replay idempotent. + +Le journal ATA réutilise la requête PostgreSQL bornée du journal Token et limite la vue aux faits +lifecycle du processor `spl_token_accounts`. Les filtres signature, mint, ATA et opération sont +exacts ; aucune clé privée ni logique de dérivation n'est exposée dans la WebView. `RecoverNested` +reste hors UI et a été validé séparément par le test opt-in Devnet contrôlé. + +## Frontière de tracing + +`kb_app_demo` utilise uniquement le target canonique `kb_app_demo`. Les anciens identifiants frontend sont validés puis conservés comme champ `frontend_target`; ils ne deviennent plus des targets Rust distincts. + +L’application journalise les invocations Tauri, les actions utilisateur, l’état des fenêtres, la progression relayée et les résumés. Les détails de transport RPC, de parsing, de dispatch, de matérialisation et de persistance appartiennent respectivement à `kb_rpc`, `kb_pipeline`, aux processors et à `kb_store_pg`. + +## Backfill depuis la dernière occurrence + +Dans `demo_backfill`, la direction « Avant, plus anciennes » accepte désormais une signature d’ancrage vide pour les modes programme, token et pool. Le premier appel `getSignaturesForAddress` est alors effectué sans `before`, donc depuis les signatures les plus récentes. La direction « Après, plus récentes » conserve une ancre obligatoire. + +## Validation de clôture `0.4.2` + +`kb_app_demo` compte 88 tests. `cargo tauri dev -c kb_app_demo/tauri.conf.json` démarre Vite, initialise les tables PostgreSQL et permet d’exercer les sessions WebSocket. Aucun `npm run build` séparé n’est requis pour ce jalon : le serveur Vite lancé par Tauri constitue la validation frontend retenue. + +## Token-2022 validation matrix + +La fenêtre `DemoExecutionSpl` regroupe les exécutions Devnet SPL Memo, SPL Token classique et Associated Token Account. Elle réutilise les profils, la simulation obligatoire, la confirmation opérateur, l’hydratation canonique, l’extraction core, le décodage, la matérialisation et le second replay. La fenêtre Solana Core est désormais limitée au System Program. Token-2022 et ElGamal Registry seront ajoutés à cette fenêtre dédiée sans fusionner leurs contrats techniques. diff --git a/olddocs/archivekbot2/kb_config/README.md b/olddocs/archivekbot2/kb_config/README.md new file mode 100644 index 0000000..11d7f88 --- /dev/null +++ b/olddocs/archivekbot2/kb_config/README.md @@ -0,0 +1,68 @@ + + + +# kb_config + +Ce crate définit le contrat de configuration commun du workspace. + +## Rôle dans l'écosystème + +`kb_config` charge, valide et sérialise un fichier JSON contenant plusieurs profils. Un seul profil est actif à l'exécution grâce au champ `active_profile`. + +Le crate fournit les structures typées runtime pour : + +- l'application et l'environnement ; +- les sorties de logs console, fichier humain, fichier JSON et fichier erreurs ; +- les filtres de targets `tracing` ; +- les stores PostgreSQL et SQLite ; +- les endpoints HTTP JSON-RPC et WebSocket Solana ; +- les rôles et limites par endpoint ; +- les listeners Solana standards ; +- le wallet temporaire géré par profil ; +- les permissions d'envoi localnet/devnet/testnet/mainnet ; +- les plafonds de dépense, frais, priorité et fraîcheur du blockhash ; +- les pages de démonstration Tauri. + +## Wallet temporaire + +Le profil `local_devnet` active un wallet persistant de laboratoire sous : + +```text +wallets/temporary/local_devnet/local-devnet-operator.json +``` + +Les profils mainnet conservent `temporary_wallet_enabled = false`. La validation typée refuse un wallet temporaire actif sur `mainnet-beta`, une persistance sans activation et les alias pouvant produire un chemin arbitraire. + +## Exécution + +La configuration sépare : + +- le dry-run par défaut ; +- l'obligation de simulation ; +- la confirmation opérateur ; +- les plafonds de dépense localnet, devnet, testnet et mainnet ; +- le plafond de frais ; +- le plafond de prix par compute unit ; +- l'âge maximal du recent blockhash. + +Un cluster dont l'envoi est activé doit disposer d'un plafond de dépense positif. Toute dépense configurée exige la simulation et toute dépense mainnet exige la confirmation opérateur. Les paramètres de confirmation sont bornés et le plafond d’airdrop Devnet est interdit dans les profils d’un autre cluster. + +## Validation + +La validation se fait en deux étapes : + +1. validation JSON brute via `config/schema.config.json` et `jsonschema` ; +2. validation typée après désérialisation Rust. + +## Secrets et placeholders + +Le fichier versionné doit rester sans secret. Les placeholders restent directement dans les URLs. Les keypairs générés par `kb_wallet` vivent hors du fichier de configuration et sous un répertoire ignoré par Git. + +## Exports TS-rs + +Les structures exposées à Tauri utilisent `TS` avec un chemin `export_to` explicite. Les fichiers générés servent uniquement au partage des types Rust/TypeScript et ne remplacent pas le schéma JSON runtime. + +```bash +cargo test export_bindings -p kb_config +cargo test -p kb_config settings::tests:: +``` diff --git a/olddocs/archivekbot2/kb_core/README.md b/olddocs/archivekbot2/kb_core/README.md new file mode 100644 index 0000000..9c9b8dc --- /dev/null +++ b/olddocs/archivekbot2/kb_core/README.md @@ -0,0 +1,23 @@ + + + +# kb_core + +Ce crate fournit les types minimaux partagés, les erreurs communes et l'identité des modules. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. + +## Erreurs communes + +`kb_core::Error` est l'enum d'erreur commune du workspace. Elle fournit des familles stables pour configuration, I/O, JSON, tracing, Tauri, HTTP, WebSocket, base de données, état invalide, client non connecté, fonctionnalité non implémentée et erreurs personnalisées. + +`kb_core::Error::new(code, message)` reste disponible comme compatibilité courte pendant que les domaines sont progressivement spécialisés. diff --git a/olddocs/archivekbot2/kb_decoder_adapter_saber_decimal_wrapper/README.md b/olddocs/archivekbot2/kb_decoder_adapter_saber_decimal_wrapper/README.md new file mode 100644 index 0000000..188061d --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_adapter_saber_decimal_wrapper/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_adapter_saber_decimal_wrapper + +Ce crate réserve la surface de décodage `adapter_saber_decimal_wrapper`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `adapter_saber_decimal_wrapper` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_admin_jupiter_lock/README.md b/olddocs/archivekbot2/kb_decoder_admin_jupiter_lock/README.md new file mode 100644 index 0000000..f8226fa --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_admin_jupiter_lock/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_admin_jupiter_lock + +Ce crate réserve la surface de décodage `admin_jupiter_lock`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `admin_jupiter_lock` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_admin_pump_fees/README.md b/olddocs/archivekbot2/kb_decoder_admin_pump_fees/README.md new file mode 100644 index 0000000..d8e1dad --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_admin_pump_fees/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_admin_pump_fees + +Ce crate décode la surface protocolaire `pump_fees` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_amm_aldrin_v1/README.md b/olddocs/archivekbot2/kb_decoder_amm_aldrin_v1/README.md new file mode 100644 index 0000000..c99427f --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_aldrin_v1/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_aldrin_v1 + +Ce crate réserve la surface de décodage `amm_aldrin_v1`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_aldrin_v1` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_aldrin_v2/README.md b/olddocs/archivekbot2/kb_decoder_amm_aldrin_v2/README.md new file mode 100644 index 0000000..bd9b178 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_aldrin_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_aldrin_v2 + +Ce crate réserve la surface de décodage `amm_aldrin_v2`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_aldrin_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_alphaq/README.md b/olddocs/archivekbot2/kb_decoder_amm_alphaq/README.md new file mode 100644 index 0000000..94235ea --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_alphaq/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_alphaq + +Ce crate réserve la surface de décodage `amm_alphaq`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_alphaq` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_believe/README.md b/olddocs/archivekbot2/kb_decoder_amm_believe/README.md new file mode 100644 index 0000000..e8754d5 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_believe/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_believe + +Ce crate réserve la surface de décodage `amm_believe`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_believe` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_bonk_swap/README.md b/olddocs/archivekbot2/kb_decoder_amm_bonk_swap/README.md new file mode 100644 index 0000000..08fd98b --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_bonk_swap/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_bonk_swap + +Ce crate réserve la surface de décodage `amm_bonk_swap`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_bonk_swap` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_fluxbeam/README.md b/olddocs/archivekbot2/kb_decoder_amm_fluxbeam/README.md new file mode 100644 index 0000000..5f7d303 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_fluxbeam/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_fluxbeam + +Ce crate réserve la surface de décodage `amm_fluxbeam`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_fluxbeam` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_goon_fi/README.md b/olddocs/archivekbot2/kb_decoder_amm_goon_fi/README.md new file mode 100644 index 0000000..9e9bf11 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_goon_fi/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_goon_fi + +Ce crate réserve la surface de décodage `amm_goon_fi`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_goon_fi` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_goosefx_gamma/README.md b/olddocs/archivekbot2/kb_decoder_amm_goosefx_gamma/README.md new file mode 100644 index 0000000..2562270 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_goosefx_gamma/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_goosefx_gamma + +Ce crate réserve la surface de décodage `amm_goosefx_gamma`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_goosefx_gamma` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_goosefx_v2/README.md b/olddocs/archivekbot2/kb_decoder_amm_goosefx_v2/README.md new file mode 100644 index 0000000..4145f28 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_goosefx_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_goosefx_v2 + +Ce crate réserve la surface de décodage `amm_goosefx_v2`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_goosefx_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_guac_swap/README.md b/olddocs/archivekbot2/kb_decoder_amm_guac_swap/README.md new file mode 100644 index 0000000..b158c3f --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_guac_swap/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_guac_swap + +Ce crate réserve la surface de décodage `amm_guac_swap`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_guac_swap` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_lifinity_swap_v2/README.md b/olddocs/archivekbot2/kb_decoder_amm_lifinity_swap_v2/README.md new file mode 100644 index 0000000..b1b3018 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_lifinity_swap_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_lifinity_swap_v2 + +Ce crate réserve la surface de décodage `amm_lifinity_swap_v2`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_lifinity_swap_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_metadao_futarchy_amm/README.md b/olddocs/archivekbot2/kb_decoder_amm_metadao_futarchy_amm/README.md new file mode 100644 index 0000000..61a0323 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_metadao_futarchy_amm/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_metadao_futarchy_amm + +Ce crate réserve la surface de décodage `amm_metadao_futarchy_amm`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_metadao_futarchy_amm` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_metadao_v0_5/README.md b/olddocs/archivekbot2/kb_decoder_amm_metadao_v0_5/README.md new file mode 100644 index 0000000..de729e7 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_metadao_v0_5/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_metadao_v0_5 + +Ce crate réserve la surface de décodage `amm_metadao_v0_5`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_metadao_v0_5` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_meteora_damm_v1/README.md b/olddocs/archivekbot2/kb_decoder_amm_meteora_damm_v1/README.md new file mode 100644 index 0000000..c07d854 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_meteora_damm_v1/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_amm_meteora_damm_v1 + +Ce crate décode la surface protocolaire `meteora_damm_v1` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_amm_meteora_damm_v2/README.md b/olddocs/archivekbot2/kb_decoder_amm_meteora_damm_v2/README.md new file mode 100644 index 0000000..eabb345 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_meteora_damm_v2/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_amm_meteora_damm_v2 + +Ce crate décode la surface protocolaire `meteora_damm_v2` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_amm_obric_v2/README.md b/olddocs/archivekbot2/kb_decoder_amm_obric_v2/README.md new file mode 100644 index 0000000..4e0196a --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_obric_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_obric_v2 + +Ce crate réserve la surface de décodage `amm_obric_v2`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_obric_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_one_dex/README.md b/olddocs/archivekbot2/kb_decoder_amm_one_dex/README.md new file mode 100644 index 0000000..08a44d5 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_one_dex/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_one_dex + +Ce crate réserve la surface de décodage `amm_one_dex`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_one_dex` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_pump_swap/README.md b/olddocs/archivekbot2/kb_decoder_amm_pump_swap/README.md new file mode 100644 index 0000000..f0c35a5 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_pump_swap/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_amm_pump_swap + +Ce crate décode la surface protocolaire `pump_swap` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_amm_raydium_lp_v4/README.md b/olddocs/archivekbot2/kb_decoder_amm_raydium_lp_v4/README.md new file mode 100644 index 0000000..a4535cf --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_raydium_lp_v4/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_amm_raydium_lp_v4 + +Ce crate décode la surface protocolaire `raydium_amm_v4` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_amm_solfi/README.md b/olddocs/archivekbot2/kb_decoder_amm_solfi/README.md new file mode 100644 index 0000000..4346f7c --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_solfi/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_solfi + +Ce crate réserve la surface de décodage `amm_solfi`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_solfi` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_solfi_v2/README.md b/olddocs/archivekbot2/kb_decoder_amm_solfi_v2/README.md new file mode 100644 index 0000000..a389767 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_solfi_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_solfi_v2 + +Ce crate réserve la surface de décodage `amm_solfi_v2`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_solfi_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_vertigo/README.md b/olddocs/archivekbot2/kb_decoder_amm_vertigo/README.md new file mode 100644 index 0000000..f882a22 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_vertigo/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_vertigo + +Ce crate réserve la surface de décodage `amm_vertigo`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_vertigo` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_virtuals/README.md b/olddocs/archivekbot2/kb_decoder_amm_virtuals/README.md new file mode 100644 index 0000000..e95c84a --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_virtuals/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_virtuals + +Ce crate réserve la surface de décodage `amm_virtuals`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_virtuals` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_woofi/README.md b/olddocs/archivekbot2/kb_decoder_amm_woofi/README.md new file mode 100644 index 0000000..40ca3d8 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_woofi/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_woofi + +Ce crate réserve la surface de décodage `amm_woofi`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_woofi` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_zero_fi/README.md b/olddocs/archivekbot2/kb_decoder_amm_zero_fi/README.md new file mode 100644 index 0000000..4637e64 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_zero_fi/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_zero_fi + +Ce crate réserve la surface de décodage `amm_zero_fi`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_zero_fi` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_amm_zora/README.md b/olddocs/archivekbot2/kb_decoder_amm_zora/README.md new file mode 100644 index 0000000..cfd4689 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_amm_zora/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_amm_zora + +Ce crate réserve la surface de décodage `amm_zora`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `amm_zora` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_anchor/README.md b/olddocs/archivekbot2/kb_decoder_anchor/README.md new file mode 100644 index 0000000..48191a7 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_anchor/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_anchor + +Ce crate fournit les outils génériques Anchor : IDL, discriminators, Borsh et événements. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_api/README.md b/olddocs/archivekbot2/kb_decoder_api/README.md new file mode 100644 index 0000000..072f5dd --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_api/README.md @@ -0,0 +1,25 @@ + + + +# kb_decoder_api + +Ce crate déclare l'interface commune des décodeurs protocolaires. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. + +## Contrats `0.4.0` et contexte core `2` + +Le trait `InstructionDecoder` reçoit exclusivement `CoreInstructionReplayInput`. Il expose une identité et une version stables, les surfaces supportées, la couverture déclarée, la reconnaissance déterministe et un résultat explicite `decoded`, `ignored`, `unsupported` ou `failed`. Les observations produites conservent la preuve, la confiance, le statut on-chain et le caractère commité ou annulé. + +Depuis `0.4.1-pre.014`, le même contrat inclut les payloads ordonnés des instructions outer. `contextual_input_hash` sérialise l’ensemble du contexte, trie récursivement les clés d’objets et conserve l’ordre des tableaux. Un changement de payload outer modifie donc le hash, tandis qu’un contexte identique produit un hash stable. + +Le crate reste indépendant de PostgreSQL, Tauri et des fournisseurs RPC. diff --git a/olddocs/archivekbot2/kb_decoder_bridge_circle_cctp_token_messenger_minter/README.md b/olddocs/archivekbot2/kb_decoder_bridge_circle_cctp_token_messenger_minter/README.md new file mode 100644 index 0000000..6ecd638 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_bridge_circle_cctp_token_messenger_minter/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_bridge_circle_cctp_token_messenger_minter + +Ce crate réserve la surface de décodage `bridge_circle_cctp_token_messenger_minter`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `bridge_circle_cctp_token_messenger_minter` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_bridge_circle_cctp_token_messenger_minter_v2/README.md b/olddocs/archivekbot2/kb_decoder_bridge_circle_cctp_token_messenger_minter_v2/README.md new file mode 100644 index 0000000..19cbef0 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_bridge_circle_cctp_token_messenger_minter_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_bridge_circle_cctp_token_messenger_minter_v2 + +Ce crate réserve la surface de décodage `bridge_circle_cctp_token_messenger_minter_v2`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `bridge_circle_cctp_token_messenger_minter_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_bridge_layer_zero_endpoint/README.md b/olddocs/archivekbot2/kb_decoder_bridge_layer_zero_endpoint/README.md new file mode 100644 index 0000000..69a0a00 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_bridge_layer_zero_endpoint/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_bridge_layer_zero_endpoint + +Ce crate réserve la surface de décodage `bridge_layer_zero_endpoint`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `bridge_layer_zero_endpoint` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_bridge_layer_zero_executor/README.md b/olddocs/archivekbot2/kb_decoder_bridge_layer_zero_executor/README.md new file mode 100644 index 0000000..8fd40e2 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_bridge_layer_zero_executor/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_bridge_layer_zero_executor + +Ce crate réserve la surface de décodage `bridge_layer_zero_executor`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `bridge_layer_zero_executor` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_clmm_byreal/README.md b/olddocs/archivekbot2/kb_decoder_clmm_byreal/README.md new file mode 100644 index 0000000..90d4afd --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_clmm_byreal/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_clmm_byreal + +Ce crate réserve la surface de décodage `clmm_byreal`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `clmm_byreal` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_clmm_fusion/README.md b/olddocs/archivekbot2/kb_decoder_clmm_fusion/README.md new file mode 100644 index 0000000..a9bc73b --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_clmm_fusion/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_clmm_fusion + +Ce crate réserve la surface de décodage `clmm_fusion`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `clmm_fusion` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_clmm_orca_whirlpool/README.md b/olddocs/archivekbot2/kb_decoder_clmm_orca_whirlpool/README.md new file mode 100644 index 0000000..81013ce --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_clmm_orca_whirlpool/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_clmm_orca_whirlpool + +Ce crate décode la surface protocolaire `orca_whirlpool` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_clmm_pancake_swap/README.md b/olddocs/archivekbot2/kb_decoder_clmm_pancake_swap/README.md new file mode 100644 index 0000000..a5254c9 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_clmm_pancake_swap/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_clmm_pancake_swap + +Ce crate réserve la surface de décodage `clmm_pancake_swap`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `clmm_pancake_swap` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_clmm_raydium/README.md b/olddocs/archivekbot2/kb_decoder_clmm_raydium/README.md new file mode 100644 index 0000000..bde5200 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_clmm_raydium/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_clmm_raydium + +Ce crate décode la surface protocolaire `raydium_clmm` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_clmm_stabble/README.md b/olddocs/archivekbot2/kb_decoder_clmm_stabble/README.md new file mode 100644 index 0000000..c947948 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_clmm_stabble/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_clmm_stabble + +Ce crate réserve la surface de décodage `clmm_stabble`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `clmm_stabble` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_cpmm_raydium/README.md b/olddocs/archivekbot2/kb_decoder_cpmm_raydium/README.md new file mode 100644 index 0000000..40098c8 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_cpmm_raydium/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_cpmm_raydium + +Ce crate décode la surface protocolaire `raydium_cpmm` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_dlmm_meteora/README.md b/olddocs/archivekbot2/kb_decoder_dlmm_meteora/README.md new file mode 100644 index 0000000..729f1e1 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_dlmm_meteora/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_dlmm_meteora + +Ce crate décode la surface protocolaire `meteora_dlmm` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_fees_bags_fee_share_v1/README.md b/olddocs/archivekbot2/kb_decoder_fees_bags_fee_share_v1/README.md new file mode 100644 index 0000000..71680a2 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_fees_bags_fee_share_v1/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_fees_bags_fee_share_v1 + +Ce crate réserve le décodeur de la surface canonique `fees_bags_fee_share_v1`. + +## Rôle dans l'écosystème + +Il servira à décoder les instructions et événements Bags Fee Share liés à la configuration et au claim de frais. + +## Statut + +Le crate est un squelette. Les layouts d'instructions, discriminants et corpus de validation restent à ajouter. diff --git a/olddocs/archivekbot2/kb_decoder_fees_bags_fee_share_v2/README.md b/olddocs/archivekbot2/kb_decoder_fees_bags_fee_share_v2/README.md new file mode 100644 index 0000000..cf5563c --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_fees_bags_fee_share_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_fees_bags_fee_share_v2 + +Ce crate réserve le décodeur de la surface canonique `fees_bags_fee_share_v2`. + +## Rôle dans l'écosystème + +Il servira à décoder les instructions et événements Bags Fee Share liés à la configuration et au claim de frais. + +## Statut + +Le crate est un squelette. Les layouts d'instructions, discriminants et corpus de validation restent à ajouter. diff --git a/olddocs/archivekbot2/kb_decoder_governance_metadao_bid_wall/README.md b/olddocs/archivekbot2/kb_decoder_governance_metadao_bid_wall/README.md new file mode 100644 index 0000000..5cae264 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_governance_metadao_bid_wall/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_governance_metadao_bid_wall + +Ce crate réserve la surface de décodage `governance_metadao_bid_wall`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `governance_metadao_bid_wall` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_launchpad_boop_fun/README.md b/olddocs/archivekbot2/kb_decoder_launchpad_boop_fun/README.md new file mode 100644 index 0000000..85ad24a --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_launchpad_boop_fun/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_launchpad_boop_fun + +Ce crate réserve la surface de décodage `launchpad_boop_fun`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `launchpad_boop_fun` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_launchpad_metadao_ico/README.md b/olddocs/archivekbot2/kb_decoder_launchpad_metadao_ico/README.md new file mode 100644 index 0000000..a67a7c4 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_launchpad_metadao_ico/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_launchpad_metadao_ico + +Ce crate réserve la surface de décodage `launchpad_metadao_ico`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `launchpad_metadao_ico` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_launchpad_meteora_dbc/README.md b/olddocs/archivekbot2/kb_decoder_launchpad_meteora_dbc/README.md new file mode 100644 index 0000000..5e45e8a --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_launchpad_meteora_dbc/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_launchpad_meteora_dbc + +Ce crate décode la surface protocolaire `meteora_dbc` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_launchpad_moonit/README.md b/olddocs/archivekbot2/kb_decoder_launchpad_moonit/README.md new file mode 100644 index 0000000..11817a6 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_launchpad_moonit/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_launchpad_moonit + +Ce crate réserve la surface de décodage `launchpad_moonit`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `launchpad_moonit` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_launchpad_orca_wavebreak/README.md b/olddocs/archivekbot2/kb_decoder_launchpad_orca_wavebreak/README.md new file mode 100644 index 0000000..8a03622 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_launchpad_orca_wavebreak/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_launchpad_orca_wavebreak + +Ce crate réserve la surface de décodage `launchpad_orca_wavebreak`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `launchpad_orca_wavebreak` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_launchpad_printr/README.md b/olddocs/archivekbot2/kb_decoder_launchpad_printr/README.md new file mode 100644 index 0000000..0d6e2f0 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_launchpad_printr/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_launchpad_printr + +Ce crate réserve la surface de décodage `launchpad_printr`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `launchpad_printr` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_launchpad_pump_fun/README.md b/olddocs/archivekbot2/kb_decoder_launchpad_pump_fun/README.md new file mode 100644 index 0000000..e98d13b --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_launchpad_pump_fun/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_launchpad_pump_fun + +Ce crate décode la surface protocolaire `pump_fun` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_launchpad_pump_pumpup_ai/README.md b/olddocs/archivekbot2/kb_decoder_launchpad_pump_pumpup_ai/README.md new file mode 100644 index 0000000..f38df38 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_launchpad_pump_pumpup_ai/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_launchpad_pump_pumpup_ai + +Ce crate réserve la surface de décodage `launchpad_pump_pumpup_ai`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `launchpad_pump_pumpup_ai` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_launchpad_raydium_launchlab/README.md b/olddocs/archivekbot2/kb_decoder_launchpad_raydium_launchlab/README.md new file mode 100644 index 0000000..e41ac40 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_launchpad_raydium_launchlab/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_launchpad_raydium_launchlab + +Ce crate décode la surface protocolaire `raydium_launchpad` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_lending_clone/README.md b/olddocs/archivekbot2/kb_decoder_lending_clone/README.md new file mode 100644 index 0000000..02bf6fd --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_lending_clone/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_lending_clone + +Ce crate réserve la surface de décodage `lending_clone`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `lending_clone` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_borrow/README.md b/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_borrow/README.md new file mode 100644 index 0000000..9b4a6b5 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_borrow/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_lending_jupiter_lend_borrow + +Ce crate réserve la surface de décodage `lending_jupiter_lend_borrow`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `lending_jupiter_lend_borrow` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_earn/README.md b/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_earn/README.md new file mode 100644 index 0000000..2b3270a --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_earn/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_lending_jupiter_lend_earn + +Ce crate réserve la surface de décodage `lending_jupiter_lend_earn`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `lending_jupiter_lend_earn` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_flash_loan/README.md b/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_flash_loan/README.md new file mode 100644 index 0000000..6554bc0 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_flash_loan/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_lending_jupiter_lend_flash_loan + +Ce crate réserve la surface de décodage `lending_jupiter_lend_flash_loan`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `lending_jupiter_lend_flash_loan` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_liquidity/README.md b/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_liquidity/README.md new file mode 100644 index 0000000..b3f976f --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_lending_jupiter_lend_liquidity/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_lending_jupiter_lend_liquidity + +Ce crate réserve la surface de décodage `lending_jupiter_lend_liquidity`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `lending_jupiter_lend_liquidity` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_lending_kamino/README.md b/olddocs/archivekbot2/kb_decoder_lending_kamino/README.md new file mode 100644 index 0000000..20ab5e7 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_lending_kamino/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_lending_kamino + +Ce crate réserve la surface de décodage `lending_kamino`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `lending_kamino` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_lending_marginfi_v2/README.md b/olddocs/archivekbot2/kb_decoder_lending_marginfi_v2/README.md new file mode 100644 index 0000000..6995ab1 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_lending_marginfi_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_lending_marginfi_v2 + +Ce crate réserve la surface de décodage `lending_marginfi_v2`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `lending_marginfi_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_lock_raydium_lp/README.md b/olddocs/archivekbot2/kb_decoder_lock_raydium_lp/README.md new file mode 100644 index 0000000..046da6e --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_lock_raydium_lp/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_lock_raydium_lp + +Ce crate réserve la surface de décodage `lock_raydium_lp`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `lock_raydium_lp` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_metadata_metaplex_token_metadata/README.md b/olddocs/archivekbot2/kb_decoder_metadata_metaplex_token_metadata/README.md new file mode 100644 index 0000000..cb96b4c --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_metadata_metaplex_token_metadata/README.md @@ -0,0 +1,178 @@ + + + +# `kb_decoder_metadata_metaplex_token_metadata` + +Décodeur contextualisé dédié au programme Metaplex Token Metadata. + +La crate suit la frontière commune des décodeurs opérationnels du workspace : + +- `constants.rs` contient la surface, les discriminateurs, les bornes et la cible de tracing ; +- `decoder.rs` implémente `ProtocolDecoder` et `InstructionDecoder` ; +- `instruction.rs` contient le décodage Borsh borné, la résolution des comptes et les observations ; +- `lib.rs` réexporte le décodeur d’instructions et les types publics du parseur de comptes ; +- le Program ID provient exclusivement de `kb_program_ids`. + +`0.4.7-pre.002` active le décodage exact de `CreateMetadataAccountV3` et `UpdateMetadataAccountV2`. `0.4.7-pre.003` ajoute `VerifyCollection`, `UnverifyCollection` et `SetAndVerifyCollection`. `0.4.7-pre.004` ajoute le groupe sized `VerifySizedCollectionItem`, `UnverifySizedCollectionItem` et `SetAndVerifySizedCollectionItem`, avec la metadata de collection writable et le `collection_authority_record` optionnel. `0.4.7-pre.005` ajoute l’administration historique/courante des autorités de collection avec `ApproveCollectionAuthority` et `RevokeCollectionAuthority`, y compris le record PDA, les autorités distinctes et les comptes système/rent optionnels. `0.4.7-pre.006` ajoute les usages et autorités d’usage avec `ApproveUseAuthority`, `RevokeUseAuthority` et `Utilize`, leurs compteurs `u64`, le `use_authority_record`, le burner, les comptes Token/ATA et les comptes système/rent. `0.4.7-pre.007` ajoute `SignMetadata` et `UpdatePrimarySaleHappenedViaToken`, avec creator/owner signataires, metadata writable et token account readonly. Les layouts proviennent de `mpl-token-metadata 5.1.1`. Le décodeur préserve outer/CPI, statut de transaction, comptes ordonnés, paramètres Borsh, provenance et hash du wire. Il refuse les payloads tronqués, suffixes, comptes invalides et discriminateurs inconnus. + +Depuis `pre.025`, la crate traite le premier compte on-chain `MetadataV1`. Elle ne traite pas encore les autres comptes Metaplex Token Metadata, les metadata Token-2022 incorporées, Metaplex Core, Bubblegum ou les contenus JSON distants. + +## Groupe `0.4.7-pre.009` + +- `PuffMetadata` (`14`) : normalisation/padding de la metadata externe. +- `RemoveCreatorVerification` (`28`) : retrait explicite de la vérification d’un creator. +- `SetTokenStandard` (`35`) : classification du standard de token, avec edition optionnelle. + +Le décodage conserve les comptes ordonnés, les flags signer/writable officiels, outer/CPI, les échecs non committés et le rejet des suffixes. + +## 0.4.7-pre.009 — création metadata historique V2 + +- `CreateMetadataAccountV2` (discriminant `16`) est décodé comme surface historique. +- Le wire conserve `DataV2` et `is_mutable` avec les mêmes bornes que V3. +- Le contrat de comptes reprend metadata, mint, mint authority, payer, update authority, System Program et rent optionnel. +- Cette instruction est décodable et matérialisable ultérieurement, mais restera non exécutable. + +## 0.4.7-pre.010 + +Ajout du décodage historique non exécutable de `CreateMetadataAccount` (0) et `UpdateMetadataAccount` (1), avec layouts `Data` V1 bornés et comptes exacts. + +## 0.4.7-pre.011 + +Ajout de `CreateMasterEditionV3` (17) et `ConvertMasterEditionV1ToV2` (12). Le premier conserve `max_supply: Option` et les autorités/payer/programmes exacts ; le second est classé historique et conserve les trois comptes writable de conversion. Le mint d’éditions imprimées et les edition markers restent planifiés pour la tranche suivante. + +## 0.4.7-pre.012 + +Ajout de `MintNewEditionFromMasterEditionViaToken` (11) et de la variante historique `MintNewEditionFromMasterEditionViaVaultProxy` (13). Les deux wires conservent l’édition `u64`, le master edition, le nouvel edition account et l’edition marker. La variante Token conserve le propriétaire et le token account du master ; la variante Vault conserve l’autorité, le safety deposit et le Token Vault Program. La variante Vault reste définitivement non exécutable. + +## 0.4.7-pre.013 + +Ajout de `SetCollectionSize` (34) et `BubblegumSetCollectionSize` (36). Les deux wires conservent `size: u64`. La variante directe exige une collection authority writable/signataire ; la variante Bubblegum exige une collection authority readonly/signataire et le `bubblegum_signer` readonly/signataire. Le record d’autorité de collection reste optionnel. Le bridge Bubblegum est décodé avec provenance Metaplex Token Metadata mais reste distinct de la future couverture complète Bubblegum de `0.4.9`. + +## 0.4.7-pre.014 — Delegate / Revoke programmables + +- `Delegate` (44) et `Revoke` (45) décodés avec leurs enums Borsh exactes. +- Contrat positionnel de 14 comptes conservé, y compris les placeholders Metaplex des comptes optionnels. +- `AuthorizationData` est projeté lorsqu’il est présent ; validation sémantique différée au preflight stateful. + +## 0.4.7-pre.015 — lifecycle programmable + +Ajout de `Transfer` (49), `Lock` (46), `Unlock` (47), `Burn` (41) et `CloseAccounts` (57). Les enums Borsh modernes, comptes positionnels, placeholders optionnels, montants `u64`, outer/CPI et transactions échouées non committées sont conservés. La validation stateful des TokenRecord, rule sets, owners et PDA reste différée. + +## `0.4.7-pre.016` — audit exhaustif et freeze/thaw historiques + +- inventaire officiel recalé sur `clients/rust/src/generated/instructions/mod.rs` ; +- ajout de `FreezeDelegatedAccount` (`26`) et `ThawDelegatedAccount` (`27`) ; +- contrat exact de cinq comptes : delegate writable/signataire, token account writable, edition, mint et Token Program readonly ; +- ces deux surfaces restent historiques, decode-only et non exécutables ; +- les wrappers modernes et les opérations escrow/collect/resize/migrate encore absents restent explicitement planifiés avant le décodage des comptes. + +## `0.4.7-pre.017` — burns NFT historiques et printing token + +- `BurnNft` (`29`) conserve metadata, owner signataire, mint, token account, master edition, Token Program et collection metadata optionnelle. +- `BurnEditionNft` (`37`) conserve le print mint, le master mint, leurs token accounts, les comptes edition/master edition et l’edition marker. +- `DeprecatedMintNewEditionFromMasterEditionViaPrintingToken` (`3`) conserve les quinze comptes obligatoires et la reservation list optionnelle. +- Ces trois surfaces sont historiques, decode-only et définitivement non exécutables. + +## `0.4.7-pre.018` — escrow et collecte + +- `CreateEscrowAccount` (`38`) et `CloseEscrowAccount` (`39`) conservent escrow, metadata, mint, token account, edition, payer et comptes système/sysvar exacts. +- `TransferOutOfEscrow` (`40`) conserve `amount: u64`, les comptes source/destination de l’attribut, le mint et le token account liés à l’escrow, ainsi que l’autorité optionnelle. +- `Collect` (`54`) conserve l’autorité signataire et le destinataire readonly. +- Les quatre surfaces préservent outer/CPI et les transactions échouées non committées ; les owners, PDA et états escrow restent à valider lors du décodage stateful. + +## `0.4.7-pre.019` — wrapper moderne Create + +- `Create` (`42`) décode `CreateArgs::V1`, y compris metadata textuelle, royalties, creators, collection, uses, token standard, rule set, decimals et print supply. +- Le contrat de neuf positions conserve metadata, master edition optionnelle, mint signataire/writable, authority, payer, update authority, programmes système/sysvar et SPL Token Program optionnel. +- Les wrappers modernes `Create`, `Mint`, `Print`, `Update`, `Use`, `Verify`, `Unverify`, `Resize` et `Migrate` sont désormais décodés ; leurs validations owner/PDA restent stateful. + +## 0.4.7-pre.020 + +Cette préversion ajoute le wrapper moderne `Mint` (`43`). Le décodeur conserve `MintArgs::V1`, le montant brut `u64`, `AuthorizationData` optionnelle et les quinze positions officielles, y compris les placeholders Metaplex utilisés pour les comptes optionnels absents. L’activation runtime, la validation stateful des PDA/rule sets et l’exécution restent différées. + +## `0.4.7-pre.021` — wrapper moderne Print + +- `Print` (`55`) décode les variantes `PrintArgs::V1` et `PrintArgs::V2`, chacune conservant le numéro d’édition `u64`. +- Le contrat de dix-huit positions conserve les comptes edition metadata, edition, edition mint, token account, Token Record optionnel, master edition, edition marker, payer, propriétaire du master token account et programmes Token/ATA/System/Sysvar. +- `PrintV1` et `PrintV2` sont des builders spécialisés du même discriminant `55` et non deux discriminateurs supplémentaires. +- Les PDA edition/edition marker et les owners restent à valider lors du décodage stateful des comptes. + +## Update moderne + +Le discriminant `50` décode `UpdateArgs` et toutes ses variantes publiées : `V1`, `AsUpdateAuthorityV2`, `AsAuthorityItemDelegateV2`, `AsCollectionDelegateV2`, `AsDataDelegateV2`, `AsProgrammableConfigDelegateV2`, `AsDataItemDelegateV2`, `AsCollectionItemDelegateV2` et `AsProgrammableConfigItemDelegateV2`. Le contrat conserve onze positions, avec placeholders Metaplex readonly pour les comptes optionnels absents. La validation sémantique des PDA, delegates, owners et rule sets reste stateful. + +## Wrapper Use et vérifications modernes + +`Use` (`51`) décode `UseArgs::V1` et ses douze positions. `Verify` (`52`) et `Unverify` (`53`) décodent `VerificationArgs::{CreatorV1,CollectionV1}` avec huit positions et placeholders optionnels explicites. Les validations owner/PDA restent stateful. + +## `0.4.7-pre.024` — inventaire d’instructions exhaustif + +`Resize` (`56`) et `Migrate` (`48`) sont décodés avec leurs contrats positionnels exacts. L’audit de l’IDL `1.14.0` a également identifié puis couvert les six discriminateurs historiques manquants `2`, `5`, `6`, `8`, `9` et `10`. Le registre contient désormais les 58 discriminateurs `0..=57` sans trou. Ces six surfaces historiques restent decode-only et non exécutables. + +## `0.4.7-pre.025` — premier compte on-chain + +La crate expose désormais `decode_metadata_account` pour le layout officiel `Metadata`. Le parseur refuse un owner étranger avant désérialisation, exige `Key::MetadataV1`, borne les données et les champs textuels, limite les creators, valide le PDA canonique `[metadata, program_id, mint]` et conserve le bump. Cette tranche ne couvre pas encore MasterEdition, Edition, EditionMarker, TokenRecord ni les records de délégation. + +## `0.4.7-pre.026` — comptes edition et master edition + +La crate expose `decode_edition_account` pour `DeprecatedMasterEditionV1`, `MasterEditionV2` et `EditionV1`. Le décodeur vérifie l’owner avant parsing, exige le PDA commun `[metadata, program_id, mint, edition]`, conserve le bump et projette supply/max supply, printing mints historiques, parent et numéro d’édition. `MasterEditionV1` reste historique et decode-only ; `MasterEditionV2` et `EditionV1` alimenteront les futures projections stateful. + +## `0.4.7-pre.027` — Edition Marker V1/V2 + +- `EditionMarker` conserve un ledger fixe de 31 octets, soit 248 éditions par groupe. +- Le groupe V1 est `edition / 248` et le PDA utilise les seeds `[metadata, program_id, mint, edition, groupe_decimal]`. +- `EditionMarkerV2` conserve un `Vec` extensible et utilise un PDA unique `[metadata, program_id, mint, edition, marker]`. +- Le décodeur projette l'index d'octet, le masque big-endian et l'état `edition_taken` pour l'édition demandée. +- V1 exige exactement 32 octets ; V2 exige une longueur Borsh exacte et borne le ledger à 1 048 576 octets. +- Owner étranger, mauvais PDA, discriminant inconnu, troncature et suffixe sont refusés avant toute projection stateful. + +## `0.4.7-pre.028` — Token Record programmable + +- `TokenRecord` exige le layout alloué exact de 80 octets et `Key::TokenRecord`. +- Le PDA est dérivé par `[metadata, program_id, mint, token_record, token_account]` et le bump stocké doit être identique au bump canonique. +- La projection conserve `TokenState::{Unlocked,Locked,Listed}`, la révision optionnelle du rule set, le delegate, son rôle et la destination optionnelle de locked transfer. +- Les rôles officiels `Sale`, `Transfer`, `Utility`, `Staking`, `Standard`, `LockedTransfer` et `Migration` sont conservés sans normalisation destructive. +- Owner étranger, mauvais PDA, bump incohérent, mauvais discriminant, troncature et suffixe sont refusés. + +## `0.4.7-pre.029` — records de délégation et d’autorité + +- `MetadataDelegateRecord` et `HolderDelegateRecord` exigent exactement 98 octets, leur discriminant `Key`, leur bump stocké et leur PDA canonique. +- Les huit seeds de rôles Metadata sont conservées sans regroupement : `authority_item_delegate`, `collection_delegate`, `use_delegate`, `data_delegate`, `programmable_config_delegate`, `data_item_delegate`, `collection_item_delegate` et `prog_config_item_delegate`. +- `HolderDelegateRecord` conserve le rôle `print_delegate`, le holder utilisé comme seed, le delegate et l’update authority stockée. +- `CollectionAuthorityRecord` valide `[metadata, program_id, mint, collection_authority, authority]` et conserve l’update authority optionnelle. +- `UseAuthorityRecord` valide `[metadata, program_id, mint, user, authority]`, exige exactement 10 octets et conserve `allowed_uses: u64`. +- Owner étranger, longueur incorrecte, discriminant erroné, PDA ou bump incohérents sont refusés avant projection. + +## `0.4.7-pre.030` — Token Owned Escrow stateful + +- `TokenOwnedEscrow` conserve le base token mint, l’autorité `TokenOwner` ou `Creator(Pubkey)` et le bump stocké. +- Le PDA `TokenOwner` utilise `[metadata, program_id, base_token, 0, escrow]`. +- Le PDA `Creator` utilise `[metadata, program_id, base_token, 1, creator, escrow]`. +- Les longueurs Borsh exactes sont 35 octets pour `TokenOwner` et 67 octets pour `Creator`. +- Owner étranger, discriminant, longueur, PDA ou bump incohérents sont refusés. +- Les effets de `CreateEscrowAccount`, `CloseEscrowAccount`, `TransferOutOfEscrow`, `Migrate` et `Resize` sont décrits dans la matrice pour la future corrélation stateful ; ils ne sont pas encore matérialisés. + +## `0.4.7-pre.031` — Reservation Lists historiques + +- `ReservationListV1` conserve le Master Edition, le supply snapshot optionnel et jusqu’à 200 entrées avec compteurs `u8`. +- `ReservationListV2` conserve les mêmes identités, des compteurs `u64` et les caches `total_reservation_spots`/`current_reservation_spots`. +- Le PDA exige le contexte `resource` et suit `[metadata, program_id, master_edition, reservation, resource]`. +- Les tailles maximales historiques sont 6 949 octets pour V1 et 9 749 octets pour V2 ; seuls les suffixes de padding nuls sont tolérés. +- Ces comptes sont historiques et ne seront jamais exposés par l’exécuteur. Ils restent toutefois matérialisables comme état historique lors des backfills et replays, avec provenance explicite et sans écraser l’état actif. + +## `0.4.7-pre.032` — audit exhaustif des comptes + +- Les quinze variantes `Key` publiées, de `Uninitialized` (`0`) à `HolderDelegate` (`14`), sont inventoriées dans le code et la matrice. +- Les quatorze variantes représentant un compte réel sont reliées à un décodeur borné ; `Uninitialized` est une sentinelle explicitement rejetée. +- Les layouts historiques restent `decode-only`, `EditionMarkerV2` reste classé actif/expérimental, et les comptes actifs restent éligibles aux futures matérialisations. +- Un test compare l’ordre et les discriminateurs Borsh du SDK épinglé à l’inventaire interne et à `docs/METAPLEX_TOKEN_METADATA_MATRIX.json`. +- Toute variante future absente de l’inventaire doit faire échouer l’audit avant toute activation runtime. + +## `0.4.7-pre.033` — modèle canonique et provenance + +- Chaque snapshot de compte est enveloppé dans une identité stable `program_id:account_address`, un nom de layout, son discriminant `Key` exact et une version canonique interne. +- Les layouts sont classés `Active`, `ActiveExperimental` ou `Historical` sans confondre cette classification avec leur politique d’exécution. +- Les états actifs et expérimentaux sont matérialisables comme état courant ; les états historiques sont matérialisables comme état historique lors d’un backfill ou replay. +- Les layouts historiques restent définitivement non exécutables, même lorsqu’ils sont matérialisés. +- La provenance conserve source, slot, write version, signature, index outer/inner et statut committed lorsque ces données sont disponibles. +- Les sources `Live`, `Replay`, `Backfill`, `Repair` et `Synthetic` restent distinctes afin d’éviter toute fusion silencieuse des observations. diff --git a/olddocs/archivekbot2/kb_decoder_metadata_spl_name_service/README.md b/olddocs/archivekbot2/kb_decoder_metadata_spl_name_service/README.md new file mode 100644 index 0000000..26bcdb4 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_metadata_spl_name_service/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_metadata_spl_name_service + +Ce crate réserve la frontière de décodage pour le programme SPL Name Service. + +## État + +Le program ID et l'identité du crate sont enregistrés, mais aucun payload n'est encore déclaré `decoded`. L'implémentation maximale sera réalisée dans la version dédiée indiquée par le `ROADMAP.md`, à partir des interfaces et fixtures officielles. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs`. +- Le scaffold ne doit produire aucun faux événement avant l'implémentation officielle. diff --git a/olddocs/archivekbot2/kb_decoder_nft_metaplex_bubblegum/README.md b/olddocs/archivekbot2/kb_decoder_nft_metaplex_bubblegum/README.md new file mode 100644 index 0000000..24445ca --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_nft_metaplex_bubblegum/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_nft_metaplex_bubblegum + +Ce crate réserve la surface de décodage `nft_metaplex_bubblegum`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `nft_metaplex_bubblegum` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_orderbook_jupiter_limit_order/README.md b/olddocs/archivekbot2/kb_decoder_orderbook_jupiter_limit_order/README.md new file mode 100644 index 0000000..7862c51 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_orderbook_jupiter_limit_order/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_orderbook_jupiter_limit_order + +Ce crate réserve la surface de décodage `orderbook_jupiter_limit_order`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `orderbook_jupiter_limit_order` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_orderbook_jupiter_limit_order_v2/README.md b/olddocs/archivekbot2/kb_decoder_orderbook_jupiter_limit_order_v2/README.md new file mode 100644 index 0000000..86c5154 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_orderbook_jupiter_limit_order_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_orderbook_jupiter_limit_order_v2 + +Ce crate réserve la surface de décodage `orderbook_jupiter_limit_order_v2`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `orderbook_jupiter_limit_order_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_orderbook_openbook_v2/README.md b/olddocs/archivekbot2/kb_decoder_orderbook_openbook_v2/README.md new file mode 100644 index 0000000..49b5a12 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_orderbook_openbook_v2/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_orderbook_openbook_v2 + +Ce crate décode la surface protocolaire `openbook_v2` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_perpetuals_drift_v2/README.md b/olddocs/archivekbot2/kb_decoder_perpetuals_drift_v2/README.md new file mode 100644 index 0000000..413ba1c --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_perpetuals_drift_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_perpetuals_drift_v2 + +Ce crate réserve la surface de décodage `perpetuals_drift_v2`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `perpetuals_drift_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_perpetuals_jupiter/README.md b/olddocs/archivekbot2/kb_decoder_perpetuals_jupiter/README.md new file mode 100644 index 0000000..eb6e24e --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_perpetuals_jupiter/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_perpetuals_jupiter + +Ce crate réserve la surface de décodage `perpetuals_jupiter`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `perpetuals_jupiter` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_perpetuals_zeta/README.md b/olddocs/archivekbot2/kb_decoder_perpetuals_zeta/README.md new file mode 100644 index 0000000..11ad077 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_perpetuals_zeta/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_perpetuals_zeta + +Ce crate réserve la surface de décodage `perpetuals_zeta`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `perpetuals_zeta` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_router_dflow_aggregator_v4/README.md b/olddocs/archivekbot2/kb_decoder_router_dflow_aggregator_v4/README.md new file mode 100644 index 0000000..7c309dd --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_router_dflow_aggregator_v4/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_router_dflow_aggregator_v4 + +Ce crate réserve la surface de décodage `router_dflow_aggregator_v4`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `router_dflow_aggregator_v4` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_router_jupiter_aggregator_v4/README.md b/olddocs/archivekbot2/kb_decoder_router_jupiter_aggregator_v4/README.md new file mode 100644 index 0000000..1530756 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_router_jupiter_aggregator_v4/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_router_jupiter_aggregator_v4 + +Ce crate réserve la surface de décodage `router_jupiter_aggregator_v4`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `router_jupiter_aggregator_v4` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_router_jupiter_aggregator_v6/README.md b/olddocs/archivekbot2/kb_decoder_router_jupiter_aggregator_v6/README.md new file mode 100644 index 0000000..6d37769 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_router_jupiter_aggregator_v6/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_router_jupiter_aggregator_v6 + +Ce crate réserve la surface de décodage `router_jupiter_aggregator_v6`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `router_jupiter_aggregator_v6` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_router_jupiter_dca/README.md b/olddocs/archivekbot2/kb_decoder_router_jupiter_dca/README.md new file mode 100644 index 0000000..c74e8bc --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_router_jupiter_dca/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_router_jupiter_dca + +Ce crate réserve la surface de décodage `router_jupiter_dca`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `router_jupiter_dca` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_router_okx_labs_v1/README.md b/olddocs/archivekbot2/kb_decoder_router_okx_labs_v1/README.md new file mode 100644 index 0000000..921ee68 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_router_okx_labs_v1/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_router_okx_labs_v1 + +Ce crate réserve la surface de décodage `router_okx_labs_v1`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `router_okx_labs_v1` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_router_okx_labs_v2/README.md b/olddocs/archivekbot2/kb_decoder_router_okx_labs_v2/README.md new file mode 100644 index 0000000..288285c --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_router_okx_labs_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_router_okx_labs_v2 + +Ce crate réserve la surface de décodage `router_okx_labs_v2`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `router_okx_labs_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_rwa_ondo_global_markets/README.md b/olddocs/archivekbot2/kb_decoder_rwa_ondo_global_markets/README.md new file mode 100644 index 0000000..3945841 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_rwa_ondo_global_markets/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_rwa_ondo_global_markets + +Ce crate réserve la surface de décodage `rwa_ondo_global_markets`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `rwa_ondo_global_markets` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_solana_core/README.md b/olddocs/archivekbot2/kb_decoder_solana_core/README.md new file mode 100644 index 0000000..43a9620 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_solana_core/README.md @@ -0,0 +1,116 @@ + + + +# kb_decoder_solana_core + +Ce crate décode les programmes Solana natifs/runtime, les programmes historiques encore observables, les loaders et les précompiles. `memo` est explicitement exclu de cette crate et appartient à la série SPL. + +## Rôle dans l'écosystème + +`SolanaCoreDecoder` implémente le contrat commun `InstructionDecoder` et consomme uniquement les inputs contextualisés produits par l’extraction core. Il ne dépend ni de PostgreSQL, ni de Tauri, ni d’un fournisseur RPC. + +Le processor conserve l’identité stable `solana_native_classifier` introduite en `0.4.0`. Cette continuité permet au ledger processor/version/hash de remplacer les anciens résultats `unsupported` lors d’un force replay. La version du processor reste `0.4.1` pendant les deltas préparatoires. + +## Couverture `0.4.1-pre.018` + +Les deltas préparatoires de `0.4.1` livrent les phases A à E et poursuivent l’audit final : + +- utilitaires de lecture base64 bornée et de lecture little-endian ; +- validation des comptes résolus et attribution de rôles officiels ; +- événements natifs versionnés, déterministes et explicites sur le succès on-chain ; +- décodage des quatorze variantes actuelles de `SystemInstruction` depuis `solana-system-interface 3.2.0` ; +- décodage des variantes Compute Budget actuelles depuis `solana-compute-budget-interface 3.0.0`, avec compatibilité runtime Borsh unchecked : valeurs minimales décodées et suffixes conservés par taille, préfixe et SHA-256 ; +- prise en charge historique de `RequestUnitsDeprecated` ; +- distinction entre `decoded`, `ignored`, `unsupported` et `failed` ; +- absence de mutation commitée pour une transaction source échouée ; +- décodage exact des cinq variantes Address Lookup Table depuis `solana-address-lookup-table-interface 3.1.0` ; +- gestion de la paire optionnelle payer/System lors d’un extend et de la règle signer historique de l’autorité lors d’un create ; +- projection lifecycle ALT séparée dans `kb_materializer_lifecycle` pour les observations réussies et commitées ; +- conservation des comptes System additionnels correctement résolus avec le rôle `additional_account`, après validation sur un transfert mainnet réussi ; +- décodage exact des loaders BPF immuables, upgradeable et v4 avec tailles canoniques, champs historiques optionnels et hashes des blocs écrits ; +- classification de l’invocation directe du Native Loader comme `ignored`, car aucune enum d’instruction autonome stable n’est publiée ; +- projection lifecycle des finalize/deploy/upgrade/close/extend/retract/set length réussis ; `pre.020` projette séparément les changements d’autorité dans `kb_materializer_admin` et les writes/copies de bytecode dans `kb_materializer_compliance_audit`, avec hash et préfixe borné ; +- décodage de `FeatureGateInstruction::RevokePendingActivation` avec validation des comptes Feature, Incinerator et System ; +- décodage générique du Config Program : clés compactes, signataires et payload opaque borné/hashé ; +- exclusion de Stake Config des surfaces, car son adresse désigne un compte historique non exécutable ; +- décodage exact des vingt variantes `VoteInstruction` de `solana-vote-interface ^6.0` via `wincode::deserialize_exact`, y compris les formes checked/seed, compactes, tower sync, initialisation V2 avec BLS, commissions différenciées et dépôt de récompenses délégateurs ; +- validation des sysvars Rent, Clock et Slot Hashes aux positions officielles, tout en conservant les comptes additionnels résolus et les privilèges attendus/observés ; +- aucune matérialisation Vote ajoutée : les événements restent des observations structurées et les transactions échouées restent non commitées. +- validation mainnet Vote sur 500 instructions réelles `tower_sync`, sans échec Vote ; +- correction du seul échec de replay observé, un `set_compute_unit_limit` de 12 octets accepté par Agave mais auparavant rejeté par le décodeur strict ; +- décodage des dix-huit variantes `StakeInstruction` depuis `solana-stake-interface ^4.3`, au moyen d’un miroir wire privé compatible avec le format historique et décodé par `wincode::deserialize_exact` ; +- distinction entre les layouts de comptes historiques avec sysvars et les layouts BPF modernes, avec `accountLayout`, comptes additionnels et privilèges attendus/observés ; +- classification de `Redelegate` comme instruction historique officiellement désactivée et décodage des transactions échouées comme intentions non commitées ; +- absence de matérialisation Stake tant que l’état préalable du compte, le lockup et la délégation ne sont pas disponibles dans un contrat de projection stable. +- contrat core contextualisé `2`, avec accès stable aux payloads de toutes les instructions outer de la transaction ; +- décodage structurel exact des précompiles Ed25519, secp256k1 et secp256r1, y compris références courantes/externes, signatures multiples, clé ou adresse, recovery ID et message ; +- conservation bornée des composants par longueur, SHA-256 et préfixe hexadécimal, sans recopier les messages et sans recalculer les signatures ; +- interprétation prudente du runtime : acceptation affirmée uniquement pour une transaction réussie, aucune validité cryptographique affirmée pour une transaction échouée ; +- aucune matérialisation des précompiles, avec `materializedOutputs = 0` ; +- décodage des treize instructions ZK ElGamal Proof depuis `solana-zk-elgamal-proof-interface ^0.1` et le runtime Agave ; +- distinction entre preuve inline et preuve référencée par compte, offset `u32 LE`, création optionnelle d’un compte de contexte et fermeture du contexte ; +- séparation bornée contexte/corps pour les preuves inline selon les tailles `Pod` officielles, avec longueurs, SHA-256 et préfixes limités, sans conserver ni vérifier cryptographiquement la preuve ; +- marquage explicite du contenu historique indisponible pour les preuves stockées dans un compte, sans lecture RPC actuelle susceptible de diverger ; +- aucune matérialisation ZK dans `pre.015`, avec `materializedOutputs = 0`. + +`pre.016` décode l’ancien ZK Token Proof Program comme surface historique et couvre ses dix-sept discriminants officiels. Les layouts inline utilisent les tailles `Pod` de un miroir wire local audité contre `solana-zk-token-sdk 3.1.14`; les instructions exactes de cinq octets conservent l’offset vers un compte de preuve, sans lire un état RPC actuel. Les gates historiques `enable_zk_proof_from_account` et `enable_zk_transfer_with_fee`, les arités de contexte et l’interdiction historique des vérifications inner sont exposées explicitement. + +Le runtime Agave `v4.1.1` est un stub sans effet. Un payload qui ne correspond pas exactement à un layout historique est donc classé `current_runtime_noop_invocation`, pas `unsupported` ou `failed`. Aucun corpus mainnet n’ayant été trouvé, la validation repose sur les sources officielles et des fixtures synthétiques. Le décodeur ne vérifie aucune preuve, ne lie pas une transaction à une version runtime supposée et ne produit aucune matérialisation. + +## Matérialisations natives + +Le stateless Slashing Program est couvert depuis `pre.018` par deux layouts exacts. La preuve duplicate block externe n’est pas relue depuis un état RPC actuel ; le décodeur conserve uniquement les données transactionnelles et la relation avec l’instruction Ed25519 précédente. + +La couverture du décodeur est volontairement plus large que celle de chaque matérialiseur spécialisé. ALT, loaders et Feature possèdent des projections lifecycle stables. Les durable nonce accounts System, les comptes de contexte ZK et les rapports Slashing possèdent désormais leurs projections stables. Stake et Vote nécessitent un matérialiseur d’état dédié, `kb_materializer_staking`, car une instruction seule ne suffit pas toujours à reconstruire l’état antérieur, le lockup, la délégation ou l’autorité effective. + +Compute Budget, les précompiles de signature et les preuves ZK sans contexte restent en audit : ils n’introduisent pas à eux seuls un état métier durable, et une projection partielle serait trompeuse. Cette distinction est maintenant suivie explicitement dans le ROADMAP et dans `docs/DECODER_MATERIALIZATION_CONTRACTS.md`. + +## Contrat des événements + +Chaque observation décodée contient notamment : + +- `eventVersion` ; +- program ID, surface et entry code ; +- signature, slot et chemin outer/inner via `DecodedProtocolEvent` ; +- paramètres numériques sans perte ; +- comptes résolus avec rôle, index, clé et privilèges attendus/observés ; +- `transactionSucceeded` ; +- hash du payload ; +- preuve indiquant l’interface officielle utilisée. + +Une transaction échouée peut produire un événement d’intention décodé, mais `observation_committed` reste obligatoirement faux. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs`. +- Aucun discriminant, offset ou ordre de compte ne doit être ajouté sans source officielle vérifiable. +- Les payloads inconnus ou invalides ne doivent jamais provoquer de panic en production. + + +## Précompiles de signature + +Ed25519 et secp256r1 utilisent la sentinelle officielle `u16::MAX` pour référencer le payload de l’instruction cible. secp256k1 n’a pas de sentinelle : chaque index `u8` désigne explicitement une instruction outer, et la provenance `current_instruction` est déduite lorsque cet index égale celui de la cible. Les données après la table d’offsets restent autorisées, car elles peuvent contenir les signatures, clés et messages référencés. + +Les règles zéro signature suivent le runtime : Ed25519 accepte exactement deux octets, secp256k1 exactement un octet, et secp256r1 refuse zéro entrée et limite le compteur à huit. Le décodeur ne dépend d’aucune nouvelle crate officielle : les structures publiées documentent le layout, mais le comportement runtime est reproduit par un parseur local borné et aucune opération cryptographique n’est exécutée. + +## Interfaces et tracing + +Le crate privilégie les interfaces officielles étroites : ALT, System, Vote et Loader v3 utilisent leurs enums officielles avec `wincode`; Stake consomme son interface officielle et un miroir wire privé `wincode` parce que `StakeInstruction` ne dérive pas directement les traits Wincode ; Compute Budget s’aligne sur l’interface Borsh et le comportement unchecked du runtime. Config et Loader v2 conservent des parseurs locaux bornés parce que leurs helpers officiels sont uniquement exposés derrière `bincode`. Loader v4 conserve également un parser local borné : son interface publie l’enum et les comptes, mais ses helpers sont conditionnés par `bincode` et aucun schéma `wincode` n’est exposé. + +Depuis `0.4.2-pre.020`, Loader v3 est désérialisé par `wincode::deserialize_exact`. Les tags, champs, booléens optionnels historiques, payloads suffixés et comptes restent couverts par les fixtures de la crate officielle et par les tests négatifs du décodeur. + +Le target canonique est `kb_decoder_solana_core`. Tout statut `failed` ou `unsupported` après dispatch émet un événement `error` contenant signature, slot, chemin, program ID, processor/version, clé d’input, longueur et hash du payload, statut transactionnel et diagnostics bornés. Une transaction on-chain échouée correctement décodée reste un événement valide non commité. + +## Compatibilité ZK Token historique sans SDK déprécié + +Le crate ne dépend plus de `solana-zk-token-sdk`. Les tags `0..16`, tailles totales de preuve/contexte et règles de forme sont conservés dans une table locale bornée, auditée contre la dernière interface historique et le runtime Agave `v2.0.0`. Aucun helper `bincode` n’est utilisé et le fallback no-op Agave `v4.1.1` reste explicite. +## Matrice de complétude native — `0.4.2-pre.023` + +`docs/NATIVE_SOLANA_DECODER_MATRIX.json` inventorie les 18 surfaces de `kb_program_ids::native_program_ids()` et leurs 121 déclarations de couverture. Le test de matrice impose l’égalité exacte avec `SolanaCoreDecoder::surfaces()` et `SolanaCoreDecoder::coverage()`, ainsi que le nombre de déclarations attendu pour chaque Program ID. + +La matrice complète les tests spécialisés qui parcourent les enums officielles ou tables wire auditées. Elle empêche qu’une surface soit ajoutée au registre partagé sans décodeur, qu’une famille disparaisse de l’agrégateur ou que son nombre de variantes change sans mise à jour explicite de l’audit. + +L’audit consolidé exécuteur/décodeur/RPC est disponible dans `docs/SOLANA_NATIVE_RPC_CLOSURE_AUDIT.md`. + diff --git a/olddocs/archivekbot2/kb_decoder_spl_account_compression/README.md b/olddocs/archivekbot2/kb_decoder_spl_account_compression/README.md new file mode 100644 index 0000000..a8efb03 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_spl_account_compression/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_spl_account_compression + +Ce crate réserve la frontière de décodage pour le programme SPL Account Compression. + +## État + +Le program ID et l'identité du crate sont enregistrés, mais aucun payload n'est encore déclaré `decoded`. L'implémentation maximale sera réalisée dans la version dédiée indiquée par le `ROADMAP.md`, à partir des interfaces et fixtures officielles. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs`. +- Le scaffold ne doit produire aucun faux événement avant l'implémentation officielle. diff --git a/olddocs/archivekbot2/kb_decoder_spl_associated_token_account/README.md b/olddocs/archivekbot2/kb_decoder_spl_associated_token_account/README.md new file mode 100644 index 0000000..9020bbc --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_spl_associated_token_account/README.md @@ -0,0 +1,40 @@ + + + +# kb_decoder_spl_associated_token_account + +Ce crate décode exactement le programme SPL Associated Token Account +`ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL`. + +## Surface décodée + +- `Create`, discriminant Borsh `0`, ainsi que sa forme historique vide ; +- `CreateIdempotent`, discriminant `1` ; +- `RecoverNested`, discriminant `2` ; +- cibles SPL Token classique et Token-2022, sans décoder les extensions Token-2022. + +Le décodeur conserve le chemin outer/inner, le statut committed, les comptes ordonnés avec leurs +flags et doublons, les rôles ATA, les adresses observées et les PDA canoniques attendus. Une adresse +incorrecte ou une forme de comptes incomplète reste une intention structurée accompagnée de +diagnostics bornés ; elle n'est jamais corrigée silencieusement. + +La matrice `docs/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json` et les tests différentiels imposent +l'égalité avec `spl-associated-token-account-interface 2.0.0`, ses builders et son helper PDA. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Matérialisation + +Le décodeur ne reconstruit aucun solde ni snapshot final. Les faits commités sont possédés par +`kb_materializer_token_accounts`, tandis que `kb_materializer_risk` possède uniquement le constat +distinct de récupération d'un anti-pattern nested. Les CPI SPL Token restent propriétaires des +initialisations, transferts et fermetures qu'elles effectuent. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_spl_elgamal_registry/README.md b/olddocs/archivekbot2/kb_decoder_spl_elgamal_registry/README.md new file mode 100644 index 0000000..8631169 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_spl_elgamal_registry/README.md @@ -0,0 +1,13 @@ + + + +# Décodeur SPL ElGamal Registry + +Décodeur strict du programme `regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg`. + +Il couvre les deux instructions publiées par `spl-elgamal-registry-interface 0.2.1` : + +- `CreateRegistry` (`00 `) ; +- `UpdateRegistry` (`01 `). + +Un offset nul désigne un compte de contexte de preuve prévalidé. Un offset non nul désigne une instruction relative du programme natif ZK ElGamal Proof. Le décodeur ne prétend pas décoder la preuve elle-même et ne mélange jamais ce programme avec Token-2022. diff --git a/olddocs/archivekbot2/kb_decoder_spl_memo/README.md b/olddocs/archivekbot2/kb_decoder_spl_memo/README.md new file mode 100644 index 0000000..1ec6305 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_spl_memo/README.md @@ -0,0 +1,55 @@ + + + +# kb_decoder_spl_memo + +Ce crate décode les programmes SPL Memo v1, v3 et v4 depuis l’instruction core contextualisée. + +## Surface exacte + +- v1 : `Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo` ; +- v3 : `MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr` ; +- v4 : `Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH`. + +`SplMemoDecoder` implémente le contrat contextualisé `InstructionDecoder`. La reconnaissance est exacte pour ces trois IDs et incompatible avec tout autre programme. L’adaptateur historique `ProtocolDecoder` déclare `Yes` pour ces IDs, mais ne fabrique pas d’événement sans instruction contextualisée. + +## Contrat décodé + +Le payload Memo est la totalité des octets de l’instruction, sans discriminator ni préfixe de longueur. Le décodeur conserve : + +- la génération et le Program ID exacts ; +- le texte complet lorsque l’UTF‑8 est valide ; +- la longueur en octets, le SHA-256 et un préfixe hexadécimal borné à 32 octets ; +- tous les comptes dans leur ordre, y compris les doublons, avec position, index, pubkey, signer et writable ; +- les signataires observés et les comptes non signers ; +- le chemin outer/inner, le succès de transaction et l’état committed ; +- les validations syntaxiques et le statut de preuve runtime. + +Le décodeur accepte au maximum 4 096 octets décodés. Cette limite protège le replay contre un payload core anormal tout en dépassant la taille pratique d’une instruction contenue dans une transaction Solana actuelle. Dans cette borne, le texte valide est conservé sans troncature. + +Les événements sont : + +- `add_memo` pour une transaction réussie dont le contrat est valide ; +- `memo_intent` pour un payload lisible dans une transaction échouée ; +- `invalid_memo_attempt` pour un UTF‑8 invalide ou un compte non signer lorsque la génération l’exige. + +Une transaction échouée n’est jamais marquée committed et son statut runtime reste `not_proven_transaction_failed`, même lorsque l’analyse statique des octets et comptes est valide. + +## Différences de génération + +Memo v1 valide l’UTF‑8 et ignore les comptes. Memo v3 et v4 parcourent tous les comptes fournis et échouent si l’un d’eux n’est pas signer ; zéro compte reste valide. Les trois générations partagent le même wire de données brutes, mais le décodeur conserve des surfaces et règles séparées. + +La matrice normative et les références officielles sont dans `docs/SPL_MEMO_MATRIX.json`. + +Le corpus réel couvre les trois générations sur Mainnet. La validation opérateur ajoute trois signatures v4 Devnet confirmées, toutes décodées comme `add_memo` outer au path `0`, avec compte wallet signer readonly, sans échec de décodage. v1 et v3 ne sont pas prétendues déployées sur Devnet : leur couverture réelle reste assurée par le replay Mainnet et leur construction reste soumise à simulation avant tout envoi. + +## Projection + +`kb_materializer_transaction_annotations` projette uniquement les `add_memo` réussis et commités dans la famille dédiée `TransactionAnnotation`. Les intentions échouées et tentatives invalides restent consultables dans le decode sans devenir des annotations réussies. Les comptes complets, flags writable, diagnostics, préfixes hexadécimaux et preuves restent volontairement dans l’événement décodé ; la projection conserve le texte, la longueur, le hash et les signataires utiles à la recherche et à la corrélation. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs`. +- Les erreurs de rétention core, de base64, de taille ou de résolution de comptes produisent un résultat `Failed` borné, jamais un faux Memo. diff --git a/olddocs/archivekbot2/kb_decoder_spl_noop/README.md b/olddocs/archivekbot2/kb_decoder_spl_noop/README.md new file mode 100644 index 0000000..720cca3 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_spl_noop/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_spl_noop + +Ce crate réserve la frontière de décodage pour le programme SPL Noop. + +## État + +Le program ID et l'identité du crate sont enregistrés, mais aucun payload n'est encore déclaré `decoded`. L'implémentation maximale sera réalisée dans la version dédiée indiquée par le `ROADMAP.md`, à partir des interfaces et fixtures officielles. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs`. +- Le scaffold ne doit produire aucun faux événement avant l'implémentation officielle. diff --git a/olddocs/archivekbot2/kb_decoder_spl_single_pool/README.md b/olddocs/archivekbot2/kb_decoder_spl_single_pool/README.md new file mode 100644 index 0000000..fa6e2dd --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_spl_single_pool/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_spl_single_pool + +Ce crate réserve la frontière de décodage pour le programme SPL Single Pool. + +## État + +Le program ID et l'identité du crate sont enregistrés, mais aucun payload n'est encore déclaré `decoded`. L'implémentation maximale sera réalisée dans la version dédiée indiquée par le `ROADMAP.md`, à partir des interfaces et fixtures officielles. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs`. +- Le scaffold ne doit produire aucun faux événement avant l'implémentation officielle. diff --git a/olddocs/archivekbot2/kb_decoder_spl_stake_pool/README.md b/olddocs/archivekbot2/kb_decoder_spl_stake_pool/README.md new file mode 100644 index 0000000..8be7af6 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_spl_stake_pool/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_spl_stake_pool + +Ce crate réserve la surface de décodage `spl_stake_pool`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `spl_stake_pool` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_spl_token/README.md b/olddocs/archivekbot2/kb_decoder_spl_token/README.md new file mode 100644 index 0000000..4b52d58 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_spl_token/README.md @@ -0,0 +1,89 @@ + + + +# kb_decoder_spl_token + +Ce crate décode exclusivement le programme SPL Token classique +`TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`. Token-2022, ATA, les interfaces +de métadonnées et les programmes qui invoquent Token par CPI ne sont pas absorbés dans sa +surface. Une instruction Token inner reste néanmoins décodée grâce à son Program ID exact et à +son chemin core stable. + +## Surface couverte + +La couverture compilée contient les 28 tags publiés par `spl-token-interface 3.0.0` : `0..24`, +`38`, `45` et `255`. Elle inclut les variantes historiques, checked, les deux générations sans +Rent, les conversions montant/UI, `WithdrawExcessLamports`, `UnwrapLamports` et `Batch`. + +La publication d'un tag et son déploiement sont traités séparément. `UnwrapLamports` et `Batch` +sont constructibles dans l'interface `3.0.0` et implémentés par p-token `1.0.0`. Leur déploiement +sur le programme classique Devnet est observé par deux simulations réussies le 16 juillet 2026 ; +Localnet et Mainnet restent non testés pour ces tags récents. Les opérations classiques observées +sur Mainnet ou exécutées sur Devnet portent séparément leurs preuves réelles. La matrice normative +est `docs/SPL_TOKEN_MATRIX.json`. + +## Contrat de décodage + +`SplTokenDecoder` implémente les deux contrats communs : + +- `ProtocolDecoder` annonce `Yes` uniquement pour le Program ID Token classique exact ; +- `InstructionDecoder` fournit une surface, 28 déclarations de couverture, une reconnaissance par + tag et un résultat contextualisé pour le replay commun. + +Chaque observation conserve le tag, le wire borné et son SHA-256, le chemin outer/inner, les +comptes dans leur ordre d'origine avec doublons et flags, les rôles prouvables, les paramètres bruts, +la forme d'autorité structurelle et les diagnostics. Les montants `u64` sont écrits en chaînes +décimales dans le JSON pour éviter toute perte à la frontière Tauri. + +Un `Transfer` non checked ne reçoit jamais de mint ou de decimals inventés. Le champ d'inférence +reste explicitement vide tant qu'aucune corrélation core prouvée n'est implémentée. Le décodeur +n'effectue aucune lecture RPC. + +## Transactions échouées et autorités + +Une transaction échouée mais lisible produit une intention structurée avec `committed=false`. Elle +ne prouve aucune mutation de compte Token. Les formes simple et multisig sont distinguées depuis +les metas fournies ; la validation de `M/N` et des membres d'un multisig existant exige un snapshot +stateful et n'est jamais inventée par le décodeur. + +Pour `InitializeMultisig` et `InitializeMultisig2`, le wire `M`, le nombre `N` déduit des comptes et +les bornes officielles `1 <= M <= N <= 11` sont contrôlés structurellement. + +## Batch + +`Batch` est analysé avec des bornes locales de 64 sous-instructions, 512 comptes cumulés et +16 384 octets de payload. Chaque entrée conserve son slice de comptes, son offset de données, son +ordre et un chemin dérivé `/batch/`. Un batch vide, tronqué, avec longueur nulle, +comptes insuffisants ou batch imbriqué échoue avec un diagnostic borné. + +## Limites actuelles + +- Le contrat `CoreInstructionReplayInput` ne transporte pas encore les return data canoniques ; les + trois conversions concernées restent décodées comme intentions, avec validation de return data + explicitement indisponible. +- Le corpus Mainnet prouve les opérations réellement observées, pas l'exhaustivité des 28 tags sur + ce cluster. Les initialisations normalisées par la matérialisation ne sont pas attribuées à une + variante wire sans preuve supplémentaire. +- Localnet et Mainnet restent sans preuve de déploiement de `UnwrapLamports` et `Batch` ; la preuve + Devnet n'est pas extrapolée aux autres clusters. + +## Corpus réel + +Le replay Mainnet du 15 juillet 2026 a décodé 370 instructions sans entrée unsupported, failed ou +unmatched. Il a produit 371 sorties commitées, huit refus correspondant exactement aux huit +transactions échouées et un second replay avec zéro sélection. Les signatures représentatives de +`Transfer`, `Approve`, `CloseAccount`, `TransferChecked`, `BurnChecked` et `SyncNative` sont +conservées par instruction dans la matrice. Le lifecycle Devnet y conserve séparément les +signatures exactes de ses opérations courantes. + +Le probe Devnet du 16 juillet 2026 a simulé sans signature ni envoi un `Batch` contenant un +`TransferChecked` de montant nul, puis un `UnwrapLamports` d'un lamport depuis un compte wrapped SOL +auxiliaire classique. Les deux simulations ont réussi sans erreur runtime, avec respectivement 270 +et 140 compute units. + +## Exemple + +```rust +let decoder = kb_decoder_spl_token::SplTokenDecoder; +let result = kb_decoder_api::InstructionDecoder::decode(&decoder, &input); +``` diff --git a/olddocs/archivekbot2/kb_decoder_spl_token_2022/README.md b/olddocs/archivekbot2/kb_decoder_spl_token_2022/README.md new file mode 100644 index 0000000..294f836 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_spl_token_2022/README.md @@ -0,0 +1,30 @@ + + + +# kb_decoder_spl_token_2022 + +Ce crate décode la surface `spl_token_2022` afin de normaliser les événements token fondamentaux. + +La première tranche d'audit publie `docs/SPL_TOKEN_2022_MATRIX.json`. Elle inventorie les 48 tags +de premier niveau et les 29 types TLV de production. La résolution opérateur confirme +`spl-token-2022-interface 3.1.1` avec `default + serde` et +`spl-elgamal-registry-interface 0.2.1` avec `default`. Le scaffold reste volontairement inchangé +tant que les sous-discriminants, comptes exacts et processors ne sont pas confirmés. + +La crate opérationnelle utilise la cible de tracing canonique `kb_decoder_spl_token_2022`. Pendant +la phase d'audit, l'appel du scaffold émet seulement un diagnostic `debug` structuré indiquant +qu'aucun événement métier n'a encore été produit ; il ne revendique aucun décodage effectif. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. +- Le seul Program ID accepté sera `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb`. +- Le registre ElGamal, le programme ZK ElGamal natif et les implémentations externes de Transfer + Hook, Token Group ou Token Metadata conservent des dispatchs et matrices séparés. diff --git a/olddocs/archivekbot2/kb_decoder_stable_swap_hylo_exchange/README.md b/olddocs/archivekbot2/kb_decoder_stable_swap_hylo_exchange/README.md new file mode 100644 index 0000000..10776f6 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_stable_swap_hylo_exchange/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_stable_swap_hylo_exchange + +Ce crate réserve la surface de décodage `stable_swap_hylo_exchange`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `stable_swap_hylo_exchange` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_stable_swap_jupiter_stable/README.md b/olddocs/archivekbot2/kb_decoder_stable_swap_jupiter_stable/README.md new file mode 100644 index 0000000..bd90a32 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_stable_swap_jupiter_stable/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_stable_swap_jupiter_stable + +Ce crate réserve la surface de décodage `stable_swap_jupiter_stable`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `stable_swap_jupiter_stable` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_stable_swap_numeraire/README.md b/olddocs/archivekbot2/kb_decoder_stable_swap_numeraire/README.md new file mode 100644 index 0000000..bbd7795 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_stable_swap_numeraire/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_stable_swap_numeraire + +Ce crate réserve la surface de décodage `stable_swap_numeraire`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `stable_swap_numeraire` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_stable_swap_stabble/README.md b/olddocs/archivekbot2/kb_decoder_stable_swap_stabble/README.md new file mode 100644 index 0000000..f56473c --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_stable_swap_stabble/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_stable_swap_stabble + +Ce crate réserve la surface de décodage `stable_swap_stabble`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `stable_swap_stabble` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_staking_kamino_farm/README.md b/olddocs/archivekbot2/kb_decoder_staking_kamino_farm/README.md new file mode 100644 index 0000000..c079589 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_staking_kamino_farm/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_staking_kamino_farm + +Ce crate réserve la surface de décodage `staking_kamino_farm`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `staking_kamino_farm` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_staking_marinade_finance/README.md b/olddocs/archivekbot2/kb_decoder_staking_marinade_finance/README.md new file mode 100644 index 0000000..4b71eec --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_staking_marinade_finance/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_staking_marinade_finance + +Ce crate réserve la surface de décodage `staking_marinade_finance`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `staking_marinade_finance` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_staking_solayer/README.md b/olddocs/archivekbot2/kb_decoder_staking_solayer/README.md new file mode 100644 index 0000000..9a7eef0 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_staking_solayer/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_staking_solayer + +Ce crate réserve la surface de décodage `staking_solayer`. Aucun `program_id` local n'est encore fixé dans ce squelette. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `staking_solayer` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_treasury_helium_treasury_management/README.md b/olddocs/archivekbot2/kb_decoder_treasury_helium_treasury_management/README.md new file mode 100644 index 0000000..6e748f1 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_treasury_helium_treasury_management/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_treasury_helium_treasury_management + +Ce crate réserve la surface de décodage `treasury_helium_treasury_management`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `treasury_helium_treasury_management` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_vault_carrot_defi/README.md b/olddocs/archivekbot2/kb_decoder_vault_carrot_defi/README.md new file mode 100644 index 0000000..b81ef0c --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_vault_carrot_defi/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_vault_carrot_defi + +Ce crate réserve la surface de décodage `vault_carrot_defi`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `vault_carrot_defi` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_vault_hylo_stability_pool/README.md b/olddocs/archivekbot2/kb_decoder_vault_hylo_stability_pool/README.md new file mode 100644 index 0000000..e0e4f98 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_vault_hylo_stability_pool/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_vault_hylo_stability_pool + +Ce crate réserve la surface de décodage `vault_hylo_stability_pool`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `vault_hylo_stability_pool` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_vault_kamino/README.md b/olddocs/archivekbot2/kb_decoder_vault_kamino/README.md new file mode 100644 index 0000000..617aed0 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_vault_kamino/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_vault_kamino + +Ce crate réserve la surface de décodage `vault_kamino`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `vault_kamino` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_vault_kamino_v2/README.md b/olddocs/archivekbot2/kb_decoder_vault_kamino_v2/README.md new file mode 100644 index 0000000..390f155 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_vault_kamino_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_vault_kamino_v2 + +Ce crate réserve la surface de décodage `vault_kamino_v2`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `vault_kamino_v2` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_vault_kamino_yvaults/README.md b/olddocs/archivekbot2/kb_decoder_vault_kamino_yvaults/README.md new file mode 100644 index 0000000..86b8c54 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_vault_kamino_yvaults/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_vault_kamino_yvaults + +Ce crate réserve la surface de décodage `vault_kamino_yvaults`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `vault_kamino_yvaults` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_vault_meteora/README.md b/olddocs/archivekbot2/kb_decoder_vault_meteora/README.md new file mode 100644 index 0000000..2e48422 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_vault_meteora/README.md @@ -0,0 +1,17 @@ + + + +# kb_decoder_vault_meteora + +Ce crate décode la surface protocolaire `meteora_vault` en événements protocolaires normalisés. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_decoder_vesting_streamflow/README.md b/olddocs/archivekbot2/kb_decoder_vesting_streamflow/README.md new file mode 100644 index 0000000..d74f5dc --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_vesting_streamflow/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_vesting_streamflow + +Ce crate réserve la surface de décodage `vesting_streamflow`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `vesting_streamflow` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_wallet_jupiter_apepro_smart_wallet/README.md b/olddocs/archivekbot2/kb_decoder_wallet_jupiter_apepro_smart_wallet/README.md new file mode 100644 index 0000000..d2a7195 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_wallet_jupiter_apepro_smart_wallet/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_wallet_jupiter_apepro_smart_wallet + +Ce crate réserve la surface de décodage `wallet_jupiter_apepro_smart_wallet`. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `wallet_jupiter_apepro_smart_wallet` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_decoder_weighted_swap_stabble/README.md b/olddocs/archivekbot2/kb_decoder_weighted_swap_stabble/README.md new file mode 100644 index 0000000..78a0469 --- /dev/null +++ b/olddocs/archivekbot2/kb_decoder_weighted_swap_stabble/README.md @@ -0,0 +1,14 @@ + + + +# kb_decoder_weighted_swap_stabble + +Ce crate réserve la surface de décodage `weighted_swap_stabble`. Le ou les `program_id` initiaux proviennent des IDL locales. + +## Rôle dans l'écosystème + +Ce module transforme les observations Solana liées à `weighted_swap_stabble` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs. + +## État initial + +Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_execution_api/README.md b/olddocs/archivekbot2/kb_execution_api/README.md new file mode 100644 index 0000000..577f13a --- /dev/null +++ b/olddocs/archivekbot2/kb_execution_api/README.md @@ -0,0 +1,101 @@ + + + +# kb_execution_api + +Cette crate définit les contrats communs de la couche d’exécution. Elle ne dépend ni du wallet, ni du RPC, ni du stockage, ni des décodeurs et ne construit aucune instruction Solana. + +## API publique + +### Capacités et traits + +| Export | Usage | +|-----------------------------------------|----------------------------------------------------------------------------------------------------------------------------| +| `ExecutionCapability` | Réponse exacte `Supported { operation_code }` ou `Unsupported { reason_code, reason }` pour un couple programme/opération. | +| `ExecutionCapability::supported(...)` | Construit une capacité supportée avec un code stable. | +| `ExecutionCapability::unsupported(...)` | Construit un refus documenté avec code et message. | +| `ExecutionCapability::is_supported()` | Teste la capacité sans perdre le diagnostic du variant complet. | +| `TypedInstructionExecutor` | Contrat actuel : expose `capability(...)` et `build_prepared_plan(...)` sans I/O, signature ou envoi. | +| `InstructionExecutor` | Pont historique fondé sur `ExecutionRequest`/`ExecutionPlan`; il reste disponible pour les crates réservées. | +| `ExecutionSupport` | Résultat historique `No`, `Maybe` ou `Yes`; les exécuteurs opérationnels doivent éviter `Maybe`. | + +### Politiques + +| Export | Usage | +|---------------------------------|-----------------------------------------------------------------------------------------------------------| +| `ExecutionPolicy` | Agrège cluster, simulation, blockhash/nonce, plafonds, signataires autorisés, dry-run et post-validation. | +| `ExecutionCluster` | Cluster attendu : Localnet, Devnet, Testnet ou Mainnet. | +| `ExecutionClusterPolicy` | Autorisation du cluster et double confirmation Mainnet. | +| `ExecutionSimulationPolicy` | Indique si la simulation est obligatoire. | +| `ExecutionBlockhashKind` | Sélectionne un recent blockhash ou un durable nonce. | +| `ExecutionBlockhashPolicy` | Porte l’âge maximal du blockhash ou le compte et l’autorité nonce. | +| `ExecutionCostLimit` | Plafonds de dépense, frais totaux et prix par compute unit. | +| `PostExecutionValidationPolicy` | Étapes exigées après confirmation : canonical insert, core extraction, decode replay et matérialisation. | + +Tous les types de politique implémentent des valeurs par défaut conservatrices : Devnet, simulation obligatoire, recent blockhash borné, dry-run actif et Mainnet désactivé. + +### Plan préparé + +| Export | Usage | +|-------------------------|-------------------------------------------------------------------------------------| +| `PreparedExecutionPlan` | Contrat immutable transmis de l’exécuteur à la sécurité puis à l’assembleur Solana. | +| `PlannedInstruction` | Program ID, code d’opération, comptes ordonnés et payload exact. | +| `PlannedAccount` | Public key et flags signer/writable d’un compte d’instruction. | +| `RequiredSigner` | Public key et rôle stable d’un signataire requis. | + +Un plan contient également l’exécuteur/version, l’identifiant d’intent, le fee payer, la politique, les lamports dépensés ou verrouillés et le prix Compute Budget demandé. + +### Résultats d’orchestration + +| Export | Usage | +|-------------------------------|-------------------------------------------------------------------------------------------------------------------| +| `ExecutionSimulationResult` | Preuve provider-neutral d’une simulation, avec contexte cluster/blockhash, frais, unités, logs et erreur runtime. | +| `ExecutionSendResult` | Signature acceptée par le RPC et slot de soumission éventuel. | +| `ExecutionConfirmationStatus` | État final ou intermédiaire de confirmation. | +| `ExecutionConfirmationResult` | Résultat borné des polls de confirmation. | +| `PostExecutionDiagnostic` | Résumé des étapes canonical/core/decode/materialization après exécution. | + +### Compatibilité et helpers JSON + +| Export | Usage | +|--------------------------------------|------------------------------------------------------------------------| +| `ExecutionRequest` | Requête historique `program_id + operation_code + payload_json`. | +| `ExecutionPlan` | Plan historique sérialisé, sans garantie d’être directement envoyable. | +| `serialize_payload_json(...)` | Sérialise un `serde_json::Value` compact avec `kb_core::Error`. | +| `serialize_payload_json_pretty(...)` | Sérialise le même payload en forme lisible. | + +## Exemple d’implémentation d’un exécuteur + +```rust +impl kb_execution_api::TypedInstructionExecutor for MyExecutor { + type Intent = MyIntent; + + fn capability( + &self, + program_id: &kb_model::ProgramId, + operation_code: &str, + ) -> kb_execution_api::ExecutionCapability { + // Return an exact Supported or Unsupported result. + } + + fn build_prepared_plan( + &self, + intent: &Self::Intent, + ) -> kb_core::Result { + // Validate and encode only. Do not access RPC or sign here. + } +} +``` + +## Frontières + +`kb_execution_api` ne décide pas qu’un plan est sûr, ne compile pas de message Solana et ne contacte aucun endpoint. Le flux attendu est : + +```text +executor intent + -> PreparedExecutionPlan + -> kb_execution_safety + -> kb_execution_solana + -> kb_rpc + -> post-execution orchestration +``` diff --git a/olddocs/archivekbot2/kb_execution_safety/README.md b/olddocs/archivekbot2/kb_execution_safety/README.md new file mode 100644 index 0000000..4f37c19 --- /dev/null +++ b/olddocs/archivekbot2/kb_execution_safety/README.md @@ -0,0 +1,55 @@ + + + +# kb_execution_safety + +Cette crate applique des contrôles stateless communs aux plans préparés avant simulation, puis avant signature et envoi. Elle ne construit pas de transaction et n’effectue aucun I/O. + +## API publique + +| Export | Usage | +|-----------------------------|------------------------------------------------------------| +| `ExecutionSafetyChecker` | Point d’entrée stateless des évaluations de sécurité. | +| `ExecutionSafetyDecision` | Décision agrégée `Deny`, `RequireConfirmation` ou `Allow`. | +| `ExecutionSafetyEvaluation` | Décision accompagnée de toutes les violations stables. | +| `ExecutionSafetyViolation` | Code machine-readable et message humain d’un refus. | + +### `ExecutionSafetyChecker::evaluate_plan(plan)` + +Évalue l’ancien `ExecutionPlan`. Ce contrat historique ne contient pas assez d’informations pour autoriser directement une exécution ; la décision reste donc conservatrice et exige une confirmation. + +### `ExecutionSafetyChecker::evaluate_prepared_plan(plan)` + +Décide si un `PreparedExecutionPlan` peut atteindre la simulation RPC. La fonction vérifie notamment : + +- présence d’instructions et de signataires ; +- simulation obligatoire ; +- recent blockhash borné ou durable nonce complet ; +- cohérence entre signataires d’instruction, signataires déclarés et liste autorisée ; +- plafond de frais présent ; +- dépense et prix de compute unit sous leurs plafonds ; +- Mainnet explicitement autorisé et confirmé. + +### `ExecutionSafetyChecker::evaluate_send(plan, simulation)` + +Réévalue le plan puis décide si la simulation exacte permet la signature et l’envoi. La fonction refuse : + +- dry-run encore actif ; +- simulation absente ou échouée ; +- blockhash remplacé pendant la simulation ; +- cluster, blockhash ou nonce observé différent du plan ; +- frais simulés supérieurs au plafond ; +- confirmation Mainnet manquante. + +## Exemple + +```rust +let checker = kb_execution_safety::ExecutionSafetyChecker; +let before_simulation = checker.evaluate_prepared_plan(&plan)?; +if before_simulation.decision != kb_execution_safety::ExecutionSafetyDecision::Allow { + // Surface the stable violations and stop. +} +let before_send = checker.evaluate_send(&plan, &simulation)?; +``` + +Une décision `Allow` ne remplace pas la validation cryptographique du message ou des signatures. Cette responsabilité appartient à `kb_execution_solana`. diff --git a/olddocs/archivekbot2/kb_execution_solana/README.md b/olddocs/archivekbot2/kb_execution_solana/README.md new file mode 100644 index 0000000..1ab6f35 --- /dev/null +++ b/olddocs/archivekbot2/kb_execution_solana/README.md @@ -0,0 +1,151 @@ + + + +# kb_execution_solana + +`kb_execution_solana` transforme un `PreparedExecutionPlan` commun en message et transaction Solana, puis résout les signataires via l’interface Solana `Signer` et signe uniquement après une simulation autorisée par `kb_execution_safety`. + +La crate est indépendante des exécuteurs concrets et des transports RPC. Elle assemble aussi bien les plans à recent blockhash que les transactions consommant réellement un durable nonce. + +## API publique + +| Export | Usage | +|----------------------------------------|-------------------------------------------------------------------------------------------------------| +| `build_legacy_transaction(...)` | Compile un plan `Latest` avec un recent blockhash explicite. | +| `build_durable_nonce_transaction(...)` | Compile un plan `DurableNonce` avec un état nonce validé et injecte l’avance en première instruction. | +| `durable_nonce_account_data_length()` | Fournit la longueur exacte à demander au RPC pour un compte nonce. | +| `parse_durable_nonce_account(...)` | Valide et décode un snapshot complet de compte nonce System. | +| `DurableNonceAccountState` | État validé exposant compte, autorité, nonce/blockhash et coût par signature. | +| `UnsignedSolanaTransaction` | Message compilé non signé, destiné aux frais, à la simulation exacte et à la signature contrôlée. | +| `SolanaSimulationEvidence` | Simulation liée au hash et au blockhash/nonce exacts du message. | +| `SignedSolanaTransaction` | Transaction signée, vérifiable localement et sérialisable pour `sendTransaction`. | + +### Méthodes des types + +| Type | Méthodes publiques | +|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `DurableNonceAccountState` | `account()`, `authority()`, `blockhash()`, `lamports_per_signature()`. | +| `UnsignedSolanaTransaction` | `plan()`, `message_hash()`, `blockhash()`, `required_signer_pubkeys()`, `message_base64()`, `transaction_base64()`, `bind_simulation(...)`, `sign_after_simulation(...)`. | +| `SolanaSimulationEvidence` | `message_hash()`, `blockhash()`, `simulation()`. | +| `SignedSolanaTransaction` | `message_hash()`, `primary_signature()`, `signer_pubkeys()`, `wire_length()`, `transaction_base64()`, `verify_signatures()`. | + +## Exemple de flux + +```rust +let unsigned = kb_execution_solana::build_legacy_transaction(&plan, recent_blockhash)?; +let simulation = rpc_simulation.to_execution_result( + unsigned.message_hash(), + unsigned.blockhash(), + observed_cluster, +)?; +let evidence = unsigned.bind_simulation(simulation)?; +let signed = unsigned.sign_after_simulation(&evidence, signers.as_slice())?; +signed.verify_signatures()?; +``` + +Le transport RPC reste extérieur : cette crate ne récupère pas le blockhash, ne charge pas le compte nonce et n’envoie pas le payload signé. + +## Assemblage à recent blockhash + +### `build_legacy_transaction(plan, recent_blockhash)` + +Construit une transaction legacy non signée à partir d’un blockhash base58 obtenu par `getLatestBlockhash`. + +La fonction vérifie : + +- la politique `ExecutionBlockhashKind::Latest` ; +- les public keys et le blockhash ; +- la présence d’au moins une instruction ; +- l’égalité exacte entre signataires déclarés et signataires compilés ; +- la limite wire Solana de 1 232 octets. + +Un plan `DurableNonce` est refusé et doit utiliser le chemin dédié. + +## Lecture et validation d’un compte nonce + +### `durable_nonce_account_data_length()` + +Retourne la taille wire officielle d’un compte nonce, actuellement 80 octets. Cette valeur doit être utilisée comme limite exacte d’un appel `getAccountInfo` avec données complètes. + +### `parse_durable_nonce_account(account, owner, executable, space, data)` + +Décode l’état officiel `solana_nonce::versions::Versions` avec `wincode::deserialize_exact` et produit un `DurableNonceAccountState` uniquement lorsque toutes les conditions suivantes sont satisfaites : + +- adresse du compte valide ; +- owner égal au System Program ; +- compte non exécutable ; +- `space` et longueur décodée égaux à la taille officielle ; +- version `Current` ; +- état `Initialized` ; +- autorité et valeur nonce extraites sans approximation. + +Les états `Legacy`, `Uninitialized`, tronqués, suffixés ou possédés par un autre programme sont refusés. `DurableNonceAccountState` expose uniquement l’adresse, l’autorité, la valeur nonce utilisée comme blockhash et le coût par signature stocké dans l’état. + +Le chargement réseau reste extérieur à cette crate. Le contrat RPC prévu est : + +```rust +let config = kb_rpc::GetAccountInfoConfig::confirmed_with_data( + kb_execution_solana::durable_nonce_account_data_length(), +)?; +``` + +## Assemblage durable nonce + +### `build_durable_nonce_transaction(plan, nonce_state)` + +Construit une transaction non signée qui consomme l’état nonce validé. + +La fonction exige : + +- une politique `ExecutionBlockhashKind::DurableNonce` sans âge de blockhash récent ; +- le même compte nonce dans la politique et dans l’état validé ; +- la même autorité dans la politique et dans l’état validé ; +- l’autorité nonce dans `required_signers` ; +- au moins une instruction métier à exécuter après l’avance nonce. + +L’assemblage utilise `Message::new_with_nonce`, place l’instruction officielle `AdvanceNonceAccount` en position zéro, puis remplace le champ `recent_blockhash` par la valeur nonce extraite de l’état. Le plan d’origine n’est pas muté : `UnsignedSolanaTransaction::plan()` expose un plan effectif cloné contenant l’instruction injectée. + +Après compilation, la crate vérifie : + +- la reconnaissance de la transaction par `solana_transaction::uses_durable_nonce` ; +- l’égalité exacte entre signataires déclarés et signataires compilés ; +- la taille wire ; +- le hash du message et la valeur nonce effectivement compilée. + +Les opérations de gestion du compte nonce elles-mêmes, telles que `initialize`, `authorize`, `withdraw` ou `upgrade`, restent des transactions ordinaires à recent blockhash. Elles ne passent pas par ce chemin. + +## Simulation et signature + +### `UnsignedSolanaTransaction` + +Expose : + +- le plan effectif ; +- le hash exact du message ; +- le recent blockhash ou la valeur nonce compilée ; +- l’ordre exact des signataires ; +- le message base64 pour `getFeeForMessage` ; +- la transaction non signée base64 pour `simulateTransaction` avec `sigVerify = false` et `replaceRecentBlockhash = false`. + +### `bind_simulation(result)` + +Lie le résultat typé de simulation au hash du message **et** au blockhash/nonce compilé. Une simulation utilisant un autre message, une autre source de blockhash ou un blockhash de remplacement ne peut pas autoriser la signature. + +### `sign_after_simulation(evidence, signers)` + +Réévalue `kb_execution_safety`, exige une décision `Allow`, résout exactement tous les signataires via `&dyn solana_signer::Signer`, signe puis vérifie que la transaction est complète. + +Les signataires manquants, supplémentaires ou dupliqués sont refusés. La fonction ne contacte aucun endpoint RPC et n’envoie rien. + +### `SignedSolanaTransaction` + +Expose uniquement des données non secrètes : + +- hash du message ; +- signature primaire ; +- public keys des signataires ; +- taille wire ; +- payload base64 signé ; +- vérification locale des signatures. + +Le payload signé reste côté backend. Il ne doit pas être transféré automatiquement à Tauri. `kb_rpc::HttpClient::send_transaction` et sa variante pool imposent le preflight et refusent une signature RPC différente de la signature primaire locale. diff --git a/olddocs/archivekbot2/kb_executor_adapter_saber_decimal_wrapper/README.md b/olddocs/archivekbot2/kb_executor_adapter_saber_decimal_wrapper/README.md new file mode 100644 index 0000000..41694cd --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_adapter_saber_decimal_wrapper/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_adapter_saber_decimal_wrapper + +Ce crate réserve l'exécuteur de la surface `adapter_saber_decimal_wrapper`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_admin_jupiter_lock/README.md b/olddocs/archivekbot2/kb_executor_admin_jupiter_lock/README.md new file mode 100644 index 0000000..e481d94 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_admin_jupiter_lock/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_admin_jupiter_lock + +Ce crate réserve l'exécuteur de la surface `admin_jupiter_lock`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_admin_pump_fees/README.md b/olddocs/archivekbot2/kb_executor_admin_pump_fees/README.md new file mode 100644 index 0000000..ec315f6 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_admin_pump_fees/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_admin_pump_fees + +Ce crate réserve l'exécuteur de la surface `admin_pump_fees`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_aldrin_v1/README.md b/olddocs/archivekbot2/kb_executor_amm_aldrin_v1/README.md new file mode 100644 index 0000000..ac2b2f5 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_aldrin_v1/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_aldrin_v1 + +Ce crate réserve l'exécuteur de la surface `amm_aldrin_v1`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_aldrin_v2/README.md b/olddocs/archivekbot2/kb_executor_amm_aldrin_v2/README.md new file mode 100644 index 0000000..4691508 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_aldrin_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_aldrin_v2 + +Ce crate réserve l'exécuteur de la surface `amm_aldrin_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_alphaq/README.md b/olddocs/archivekbot2/kb_executor_amm_alphaq/README.md new file mode 100644 index 0000000..515635e --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_alphaq/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_alphaq + +Ce crate réserve l'exécuteur de la surface `amm_alphaq`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_believe/README.md b/olddocs/archivekbot2/kb_executor_amm_believe/README.md new file mode 100644 index 0000000..7ce4aba --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_believe/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_believe + +Ce crate réserve l'exécuteur de la surface `amm_believe`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_bonk_swap/README.md b/olddocs/archivekbot2/kb_executor_amm_bonk_swap/README.md new file mode 100644 index 0000000..6bb0c93 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_bonk_swap/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_bonk_swap + +Ce crate réserve l'exécuteur de la surface `amm_bonk_swap`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_fluxbeam/README.md b/olddocs/archivekbot2/kb_executor_amm_fluxbeam/README.md new file mode 100644 index 0000000..c001614 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_fluxbeam/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_fluxbeam + +Ce crate réserve l'exécuteur de la surface `amm_fluxbeam`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_goon_fi/README.md b/olddocs/archivekbot2/kb_executor_amm_goon_fi/README.md new file mode 100644 index 0000000..d8ebb6f --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_goon_fi/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_goon_fi + +Ce crate réserve l'exécuteur de la surface `amm_goon_fi`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_goosefx_gamma/README.md b/olddocs/archivekbot2/kb_executor_amm_goosefx_gamma/README.md new file mode 100644 index 0000000..b80b23c --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_goosefx_gamma/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_goosefx_gamma + +Ce crate réserve l'exécuteur de la surface `amm_goosefx_gamma`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_goosefx_v2/README.md b/olddocs/archivekbot2/kb_executor_amm_goosefx_v2/README.md new file mode 100644 index 0000000..8b11a1c --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_goosefx_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_goosefx_v2 + +Ce crate réserve l'exécuteur de la surface `amm_goosefx_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_guac_swap/README.md b/olddocs/archivekbot2/kb_executor_amm_guac_swap/README.md new file mode 100644 index 0000000..e90adbf --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_guac_swap/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_guac_swap + +Ce crate réserve l'exécuteur de la surface `amm_guac_swap`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_lifinity_swap_v2/README.md b/olddocs/archivekbot2/kb_executor_amm_lifinity_swap_v2/README.md new file mode 100644 index 0000000..651344f --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_lifinity_swap_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_lifinity_swap_v2 + +Ce crate réserve l'exécuteur de la surface `amm_lifinity_swap_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_metadao_futarchy_amm/README.md b/olddocs/archivekbot2/kb_executor_amm_metadao_futarchy_amm/README.md new file mode 100644 index 0000000..03e2ef9 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_metadao_futarchy_amm/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_metadao_futarchy_amm + +Ce crate réserve l'exécuteur de la surface `amm_metadao_futarchy_amm`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_metadao_v0_5/README.md b/olddocs/archivekbot2/kb_executor_amm_metadao_v0_5/README.md new file mode 100644 index 0000000..835035a --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_metadao_v0_5/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_metadao_v0_5 + +Ce crate réserve l'exécuteur de la surface `amm_metadao_v0_5`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_meteora_damm_v1/README.md b/olddocs/archivekbot2/kb_executor_amm_meteora_damm_v1/README.md new file mode 100644 index 0000000..eeab38f --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_meteora_damm_v1/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_meteora_damm_v1 + +Ce crate réserve l'exécuteur de la surface `amm_meteora_damm_v1`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_meteora_damm_v2/README.md b/olddocs/archivekbot2/kb_executor_amm_meteora_damm_v2/README.md new file mode 100644 index 0000000..1fa749d --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_meteora_damm_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_meteora_damm_v2 + +Ce crate réserve l'exécuteur de la surface `amm_meteora_damm_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_obric_v2/README.md b/olddocs/archivekbot2/kb_executor_amm_obric_v2/README.md new file mode 100644 index 0000000..06a1a75 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_obric_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_obric_v2 + +Ce crate réserve l'exécuteur de la surface `amm_obric_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_one_dex/README.md b/olddocs/archivekbot2/kb_executor_amm_one_dex/README.md new file mode 100644 index 0000000..c960f20 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_one_dex/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_one_dex + +Ce crate réserve l'exécuteur de la surface `amm_one_dex`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_pump_swap/README.md b/olddocs/archivekbot2/kb_executor_amm_pump_swap/README.md new file mode 100644 index 0000000..54c6f11 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_pump_swap/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_pump_swap + +Ce crate réserve l'exécuteur de la surface `amm_pump_swap`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_raydium_lp_v4/README.md b/olddocs/archivekbot2/kb_executor_amm_raydium_lp_v4/README.md new file mode 100644 index 0000000..ebabd4a --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_raydium_lp_v4/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_raydium_lp_v4 + +Ce crate réserve l'exécuteur de la surface `amm_raydium_lp_v4`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_solfi/README.md b/olddocs/archivekbot2/kb_executor_amm_solfi/README.md new file mode 100644 index 0000000..dde2cb1 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_solfi/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_solfi + +Ce crate réserve l'exécuteur de la surface `amm_solfi`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_solfi_v2/README.md b/olddocs/archivekbot2/kb_executor_amm_solfi_v2/README.md new file mode 100644 index 0000000..442135a --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_solfi_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_solfi_v2 + +Ce crate réserve l'exécuteur de la surface `amm_solfi_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_vertigo/README.md b/olddocs/archivekbot2/kb_executor_amm_vertigo/README.md new file mode 100644 index 0000000..fba391c --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_vertigo/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_vertigo + +Ce crate réserve l'exécuteur de la surface `amm_vertigo`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_virtuals/README.md b/olddocs/archivekbot2/kb_executor_amm_virtuals/README.md new file mode 100644 index 0000000..5584f91 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_virtuals/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_virtuals + +Ce crate réserve l'exécuteur de la surface `amm_virtuals`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_woofi/README.md b/olddocs/archivekbot2/kb_executor_amm_woofi/README.md new file mode 100644 index 0000000..a6afd55 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_woofi/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_woofi + +Ce crate réserve l'exécuteur de la surface `amm_woofi`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_zero_fi/README.md b/olddocs/archivekbot2/kb_executor_amm_zero_fi/README.md new file mode 100644 index 0000000..f22b74d --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_zero_fi/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_zero_fi + +Ce crate réserve l'exécuteur de la surface `amm_zero_fi`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_amm_zora/README.md b/olddocs/archivekbot2/kb_executor_amm_zora/README.md new file mode 100644 index 0000000..e862587 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_amm_zora/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_amm_zora + +Ce crate réserve l'exécuteur de la surface `amm_zora`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_bridge_circle_cctp_token_messenger_minter/README.md b/olddocs/archivekbot2/kb_executor_bridge_circle_cctp_token_messenger_minter/README.md new file mode 100644 index 0000000..0fbea15 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_bridge_circle_cctp_token_messenger_minter/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_bridge_circle_cctp_token_messenger_minter + +Ce crate réserve l'exécuteur de la surface `bridge_circle_cctp_token_messenger_minter`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_bridge_circle_cctp_token_messenger_minter_v2/README.md b/olddocs/archivekbot2/kb_executor_bridge_circle_cctp_token_messenger_minter_v2/README.md new file mode 100644 index 0000000..305623a --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_bridge_circle_cctp_token_messenger_minter_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_bridge_circle_cctp_token_messenger_minter_v2 + +Ce crate réserve l'exécuteur de la surface `bridge_circle_cctp_token_messenger_minter_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_bridge_layer_zero_endpoint/README.md b/olddocs/archivekbot2/kb_executor_bridge_layer_zero_endpoint/README.md new file mode 100644 index 0000000..f536410 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_bridge_layer_zero_endpoint/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_bridge_layer_zero_endpoint + +Ce crate réserve l'exécuteur de la surface `bridge_layer_zero_endpoint`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_bridge_layer_zero_executor/README.md b/olddocs/archivekbot2/kb_executor_bridge_layer_zero_executor/README.md new file mode 100644 index 0000000..c44c9cf --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_bridge_layer_zero_executor/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_bridge_layer_zero_executor + +Ce crate réserve l'exécuteur de la surface `bridge_layer_zero_executor`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_clmm_byreal/README.md b/olddocs/archivekbot2/kb_executor_clmm_byreal/README.md new file mode 100644 index 0000000..494cd66 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_clmm_byreal/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_clmm_byreal + +Ce crate réserve l'exécuteur de la surface `clmm_byreal`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_clmm_fusion/README.md b/olddocs/archivekbot2/kb_executor_clmm_fusion/README.md new file mode 100644 index 0000000..b5fbb99 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_clmm_fusion/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_clmm_fusion + +Ce crate réserve l'exécuteur de la surface `clmm_fusion`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_clmm_orca_whirlpool/README.md b/olddocs/archivekbot2/kb_executor_clmm_orca_whirlpool/README.md new file mode 100644 index 0000000..728d047 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_clmm_orca_whirlpool/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_clmm_orca_whirlpool + +Ce crate réserve l'exécuteur de la surface `clmm_orca_whirlpool`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_clmm_pancake_swap/README.md b/olddocs/archivekbot2/kb_executor_clmm_pancake_swap/README.md new file mode 100644 index 0000000..4f953bc --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_clmm_pancake_swap/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_clmm_pancake_swap + +Ce crate réserve l'exécuteur de la surface `clmm_pancake_swap`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_clmm_raydium/README.md b/olddocs/archivekbot2/kb_executor_clmm_raydium/README.md new file mode 100644 index 0000000..75b2076 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_clmm_raydium/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_clmm_raydium + +Ce crate réserve l'exécuteur de la surface `clmm_raydium`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_clmm_stabble/README.md b/olddocs/archivekbot2/kb_executor_clmm_stabble/README.md new file mode 100644 index 0000000..b573d12 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_clmm_stabble/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_clmm_stabble + +Ce crate réserve l'exécuteur de la surface `clmm_stabble`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_cpmm_raydium/README.md b/olddocs/archivekbot2/kb_executor_cpmm_raydium/README.md new file mode 100644 index 0000000..b5998c8 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_cpmm_raydium/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_cpmm_raydium + +Ce crate réserve l'exécuteur de la surface `cpmm_raydium`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_dlmm_meteora/README.md b/olddocs/archivekbot2/kb_executor_dlmm_meteora/README.md new file mode 100644 index 0000000..3d37343 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_dlmm_meteora/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_dlmm_meteora + +Ce crate réserve l'exécuteur de la surface `dlmm_meteora`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_fees_bags_fee_share_v1/README.md b/olddocs/archivekbot2/kb_executor_fees_bags_fee_share_v1/README.md new file mode 100644 index 0000000..e243c22 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_fees_bags_fee_share_v1/README.md @@ -0,0 +1,14 @@ + + + +# kb_executor_fees_bags_fee_share_v1 + +Ce crate réserve l'exécuteur de la surface `fees_bags_fee_share_v1`. + +## Rôle dans l'écosystème + +Il construira les plans d'exécution liés à Bags Fee Share lorsque les builders, simulations et garde-fous seront validés. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders et simulations dédiés ne sont pas validés. diff --git a/olddocs/archivekbot2/kb_executor_fees_bags_fee_share_v2/README.md b/olddocs/archivekbot2/kb_executor_fees_bags_fee_share_v2/README.md new file mode 100644 index 0000000..cdb1524 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_fees_bags_fee_share_v2/README.md @@ -0,0 +1,14 @@ + + + +# kb_executor_fees_bags_fee_share_v2 + +Ce crate réserve l'exécuteur de la surface `fees_bags_fee_share_v2`. + +## Rôle dans l'écosystème + +Il construira les plans d'exécution liés à Bags Fee Share lorsque les builders, simulations et garde-fous seront validés. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders et simulations dédiés ne sont pas validés. diff --git a/olddocs/archivekbot2/kb_executor_governance_metadao_bid_wall/README.md b/olddocs/archivekbot2/kb_executor_governance_metadao_bid_wall/README.md new file mode 100644 index 0000000..3507c22 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_governance_metadao_bid_wall/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_governance_metadao_bid_wall + +Ce crate réserve l'exécuteur de la surface `governance_metadao_bid_wall`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_launchpad_boop_fun/README.md b/olddocs/archivekbot2/kb_executor_launchpad_boop_fun/README.md new file mode 100644 index 0000000..ee941f5 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_launchpad_boop_fun/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_launchpad_boop_fun + +Ce crate réserve l'exécuteur de la surface `launchpad_boop_fun`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_launchpad_metadao_ico/README.md b/olddocs/archivekbot2/kb_executor_launchpad_metadao_ico/README.md new file mode 100644 index 0000000..b4b9956 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_launchpad_metadao_ico/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_launchpad_metadao_ico + +Ce crate réserve l'exécuteur de la surface `launchpad_metadao_ico`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_launchpad_meteora_dbc/README.md b/olddocs/archivekbot2/kb_executor_launchpad_meteora_dbc/README.md new file mode 100644 index 0000000..84ad365 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_launchpad_meteora_dbc/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_launchpad_meteora_dbc + +Ce crate réserve l'exécuteur de la surface `launchpad_meteora_dbc`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_launchpad_moonit/README.md b/olddocs/archivekbot2/kb_executor_launchpad_moonit/README.md new file mode 100644 index 0000000..e8afa22 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_launchpad_moonit/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_launchpad_moonit + +Ce crate réserve l'exécuteur de la surface `launchpad_moonit`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_launchpad_orca_wavebreak/README.md b/olddocs/archivekbot2/kb_executor_launchpad_orca_wavebreak/README.md new file mode 100644 index 0000000..a8a049f --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_launchpad_orca_wavebreak/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_launchpad_orca_wavebreak + +Ce crate réserve l'exécuteur de la surface `launchpad_orca_wavebreak`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_launchpad_printr/README.md b/olddocs/archivekbot2/kb_executor_launchpad_printr/README.md new file mode 100644 index 0000000..76f3a39 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_launchpad_printr/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_launchpad_printr + +Ce crate réserve l'exécuteur de la surface `launchpad_printr`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_launchpad_pump_fun/README.md b/olddocs/archivekbot2/kb_executor_launchpad_pump_fun/README.md new file mode 100644 index 0000000..28b7500 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_launchpad_pump_fun/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_launchpad_pump_fun + +Ce crate réserve l'exécuteur de la surface `launchpad_pump_fun`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_launchpad_pump_pumpup_ai/README.md b/olddocs/archivekbot2/kb_executor_launchpad_pump_pumpup_ai/README.md new file mode 100644 index 0000000..c8257b2 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_launchpad_pump_pumpup_ai/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_launchpad_pump_pumpup_ai + +Ce crate réserve l'exécuteur de la surface `launchpad_pump_pumpup_ai`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_launchpad_raydium_launchlab/README.md b/olddocs/archivekbot2/kb_executor_launchpad_raydium_launchlab/README.md new file mode 100644 index 0000000..ea1bf8c --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_launchpad_raydium_launchlab/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_launchpad_raydium_launchlab + +Ce crate réserve l'exécuteur de la surface `launchpad_raydium_launchlab`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_lending_clone/README.md b/olddocs/archivekbot2/kb_executor_lending_clone/README.md new file mode 100644 index 0000000..74ef499 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_lending_clone/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_lending_clone + +Ce crate réserve l'exécuteur de la surface `lending_clone`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_borrow/README.md b/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_borrow/README.md new file mode 100644 index 0000000..07f0f8f --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_borrow/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_lending_jupiter_lend_borrow + +Ce crate réserve l'exécuteur de la surface `lending_jupiter_lend_borrow`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_earn/README.md b/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_earn/README.md new file mode 100644 index 0000000..f64140c --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_earn/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_lending_jupiter_lend_earn + +Ce crate réserve l'exécuteur de la surface `lending_jupiter_lend_earn`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_flash_loan/README.md b/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_flash_loan/README.md new file mode 100644 index 0000000..4fe0d61 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_flash_loan/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_lending_jupiter_lend_flash_loan + +Ce crate réserve l'exécuteur de la surface `lending_jupiter_lend_flash_loan`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_liquidity/README.md b/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_liquidity/README.md new file mode 100644 index 0000000..0577d4b --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_lending_jupiter_lend_liquidity/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_lending_jupiter_lend_liquidity + +Ce crate réserve l'exécuteur de la surface `lending_jupiter_lend_liquidity`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_lending_kamino/README.md b/olddocs/archivekbot2/kb_executor_lending_kamino/README.md new file mode 100644 index 0000000..b7f9879 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_lending_kamino/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_lending_kamino + +Ce crate réserve l'exécuteur de la surface `lending_kamino`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_lending_marginfi_v2/README.md b/olddocs/archivekbot2/kb_executor_lending_marginfi_v2/README.md new file mode 100644 index 0000000..86f8706 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_lending_marginfi_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_lending_marginfi_v2 + +Ce crate réserve l'exécuteur de la surface `lending_marginfi_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_lock_raydium_lp/README.md b/olddocs/archivekbot2/kb_executor_lock_raydium_lp/README.md new file mode 100644 index 0000000..7b25181 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_lock_raydium_lp/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_lock_raydium_lp + +Ce crate réserve l'exécuteur de la surface `lock_raydium_lp`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_metadata_metaplex_token_metadata/README.md b/olddocs/archivekbot2/kb_executor_metadata_metaplex_token_metadata/README.md new file mode 100644 index 0000000..d6eb75d --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_metadata_metaplex_token_metadata/README.md @@ -0,0 +1,15 @@ + + + +# `kb_executor_metadata_metaplex_token_metadata` + +Exécuteur dédié au programme Metaplex Token Metadata. + +La crate suit la frontière commune des exécuteurs du workspace : + +- `constants.rs` contient les constantes locales et la cible de tracing ; +- `executor.rs` expose `MetadataMetaplexTokenMetadataExecutor` et implémente `kb_execution_api::InstructionExecutor` ; +- `lib.rs` réexporte uniquement le type public ; +- le Program ID provient exclusivement de `kb_program_ids`. + +Dans `0.4.7-pre.001`, le support exact du Program ID retourne encore `Maybe`. `build_plan` produit uniquement un plan réservé sans instruction afin qu'aucune opération Metaplex ne puisse être exécutée avant validation complète des builders officiels, comptes ordonnés, autorités, signataires, préconditions, coûts, confirmations et postconditions stateful. diff --git a/olddocs/archivekbot2/kb_executor_metadata_spl_name_service/README.md b/olddocs/archivekbot2/kb_executor_metadata_spl_name_service/README.md new file mode 100644 index 0000000..d80e0c7 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_metadata_spl_name_service/README.md @@ -0,0 +1,14 @@ + + + +# kb_executor_metadata_spl_name_service + +Ce crate réserve l’exécuteur pour le programme SPL Name Service. + +## Rôle + +Il construira des instructions ou plans d’exécution indépendamment du décodeur correspondant. Le scaffold actuel ne signe, ne simule et n’envoie aucune transaction. + +## Statut + +L’exécuteur reconnaît uniquement ses program IDs vérifiés et retourne un plan réservé contenant zéro instruction. Les builders, contrôles de comptes, simulations et garde-fous seront ajoutés dans la version SPL dédiée du `ROADMAP.md`. diff --git a/olddocs/archivekbot2/kb_executor_nft_metaplex_bubblegum/README.md b/olddocs/archivekbot2/kb_executor_nft_metaplex_bubblegum/README.md new file mode 100644 index 0000000..ed7c946 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_nft_metaplex_bubblegum/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_nft_metaplex_bubblegum + +Ce crate réserve l'exécuteur de la surface `nft_metaplex_bubblegum`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_orderbook_jupiter_limit_order/README.md b/olddocs/archivekbot2/kb_executor_orderbook_jupiter_limit_order/README.md new file mode 100644 index 0000000..f638ce0 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_orderbook_jupiter_limit_order/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_orderbook_jupiter_limit_order + +Ce crate réserve l'exécuteur de la surface `orderbook_jupiter_limit_order`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_orderbook_jupiter_limit_order_v2/README.md b/olddocs/archivekbot2/kb_executor_orderbook_jupiter_limit_order_v2/README.md new file mode 100644 index 0000000..4eb7016 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_orderbook_jupiter_limit_order_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_orderbook_jupiter_limit_order_v2 + +Ce crate réserve l'exécuteur de la surface `orderbook_jupiter_limit_order_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_orderbook_openbook_v2/README.md b/olddocs/archivekbot2/kb_executor_orderbook_openbook_v2/README.md new file mode 100644 index 0000000..73f5933 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_orderbook_openbook_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_orderbook_openbook_v2 + +Ce crate réserve l'exécuteur de la surface `orderbook_openbook_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_perpetuals_drift_v2/README.md b/olddocs/archivekbot2/kb_executor_perpetuals_drift_v2/README.md new file mode 100644 index 0000000..edd88bc --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_perpetuals_drift_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_perpetuals_drift_v2 + +Ce crate réserve l'exécuteur de la surface `perpetuals_drift_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_perpetuals_jupiter/README.md b/olddocs/archivekbot2/kb_executor_perpetuals_jupiter/README.md new file mode 100644 index 0000000..90de274 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_perpetuals_jupiter/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_perpetuals_jupiter + +Ce crate réserve l'exécuteur de la surface `perpetuals_jupiter`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_perpetuals_zeta/README.md b/olddocs/archivekbot2/kb_executor_perpetuals_zeta/README.md new file mode 100644 index 0000000..6e44392 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_perpetuals_zeta/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_perpetuals_zeta + +Ce crate réserve l'exécuteur de la surface `perpetuals_zeta`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_router_dflow_aggregator_v4/README.md b/olddocs/archivekbot2/kb_executor_router_dflow_aggregator_v4/README.md new file mode 100644 index 0000000..34080fd --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_router_dflow_aggregator_v4/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_router_dflow_aggregator_v4 + +Ce crate réserve l'exécuteur de la surface `router_dflow_aggregator_v4`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_router_jupiter_aggregator_v4/README.md b/olddocs/archivekbot2/kb_executor_router_jupiter_aggregator_v4/README.md new file mode 100644 index 0000000..412695e --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_router_jupiter_aggregator_v4/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_router_jupiter_aggregator_v4 + +Ce crate réserve l'exécuteur de la surface `router_jupiter_aggregator_v4`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_router_jupiter_aggregator_v6/README.md b/olddocs/archivekbot2/kb_executor_router_jupiter_aggregator_v6/README.md new file mode 100644 index 0000000..f67e99a --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_router_jupiter_aggregator_v6/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_router_jupiter_aggregator_v6 + +Ce crate réserve l'exécuteur de la surface `router_jupiter_aggregator_v6`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_router_jupiter_dca/README.md b/olddocs/archivekbot2/kb_executor_router_jupiter_dca/README.md new file mode 100644 index 0000000..225c87e --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_router_jupiter_dca/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_router_jupiter_dca + +Ce crate réserve l'exécuteur de la surface `router_jupiter_dca`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_router_okx_labs_v1/README.md b/olddocs/archivekbot2/kb_executor_router_okx_labs_v1/README.md new file mode 100644 index 0000000..fef2613 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_router_okx_labs_v1/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_router_okx_labs_v1 + +Ce crate réserve l'exécuteur de la surface `router_okx_labs_v1`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_router_okx_labs_v2/README.md b/olddocs/archivekbot2/kb_executor_router_okx_labs_v2/README.md new file mode 100644 index 0000000..e7536ba --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_router_okx_labs_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_router_okx_labs_v2 + +Ce crate réserve l'exécuteur de la surface `router_okx_labs_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_rwa_ondo_global_markets/README.md b/olddocs/archivekbot2/kb_executor_rwa_ondo_global_markets/README.md new file mode 100644 index 0000000..61d3c64 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_rwa_ondo_global_markets/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_rwa_ondo_global_markets + +Ce crate réserve l'exécuteur de la surface `rwa_ondo_global_markets`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_solana_core/README.md b/olddocs/archivekbot2/kb_executor_solana_core/README.md new file mode 100644 index 0000000..20dc88b --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_solana_core/README.md @@ -0,0 +1,915 @@ + + + +# kb_executor_solana_core + +Cette crate construit des plans d’instructions déterministes pour les dix-huit surfaces du registre natif `solana_core`. Elle expose actuellement 109 opérations : dix-sept System, quatre Compute Budget, cinq Address Lookup Table, six formes de vérification par précompile, deux opérations Config, deux opérations Feature, deux opérations Slashing, trois opérations ZK ElGamal, vingt-quatre opérations Stake, vingt-quatre opérations Vote, onze opérations Loader v3 et neuf opérations Loader v4. Les comptes natifs non exécutables, notamment Stake Config, en sont exclus. L’ancien ZK Token Proof, BPF Loader v1/v2 et Stake Redelegate sont conservés comme surfaces historiques de décodage seulement; Native Loader n’expose pas de builder transactionnel client. + +Elle ne charge aucun wallet, ne signe rien, n’appelle aucun RPC et n’envoie aucune transaction. Les opérations dangereuses restent des capacités de bibliothèque : leur exposition éventuelle relève de l’orchestrateur ou de l’application appelante. + +## API publique + +### `SolanaCoreExecutor` + +`SolanaCoreExecutor` implémente deux contrats : + +- `kb_execution_api::TypedInstructionExecutor` pour l’API typée actuelle ; +- `kb_execution_api::InstructionExecutor` pour le pont historique fondé sur un payload JSON. + +| Fonction | Paramètres | Résultat | Rôle | +|-------------------------------------------------|--------------------------------------------------|------------------------------------------|------------------------------------------------------------------------------------------------------------------| +| `TypedInstructionExecutor::capability` | `program_id: &ProgramId`, `operation_code: &str` | `ExecutionCapability` | Indique exactement si le couple programme/opération possède un builder. | +| `TypedInstructionExecutor::build_prepared_plan` | `intent: &SolanaCoreExecutionIntent` | `kb_core::Result` | Valide l’intent, construit l’instruction officielle et déclare comptes, signataires, coût et politique. | +| `InstructionExecutor::program_ids` | aucun | `&'static [&'static str]` | Retourne les dix-huit program IDs natifs classifiés par la crate. | +| `InstructionExecutor::supports_request` | `request: &ExecutionRequest` | `ExecutionSupport` | Pont historique exact `Yes/No`, sans état `Maybe`. | +| `InstructionExecutor::build_plan` | `request: &ExecutionRequest` | `kb_core::Result` | Désérialise un `SolanaCoreExecutionIntent`, construit le plan typé puis le sérialise dans le contrat historique. | + +### Types et constantes réexportés + +| Export | Usage | +|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| +| `SolanaCoreExecutor` | Point d’entrée stateless pour interroger une capacité et construire un plan. | +| `SolanaCoreExecutionIntent` | Enveloppe complète contenant identifiant, fee payer, politique et opération typée. | +| `SolanaCoreOperation` | Enum des opérations System, Compute Budget, Address Lookup Table, précompiles, Config, Feature, Slashing, ZK ElGamal, Stake, Vote et Loaders disponibles. | +| `SystemTransferRecipient` | Destination ordonnée d’un `SystemTransferMany`. | +| `Ed25519VerificationOffsets` | Table d’offsets Ed25519, avec `u16::MAX` comme référence aux données de l’instruction courante. | +| `Secp256k1VerificationOffsets` | Table d’offsets secp256k1 utilisant des index d’instructions `u8` explicites. | +| `Secp256r1VerificationOffsets` | Table d’offsets secp256r1, avec `u16::MAX` comme référence aux données de l’instruction courante. | +| `SYSTEM_*_OPERATION` | Codes stables des dix-sept opérations System, utilisables dans les registries, logs et ponts historiques. | +| `COMPUTE_BUDGET_*_OPERATION` | Codes stables des quatre opérations Compute Budget actuelles. | +| `ADDRESS_LOOKUP_TABLE_*_OPERATION` | Codes stables des cinq opérations Address Lookup Table. | +| `ED25519_*_OPERATION`, `SECP256K1_*_OPERATION`, `SECP256R1_*_OPERATION` | Codes stables des six formes inline/offsets des précompiles de signature. | +| `CONFIG_*_OPERATION`, `FEATURE_*_OPERATION`, `SLASHING_*_OPERATION`, `ZK_ELGAMAL_*_OPERATION` | Codes stables des neuf opérations natives ajoutées dans `pre.017`. | +| `ConfigKey` | Entrée ordonnée de la liste `ConfigKeys`, avec rôle de signataire explicite. | +| `ZkElGamalProofType` | Douze discriminants de preuve ZK ElGamal et tailles POD officielles. | +| `ZkElGamalContextState` | Compte de contexte préalloué et autorité enregistrée par la preuve. | +| `StakeAuthorizationKind` | Sélectionne l’autorité `staker` ou `withdrawer` dans les builders Stake authorize. | +| `STAKE_*_OPERATION` | Codes stables des vingt-quatre helpers clients Stake actuels. | +| `VoteAuthorizationKind` | Sélectionne l’autorité Vote `voter`, `withdrawer` ou `voter_with_bls` avec tailles BLS bornées. | +| `VoteCommissionKind` | Sélectionne la commission Vote v2 d’inflation ou de revenu de bloc. | +| `VoteLockout` | Entrée de tour typée contenant slot et confirmation count. | +| `VOTE_*_OPERATION` | Codes stables des vingt-quatre opérations Vote actuelles. | +| `LOADER_V3_*_OPERATION` | Codes stables des onze plans Loader v3. | +| `LOADER_V4_*_OPERATION` | Codes stables des neuf plans Loader v4. | + +Les modules internes ne sont pas publics. Les appelants utilisent les réexports de `lib.rs` et les traits de `kb_execution_api`. Le module privé `validation` centralise le parsing des `Pubkey`, les IDs natifs, les contrôles de longueur, de montants positifs, de comptes distincts, de dérivation seedée et la construction d’erreurs partagées ; les modules de programme conservent uniquement leurs règles et libellés métier. + +## Contrat d’intent et résultat + +Toutes les opérations utilisent : + +```rust +SolanaCoreExecutionIntent { + intent_id, + fee_payer, + policy, + operation, +} +``` + +- `intent_id` : identifiant stable fourni par l’appelant pour les logs et la corrélation ; +- `fee_payer` : compte qui paiera les frais de transaction ; +- `policy` : `ExecutionPolicy` évaluée séparément par `kb_execution_safety` ; +- `operation` : variante typée de `SolanaCoreOperation`. + +Le résultat `PreparedExecutionPlan` contient : + +- l’exécuteur et sa version ; +- le code d’opération ; +- le fee payer ; +- les instructions encodées dans leur ordre final ; +- les comptes ordonnés avec flags signer/writable ; +- les signataires requis dédupliqués et leur rôle ; +- la politique de cluster, simulation, blockhash/nonce et plafonds ; +- le nombre de lamports explicitement dépensés ou verrouillés ; +- le prix Compute Budget demandé, lorsqu’il existe. + +### Exemple minimal + +```rust +let executor = kb_executor_solana_core::SolanaCoreExecutor; +let intent = kb_executor_solana_core::SolanaCoreExecutionIntent { + intent_id: std::string::String::from("compute-budget-limit-1"), + fee_payer: payer.clone(), + policy, + operation: kb_executor_solana_core::SolanaCoreOperation::ComputeBudgetSetUnitLimit { + units: 500_000, + }, +}; +let plan = kb_execution_api::TypedInstructionExecutor::build_prepared_plan( + &executor, + &intent, +)?; +``` + +Le plan doit ensuite passer par `kb_execution_safety`, `kb_execution_solana` et le RPC. Cet exemple ne signe et n’envoie rien. + +## Opérations actuellement constructibles + +Cent neuf opérations disposent d’un builder : dix-sept System, quatre Compute Budget, cinq Address Lookup Table, six précompiles de signature, neuf Config/Feature/Slashing/ZK ElGamal, vingt-quatre Stake, vingt-quatre Vote, onze Loader v3 et neuf Loader v4. + +### `solana_core.system.transfer` + +```rust +SolanaCoreOperation::SystemTransfer { from, to, lamports } +``` + +| Paramètre | Type | Description | +|------------|----------|-----------------------------------------| +| `from` | `Pubkey` | Compte source writable et signataire. | +| `to` | `Pubkey` | Compte destinataire writable. | +| `lamports` | `u64` | Montant transféré, strictement positif. | + +**Résultat et effet :** une instruction System `Transfer`. Le plan exige `from`, ajoute le fee payer si nécessaire et reporte `lamports` dans `requested_spend_lamports`. + +### `solana_core.system.transfer_many` + +```rust +SolanaCoreOperation::SystemTransferMany { + from, + recipients: Vec, +} +``` + +**Résultat et effet :** un vecteur ordonné d’instructions officielles System `Transfer`, une par destinataire. La liste doit être non vide, chaque montant est strictement positif, chaque destination diffère de `from` et la somme est calculée avec détection de dépassement `u64`. Le plan déclare un seul signataire source et reporte la somme dans `requested_spend_lamports`. La taille wire finale reste contrôlée lors de l’assemblage de transaction. + +### `solana_core.system.transfer_with_seed` + +```rust +SolanaCoreOperation::SystemTransferWithSeed { + from, + from_base, + from_seed, + from_owner, + to, + lamports, +} +``` + +| Paramètre | Type | Description | +|--------------|----------|------------------------------------------------------------| +| `from` | `Pubkey` | Compte source dérivé, writable mais non signataire direct. | +| `from_base` | `Pubkey` | Base de dérivation et signataire requis. | +| `from_seed` | `String` | Seed utilisé pour dériver `from`. | +| `from_owner` | `Pubkey` | Owner utilisé dans la dérivation de `from`. | +| `to` | `Pubkey` | Destinataire writable. | +| `lamports` | `u64` | Montant strictement positif. | + +**Résultat et effet :** une instruction System `TransferWithSeed`. Le builder recalcule `Pubkey::create_with_seed(from_base, from_seed, from_owner)` et refuse l’intent si l’adresse obtenue diffère de `from`. + +### `solana_core.system.create_account` + +```rust +SolanaCoreOperation::SystemCreateAccount { + from, + new_account, + lamports, + space, + owner, +} +``` + +| Paramètre | Type | Description | +|---------------|----------|---------------------------------------------------------------------------------| +| `from` | `Pubkey` | Compte de financement writable et signataire. | +| `new_account` | `Pubkey` | Nouveau compte writable et signataire. | +| `lamports` | `u64` | Financement initial, strictement positif. | +| `space` | `u64` | Taille de données allouée ; zéro est valide pour un compte System sans données. | +| `owner` | `Pubkey` | Programme propriétaire après création. | + +**Résultat et effet :** une instruction officielle `CreateAccount` qui finance, alloue et assigne le compte. Le calcul du minimum rent-exempt appartient à la couche RPC/orchestration. + +### `solana_core.system.create_account_with_seed` + +```rust +SolanaCoreOperation::SystemCreateAccountWithSeed { + from, + new_account, + base, + seed, + lamports, + space, + owner, +} +``` + +| Paramètre | Type | Description | +|---------------|----------|------------------------------------------------------| +| `from` | `Pubkey` | Compte de financement writable et signataire. | +| `new_account` | `Pubkey` | Adresse créée à partir de `base`, `seed` et `owner`. | +| `base` | `Pubkey` | Base signataire ; elle peut être identique à `from`. | +| `seed` | `String` | Seed borné par l’interface Solana. | +| `lamports` | `u64` | Financement initial strictement positif. | +| `space` | `u64` | Taille allouée, zéro compris. | +| `owner` | `Pubkey` | Owner du compte et composant de sa dérivation. | + +**Résultat et effet :** une instruction `CreateAccountWithSeed`. Le builder recalcule l’adresse dérivée avant de construire le plan et déduplique `from`/`base` lorsqu’ils désignent le même signataire. + +### `solana_core.system.create_account_allow_prefund` + +```rust +SolanaCoreOperation::SystemCreateAccountAllowPrefund { + new_account, + payer, + lamports, + space, + owner, +} +``` + +| Paramètre | Type | Description | +|---------------|------------------|------------------------------------------------------------------| +| `new_account` | `Pubkey` | Compte préfinancé à créer, writable et toujours signataire. | +| `payer` | `Option` | Payer writable/signataire pour des lamports additionnels. | +| `lamports` | `u64` | Montant additionnel ; doit être zéro lorsque `payer` est absent. | +| `space` | `u64` | Taille de données à allouer, zéro compris. | +| `owner` | `Pubkey` | Programme propriétaire après création. | + +**Résultat et effet :** une instruction `CreateAccountAllowPrefund`, qui n’impose pas un solde initial nul. Cette opération peut verrouiller tout le solde existant dans le compte assigné ; elle doit être protégée par une politique appelante stricte et peut dépendre de l’activation runtime correspondante sur le cluster ciblé. + +### `solana_core.system.allocate` + +```rust +SolanaCoreOperation::SystemAllocate { account, space } +``` + +| Paramètre | Type | Description | +|-----------|----------|---------------------------------------| +| `account` | `Pubkey` | Compte System writable et signataire. | +| `space` | `u64` | Nouvelle taille strictement positive. | + +**Résultat et effet :** une instruction `Allocate`. Elle ne finance pas le compte et ne change pas son propriétaire. + +### `solana_core.system.allocate_with_seed` + +```rust +SolanaCoreOperation::SystemAllocateWithSeed { + account, + base, + seed, + space, + owner, +} +``` + +| Paramètre | Type | Description | +|-----------|----------|--------------------------------------------------------| +| `account` | `Pubkey` | Compte dérivé writable. | +| `base` | `Pubkey` | Base de dérivation et signataire requis. | +| `seed` | `String` | Seed de dérivation. | +| `space` | `u64` | Taille strictement positive. | +| `owner` | `Pubkey` | Owner utilisé dans la dérivation et assigné au compte. | + +**Résultat et effet :** une instruction `AllocateWithSeed`. L’adresse `account` est recalculée et validée avant construction. + +### `solana_core.system.assign` + +```rust +SolanaCoreOperation::SystemAssign { account, owner } +``` + +| Paramètre | Type | Description | +|-----------|----------|---------------------------------------| +| `account` | `Pubkey` | Compte System writable et signataire. | +| `owner` | `Pubkey` | Nouveau programme propriétaire. | + +**Résultat et effet :** une instruction `Assign`. Elle ne transfère aucun lamport et n’alloue aucune donnée. + +### `solana_core.system.assign_with_seed` + +```rust +SolanaCoreOperation::SystemAssignWithSeed { + account, + base, + seed, + owner, +} +``` + +| Paramètre | Type | Description | +|-----------|----------|------------------------------------------------------| +| `account` | `Pubkey` | Compte dérivé writable. | +| `base` | `Pubkey` | Base de dérivation et signataire requis. | +| `seed` | `String` | Seed de dérivation. | +| `owner` | `Pubkey` | Nouvel owner et composant de la dérivation attendue. | + +**Résultat et effet :** une instruction `AssignWithSeed`. Le builder refuse une adresse qui ne correspond pas exactement à `base + seed + owner`. + +### `solana_core.system.nonce.create` + +```rust +SolanaCoreOperation::SystemCreateNonceAccount { + from, + nonce_account, + authority, + lamports, +} +``` + +**Résultat et effet :** deux instructions officielles ordonnées : `CreateAccount` avec l’espace nonce officiel, puis `InitializeNonceAccount`. `from` et `nonce_account` signent ; `authority` est stockée dans l’état mais ne signe pas nécessairement la création. `lamports` doit être strictement positif et être calculé par l’orchestrateur avec `getMinimumBalanceForRentExemption`. + +### `solana_core.system.nonce.create_with_seed` + +```rust +SolanaCoreOperation::SystemCreateNonceAccountWithSeed { + from, + nonce_account, + base, + seed, + authority, + lamports, +} +``` + +**Résultat et effet :** deux instructions officielles `CreateAccountWithSeed` puis `InitializeNonceAccount`. Le builder recalcule `nonce_account = create_with_seed(base, seed, System Program)` et exige `from` ainsi que `base` lorsqu’ils diffèrent. + +### `solana_core.system.nonce.initialize` + +```rust +SolanaCoreOperation::SystemInitializeNonceAccount { + nonce_account, + authority, +} +``` + +**Résultat et effet :** une instruction wire officielle `InitializeNonceAccount` pour un compte System déjà créé, rent-exempt et non initialisé. L’interface 3.2 n’expose pas de helper public autonome ; la crate encode donc le type officiel `SystemInstruction` avec `wincode` et reproduit exactement les comptes sysvar attendus. Aucun signataire d’instruction n’est requis, hors fee payer du message. + +### `solana_core.system.nonce.advance` + +```rust +SolanaCoreOperation::SystemAdvanceNonceAccount { + nonce_account, + authority, +} +``` + +**Résultat et effet :** une instruction officielle `AdvanceNonceAccount`. L’autorité courante signe. Dans cette tranche, elle est une opération de lifecycle envoyée avec un recent blockhash normal ; elle ne constitue pas encore l’assemblage spécial d’une transaction utilisant la valeur nonce comme blockhash. + +### `solana_core.system.nonce.authorize` + +```rust +SolanaCoreOperation::SystemAuthorizeNonceAccount { + nonce_account, + authority, + new_authority, +} +``` + +**Résultat et effet :** une instruction officielle `AuthorizeNonceAccount`. L’autorité courante signe et la nouvelle autorité est enregistrée dans l’état. + +### `solana_core.system.nonce.withdraw` + +```rust +SolanaCoreOperation::SystemWithdrawNonceAccount { + nonce_account, + authority, + to, + lamports, +} +``` + +**Résultat et effet :** une instruction officielle `WithdrawNonceAccount`. L’autorité signe, le montant est reporté comme dépense explicite et doit laisser le compte rent-exempt ou le vider complètement ; cette contrainte d’état est validée par simulation/runtime. + +### `solana_core.system.nonce.upgrade` + +```rust +SolanaCoreOperation::SystemUpgradeNonceAccount { nonce_account } +``` + +**Résultat et effet :** une instruction officielle idempotente `UpgradeNonceAccount` sur un ancien état nonce. Aucun signataire d’instruction n’est requis, hors fee payer. + +Toutes les opérations de gestion nonce ci-dessus exigent `ExecutionBlockhashKind::Latest`. Elles administrent le compte avec une transaction ordinaire. Pour une opération métier utilisant réellement un durable nonce, l’exécuteur accepte une politique `DurableNonce`, exige compte et autorité, puis ajoute cette autorité aux signataires requis ; `kb_execution_solana` valide ensuite l’état on-chain et réalise l’assemblage spécial. + +### `solana_core.compute_budget.request_heap_frame` + +```rust +SolanaCoreOperation::ComputeBudgetRequestHeapFrame { bytes } +``` + +| Paramètre | Type | Description | +|-----------|-------|----------------------------------------------------------------------------------------------| +| `bytes` | `u32` | Taille demandée pour chaque heap de programme, entre 32 KiB et 256 KiB et multiple de 1 024. | + +**Résultat et effet :** une instruction officielle `RequestHeapFrame` sans compte ni signataire propre. La taille s’applique à chaque programme exécuté par la transaction, y compris les CPI. Le builder refuse les valeurs que le runtime classerait `InvalidInstructionData`. + +### `solana_core.compute_budget.set_compute_unit_limit` + +```rust +SolanaCoreOperation::ComputeBudgetSetUnitLimit { units } +``` + +| Paramètre | Type | Description | +|-----------|-------|-------------------------------------------------| +| `units` | `u32` | Limite demandée, comprise entre 1 et 1 400 000. | + +**Résultat et effet :** une instruction Compute Budget sans compte ni signataire propre. Elle doit être assemblée dans la transaction dont elle modifie la limite. + +### `solana_core.compute_budget.set_compute_unit_price` + +```rust +SolanaCoreOperation::ComputeBudgetSetUnitPrice { micro_lamports } +``` + +| Paramètre | Type | Description | +|------------------|-------|--------------------------------| +| `micro_lamports` | `u64` | Prix demandé par compute unit. | + +**Résultat et effet :** une instruction Compute Budget sans compte propre. Le plan reporte la valeur dans `requested_compute_unit_price_micro_lamports` afin que `kb_execution_safety` applique le plafond configuré. + +### `solana_core.compute_budget.set_loaded_accounts_data_size_limit` + +```rust +SolanaCoreOperation::ComputeBudgetSetLoadedAccountsDataSizeLimit { bytes } +``` + +| Paramètre | Type | Description | +|-----------|-------|----------------------------------------------------------------------------------| +| `bytes` | `u32` | Limite transactionnelle de données de comptes chargées, entre 1 octet et 64 MiB. | + +**Résultat et effet :** une instruction officielle `SetLoadedAccountsDataSizeLimit` sans compte ni signataire propre. Le runtime accepte une valeur non nulle puis borne la limite effective à 64 MiB ; l’exécuteur applique directement cette borne afin que le plan reflète exactement la limite utile. + +### Variantes non émises + +- `Unused` est un tag réservé et n’est pas une opération client. +- `RequestUnitsDeprecated` reste couvert par `kb_decoder_solana_core` pour l’historique, mais n’appartient plus à `solana-compute-budget-interface ^3.0` et n’est pas construit par l’exécuteur. +- Une transaction ne doit contenir qu’une instruction de chaque variante Compute Budget ; la détection des doublons appartient au futur assembleur de plans multi-opérations ou au runtime. + + +## Address Lookup Table + +Les cinq fonctions publiques de `solana-address-lookup-table-interface` sont couvertes. Les builders reproduisent exactement le program ID, l’ordre des comptes, les flags signer/writable et le payload officiels. Ils ne lisent pas l’état on-chain et ne calculent pas le rent top-up dynamique. + +### `solana_core.address_lookup_table.create` + +```rust +SolanaCoreOperation::AddressLookupTableCreate { + authority, + payer, + recent_slot, +} +``` + +**Résultat et effet :** une instruction officielle `CreateLookupTable` et l’adresse PDA déterministe dérivée de `authority + recent_slot`. `payer` est writable et signataire ; l’autorité est enregistrée dans la table mais n’est pas signataire de cette instruction dans l’interface actuelle. Le builder déclare un coût explicite nul, car le runtime calcule le financement rent-exempt pendant l’exécution. L’orchestrateur doit fournir un slot récent et vérifier le coût simulé contre la politique avant signature. + +### `solana_core.address_lookup_table.extend` + +```rust +SolanaCoreOperation::AddressLookupTableExtend { + lookup_table, + authority, + payer, + new_addresses, +} +``` + +**Résultat et effet :** une instruction officielle `ExtendLookupTable` qui conserve l’ordre des adresses. `authority` signe toujours. `payer`, lorsqu’il est présent, signe et active le couple de comptes payer/System Program nécessaire au rent top-up. La liste doit être non vide et ne peut pas dépasser la capacité maximale officielle de 256 adresses. La capacité restante de la table et le montant exact du top-up exigent une lecture stateful avant simulation. + +### `solana_core.address_lookup_table.freeze` + +```rust +SolanaCoreOperation::AddressLookupTableFreeze { + lookup_table, + authority, +} +``` + +**Résultat et effet :** une instruction officielle `FreezeLookupTable`. L’autorité signe. Le gel supprime définitivement l’autorité de la table ; l’orchestrateur doit donc relire l’état et exiger une confirmation renforcée. Une table gelée ne peut plus être étendue, désactivée ou fermée. + +### `solana_core.address_lookup_table.deactivate` + +```rust +SolanaCoreOperation::AddressLookupTableDeactivate { + lookup_table, + authority, +} +``` + +**Résultat et effet :** une instruction officielle `DeactivateLookupTable`. L’autorité signe. La désactivation démarre un cooldown dépendant de l’historique des slots ; elle ne permet pas une fermeture immédiate. + +### `solana_core.address_lookup_table.close` + +```rust +SolanaCoreOperation::AddressLookupTableClose { + lookup_table, + authority, + recipient, +} +``` + +**Résultat et effet :** une instruction officielle `CloseLookupTable`. L’autorité signe et les lamports du compte fermé sont transférés vers `recipient`. Le builder refuse que la table soit son propre destinataire. L’orchestrateur doit vérifier que la table est désactivée, que son cooldown est terminé et que l’autorité on-chain correspond avant simulation et signature. + +### Frontière stateful et coût + +`requested_spend_lamports` reste à zéro pour les cinq plans ALT : ce champ représente les lamports encodés explicitement dans les instructions, alors que le rent de création/extension est calculé par le programme au runtime. Avant tout envoi réel, la couche d’orchestration doit : + +- charger et décoder le compte ALT lorsqu’il existe ; +- vérifier owner, autorité, statut actif/gelé/désactivé, capacité et cooldown ; +- obtenir un slot récent pour la création ; +- calculer le top-up maximal depuis la taille, le solde et le minimum rent-exempt, le comparer au plafond de dépense, puis confirmer le plan par simulation exacte ; +- refuser la fermeture avant la fin du cooldown. + +Ces contrôles cluster ne sont pas simulés par le builder stateless. + + +## Précompiles de signature + +Les précompiles Ed25519, secp256k1 et secp256r1 sont des instructions natives sans compte applicatif et sans signataire propre. Le fee payer reste le seul signataire transactionnel ajouté par défaut. Une vérification réussie prouve uniquement que le runtime a validé le tuple demandé ; elle ne marque pas la clé vérifiée comme `is_signer` et ne remplace pas les contrôles d’autorisation du programme consommateur. + +Chaque précompile expose deux contrats : + +- une forme `Inline`, destinée à une signature, qui place clé/adresse, signature et message dans la même instruction ; +- une forme `Offsets`, destinée aux lots ou références croisées, qui encode une table officielle et peut ajouter un buffer local après cette table. + +Les tables sont limitées à 255 entrées et la donnée totale doit rester adressable par les offsets `u16`, soit au plus 65 535 octets. Les références locales sont vérifiées avant simulation ; les références vers d’autres instructions restent validées par le runtime sur la transaction finale. + +### `solana_core.ed25519.verify_inline` + +```rust +SolanaCoreOperation::Ed25519VerifyInline { + message, + signature, + public_key, +} +``` + +| Paramètre | Contrat | +|--------------|----------------------------------------------------------------------------------| +| `message` | Octets exacts signés, longueur bornée par la taille adressable de l’instruction. | +| `signature` | Signature Ed25519 de 64 octets. | +| `public_key` | Clé publique Ed25519 de 32 octets. | + +**Résultat et effet :** une instruction officielle contenant une entrée, avec clé, signature puis message. Les trois index utilisent le sentinelle `u16::MAX` pour référencer l’instruction courante. + +### `solana_core.ed25519.verify_offsets` + +```rust +SolanaCoreOperation::Ed25519VerifyOffsets { + offsets, + data, +} +``` + +`offsets` contient des `Ed25519VerificationOffsets`. `data` est ajouté après la table et peut porter les clés, signatures ou messages référencés localement. Les index différents de `u16::MAX` désignent d’autres instructions de la transaction. + +### `solana_core.secp256k1.verify_inline` + +```rust +SolanaCoreOperation::Secp256k1VerifyInline { + message, + signature, + recovery_id, + ethereum_address, +} +``` + +| Paramètre | Contrat | +|--------------------|------------------------------------------------------------| +| `message` | Message brut attendu par le précompile secp256k1. | +| `signature` | Signature compacte de 64 octets. | +| `recovery_id` | Identifiant de récupération compris entre 0 et 3. | +| `ethereum_address` | Adresse Ethereum de 20 octets attendue après récupération. | + +**Résultat et effet :** une instruction conforme au layout officiel de 11 octets par entrée, suivie de l’adresse, de la signature, du recovery ID et du message. Le layout secp256k1 ne possède pas de sentinelle « instruction courante » : la forme inline utilise explicitement l’index transactionnel `0`. Elle doit donc rester la première instruction de la transaction. Aucun helper `bincode` n’est activé ; le wire little-endian est construit directement et comparé aux constantes/structures officielles. Le runtime secp256k1 n’impose pas lui-même la forme low-S ; le programme consommateur doit ajouter ce contrôle lorsque l’unicité canonique des signatures fait partie de son modèle de sécurité. + +### `solana_core.secp256k1.verify_offsets` + +```rust +SolanaCoreOperation::Secp256k1VerifyOffsets { + offsets, + data, +} +``` + +`offsets` contient des `Secp256k1VerificationOffsets` avec des index `u8`. Le builder conserve les références externes. L’index `0` désigne les données de cette instruction selon le contrat de positionnement imposé ; ses plages sont contrôlées localement. + +### `solana_core.secp256r1.verify_inline` + +```rust +SolanaCoreOperation::Secp256r1VerifyInline { + message, + signature, + public_key, +} +``` + +| Paramètre | Contrat | +|--------------|--------------------------------------------------------------------------------| +| `message` | Octets exacts signés. | +| `signature` | Signature compacte `rs` de 64 octets, avec composants non nuls et forme low-S. | +| `public_key` | Clé publique compressée de 33 octets commençant par `0x02` ou `0x03`. | + +**Résultat et effet :** une instruction officielle contenant une entrée et utilisant `u16::MAX` pour les trois références locales. Le builder refuse une signature high-S avant simulation afin de reproduire la contrainte de malléabilité du runtime. + +### `solana_core.secp256r1.verify_offsets` + +```rust +SolanaCoreOperation::Secp256r1VerifyOffsets { + offsets, + data, +} +``` + +`offsets` contient des `Secp256r1VerificationOffsets`. Les références locales utilisent `u16::MAX`; les références externes conservent leur index d’instruction. Dans cette forme avancée, le contenu cryptographique référencé dans une autre instruction est contrôlé par le runtime et par le programme consommateur. + +### Exemple minimal Ed25519 + +```rust +let intent = kb_executor_solana_core::SolanaCoreExecutionIntent { + intent_id: std::string::String::from("verify-ed25519-1"), + fee_payer: payer, + policy, + operation: kb_executor_solana_core::SolanaCoreOperation::Ed25519VerifyInline { + message: b"authorization-v1".to_vec(), + signature: signature_bytes.to_vec(), + public_key: public_key_bytes.to_vec(), + }, +}; +let plan = kb_execution_api::TypedInstructionExecutor::build_prepared_plan( + &kb_executor_solana_core::SolanaCoreExecutor, + &intent, +)?; +``` + +L’appelant doit ensuite ajouter, lorsqu’il existe, le programme qui consomme cette preuve et vérifie l’instruction via le sysvar d’instructions. La seule présence de la précompile dans une transaction n’accorde aucune autorisation métier. + + +## Config Program + +La crate expose deux opérations Config. Les helpers officiels actuels activent leur sérialisation via une feature `bincode`; le workspace ne l’active pas. Le builder reproduit donc uniquement le wire vérifié : longueur compact-u16 de `ConfigKeys`, couples `Pubkey + bool`, puis données applicatives déjà sérialisées. + +### `solana_core.config.create_account` + +Produit deux instructions ordonnées : + +1. création System du compte, avec `space = max_config_data_space + taille(ConfigKeys(max_keys))` ; +2. initialisation Config avec une liste de clés vide suivie de `initial_data`. + +Paramètres principaux : + +| Champ | Rôle | +|-------------------------|------------------------------------------------------------------| +| `from` | Compte de financement et signataire. | +| `config_account` | Nouveau compte Config et signataire. | +| `lamports` | Montant rent-exempt déjà mesuré par l’orchestrateur. | +| `max_config_data_space` | Réserve maximale pour les données métier sérialisées. | +| `max_keys` | Liste utilisée pour calculer la taille maximale de `ConfigKeys`. | +| `initial_data` | Octets déjà sérialisés de la valeur initiale. | + +Le plan comptabilise `lamports` dans `requested_spend_lamports`. Il ne calcule pas le rent et ne valide pas l’absence préalable du compte. + +### `solana_core.config.store` + +Construit une instruction Config unique. `config_account_is_signer` et les flags `is_signer` de `ConfigKey` déterminent exactement les comptes signataires ajoutés. La liste est ordonnée, dédupliquée et bornée. Au moins une autorité doit signer. + +L’exécuteur ne connaît pas le type applicatif `T`; l’appelant doit fournir `data` dans le format attendu par le programme Config concerné. + +## Feature Program + +### `solana_core.feature.activate` + +Reproduit la séquence officielle : transfert rent-exempt, allocation à `Feature::size_of()`, puis assignation au Feature Program. Le compte de financement et le nouveau compte feature signent. Le montant est fourni par l’orchestrateur après mesure du rent. + +### `solana_core.feature.revoke_pending_activation` + +Produit l’instruction d’un octet `0x00` avec les comptes ordonnés : feature writable/signataire, incinerator writable, System Program readonly. La révocation ne doit être envoyée qu’après lecture de l’état du compte et confirmation qu’une activation est encore en attente. + +## Slashing Program + +### `solana_core.slashing.submit_duplicate_block_proof` + +Produit un plan atomique de trois instructions : + +```text +System transfer vers le report PDA + -> Ed25519SigVerify avec deux tables d’offsets + -> Slashing DuplicateBlockProof (305 octets) +``` + +Le builder : + +- dérive le report PDA depuis `node_pubkey`, `slot` little-endian et le type de violation `1` ; +- exige le montant rent-exempt exact fourni dans `report_lamports` ; +- conserve l’ordre et les offsets officiels vers la troisième instruction ; +- refuse `destination == report_account` ; +- exige `ExecutionBlockhashKind::Latest`, car l’injection d’une instruction durable nonce déplacerait les index attendus ; +- comptabilise le préfinancement dans `requested_spend_lamports`. + +L’orchestrateur reste responsable de créer/remplir le compte de preuve, de vérifier la fenêtre d’un epoch, de mesurer le rent du rapport et de relire les comptes avant envoi. + +### `solana_core.slashing.close_violation_report` + +Construit l’instruction `0x00` avec le report et sa destination writable. Aucun signataire d’instruction n’est requis, mais le runtime vérifie l’owner, la destination stockée et une rétention minimale de trois epochs. Ces contrôles stateful doivent être reproduits avant simulation. + +## ZK ElGamal Proof Program + +### `solana_core.zk_elgamal.verify_inline` + +Accepte l’un des douze `ZkElGamalProofType` et exige exactement la taille POD officielle associée. Sans contexte, aucun compte n’est ajouté. Avec contexte, le plan ajoute le compte writable préalloué puis son autorité readonly. + +### `solana_core.zk_elgamal.verify_from_account` + +Encode le discriminant suivi d’un offset `u32` little-endian. Le compte contenant la preuve est readonly ; les deux comptes de contexte optionnels suivent dans l’ordre officiel. + +### `solana_core.zk_elgamal.close_context_state` + +Encode le discriminant `0`, rend le contexte et la destination writable et exige la signature de l’autorité du contexte. + +La crate ne crée ni n’alloue le compte de contexte. L’orchestrateur doit vérifier son owner, sa taille, son financement et son état avant la vérification ou la fermeture. L’ancien programme ZK Token Proof ne reçoit aucun builder : il est retiré du runtime actif et reste uniquement décodable pour l’historique. + +### Exemple minimal ZK ElGamal + +```rust +let operation = kb_executor_solana_core::SolanaCoreOperation::ZkElGamalVerifyFromAccount { + proof_type: kb_executor_solana_core::ZkElGamalProofType::PubkeyValidity, + proof_account, + proof_offset: 0, + context_state: None, +}; +``` + +## Stake Program + +La crate couvre les **24 helpers clients actuels** de `solana-stake-interface 4.3.1` sans activer sa feature `bincode`. Le payload est produit par un miroir privé `wincode` identique à celui du décodeur, puis les comptes et signataires sont reproduits selon les builders officiels. + +| Groupe | Opérations exposées | Effet du plan | +|----------------------------|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------| +| Initialisation | `STAKE_INITIALIZE_OPERATION`, `STAKE_INITIALIZE_CHECKED_OPERATION` | Initialise un compte préalloué ; la forme checked exige la signature du withdrawer. | +| Création | `STAKE_CREATE_ACCOUNT_OPERATION`, `STAKE_CREATE_ACCOUNT_WITH_SEED_OPERATION`, variantes checked | Construit `System create_account[_with_seed]` puis l’initialisation Stake. | +| Création + délégation | `STAKE_CREATE_ACCOUNT_AND_DELEGATE_OPERATION`, variante seedée | Ajoute `DelegateStake` après création et initialisation. | +| Split / merge | `STAKE_SPLIT_OPERATION`, `STAKE_SPLIT_WITH_SEED_OPERATION`, `STAKE_MERGE_OPERATION` | Prépare le compte de destination puis split, ou fusionne deux états compatibles. | +| Autorités | `STAKE_AUTHORIZE_OPERATION`, checked, seed et checked-with-seed | Change le staker ou le withdrawer via `StakeAuthorizationKind`. | +| Délégation / désactivation | `STAKE_DELEGATE_OPERATION`, `STAKE_DEACTIVATE_OPERATION`, `STAKE_DEACTIVATE_DELINQUENT_OPERATION` | Administre la délégation et les transitions d’activation. | +| Retrait / mouvement | `STAKE_WITHDRAW_OPERATION`, `STAKE_MOVE_STAKE_OPERATION`, `STAKE_MOVE_LAMPORTS_OPERATION` | Déplace des lamports ou du stake entre comptes compatibles. | +| Lockup | `STAKE_SET_LOCKUP_OPERATION`, `STAKE_SET_LOCKUP_CHECKED_OPERATION` | Modifie timestamp, epoch et éventuellement custodian. | +| Lecture runtime | `STAKE_GET_MINIMUM_DELEGATION_OPERATION` | Produit l’instruction sans comptes dont le résultat est renvoyé en return data. | + +`StakeAuthorizationKind::{Staker, Withdrawer}` sélectionne le rôle modifié par les quatre opérations d’autorisation. Les plans déclarent tous les signataires avant simulation, conservent l’ordre officiel des instructions composées et comptabilisent conservativement les montants de création, split, retrait ou mouvement dans `requested_spend_lamports`. + +### Frontière stateful Stake + +Le builder ne prétend pas connaître l’état on-chain. Avant envoi, l’orchestrateur doit notamment vérifier : propriétaire et taille du compte, état initialisé/delegated, autorités courantes, lockup et custodian, rent-exemption, compatibilité merge/split/move, activation/deactivation epoch, vote account, minimum delegation et solde réellement retirable. Ces contrôles et les parcours localnet/devnet restent dans `pre.022`. + +`Redelegate` et `redelegate_with_seed` ne sont pas exposés : l’interface officielle les marque dépréciés avec la mention « Redelegate will not be enabled ». Ils restent décodables historiquement mais sont classés `decode-only` dans la matrice d’exécution. + +### Exemple minimal Stake + +```rust +use kb_execution_api::TypedInstructionExecutor; + +let executor = kb_executor_solana_core::SolanaCoreExecutor; +let intent = kb_executor_solana_core::SolanaCoreExecutionIntent { + intent_id: String::from("delegate-stake"), + fee_payer: payer.clone(), + policy, + operation: kb_executor_solana_core::SolanaCoreOperation::StakeDelegate { + stake_account, + stake_authority, + vote_account, + }, +}; +let plan = executor.build_prepared_plan(&intent)?; +``` + +Le plan est seulement construit. La lecture des comptes, la simulation exacte, la signature, l’envoi, la confirmation et le replay post-exécution restent des étapes distinctes. + +## Vote Program + +La crate couvre **24 opérations Vote** : les vingt variantes `VoteInstruction` actuelles de `solana-vote-interface 6.0.3` et quatre plans composés de création. Le payload est sérialisé directement avec le schéma officiel `wincode`; aucune feature ni helper `bincode` n’est activé. Les comptes sysvar utilisent le registre canonique `solana_sdk_ids::sysvar`, conformément à l’interface officielle. + +| Groupe | Opérations exposées | Contrat principal | +|----------------|-----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------| +| Initialisation | `VOTE_INITIALIZE_ACCOUNT_OPERATION`, `VOTE_INITIALIZE_ACCOUNT_V2_OPERATION` | Legacy avec Rent/Clock; V2 avec identité, clé/preuve BLS 48/96 octets et deux collectors writable. | +| Création | `VOTE_CREATE_ACCOUNT_OPERATION`, variante seedée, et deux variantes V2 | `System create_account[_with_seed]` avec `VoteStateV4::size_of()`, puis initialisation Vote dans l’ordre officiel. | +| Autorités | `VOTE_AUTHORIZE_OPERATION`, checked, seed et checked-with-seed | Autorités voter/withdrawer, nouvelle autorité signer dans les formes checked, BLS borné pour `VoterWithBLS`. | +| Vote simple | `VOTE_SUBMIT_OPERATION`, `VOTE_SWITCH_OPERATION` | Slots strictement croissants, hash de banque, timestamp optionnel, SlotHashes/Clock et autorité signer. | +| État/tour | update, compact update, TowerSync et variantes switch | Lockouts bornés à `MAX_LOCKOUT_HISTORY`, root cohérente, hashes et block ID validés avant sérialisation compacte. | +| Administration | retrait, identité, commission legacy, collector et commission BPS | Comptes/signataires officiels; pourcentage `0..=100`, BPS `0..=10_000`. | +| Récompenses | `VOTE_DEPOSIT_DELEGATOR_REWARDS_OPERATION` | Source writable signer et montant positif. | + +Les créations, retraits et dépôts reportent leurs lamports explicitement transférés dans `requested_spend_lamports`; ils exigent donc un plafond de dépense avant simulation. Les autres opérations reportent zéro. Les plans ne lisent pas le compte Vote : version/state, autorités courantes, ownership, rent, collectors autorisés, fenêtre de commission, validité cryptographique BLS et admissibilité runtime de la tour restent des validations stateful de l’orchestrateur. + +## Loaders v3 et v4 + +La crate couvre **20 plans Loader**. Les onze plans Loader v3 appellent `solana-loader-v3-interface 8.x` avec son schéma `wincode`; les neuf plans Loader v4 reproduisent le wire et les comptes publiés par `solana-loader-v4-interface 3.1`, sans activer ses helpers conditionnés par `bincode`. + +| Famille | Opérations | Contrat | +|----------------------|-------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------| +| Loader v3 buffer | création, écriture, autorité/checked, fermeture | création composée System + InitializeBuffer, écritures bornées à 1 024 octets et signataires officiels | +| Loader v3 programme | deploy-with-max-len, upgrade, autorité/checked, close-any, extend | ordre officiel, comptes Program/ProgramData/buffer, sysvars via `solana_sdk_ids` et extension minimale officielle | +| Loader v4 allocation | create-buffer, set-program-length | création System de taille zéro puis `SetProgramLength`; zéro ferme/réinitialise dans l’opération directe | +| Loader v4 bytecode | write, copy | tag `u32 LE`, offset, longueur de vecteur `u64 LE`, plages bornées et source read-only pour copy | +| Loader v4 lifecycle | deploy, deploy-from-source, retract, transfer-authority, finalize | comptes et flags signer/writable identiques aux helpers officiels; le programme next-version peut être identique au programme finalisé | + +Les créations Loader déclarent uniquement les lamports explicitement transférés par l’instruction System dans `requested_spend_lamports`. Les rent top-ups calculés à partir de l’état réel ne sont pas devinés par le builder. Avant simulation, l’orchestrateur doit vérifier owner, état, autorité, taille/capacité, rent, ProgramData, relations de comptes, source de déploiement et admissibilité de fermeture/extension. + +BPF Loader v1/v2 restent historiques `decode-only` malgré l’existence d’anciens helpers dépréciés. Native Loader appartient au chemin de mise à niveau du logiciel validator et ne possède pas d’instruction client autonome. Ces surfaces sont classées précisément par `ExecutionCapability::Unsupported` et aucune instruction fictive n’est construite. + +## Contrat avec l’assemblage durable nonce + +Les builders de création et lifecycle nonce restent indépendants de la consommation d’un durable nonce. Pour un plan métier configuré avec `ExecutionBlockhashKind::DurableNonce`, `finalize_prepared_plan` impose désormais : + +- un compte nonce ; +- une autorité nonce ; +- aucune limite d’âge de recent blockhash ; +- l’autorité nonce dans les signataires requis, avec le rôle `durable_nonce_authority`. + +`kb_execution_solana` prend ensuite la responsabilité stateful : lecture complète et bornée du compte, validation System Program/`Current`/`Initialized`, concordance compte-autorité, injection de `AdvanceNonceAccount` en première instruction, compilation avec la valeur nonce et liaison exacte de la simulation avant signature. Le plan produit ici ne lit toujours aucun RPC et ne contient aucun secret. + +## Erreurs et garde-fous de construction + +Les erreurs utilisent `kb_core::Error` avec un code stable. Les contrôles couvrent notamment : + +- program ID et code d’opération incohérents ; +- clé publique invalide ; +- lamports nuls lorsque l’opération exige un montant positif ; +- comptes source/destination identiques ; +- taille d’allocation nulle ou supérieure à la limite officielle selon l’opération ; +- seed invalide ou adresse dérivée incohérente ; +- payer absent avec un montant additionnel non nul pour `create_account_allow_prefund` ; +- liste `transfer_many` vide, montant nul ou dépassement de la somme ; +- gestion nonce demandée avec une politique durable nonce au lieu du recent-blockhash de lifecycle ; +- politique durable nonce sans compte, sans autorité ou avec une limite d’âge de recent blockhash ; +- heap frame hors intervalle ou non alignée sur 1 024 octets ; +- limite de données de comptes chargées nulle ou supérieure à 64 MiB ; +- signature, clé publique, adresse Ethereum ou recovery ID de taille/valeur invalide ; +- signature secp256r1 avec composant nul, forme high-S ou préfixe de clé compressée invalide ; +- table d’offsets vide, supérieure à 255 entrées, trop grande ou plage locale hors bornes ; +- dépassement numérique lors du calcul du coût ; +- extension ALT vide ou supérieure à 256 adresses ; +- table ALT confondue avec son autorité, son payer ou son destinataire de fermeture ; +- Config sans autorité, clé dupliquée, données trop grandes ou espace incohérent ; +- Feature sans rent positif ou confondue avec son compte de financement ; +- report Slashing mal dérivé, montant nul, destination égale au PDA, preuve/signature de mauvaise taille ou politique durable nonce ; +- preuve ZK ElGamal de taille incorrecte, comptes preuve/contexte confondus ou fermeture sans autorité distincte ; +- commission Vote hors plage, BLS de taille incorrecte, seed/adresse dérivée incohérente, hash invalide, slots ou lockouts non strictement croissants, root au-dessus de la première lockout ou montant nul ; +- création Loader sans lamports/taille, écriture vide ou supérieure à 1 024 octets, offset/plage en dépassement, comptes source/destination confondus, autorité v4 inchangée ou extension v3 sous le minimum officiel ; +- opération déclarée mais pas encore implémentée. + +`ExecutionCapability::Unsupported { reason_code, reason }` représente uniquement une dette temporaire ou une instruction non constructible par un client. L’objectif de clôture est de couvrir toutes les instructions natives officiellement appelables. + +## Builders officiels et tests + +Les builders proviennent de : + +- `solana-system-interface` avec la feature `wincode` ; +- `solana-compute-budget-interface` ; +- `solana-address-lookup-table-interface` avec les helpers `create`, `extend`, `freeze`, `deactivate` et `close` ; +- `solana-ed25519-program` et `solana-secp256r1-program` pour les builders inline et structures d’offsets officiels ; +- `solana-secp256k1-program` sans feature `bincode`, pour les constantes et la structure wire officielle reproduite explicitement en little-endian ; +- `solana-config-interface` pour le contrat `ConfigKeys`, reproduit sans activer son helper `bincode` ; +- `solana-feature-gate-interface` pour `Feature::size_of()` et les séquences officielles reproduites sans helper `bincode` ; +- `solana-zk-elgamal-proof-interface` pour les discriminants, tailles POD, comptes de contexte et fermeture ; +- `solana-vote-interface` pour les vingt variantes `VoteInstruction`, les types d’état Vote/BLS et le schéma officiel `wincode`, avec `solana-sdk-ids` pour les sysvar IDs ; +- `solana-loader-v3-interface` pour les onze helpers Loader v3 et leur sérialisation `wincode` ; +- `solana-loader-v4-interface` comme contrat normatif des sept discriminants et comptes, reproduits localement sans activer sa feature `bincode` ; +- SIMD-0204 et le contrat publié du Slashing Program pour le payload de 305 octets, le PDA et l’introspection Ed25519. + +Les tests comparent : + +- le program ID ; +- le code d’opération ; +- l’ordre exact des comptes ; +- les flags signer/writable ; +- le payload exact ; +- les signataires requis et leur déduplication ; +- les coûts demandés ; +- la validation des adresses dérivées ; +- les erreurs de valeurs ou contrats invalides ; +- les tables d’offsets, références externes, sentinelles locales et contraintes de position des précompiles ; +- le wire Config compact-u16, le calcul d’espace et les signataires exacts ; +- les séquences System officielles d’activation et de révocation Feature ; +- l’ordre atomique, le PDA, les offsets Ed25519 et le payload Slashing de 305 octets ; +- les discriminants, tailles POD, modes inline/account et fermeture des contextes ZK ElGamal ; +- les vingt variantes wire Vote, les quatre créations composées, comptes/signataires, BLS, commissions, tours et plafonds de lamports ; +- les onze helpers Loader v3 contre les builders officiels, puis les neuf plans Loader v4 contre les tags, champs, comptes, signataires, ordre composé et plafonds de lamports publiés. + +## État final `0.4.2` + +System, Compute Budget, Address Lookup Table, les trois précompiles de signature, Config, Feature, Slashing, ZK ElGamal, Stake, Vote, Loader v3 et Loader v4 sont couverts pour leurs opérations client retenues. L’ancien ZK Token Proof, Stake Redelegate et BPF Loader v1/v2 restent explicitement `decode-only`; Native Loader est classé sans instruction client. + +La bibliothèque est complète au niveau des plans et du wire connus, mais elle ne donne aucune autorisation implicite d’envoi. Les opérations administratives ou dangereuses restent hors de `kb_app_demo`, derrière les politiques et préflights stateful, et sans activation Mainnet. Une validation cluster spécifique reste obligatoire avant toute future exposition mutable. + +## Tracing + +Les événements opérationnels utilisent le target canonique `kb_executor_solana_core` défini dans `src/constants.rs`. + + +## Contrat avec le préflight stateful `pre.022` + +`ZkElGamalProofType::context_state_size()` expose la taille exacte de `ProofContextState` pour chaque contexte officiel. Cette donnée permet à `kb_pipeline` de contrôler l’allocation et le rent sans dupliquer une table numérique fragile. L’exécuteur reste sans I/O : ALT, Config, Feature, Slashing et ZK ElGamal sont inspectés par `inspect_solana_core_stateful_readiness` avant simulation. + +La surface complète est inventoriée dans `docs/NATIVE_SOLANA_EXECUTION_MATRIX.json`. Le validateur associé impose la correspondance exacte des 109 codes `solana_core.*` et les classifications sans builder client. +## Matrice compilée de complétude — `0.4.2-pre.023` + +`SOLANA_CORE_OPERATION_CODES` expose le registre compilé des 109 opérations appelables. Un test Rust charge `docs/NATIVE_SOLANA_EXECUTION_MATRIX.json` et impose : + +- 18 surfaces exactement ; +- 14 surfaces appelables et 4 surfaces non invocables ou historiques ; +- égalité exacte entre la matrice et les 109 codes compilés ; +- Program IDs enregistrés, surfaces et opérations uniques ; +- justification des surfaces non invocables ; +- contrats de construction, politique, tests, cluster et exposition UI ; +- distribution exacte des préflights `27 none / 14 required / 68 future`. + +Cette validation remplace le script Python fondé sur des expressions régulières. La matrice prouve l’exhaustivité théorique des builders connus ; les entrées `future` conservent explicitement la dette de validation stateful Localnet/Devnet. + diff --git a/olddocs/archivekbot2/kb_executor_spl_account_compression/README.md b/olddocs/archivekbot2/kb_executor_spl_account_compression/README.md new file mode 100644 index 0000000..d5219be --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_spl_account_compression/README.md @@ -0,0 +1,14 @@ + + + +# kb_executor_spl_account_compression + +Ce crate réserve l’exécuteur pour le programme SPL Account Compression. + +## Rôle + +Il construira des instructions ou plans d’exécution indépendamment du décodeur correspondant. Le scaffold actuel ne signe, ne simule et n’envoie aucune transaction. + +## Statut + +L’exécuteur reconnaît uniquement ses program IDs vérifiés et retourne un plan réservé contenant zéro instruction. Les builders, contrôles de comptes, simulations et garde-fous seront ajoutés dans la version SPL dédiée du `ROADMAP.md`. diff --git a/olddocs/archivekbot2/kb_executor_spl_associated_token_account/README.md b/olddocs/archivekbot2/kb_executor_spl_associated_token_account/README.md new file mode 100644 index 0000000..b8d2f63 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_spl_associated_token_account/README.md @@ -0,0 +1,35 @@ + + + +# kb_executor_spl_associated_token_account + +Ce crate construit les plans typés de la surface SPL Associated Token Account courante. + +## Surface + +- `Create` ; +- `CreateIdempotent` ; +- `RecoverNested` ; +- Token Program classique ou Token-2022 comme cible explicite de la dérivation. + +Chaque plan conserve l’ordre et les flags des metas produits par le builder officiel de +`spl-associated-token-account-interface 2.0.0`. Les signataires requis sont dédupliqués séparément, +sans réordonner les comptes de l’instruction. + +## Garde-fous + +La simulation est obligatoire, le mode par défaut reste `dry_run`, les plafonds de rent et de frais +sont explicites et le replay post-exécution complet est requis. Le préflight stateful Localnet/Devnet +est orchestré par `kb_pipeline` : il contrôle cluster, mints, PDA, comptes Token existants, +`RecoverNested`, signataires et solde couvrant le plafond rent-plus-frais. + +Pour Token-2022, le préflight valide uniquement le préfixe commun Mint/Token Account et accepte des +octets d’extension suffixés. Il ne décode ni instruction ni extension Token-2022 ; la simulation +officielle reste l’autorité pour la taille de compte et le rent exacts liés aux extensions. + +## Preuves Devnet + +Les parcours contrôlés du 16 juillet 2026 ont validé `CreateIdempotent` pour un mint classique et +un mint Token-2022, puis la réutilisation des deux ATA avec second replay sans doublon. Un scénario +`RecoverNested` classique a transféré 1 000 000 000 unités brutes vers l'ATA wallet, fermé le nested +ATA et confirmé les postconditions ainsi que deux matérialisations distinctes lifecycle/risk. diff --git a/olddocs/archivekbot2/kb_executor_spl_elgamal_registry/README.md b/olddocs/archivekbot2/kb_executor_spl_elgamal_registry/README.md new file mode 100644 index 0000000..be3dcde --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_spl_elgamal_registry/README.md @@ -0,0 +1,6 @@ + + + +# kb_executor_spl_elgamal_registry + +Exécuteur typé du registre ElGamal SPL. Il construit `create_registry` et `update_registry` au moyen de l'interface officielle, avec preuve `PubkeyValidity` inline ou compte de contexte prévalidé. Toute exécution exige une simulation, une limite de frais positive et la validation canonique après envoi. diff --git a/olddocs/archivekbot2/kb_executor_spl_memo/README.md b/olddocs/archivekbot2/kb_executor_spl_memo/README.md new file mode 100644 index 0000000..bf06ea5 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_spl_memo/README.md @@ -0,0 +1,50 @@ + + + +# kb_executor_spl_memo + +Ce crate reconnaît les Program IDs exacts SPL Memo v1, v3 et v4, mais construit des plans d’exécution uniquement pour la génération courante v4. Il ne dépend ni du wallet, ni du RPC, ni du décodeur et n’effectue directement aucune signature ni aucun envoi. + +## Contrat typé + +L’unique opération est `spl_memo.add_memo`, portée par : + +- `SplMemoGeneration::V1`, `V3` ou `V4`, afin de produire une capacité exacte ; +- `SplMemoOperation::AddMemo` ; +- `SplMemoExecutionIntent` avec intent ID, fee payer et politique commune ; +- une liste ordonnée de `SplMemoSigner` dont les doublons sont conservés dans l’instruction. + +Le message est un `String` Rust : sa validité UTF‑8 est donc acquise avant la construction. Les octets UTF‑8 exacts deviennent l’intégralité de `Instruction::data`, sans préfixe, discriminator, Borsh ou `bincode`. + +## Builder et comptes + +Pour v4, le crate appelle directement `spl_memo_interface::instruction::build_memo` de la version 2.1.0 avec le Program ID explicite. Les tests comparent le plan produit au builder officiel. Les générations v1 et v3 sont historiques `decode-only` et n'atteignent jamais ce builder par l'API de l'exécuteur. + +Chaque signer fourni devient un compte `readonly`, `is_signer = true`, dans l’ordre exact. Aucun compte writable n’est inventé. Les occurrences dupliquées restent dans les metas ; la liste transactionnelle `required_signers` est dédupliquée et commence toujours par le fee payer. + +Le payload est borné à 566 octets et la liste à 32 occurrences de signataires. Ces limites sont des garde-fous conservateurs de l’exécuteur, pas de nouveaux rejets attribués au runtime. L’assembleur commun vérifie ensuite la taille wire exacte de 1 232 octets, qui dépend notamment du nombre de signatures. + +## Capacités et politiques + +La construction de plan est `Supported` pour `AddMemo` uniquement sur l'ID v4 exact. V1 et v3 retournent `Unsupported(reason)` avec le code stable `execution_spl_memo_historical_generation_decode_only`. Toute autre opération ou tout autre Program ID est également `Unsupported(reason)` avec son propre motif. + +- simulation obligatoire ; +- dry-run par défaut via `ExecutionPolicy::default()` ; +- plafond de frais strictement positif obligatoire ; +- dépense d’instruction égale à zéro lamport, hors frais réseau ; +- construction v4 disponible sur Localnet, Devnet, Testnet et Mainnet ; +- aucune génération artificiellement limitée au dry-run par la bibliothèque ; +- Mainnet gouverné par la politique commune `allow_mainnet` et sa confirmation explicite ; +- insertion canonique, extraction core, decode replay Memo et matérialisation exigés après exécution. + +La disponibilité effective de v4 sur un cluster n’est pas supposée par le builder : elle est établie par la simulation RPC obligatoire. Une future génération expérimentale officiellement encodée pourra être ajoutée sans la limiter artificiellement à un cluster. Les générations historiques restent décodables dans `kb_decoder_spl_memo`, mais ne sont pas exécutables. La démo `0.4.3` reste limitée à Devnet. + +Les signataires restent visibles dans `PreparedExecutionPlan` avant toute signature. Les clés privées ne font partie ni de l’intent ni du plan. + +## Validation Devnet et démos + +`kb_pipeline::execute_devnet_memo` réutilise l’infrastructure de `0.4.2` pour construire un Memo v4, simuler, demander une autorisation explicite avant l’envoi, confirmer, hydrater, extraire, rejouer le décodeur, vérifier l’annotation puis prouver l’idempotence par un second replay non forcé. + +La fenêtre Solana Devnet existante expose ce parcours sans nouvelle WebView. Elle affiche payload, fee payer, signataire wallet readonly, plan, simulation et validation post-exécution. Le journal générique `demo_decode_replay` reste la surface de consultation des annotations matérialisées. Les DTO Memo sérialisent soldes et frais en chaînes décimales et n’exportent aucune clé privée ni `bigint` actif. + +La validation réelle du 15 juillet 2026 comprend une simulation seule et trois transactions v4 Devnet confirmées. Chacune a produit une insertion canonique, une extraction core, un decode, une annotation et un second replay `skipped` sans nouvelle matérialisation. Les signatures exactes sont enregistrées dans `docs/SPL_MEMO_MATRIX.json`. diff --git a/olddocs/archivekbot2/kb_executor_spl_noop/README.md b/olddocs/archivekbot2/kb_executor_spl_noop/README.md new file mode 100644 index 0000000..2d6f91a --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_spl_noop/README.md @@ -0,0 +1,14 @@ + + + +# kb_executor_spl_noop + +Ce crate réserve l’exécuteur pour le programme SPL Noop. + +## Rôle + +Il construira des instructions ou plans d’exécution indépendamment du décodeur correspondant. Le scaffold actuel ne signe, ne simule et n’envoie aucune transaction. + +## Statut + +L’exécuteur reconnaît uniquement ses program IDs vérifiés et retourne un plan réservé contenant zéro instruction. Les builders, contrôles de comptes, simulations et garde-fous seront ajoutés dans la version SPL dédiée du `ROADMAP.md`. diff --git a/olddocs/archivekbot2/kb_executor_spl_single_pool/README.md b/olddocs/archivekbot2/kb_executor_spl_single_pool/README.md new file mode 100644 index 0000000..bd22fb1 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_spl_single_pool/README.md @@ -0,0 +1,14 @@ + + + +# kb_executor_spl_single_pool + +Ce crate réserve l’exécuteur pour le programme SPL Single Pool. + +## Rôle + +Il construira des instructions ou plans d’exécution indépendamment du décodeur correspondant. Le scaffold actuel ne signe, ne simule et n’envoie aucune transaction. + +## Statut + +L’exécuteur reconnaît uniquement ses program IDs vérifiés et retourne un plan réservé contenant zéro instruction. Les builders, contrôles de comptes, simulations et garde-fous seront ajoutés dans la version SPL dédiée du `ROADMAP.md`. diff --git a/olddocs/archivekbot2/kb_executor_spl_stake_pool/README.md b/olddocs/archivekbot2/kb_executor_spl_stake_pool/README.md new file mode 100644 index 0000000..b66d33b --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_spl_stake_pool/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_spl_stake_pool + +Ce crate réserve l'exécuteur de la surface `spl_stake_pool`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_spl_token/README.md b/olddocs/archivekbot2/kb_executor_spl_token/README.md new file mode 100644 index 0000000..2585d05 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_spl_token/README.md @@ -0,0 +1,98 @@ + + + +# kb_executor_spl_token + +Ce crate construit des plans typés pour le programme SPL Token classique exact : + +```text +TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA +``` + +Il ne dépend ni du RPC, ni du wallet, ni de Tauri, ni du décodeur. La lecture d’état, la simulation, +la signature, l’envoi et la validation post-exécution appartiennent à l’orchestration commune. + +## Politique de surface + +Le décodeur conserve les 28 tags publiés, y compris les formes historiques. L’exécuteur expose 24 +opérations encore courantes ou récentes et refuse quatre initialisations obsolètes dépendantes de +Rent : `InitializeMint`, `InitializeAccount`, `InitializeMultisig` et `InitializeAccount2`. Leurs +équivalents actuels utilisent respectivement `InitializeMint2`, `InitializeAccount3` et +`InitializeMultisig2`. + +Les opérations non checked `Transfer`, `Approve`, `MintTo` et `Burn` restent constructibles : leur +wire est ancien, mais les builders officiels 3.0.0 les publient toujours et elles ne sont pas +obsolètes. Les variantes checked doivent être préférées lorsqu’un mint et ses decimals sont connus. + +## Contrat typé + +`SplTokenExecutionIntent` contient : + +- un identifiant d’intent et un fee payer ; +- une `ExecutionPolicy` commune, simulation obligatoire et dry-run par défaut ; +- une instruction typée ou un `Batch` de sous-instructions non batch ; +- les comptes métier explicites ; +- une autorité simple ou un multisig avec signataires ordonnés ; +- les montants bruts sous forme de chaînes décimales JSON, converties en `u64` seulement dans le + builder ; +- les decimals séparés lorsqu’ils appartiennent réellement au wire. + +Les doublons des metas multisig sont conservés dans l’ordre officiel. La liste des signataires +transactionnels est dédupliquée séparément avec le fee payer. + +## Builders + +Chaque opération appelle directement le builder `spl-token-interface 3.0.0`. Cela couvre les +initialisations actuelles, transferts, délégations, changements d’autorité, mint/burn, close, +freeze/thaw, variantes checked, `SyncNative`, les trois instructions de return data, +`InitializeImmutableOwner`, `WithdrawExcessLamports`, `UnwrapLamports` et `Batch`. + +`InitializeImmutableOwner` est explicitement un no-op de compatibilité sur le programme classique ; +il n’est jamais présenté comme une extension Token-2022. + +`Batch` est borné à 64 enfants, 512 occurrences de comptes et 255 octets de data par enfant. Son +type enfant exclut structurellement un autre `Batch`. Les slices de comptes et l’ordre produits par +le builder officiel sont conservés. + +## Constructibilité et clusters + +La constructibilité de bibliothèque ne dépend pas du cluster. `UnwrapLamports` et `Batch` sont +publiés avec un builder exact dans l’interface 3.0.0 et sont donc constructibles. Deux simulations +réussies le 16 juillet 2026 prouvent leur présence sur le programme classique Devnet. Cette preuve +n'est pas extrapolée à Localnet, Testnet ou Mainnet. Mainnet demeure gouverné par +`kb_execution_safety` et la confirmation opérateur, pas par une interdiction interne à ce crate. + +Les opérations d’initialisation supposent que les comptes ont déjà été créés avec la bonne taille, +le bon owner et le bon financement. La création System et le rent ne sont pas masqués dans une +instruction Token ; le préflight stateful de la tranche suivante les vérifiera sans utiliser ATA. + +## Coûts et validation + +Les montants token ne sont pas des frais réseau et ne sont pas reportés comme lamports dépensés. +Un montant explicite `UnwrapLamports` est déclaré dans `requested_spend_lamports`; un unwrap total +et `WithdrawExcessLamports` restent simulation-only tant qu’une lecture d’état n’a pas borné les +lamports déplaçables. Le plafond de frais reste séparé dans `ExecutionCostLimit`. + +Toute construction impose une simulation, un plafond de frais positif, une insertion canonique, +l’extraction core et le replay décodé. Les mutations exigent aussi la validation de matérialisation ; +les conversions, requêtes de return data et le no-op de compatibilité n’inventent aucune projection. + +## Limites actuelles + +- aucun préflight Mint/Account/Multisig dans ce crate : ces lectures sont implémentées dans + `kb_pipeline` afin de conserver l'exécuteur pur ; +- aucun envoi ni simulation RPC dans ce crate ; l'orchestrateur commun a validé ces étapes sur + Devnet pour `TransferChecked` et le lifecycle contrôlé ; +- aucun compte ATA créé implicitement ; +- aucun support Token-2022 ; +- aucun déploiement de `UnwrapLamports` ou `Batch` revendiqué hors Devnet sans simulation cluster + dédiée. + +Le parcours Devnet réel a prouvé simulation, soumission, confirmation, hydratation canonique, +extraction, replay, matérialisation et idempotence pour les opérations du lifecycle documentées dans +`docs/SPL_TOKEN_MATRIX.json`. La démo Tauri refuse volontairement un envoi si le wallet du profil ne +résout pas aussi l'autorité Token requise ; elle ne prend jamais en charge une clé externe implicite. + +Le probe Devnet simulation-only du 16 juillet 2026 a validé le wire déployé de `Batch` avec un +enfant `TransferChecked` de montant nul en 270 compute units, puis `UnwrapLamports` d'un lamport en +140 compute units. Aucune transaction n'a été signée ou envoyée par ce probe. diff --git a/olddocs/archivekbot2/kb_executor_spl_token_2022/README.md b/olddocs/archivekbot2/kb_executor_spl_token_2022/README.md new file mode 100644 index 0000000..dd1b190 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_spl_token_2022/README.md @@ -0,0 +1,139 @@ + + + +# kb_executor_spl_token_2022 + +Ce crate construit des plans d’exécution typés pour le programme SPL Token-2022. Il ne diffuse aucune transaction directement : l’orchestration impose simulation, plafonds de coûts, signataires autorisés et validation post-exécution. + +## Frontière + +- Program ID exact : `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb`. +- Builders officiels de `spl-token-2022-interface`. +- Clés publiques exposées par `solana_pubkey::Pubkey` via les contrats `kb_model`. +- `Batch` reste decode-only tant qu’aucun builder officiel n’est publié. +- Les opérations confidentielles restent séparées jusqu’à validation complète des preuves et comptes de contexte. + +## Transfer Fee + +La tranche `0.4.6-pre.043` ajoute les six builders publics officiels : + +- `initialize_transfer_fee_config` ; +- `set_transfer_fee` ; +- `transfer_checked_with_fee` ; +- `withdraw_withheld_tokens_from_mint` ; +- `withdraw_withheld_tokens_from_accounts` ; +- `harvest_withheld_tokens_to_mint`. + +Les montants restent des chaînes décimales `u64`. Les basis points sont limités à `10_000`. Les listes de comptes sources sont non vides, uniques, ordonnées et limitées à 255 occurrences. Les autorités simples et multisig conservent exactement les metas publiées par l’interface officielle. + +## Default Account State, Memo Transfer et CPI Guard + +La tranche `0.4.6-pre.044` ajoute les six builders publics officiels : + +- `initialize_default_account_state` ; +- `update_default_account_state` ; +- `enable_required_transfer_memos` ; +- `disable_required_transfer_memos` ; +- `enable_cpi_guard` ; +- `disable_cpi_guard`. + +`InitializeDefaultAccountState` doit précéder l'initialisation du mint. La mise à jour utilise la freeze authority, simple ou multisig. Memo Transfer et CPI Guard modifient un Token Account et utilisent son owner, simple ou multisig. Les états par défaut sont typés `initialized` ou `frozen`; aucune valeur numérique arbitraire n'est acceptée. + +## Transfer Hook et pointers + +La tranche `0.4.6-pre.045` ajoute les huit builders publics officiels : + +- `initialize_transfer_hook` et `update_transfer_hook` ; +- `initialize_metadata_pointer` et `update_metadata_pointer` ; +- `initialize_group_pointer` et `update_group_pointer` ; +- `initialize_group_member_pointer` et `update_group_member_pointer`. + +Les initialisations doivent précéder l'initialisation du mint et acceptent une autorité optionnelle ainsi qu'une cible optionnelle. Les mises à jour utilisent une autorité simple ou multisig et acceptent `None` pour supprimer explicitement la cible. Les metas et l'ordre des signataires proviennent exclusivement des builders officiels de `spl-token-2022-interface`. + +## Sécurité + +- simulation obligatoire ; +- dry-run par défaut ; +- plafond de frais positif obligatoire ; +- matérialisation post-exécution requise pour les mutations ; +- aucun calcul de fee implicite : `transfer_checked_with_fee` exige le montant attendu exact ; +- aucun retrait ou harvest n’invente l’état final, qui doit être relu par le pipeline stateful. +## Token Metadata et Token Group + +La tranche `0.4.6-pre.046` ajoute les builders officiels des interfaces exécutées sous le Program ID Token-2022 : + +- initialisation, mise à jour de champ et suppression de clé Token Metadata ; +- initialisation de groupe, mise à jour de `max_size` et initialisation de membre ; +- chaînes metadata bornées à 1 024 octets par champ dans le contrat d’exécution ; +- comptes et signataires conservés dans l’ordre publié par les interfaces ; +- aucune confusion avec Metaplex Token Metadata ni avec une implémentation tierce des interfaces. + +Les instructions utilisent les discriminateurs SPL des interfaces et non un tag `TokenInstruction` sur un octet. Le dispatcher reste strictement attaché au Program ID Token-2022 pour cette crate. +## Extensions publiques récentes + +L’exécuteur construit désormais les opérations officielles `ScaledUiAmount`, `Pausable` et `PermissionedBurn`. Les multiplicateurs Scaled UI sont fournis sous forme de chaîne décimale, puis refusés s’ils ne sont pas strictement positifs, finis et normaux. `PermissionedBurn` conserve séparément l’autorité dédiée obligatoire et l’owner/delegate simple ou multisig du compte source. Les opérations confidentielles de burn restent hors de cette tranche. + + +## Audit Confidential Transfer + +La tranche `0.4.6-pre.048` publie uniquement le contrat audité des opérations confidentielles : inventaire des opérations, ordre exact des preuves, modes `instruction_offset` et `context_state_account`, et classification entre builders ne nécessitant que des données publiques et opérations exigeant des entrées cryptographiques générées par l’appelant. + +Un offset inline nul est refusé : la valeur wire `0` est réservée au mode compte de contexte. Les instructions Token-2022, les instructions du programme ZK ElGamal Proof et les instructions du registre ElGamal restent trois surfaces techniques distinctes. Aucun chiffrement, déchiffrement, secret ou preuve n’est généré par ce crate. + +## Confidential Transfer public-data builders + +The executor constructs the six Confidential Transfer operations whose complete wire payload is public and requires no caller-generated proof or ciphertext: account approval, public deposit, and the four credit toggles. Initialize/update mint and apply-pending-balance remain deferred because their official data contracts include ElGamal or decryptable-balance material that must be supplied as bounded opaque caller input. + +## Confidential Transfer — entrées cryptographiques opaques + +L’exécuteur accepte désormais les clés publiques ElGamal de 32 octets et les balances déchiffrables de 36 octets sous forme hexadécimale stricte. Il construit `InitializeMint`, `UpdateMint` et `ApplyPendingBalance` avec les builders officiels, sans générer ni dériver de secret. + +## Configuration confidentielle des comptes + +`ConfigureConfidentialTransferAccount` accepte une balance zéro déchiffrable opaque, un compteur maximal de crédits en attente, une autorité simple ou multisig et une référence `PubkeyValidity` explicite. Le mode `InstructionOffset` référence une instruction ZK déjà orchestrée dans la transaction ; le mode `ContextStateAccount` référence un contexte pré-vérifié. Le crate ne fabrique aucune preuve. + +`ConfigureConfidentialTransferAccountWithRegistry` utilise un compte ElGamal Registry explicite. Le payer de réallocation est optionnel ; lorsqu’il est présent, le builder officiel ajoute le System Program. La cohérence owner/PDA du registre reste un préflight obligatoire avant diffusion. + +## Confidential Transfer — vidage du compte + +`EmptyConfidentialTransferAccount` construit l’instruction Token-2022 `EmptyAccount` avec une référence `ZeroCiphertext` explicite. Le mode `InstructionOffset` ajoute uniquement le compte Instructions Sysvar et encode l’offset signé non nul ; le mode `ContextStateAccount` ajoute le compte de contexte readonly et encode l’offset `0`. L’autorité owner/delegate simple ou multisig reste ordonnée exactement. Le crate ne génère ni preuve ni donnée secrète. + +`WithdrawConfidentialTokens` construit l’instruction `Withdraw` avec montant brut, decimals, nouvelle balance déchiffrable opaque et deux preuves ordonnées : `CiphertextCommitmentEquality`, puis `BatchedRangeProofU64`. Chaque preuve peut être référencée par offset inline non nul ou par compte context-state ; le compte Instructions Sysvar n’est ajouté qu’une seule fois lorsqu’au moins une preuve est inline. + + +## Transfer confidentiel + +`TransferConfidentialTokens` construit l'instruction Token-2022 `ConfidentialTransferExtension::Transfer` avec une balance source déchiffrable de 36 octets, deux ciphertexts auditeur ElGamal de 64 octets et trois preuves référencées dans l'ordre officiel : Equality, Grouped Ciphertext Validity à trois handles, puis Range U128. Les preuves peuvent utiliser indépendamment un offset inline non nul ou un compte context-state. Le crate ne génère aucun ciphertext, secret ou preuve. + + +## Audit Transfer With Fee (`pre.055`) + +Le contrat audité fixe le wire `27/13`, 169 octets de payload et 171 octets de données d’instruction. Le payload Token-2022 réutilise uniquement `SplTokenDecryptableBalance` et deux `SplTokenElGamalCiphertext`. Le ciphertext de frais et les paramètres de frais restent portés par les contextes de preuve, pas par un nouveau champ opaque de l’intent Token-2022. + +### Transfer confidentiel avec frais + +`TransferConfidentialTokensWithFee` construit l’instruction Token-2022 `ConfidentialTransferExtension::TransferWithFee` avec cinq références de preuve strictement ordonnées : equality, validité trois handles, percentage with fee, validité deux handles et range U256. Chaque preuve peut être référencée par offset non nul ou par compte context-state. Le crate valide uniquement les entrées opaques fournies ; il ne produit aucune preuve ni donnée secrète. + +## Confidential Transfer Fee public operations (`pre.057`) + +The executor constructs the four proof-free public operations published by +`spl-token-2022-interface 3.1.1`: + +- initialize confidential transfer fee configuration before mint initialization; +- enable harvest to mint; +- disable harvest to mint; +- permissionless harvest of ordered, distinct source accounts to the mint. + +The initialization keeps the optional configuration authority and the exact +caller-provided 32-byte ElGamal public key. Harvest source lists use the same +non-empty, unique and `u8`-bounded contract as public transfer-fee harvests. +No ciphertext is decrypted or synthesized. + +- `withdraw_confidential_withheld_tokens_from_mint` : retrait depuis le Mint avec preuve `CiphertextCiphertextEquality` inline ou context-state. + + +## Confidential Transfer Fee — retrait multi-comptes (`pre.059`) + +`WithdrawConfidentialWithheldTokensFromAccounts` construit le retrait direct des frais confidentiels depuis une liste ordonnée de Token Accounts vers un compte destination Confidential Transfer. Le Mint reste readonly, la destination est writable, puis viennent la référence de preuve, l’autorité withdraw-withheld, les signataires multisig et enfin les sources writable. + +La liste de sources doit être non vide, unique et limitée à 255 comptes. Le nombre exact est encodé sur `u8` dans le payload. La preuve exigée est `CiphertextCiphertextEquality`, référencée par offset inline non nul ou par compte context-state. Cette opération est sensible au front-running : tout changement d’un withheld ciphertext source entre la génération de la preuve et l’exécution invalide la preuve. Le parcours recommandé pour réduire ce risque reste harvest vers Mint puis retrait depuis le Mint. diff --git a/olddocs/archivekbot2/kb_executor_stable_swap_hylo_exchange/README.md b/olddocs/archivekbot2/kb_executor_stable_swap_hylo_exchange/README.md new file mode 100644 index 0000000..2ff5196 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_stable_swap_hylo_exchange/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_stable_swap_hylo_exchange + +Ce crate réserve l'exécuteur de la surface `stable_swap_hylo_exchange`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_stable_swap_jupiter_stable/README.md b/olddocs/archivekbot2/kb_executor_stable_swap_jupiter_stable/README.md new file mode 100644 index 0000000..dde7dfe --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_stable_swap_jupiter_stable/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_stable_swap_jupiter_stable + +Ce crate réserve l'exécuteur de la surface `stable_swap_jupiter_stable`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_stable_swap_numeraire/README.md b/olddocs/archivekbot2/kb_executor_stable_swap_numeraire/README.md new file mode 100644 index 0000000..d1e9e79 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_stable_swap_numeraire/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_stable_swap_numeraire + +Ce crate réserve l'exécuteur de la surface `stable_swap_numeraire`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_stable_swap_stabble/README.md b/olddocs/archivekbot2/kb_executor_stable_swap_stabble/README.md new file mode 100644 index 0000000..cb0210f --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_stable_swap_stabble/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_stable_swap_stabble + +Ce crate réserve l'exécuteur de la surface `stable_swap_stabble`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_staking_kamino_farm/README.md b/olddocs/archivekbot2/kb_executor_staking_kamino_farm/README.md new file mode 100644 index 0000000..02362e5 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_staking_kamino_farm/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_staking_kamino_farm + +Ce crate réserve l'exécuteur de la surface `staking_kamino_farm`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_staking_marinade_finance/README.md b/olddocs/archivekbot2/kb_executor_staking_marinade_finance/README.md new file mode 100644 index 0000000..dc7f36e --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_staking_marinade_finance/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_staking_marinade_finance + +Ce crate réserve l'exécuteur de la surface `staking_marinade_finance`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_staking_solayer/README.md b/olddocs/archivekbot2/kb_executor_staking_solayer/README.md new file mode 100644 index 0000000..f634da3 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_staking_solayer/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_staking_solayer + +Ce crate réserve l'exécuteur de la surface `staking_solayer`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_treasury_helium_treasury_management/README.md b/olddocs/archivekbot2/kb_executor_treasury_helium_treasury_management/README.md new file mode 100644 index 0000000..d922e66 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_treasury_helium_treasury_management/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_treasury_helium_treasury_management + +Ce crate réserve l'exécuteur de la surface `treasury_helium_treasury_management`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_vault_carrot_defi/README.md b/olddocs/archivekbot2/kb_executor_vault_carrot_defi/README.md new file mode 100644 index 0000000..8b11e6b --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_vault_carrot_defi/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_vault_carrot_defi + +Ce crate réserve l'exécuteur de la surface `vault_carrot_defi`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_vault_hylo_stability_pool/README.md b/olddocs/archivekbot2/kb_executor_vault_hylo_stability_pool/README.md new file mode 100644 index 0000000..ce12e5e --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_vault_hylo_stability_pool/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_vault_hylo_stability_pool + +Ce crate réserve l'exécuteur de la surface `vault_hylo_stability_pool`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_vault_kamino/README.md b/olddocs/archivekbot2/kb_executor_vault_kamino/README.md new file mode 100644 index 0000000..b1739b9 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_vault_kamino/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_vault_kamino + +Ce crate réserve l'exécuteur de la surface `vault_kamino`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_vault_kamino_v2/README.md b/olddocs/archivekbot2/kb_executor_vault_kamino_v2/README.md new file mode 100644 index 0000000..bef1f0e --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_vault_kamino_v2/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_vault_kamino_v2 + +Ce crate réserve l'exécuteur de la surface `vault_kamino_v2`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_vault_kamino_yvaults/README.md b/olddocs/archivekbot2/kb_executor_vault_kamino_yvaults/README.md new file mode 100644 index 0000000..9b7bdd6 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_vault_kamino_yvaults/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_vault_kamino_yvaults + +Ce crate réserve l'exécuteur de la surface `vault_kamino_yvaults`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_vault_meteora/README.md b/olddocs/archivekbot2/kb_executor_vault_meteora/README.md new file mode 100644 index 0000000..0ba203e --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_vault_meteora/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_vault_meteora + +Ce crate réserve l'exécuteur de la surface `vault_meteora`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_vesting_streamflow/README.md b/olddocs/archivekbot2/kb_executor_vesting_streamflow/README.md new file mode 100644 index 0000000..0dc40fc --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_vesting_streamflow/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_vesting_streamflow + +Ce crate réserve l'exécuteur de la surface `vesting_streamflow`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_wallet_jupiter_apepro_smart_wallet/README.md b/olddocs/archivekbot2/kb_executor_wallet_jupiter_apepro_smart_wallet/README.md new file mode 100644 index 0000000..e38bbc3 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_wallet_jupiter_apepro_smart_wallet/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_wallet_jupiter_apepro_smart_wallet + +Ce crate réserve l'exécuteur de la surface `wallet_jupiter_apepro_smart_wallet`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_executor_weighted_swap_stabble/README.md b/olddocs/archivekbot2/kb_executor_weighted_swap_stabble/README.md new file mode 100644 index 0000000..0639942 --- /dev/null +++ b/olddocs/archivekbot2/kb_executor_weighted_swap_stabble/README.md @@ -0,0 +1,15 @@ + + + +# kb_executor_weighted_swap_stabble + +Ce crate réserve l'exécuteur de la surface `weighted_swap_stabble`. + +## Rôle dans l'écosystème + +Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant. + +## Statut + +Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés. + diff --git a/olddocs/archivekbot2/kb_logging/README.md b/olddocs/archivekbot2/kb_logging/README.md new file mode 100644 index 0000000..a079a90 --- /dev/null +++ b/olddocs/archivekbot2/kb_logging/README.md @@ -0,0 +1,38 @@ + + + +# kb_logging + +`kb_logging` initialise le routage `tracing` commun du workspace. + +## Responsabilité + +Le crate transforme la configuration du profil actif en layers `tracing_subscriber` et route les événements vers la console, les fichiers humains et les fichiers JSONL. Le `LoggingGuard` retourné par `init_logging` doit rester vivant pendant toute la durée du processus afin de conserver les writers non bloquants. + +Les décisions de niveau et de target sont appliquées par chaque writer de route, avec un seul filtre d’admission agrégé en amont. Elles ne créent pas un `Filtered` layer par sortie : `tracing-subscriber` réserve seulement 64 identifiants de filtres par subscriber, tandis que la matrice complète comporte désormais plus de 64 routes activables. Le filtrage writer conserve les niveaux, targets exacts, préfixes et overrides configurés sans imposer cette limite au nombre de sorties ; le filtre agrégé évite de formater un événement qu’aucune route n’accepte. + +Les chemins relatifs sont résolus depuis la racine du workspace. L’ANSI est désactivé dans les formatters fichier et retiré une seconde fois par `StripAnsiMakeWriter` afin de nettoyer les messages provenant d’une WebView ou d’une dépendance externe. + +## Contrat de targets + +`kb_logging` utilise le target canonique `kb_logging`, défini dans `src/constants.rs`. Chaque crate qui dépend de `tracing` doit suivre le même contrat avec son propre nom Cargo. + +Le test `every_tracing_crate_has_one_canonical_target_constant` inspecte les manifests du workspace et vérifie qu’une crate déclarant `tracing.workspace = true` possède exactement une constante conforme. + +## Matrice de fichiers + +Chaque profil actif configure : + +```text +logs//debug.log +logs//info.log +logs//error.jsonl +logs//app.log +logs///debug.log +logs///info.log +logs///error.jsonl +``` + +Les fichiers sont en rotation quotidienne. Les routes `debug` et `info` sont cumulatives ; les routes `error.jsonl` sont forcées au niveau `error` et n’ajoutent pas les overrides verbeux des dépendances. + +Le contrat détaillé se trouve dans `docs/LOGGING.md` et `docs/TRACING_CONTRACT.md`. diff --git a/olddocs/archivekbot2/kb_materializer_admin/README.md b/olddocs/archivekbot2/kb_materializer_admin/README.md new file mode 100644 index 0000000..520e47f --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_admin/README.md @@ -0,0 +1,25 @@ + + + +# kb_materializer_admin + +Ce crate matérialise les mutations administratives exactes et commitées qui possèdent une identité stable sans nécessiter un snapshot complet du compte. + +## Projections natives actives + +- `system_account_ownership::0` pour `assign` et `assign_with_seed` ; +- `config_account_update:store:0` pour les écritures Config génériques, avec clés, signataires, longueur, SHA-256 et préfixe borné du payload opaque ; +- `program_loader_authority:::0` pour `set_authority`, `set_authority_checked` et `transfer_authority`. +- `spl_token_authority:set_authority:0` pour les changements ou révocations d'autorité Token ; +- `spl_token_multisig::0` pour les configurations multisig classiques, avec seuil et membres ordonnés. + +Les sorties utilisent la famille matérialisée `Admin` et la politique `SuccessfulCommittedOnly`. Une transaction échouée ou une observation non commitée ne produit aucune mutation administrative. + +## Limites + +Le crate conserve l'intention commitée et les paramètres observables, mais ne prétend pas reconstruire l'état final du compte. Les données Config complètes et le bytecode Loader ne sont jamais recopiés dans les sorties matérialisées. +Les instructions ATA ne modifient aucune autorité de mint, freeze, close ou multisig et restent donc explicitement sans projection administrative. + +## État ElGamal Registry + +`materialize_elgamal_registry_state_snapshot` projette l’état exact lu du compte registre (`owner`, clé ElGamal publique et wire). Cette projection ne prétend pas revalider la preuve cryptographique depuis les seuls octets du compte et ne déchiffre aucune valeur. diff --git a/olddocs/archivekbot2/kb_materializer_api/README.md b/olddocs/archivekbot2/kb_materializer_api/README.md new file mode 100644 index 0000000..5ef5776 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_api/README.md @@ -0,0 +1,25 @@ + + + +# kb_materializer_api + +Ce crate déclare l'interface commune des matérialisateurs métier. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. + +## Contrats `0.4.0` + +Le trait `EventMaterializer` consomme des observations décodées stables et déclare les familles acceptées, l’applicabilité exacte par observation ainsi que la politique applicable aux transactions réussies ou échouées. Les sorties possèdent des clés idempotentes et un statut explicite `inserted`, `replaced`, `ignored`, `refused` ou `failed`. + +La garde commune refuse toute matérialisation de trade, liquidité ou lifecycle supposée réussie depuis une observation échouée ou non commitée. + +À partir de `0.4.1-pre.005`, le pipeline filtre une observation par surface et entrée avant le ledger et la politique. Deux événements de même famille ne sont donc plus automatiquement proposés au même matérialiseur. diff --git a/olddocs/archivekbot2/kb_materializer_bridge/README.md b/olddocs/archivekbot2/kb_materializer_bridge/README.md new file mode 100644 index 0000000..e29f17c --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_bridge/README.md @@ -0,0 +1,14 @@ + + + +# kb_materializer_bridge + +Ce crate matérialise les événements décodés de la famille `bridge` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module travaille sur les événements décodés et produit des projections métier. Il ne doit pas accéder directement au RPC, au wallet, à Tauri ou aux décodeurs spécifiques. + +## État initial + +Le crate est créé comme point d'ancrage. Les règles de promotion métier, les tables PostgreSQL et les contrôles SQL seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_materializer_compliance_audit/README.md b/olddocs/archivekbot2/kb_materializer_compliance_audit/README.md new file mode 100644 index 0000000..9a256e9 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_compliance_audit/README.md @@ -0,0 +1,19 @@ + + + +# kb_materializer_compliance_audit + +Ce crate matérialise les mutations techniques commitées qui doivent rester auditables sans recopier leurs payloads complets. + +## Projections natives actives + +`program_loader_code:::0` couvre : + +- `write` pour BPF Loader deprecated, BPF Loader, BPF Loader upgradeable et Loader v4 ; +- `copy` pour Loader v4. + +Les sorties conservent les comptes cibles, autorités, offsets, longueurs, SHA-256 et préfixes hexadécimaux bornés disponibles. Le bytecode complet n'est jamais recopié dans `kb_sol_mat_events`. + +## Politique + +La famille matérialisée est `ComplianceAudit`. Seules les observations réussies et commitées sont projetées, car la sortie décrit une mutation de code effectivement appliquée. Les tentatives échouées restent disponibles dans les observations décodées, sans être présentées comme des écritures commitées. diff --git a/olddocs/archivekbot2/kb_materializer_fees/README.md b/olddocs/archivekbot2/kb_materializer_fees/README.md new file mode 100644 index 0000000..1fb486b --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_fees/README.md @@ -0,0 +1,16 @@ + + + +# kb_materializer_fees + +Ce crate conserve le domaine commun des frais, mais n'active aucune projection pour le programme SPL Token classique. + +## Décision SPL Token classique + +SPL Token classique ne possède pas les transfer fees de Token-2022. Un transfert Token ne permet donc pas d'inventer un frais, et les frais réseau appartiennent déjà au core. Le contrat `no projection` est couvert par tests. + +Le matérialiseur reste disponible pour de futures surfaces qui produisent de véritables faits `Fee`, sans anticiper leur schéma. + +## Décision ATA + +Le wire ATA ne transporte aucun montant exact de rent ni de frais réseau. Ces coûts doivent provenir du contexte core ou de la simulation d'exécution ; aucune projection `Fee` ATA n'est donc produite. diff --git a/olddocs/archivekbot2/kb_materializer_governance/README.md b/olddocs/archivekbot2/kb_materializer_governance/README.md new file mode 100644 index 0000000..3ff3ae4 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_governance/README.md @@ -0,0 +1,14 @@ + + + +# kb_materializer_governance + +Ce crate matérialise les événements décodés de la famille `governance` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module travaille sur les événements décodés et produit des projections métier. Il ne doit pas accéder directement au RPC, au wallet, à Tauri ou aux décodeurs spécifiques. + +## État initial + +Le crate est créé comme point d'ancrage. Les règles de promotion métier, les tables PostgreSQL et les contrôles SQL seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_materializer_lending/README.md b/olddocs/archivekbot2/kb_materializer_lending/README.md new file mode 100644 index 0000000..7b8dc33 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_lending/README.md @@ -0,0 +1,14 @@ + + + +# kb_materializer_lending + +Ce crate matérialise les événements décodés de la famille `lending` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module travaille sur les événements décodés et produit des projections métier. Il ne doit pas accéder directement au RPC, au wallet, à Tauri ou aux décodeurs spécifiques. + +## État initial + +Le crate est créé comme point d'ancrage. Les règles de promotion métier, les tables PostgreSQL et les contrôles SQL seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_materializer_lifecycle/README.md b/olddocs/archivekbot2/kb_materializer_lifecycle/README.md new file mode 100644 index 0000000..26d925b --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_lifecycle/README.md @@ -0,0 +1,36 @@ + + + +# kb_materializer_lifecycle + +Ce crate matérialise des mutations lifecycle natives stables dans des projections métier génériques et versionnées. Il ne se limite pas à la famille décodée `Lifecycle` : certaines mutations exactes sont classées `Admin` ou `Audit` par le décodeur, puis promues en sortie `Lifecycle` uniquement lorsque leur effet durable est explicite et que la transaction est réussie et commitée. + +## Projections actives + +- comptes System génériques : `system_account::0` pour create/allocate ; +- Address Lookup Table : `address_lookup_table::0` ; +- loaders natifs : `program_loader:::0` ; +- Feature Gate : `feature_gate:revoke_pending_activation:0` ; +- durable nonce System : `durable_nonce_account::0` pour initialize, advance, authorize, upgrade et withdraw ; +- contexte ZK ElGamal : `zk_proof_context::0` pour l’initialisation demandée par une vérification réussie et pour la fermeture ; +- rapport Slashing : `slashing_violation_report::0` pour l’initialisation après preuve acceptée et la fermeture après rétention minimale. + +Le retrait d’un nonce account est projeté comme une opération de retrait avec fermeture conditionnelle. Le runtime détruit le compte seulement lorsque la totalité du solde est retirée ; le matérialiseur ne prétend pas reconstruire l’état final du compte à partir de l’instruction seule et ne duplique pas les deltas SOL déjà présents dans core. + +Une vérification ZK ElGamal sans compte de contexte reste en decode/audit. Lorsqu’un contexte est demandé, la projection conserve le compte de contexte, son autorité et le type de preuve, mais ne matérialise jamais la preuve cryptographique. Le rapport Slashing est un enregistrement de violation et non une pénalité appliquée par le programme ; la projection conserve explicitement `penaltyAppliedByProgram = false`. L’ancien ZK Token Proof Program reste exclu : le runtime Agave actuel est un stub sans effet et les layouts historiques ne disposent pas d’un corpus mainnet fiable. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Toute projection mutable applique `SuccessfulCommittedOnly`. +- L’applicabilité est filtrée au niveau exact de la surface, de l’entrée et, pour ZK ElGamal, de `contextStateRequested`. +- Le lifecycle ATA appartient exclusivement à `kb_materializer_token_accounts` et reste explicitement ignoré ici afin d'éviter toute duplication. +- Les écritures/copies de bytecode et changements d’autorité Loader sont pris en charge par les matérialiseurs compliance audit et admin ; Compute Budget, les précompiles de signature et les preuves ZK sans contexte restent dans decode. + +Depuis `0.4.1-pre.005`, l’applicabilité est déclarée au niveau exact de l’observation. `pre.006` ajoute les mutations loader stables, `pre.008` la révocation Feature Gate et `pre.017` les durable nonce accounts System ainsi que les comptes de contexte ZK ElGamal, puis `pre.018` les rapports Slashing. Toute transaction échouée ou observation non commitée reste refusée. + +## Comptes System génériques + +`pre.020` ajoute les sorties `system_account::0` pour `create_account`, `create_account_with_seed`, `create_account_allow_prefund`, `allocate` et `allocate_with_seed`. La projection conserve la cible, l'owner, l'espace, la seed et le montant demandé, mais ne recopie pas les deltas SOL déjà présents dans le graphe core. diff --git a/olddocs/archivekbot2/kb_materializer_liquidity/README.md b/olddocs/archivekbot2/kb_materializer_liquidity/README.md new file mode 100644 index 0000000..fc68554 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_liquidity/README.md @@ -0,0 +1,17 @@ + + + +# kb_materializer_liquidity + +Ce crate matérialise les événements décodés de la famille `liquidity` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_materializer_metadata/README.md b/olddocs/archivekbot2/kb_materializer_metadata/README.md new file mode 100644 index 0000000..74be6e5 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_metadata/README.md @@ -0,0 +1,45 @@ + + + +# kb_materializer_metadata + +Ce crate matérialise les états et observations de metadata dans une projection métier canonique. + +## Frontière + +Le matérialisateur ne lit ni RPC, ni wallet, ni Tauri. Il reçoit des snapshots déjà décodés, bornés et accompagnés de leur provenance. + +Une même réalité métier possède une seule projection canonique. Lorsqu’un snapshot de compte owned est disponible, il constitue la source autoritative de l’état final. Les instructions restent des observations de mutation et ne produisent pas une seconde copie concurrente du même état. + +## Metaplex Token Metadata + +`materialize_metaplex_metadata_snapshot` matérialise un `CanonicalMetadataAccountSnapshot` de type `MetadataV1` lorsque sa provenance est commitée. + +La projection conserve notamment : + +- l’identité stable programme/compte ; +- mint et update authority ; +- name, symbol et URI ; +- royalties en basis points ; +- primary sale et mutabilité ; +- creators, collection, uses, token standard et programmable config depuis le payload borné ; +- layout, lifecycle et version canonique ; +- source, slot, write version, signature et indices d’instruction lorsqu’ils sont disponibles. + +La fonction ne télécharge jamais l’URI externe. Sa clé de sortie stable est basée sur l’adresse du compte Metadata, afin qu’un replay ou backfill mette à jour la même identité logique au lieu de créer un doublon par instruction. + +Une provenance non commitée ou un autre layout est refusé. + +## Token-2022 incorporé + +`materialize_token_2022_metadata_snapshot` projette uniquement les extensions `TokenMetadata`, `TokenGroup` et `TokenGroupMember` d’un état Mint déjà parsé et borné. La provenance reste `token_2022_embedded_tlv`; aucun URI externe n’est téléchargé et aucune donnée Metaplex n’est fusionnée implicitement. + +Les conflits éventuels entre Metaplex, Token-2022 embedded metadata et futures sources externes doivent être résolus par une politique de provenance explicite, jamais par écrasement silencieux. + +## Metaplex Token Metadata — `0.4.7-pre.035` + +Les comptes Edition, Master Edition, Edition Marker, Token Record, Delegate Record, Authority Record, Token Owned Escrow et Reservation List sont matérialisés depuis leurs snapshots owned commités. + +Chaque compte conserve une clé stable, son lifecycle actif/expérimental/historique, sa provenance et un propriétaire unique du fait. Les comptes historiques restent matérialisables pendant les backfills et replays, mais leur politique d’exécution demeure `never_historical`. + +Les instructions décodées décrivent les mutations ; elles ne produisent pas une seconde copie concurrente de l’état final du compte. diff --git a/olddocs/archivekbot2/kb_materializer_nft/README.md b/olddocs/archivekbot2/kb_materializer_nft/README.md new file mode 100644 index 0000000..0e2a09d --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_nft/README.md @@ -0,0 +1,14 @@ + + + +# kb_materializer_nft + +Ce crate matérialise les événements décodés de la famille `nft` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module travaille sur les événements décodés et produit des projections métier. Il ne doit pas accéder directement au RPC, au wallet, à Tauri ou aux décodeurs spécifiques. + +## État initial + +Le crate est créé comme point d'ancrage. Les règles de promotion métier, les tables PostgreSQL et les contrôles SQL seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_materializer_oracle/README.md b/olddocs/archivekbot2/kb_materializer_oracle/README.md new file mode 100644 index 0000000..fb8d557 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_oracle/README.md @@ -0,0 +1,14 @@ + + + +# kb_materializer_oracle + +Ce crate matérialise les événements décodés de la famille `oracle` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module travaille sur les événements décodés et produit des projections métier. Il ne doit pas accéder directement au RPC, au wallet, à Tauri ou aux décodeurs spécifiques. + +## État initial + +Le crate est créé comme point d'ancrage. Les règles de promotion métier, les tables PostgreSQL et les contrôles SQL seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_materializer_orderbook/README.md b/olddocs/archivekbot2/kb_materializer_orderbook/README.md new file mode 100644 index 0000000..e4e98dd --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_orderbook/README.md @@ -0,0 +1,17 @@ + + + +# kb_materializer_orderbook + +Ce crate matérialise les événements décodés de la famille `orderbook` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_materializer_perpetuals/README.md b/olddocs/archivekbot2/kb_materializer_perpetuals/README.md new file mode 100644 index 0000000..38824ca --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_perpetuals/README.md @@ -0,0 +1,14 @@ + + + +# kb_materializer_perpetuals + +Ce crate matérialise les événements décodés de la famille `perpetuals` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module travaille sur les événements décodés et produit des projections métier. Il ne doit pas accéder directement au RPC, au wallet, à Tauri ou aux décodeurs spécifiques. + +## État initial + +Le crate est créé comme point d'ancrage. Les règles de promotion métier, les tables PostgreSQL et les contrôles SQL seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_materializer_pool_state/README.md b/olddocs/archivekbot2/kb_materializer_pool_state/README.md new file mode 100644 index 0000000..0d6b379 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_pool_state/README.md @@ -0,0 +1,17 @@ + + + +# kb_materializer_pool_state + +Ce crate matérialise les événements décodés de la famille `pool_state` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_materializer_rewards/README.md b/olddocs/archivekbot2/kb_materializer_rewards/README.md new file mode 100644 index 0000000..aa6af7e --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_rewards/README.md @@ -0,0 +1,17 @@ + + + +# kb_materializer_rewards + +Ce crate matérialise les événements décodés de la famille `rewards` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_materializer_risk/README.md b/olddocs/archivekbot2/kb_materializer_risk/README.md new file mode 100644 index 0000000..e40bf56 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_risk/README.md @@ -0,0 +1,18 @@ + + + +# kb_materializer_risk + +Ce crate matérialise des constats de risque factuels issus d'instructions SPL Token classiques ou ATA commitées. + +## Constats actifs + +- délégation/allowance accordée ou révoquée ; +- compte gelé ou dégelé ; +- autorité changée ou révoquée ; +- multisig structurellement faible lorsque `M = 1` et `N > 1`. +- anti-pattern ATA nested effectivement récupéré par un `RecoverNested` réussi dont les trois dérivations sont valides. + +## Limites + +Les sorties ne contiennent ni score, ni sévérité arbitraire, ni recommandation de trading. Elles séparent le constat on-chain de toute interprétation future et refusent les transactions non commitées. diff --git a/olddocs/archivekbot2/kb_materializer_routing/README.md b/olddocs/archivekbot2/kb_materializer_routing/README.md new file mode 100644 index 0000000..018841b --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_routing/README.md @@ -0,0 +1,14 @@ + + + +# kb_materializer_routing + +Ce crate matérialise les événements décodés de la famille `routing` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module travaille sur les événements décodés et produit des projections métier. Il ne doit pas accéder directement au RPC, au wallet, à Tauri ou aux décodeurs spécifiques. + +## État initial + +Le crate est créé comme point d'ancrage. Les règles de promotion métier, les tables PostgreSQL et les contrôles SQL seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_materializer_staking/README.md b/olddocs/archivekbot2/kb_materializer_staking/README.md new file mode 100644 index 0000000..9938408 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_staking/README.md @@ -0,0 +1,56 @@ + + + +# kb_materializer_staking + +Ce crate produit des projections instructionnelles stables pour les observations natives Stake et Vote décodées par `kb_decoder_solana_core`. + +## Statut + +`0.4.1-pre.021` active le matérialiseur sous l'identité : + +```text +solana_native_staking +``` + +Le matérialiseur est enregistré par `kb_app_demo::demo_decode_replay` avec les autres matérialiseurs natifs. Il applique `SuccessfulCommittedOnly` : une transaction échouée ou une observation non commitée reste décodable, mais ne produit aucune sortie métier mutable. + +## Surfaces couvertes + +### Stake Program + +Les projections sont instructionnelles et ne prétendent pas reconstruire l'état final du compte Stake. + +| Domaine | Entrées | +|-------------------|-----------------------------------------------------------------------------------| +| `stake_account` | initialize, initialize_checked, delegate_stake, deactivate, deactivate_delinquent | +| `stake_value` | split, withdraw, merge, move_stake, move_lamports | +| `stake_authority` | authorize, authorize_with_seed, authorize_checked, authorize_checked_with_seed | +| `stake_lockup` | set_lockup, set_lockup_checked | + +`redelegate` reste ignoré : l'instruction est conservée par le décodeur comme intention historique officiellement désactivée, mais elle ne doit pas produire une mutation staking réussie. + +### Vote Program + +| Domaine | Entrées | +|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `vote_account` | initialize_account, initialize_account_v2 | +| `vote_authority` | authorize, authorize_checked, authorize_with_seed, authorize_checked_with_seed | +| `vote_admin` | update_validator_identity, update_commission, update_commission_collector, update_commission_bps | +| `vote_state` | vote, vote_switch, update_vote_state, update_vote_state_switch, compact_update_vote_state, compact_update_vote_state_switch, tower_sync, tower_sync_switch | +| `vote_value` | withdraw | +| `vote_reward` | deposit_delegator_rewards | + +`deposit_delegator_rewards` produit une sortie de famille `Reward`; les autres sorties produisent une famille matérialisée `Staking`. + +## Limites explicites + +Le crate ne reconstruit pas : + +- activation/désactivation effective d'un stake par epoch ; +- crédits Vote cumulés ; +- statut final exact d'un compte après withdraw ; +- état antérieur et état suivant du compte ; +- sysvars historiques non portées par le core replay. + +Ces projections doivent donc être lues comme des événements instructionnels commités. Les snapshots d'état final seront un futur contrat distinct lorsque le replay core transportera les données de comptes et sysvars nécessaires. diff --git a/olddocs/archivekbot2/kb_materializer_token_accounts/README.md b/olddocs/archivekbot2/kb_materializer_token_accounts/README.md new file mode 100644 index 0000000..2f4f26c --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_token_accounts/README.md @@ -0,0 +1,29 @@ + + + +# kb_materializer_token_accounts + +Ce crate matérialise les mutations instructionnelles commitées du programme SPL Token classique et le lifecycle d'adresses associées ATA dans le journal générique `kb_sol_mat_events`. + +## Projections actives + +- initialisations de mint et de compte ; +- transferts, approvals/revocations, mint et burn ; +- freeze/thaw et close ; +- `SyncNative`, `InitializeImmutableOwner`, `WithdrawExcessLamports` et `UnwrapLamports`. +- `ata_created` pour `Create` ; +- `ata_created_or_reused_idempotently` pour `CreateIdempotent`, sans inventer laquelle des deux branches s'est produite ; +- `nested_ata_recovered` pour `RecoverNested`, avec wallet, mints, trois ATA et Token Program classique ou Token-2022. + +Chaque sortie conserve signature, slot, chemin, comptes, autorité, mint lorsqu'il est explicite, montant brut en chaîne et decimals présents dans le wire. Le matérialiseur utilise `SuccessfulCommittedOnly` et refuse toute transaction échouée. + +## Limites et déduplication + +La projection décrit une mutation d'instruction, jamais le snapshot final du compte. Elle ne recopie pas les changements de balances core. Le parent ATA possède uniquement le lifecycle de l'adresse associée ; les CPI SPL Token conservent la propriété exclusive des initialisations, transferts et fermetures de comptes. Le parent `Batch`, les conversions amount/UI amount, `set_authority` et la configuration multisig sont laissés respectivement aux enfants, au decode et au matérialiseur admin. + +## Corpus validé + +Le replay Mainnet du 15 juillet 2026 a produit 362 sorties `token_account` et neuf constats `risk` +depuis 370 instructions décodées. Les huit refus de matérialisation correspondent exactement à des +transactions échouées ; aucune sortie non commitée, aucun parent `Batch` dupliqué et aucun faux frais +classique n'ont été persistés. Un second replay sans force a sélectionné zéro entrée. diff --git a/olddocs/archivekbot2/kb_materializer_token_metadata_risk/README.md b/olddocs/archivekbot2/kb_materializer_token_metadata_risk/README.md new file mode 100644 index 0000000..324070d --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_token_metadata_risk/README.md @@ -0,0 +1,14 @@ + + + +# kb_materializer_token_metadata_risk + +Ce crate matérialise les événements décodés de la famille `token_metadata_risk` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module travaille sur les événements décodés et produit des projections métier. Il ne doit pas accéder directement au RPC, au wallet, à Tauri ou aux décodeurs spécifiques. + +## État initial + +Le crate est créé comme point d'ancrage. Les règles de promotion métier, les tables PostgreSQL et les contrôles SQL seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_materializer_trades/README.md b/olddocs/archivekbot2/kb_materializer_trades/README.md new file mode 100644 index 0000000..1baf7c3 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_trades/README.md @@ -0,0 +1,17 @@ + + + +# kb_materializer_trades + +Ce crate matérialise les événements décodés de la famille `trades` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_materializer_transaction_annotations/README.md b/olddocs/archivekbot2/kb_materializer_transaction_annotations/README.md new file mode 100644 index 0000000..004d769 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_transaction_annotations/README.md @@ -0,0 +1,47 @@ + + + +# kb_materializer_transaction_annotations + +Ce crate fournit une projection réutilisable d’annotations de transaction. La première surface active est SPL Memo v1, v3 et v4 ; le domaine n’est volontairement pas fusionné avec metadata, admin, lifecycle ou compliance audit. + +## Projection Memo + +Le matérialiseur accepte uniquement les observations `spl_memo` dont le Program ID, la surface et l’entrée correspondent exactement. `add_memo`, `memo_intent` et `invalid_memo_attempt` sont reconnus afin que la politique commune puisse enregistrer un refus explicite, mais seule une observation `add_memo` réussie et commitée produit une sortie. + +La sortie `TransactionAnnotation` conserve : + +- signature, slot et chemin d’instruction outer/inner ; +- génération et Program ID exacts ; +- texte UTF‑8 complet dans la borne de 4 096 octets ; +- longueur et SHA-256 du payload ; +- signataires exigés, observés et réellement vérifiés par la génération ; +- état committed, version de projection et provenance du matérialiseur ; +- clé d’idempotence déterministe fondée sur signature, chemin, Program ID et hash. + +Pour v1, les comptes signers restent observables mais la liste `verified` est vide, car le runtime historique ne les vérifie pas. Pour v3/v4, une projection commitée exige l’égalité ordonnée entre signataires requis et observés, doublons compris. + +## Persistance et replay + +La sortie utilise le store commun `kb_sol_mat_events` avec la famille `transaction_annotation`. Aucune migration SQL supplémentaire n’est nécessaire et les événements decode/core ne sont pas dupliqués. Le ledger commun assure : + +- replay identique et même version : skip ; +- force replay : remplacement atomique des sorties appartenant à la version ciblée ; +- changement de version : identité de processor distincte et déterministe. + +Les transactions échouées, observations non commitées, UTF‑8 invalides et validations de signataires invalides restent uniquement dans `kb_sol_decode_events`. Les comptes complets, flags writable, préfixes diagnostics, erreurs UTF‑8 et preuves détaillées restent également dans l’événement décodé ; la projection ne conserve que les champs utiles à la consultation d’annotations. + +## Consultation + +La fenêtre `demo_decode_replay` affiche les sorties comme un journal d’annotations, et non comme une série OHLC : slot, signature, instruction path, génération, texte, longueur, signataires vérifiés, hash et provenance. La lecture passe par le contrat borné `DecodePipelineStore::list_materialized_events`, filtré exactement sur le processor `transaction_annotations` et la famille `transaction_annotation` ; aucun SQL libre ni payload JSON arbitraire ne traverse l’UI. + +La démo d’exécution Memo v4 réutilise ce même contrat de lecture pour vérifier la projection après confirmation. Trois transactions Devnet réelles ont chacune produit exactement une annotation ; le second replay a été `skipped` sans sortie supplémentaire ni refus. Cette projection reste un journal consultable et corrélable, pas une agrégation temporelle de type OHLC. + +Le parcours Mainnet du 14 juillet 2026 a acquis puis extrait 300 transactions réelles, 100 par Program ID. Le replay a décodé 102 instructions v1, 439 v3 et 100 v4 sans unmatched ni échec de décodage. La projection a produit respectivement 69, 422 et 100 annotations ; les 33 refus v1 et 17 refus v3 correspondaient aux intentions issues de transactions échouées. Un second replay v3 non forcé a sélectionné zéro entrée, validant le skip idempotent du ledger. Les campagnes forcées v3/v4 ont également reproduit les mêmes nombres de sorties. + +## Règles locales + +- `SuccessfulCommittedOnly` est appliqué avant toute sortie. +- Un payload décodé incohérent échoue fermé avec un diagnostic stable. +- Le target tracing canonique est `kb_materializer_transaction_annotations`. +- Aucun log ne contient de clé privée ni de texte Memo complet. diff --git a/olddocs/archivekbot2/kb_materializer_vault/README.md b/olddocs/archivekbot2/kb_materializer_vault/README.md new file mode 100644 index 0000000..58f4ef5 --- /dev/null +++ b/olddocs/archivekbot2/kb_materializer_vault/README.md @@ -0,0 +1,14 @@ + + + +# kb_materializer_vault + +Ce crate matérialise les événements décodés de la famille `vault` dans les tables métier correspondantes. + +## Rôle dans l'écosystème + +Ce module travaille sur les événements décodés et produit des projections métier. Il ne doit pas accéder directement au RPC, au wallet, à Tauri ou aux décodeurs spécifiques. + +## État initial + +Le crate est créé comme point d'ancrage. Les règles de promotion métier, les tables PostgreSQL et les contrôles SQL seront ajoutés dans des deltas dédiés. diff --git a/olddocs/archivekbot2/kb_model/README.md b/olddocs/archivekbot2/kb_model/README.md new file mode 100644 index 0000000..d07762a --- /dev/null +++ b/olddocs/archivekbot2/kb_model/README.md @@ -0,0 +1,32 @@ + + + +# kb_model + +Ce crate définit les modèles neutres utilisés par l'ingestion, l'extraction, le décodage et la matérialisation. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. + +## Contrat canonique `0.3.2` + +Le crate expose maintenant `CanonicalTransaction` et les structures associées pour représenter une transaction Solana indépendamment de sa source. Le contrat couvre les transactions legacy et v0, les comptes statiques et chargés par ALT, les instructions externes et internes, les logs, les balances SOL/SPL, les erreurs, rewards, return data, compute units et block time. + +La sérialisation canonique : + +- utilise des noms de champs stables en camelCase ; +- trie récursivement les clés des objets JSON ; +- conserve signatures et public keys en base58 ; +- conserve les payloads binaires en base64 ; +- conserve les valeurs entières et recalcule localement les montants SPL décimaux à partir du montant brut et des décimales ; +- exclut toute information de provider, endpoint ou transport ; +- calcule `canonical_json_hash` en SHA-256 sur le JSON compact déterministe. + diff --git a/olddocs/archivekbot2/kb_pipeline/README.md b/olddocs/archivekbot2/kb_pipeline/README.md new file mode 100644 index 0000000..5344097 --- /dev/null +++ b/olddocs/archivekbot2/kb_pipeline/README.md @@ -0,0 +1,214 @@ + + + +# kb_pipeline + +Ce crate orchestre les étapes d'ingestion, extraction, observation, décodage, matérialisation et validation. + + +## Lectures stateful Token-2022 et ElGamal Registry + +`read_token_2022_stateful_snapshot` effectue un `getAccountInfo` complet avec commitment `confirmed`, `minContextSlot` optionnel et limite de données explicite comprise entre 1 et 65 536 octets. La réponse est refusée avant parsing si le compte est absent, exécutable, détenu par un autre programme, plus grand que la limite ou si les données décodées ne couvrent pas exactement `space`. Le buffer validé est ensuite parsé comme Mint, Account ou Multisig et routé vers les matérialiseurs propriétaires token accounts, metadata/group, fees et admin. + +`read_elgamal_registry_stateful_snapshot` applique le même contrat avec une taille exacte de 64 octets, le Program ID propre du registre et la validation du PDA dérivé du propriétaire stocké. Ces fonctions n'effectuent ni déchiffrement ni validation rétroactive des preuves cryptographiques. + +Les variantes pures `materialize_token_2022_account_info_result` et `materialize_elgamal_registry_account_info_result` permettent de tester ou réutiliser la validation d'une réponse RPC déjà obtenue. + +## Token-2022 state snapshots + +`materialize_token_2022_stateful_snapshot` validates the Token-2022 owner boundary, parses one bounded Mint, Account, or Multisig buffer, checks embedded Token Metadata and Token Group mint identities against the carrying account, and routes outputs to their unique materializers. The function does not perform RPC reads itself; callers retain control over endpoint selection, account-data bounds, commitment, and post-execution timing. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. + +## Backfill HTTP 0.3.3 + +Le crate expose `execute_http_backfill`, `BackfillRequest`, `BackfillSource` et `BackfillObserver`. Le moteur prend en charge les signatures explicites et les historiques programme/token/pool. Une recherche `Before` sans ancre commence sur les signatures les plus récentes et utilise un `filter_code` `program_latest`, `token_latest` ou `pool_latest`; une recherche `After` conserve une ancre obligatoire. Il applique les limites des rôles `kb_rpc`, normalise avec `getTransaction`, écrit le store canonique et produit une observation légère par tentative. + +## Replay decode `0.4.0` + +`execute_decode_replay` sélectionne des instructions core contextualisées par signatures, états, slots, program IDs et instruction paths. Il applique un dispatch déterministe, une concurrence bornée, l’arrêt coopératif, le skip processor/version/hash, un force replay obligatoirement borné par signatures ou par autorisation « toutes les signatures », et la persistance atomique via `DecodePipelineStore`. +Depuis `0.4.1-pre.014`, le contrat core `2` ajoute les instructions outer ordonnées au calcul de `contextual_input_hash`. `DECODE_PIPELINE_VERSION` reste `1` : le changement de contrat est déjà versionné et force naturellement un nouveau hash. Après application du delta, un force replay est nécessaire pour remplacer les résultats calculés avec le contrat `1`. Les transactions, rollbacks et clés d’idempotence du pipeline restent inchangés. + +La matérialisation reste optionnelle, exige au moins un matérialiseur enregistré et n’est appelée qu’après la persistance réussie du décodage. Depuis `0.4.1-pre.005`, la sélection vérifie d’abord l’applicabilité exacte surface/entrée ; les observations de même famille mais hors périmètre ne créent plus de faux refus. Le résumé distingue les statuts par processor, les skips, les sorties matérialisées et les refus de politique. + +## Tracing opérationnel + +`kb_pipeline` utilise le target canonique `kb_pipeline`. Les champs `action`, `campaign_id`, `capture_session_id`, `signature`, `instruction_path`, processor et statut remplacent les anciens targets suffixés par module. + +Le backfill journalise sa validation, la sélection du client, la découverte des candidats, les erreurs terminales et le résumé. Le replay decode émet un événement `error` pour tout input sélectionné mais unmatched, tout résultat `failed`/`unsupported`, tout résultat de matérialisation `failed` et toute erreur de persistance. Une annulation coopérative reste un `warn`, et une transaction on-chain échouée mais correctement décodée n’est pas une erreur logicielle. + +## Orchestration Devnet `0.4.2-pre.009` + +`execute_devnet_system_transfer` relie les briques déjà stabilisées sans les fusionner. L’appel vérifie le genesis hash Devnet, charge ou crée le wallet temporaire persistant du profil, contrôle si le destinataire existe et impose le minimum rent-exempt retourné par le RPC pour une adresse neuve, contrôle le solde et l’airdrop éventuel, construit un plan System transfer, estime les frais, simule le message exact, puis signe et envoie uniquement lorsque `submit` et la confirmation opérateur sont explicites. + +Après confirmation, l’orchestrateur réutilise successivement : + +```text +execute_http_backfill + -> execute_core_extraction + -> execute_decode_replay +``` + +La signature exacte est l’unique sélection de chaque campagne. Le résumé conserve séparément le plan, le blockhash, les frais, la simulation, l’envoi, la confirmation, le backfill, l’extraction, le replay et le diagnostic agrégé. Le mode simulation seule retourne avant signature et ne crée pas de faux diagnostic post-exécution. Après signature, les erreurs d’envoi, de confirmation ou de replay restent attachées à la signature dans le résumé au lieu de masquer une transaction potentiellement diffusée. + +`SolanaExecutionObserver` compose les observers existants du backfill, de l’extraction et du replay avec les événements propres à l’exécution. Cette API reste utilisable par une CLI, un worker ou une application distincte de `kb_app_demo`. + +Le test réseau réel reste opt-in via `KB_DEVNET_EXECUTION_TEST=1`; il n’est jamais lancé par la suite de tests standard. Il a été validé avec un wallet préfinancé et un transfert de 1 000 000 lamports vers une adresse neuve. Une simulation refusée conserve son erreur runtime et un extrait borné des logs afin de distinguer un défaut de transaction d’un défaut de transport. + +## Orchestration Memo v4 Devnet `0.4.3-pre.004` + +`execute_devnet_memo` est le parcours opérateur Devnet de l’exécuteur SPL Memo universel. La restriction à v4 et Devnet appartient uniquement à cette démonstration : `kb_executor_spl_memo` reste capable de construire v1, v3 et v4 pour tous les clusters, sous le contrôle de la politique commune et de la simulation effective du programme demandé. + +`DevnetMemoExecutionRequest::new` produit un dry-run. Le champ `submit` n’autorise la signature et l’envoi qu’avec un profil Devnet mutable et la confirmation opérateur requise. Le wallet temporaire persistant du profil paie uniquement les frais réseau ; le plan annonce une dépense d’instruction nulle. Le wallet peut également être fourni comme compte signer readonly du Memo afin de valider le contrat runtime v4 sans exposer une seconde clé. + +Après une simulation réussie et un envoi explicitement autorisé, le parcours confirme la signature puis enchaîne l’hydratation canonique, l’extraction core, le decode replay Memo avec matérialisation, une lecture bornée de la projection `transaction_annotation` et un second replay non forcé. Le résumé conserve les lignes d’annotation exactes et le résultat du second replay ; celui-ci doit rester sans échec, sans nouvelle sortie matérialisée et sans refus pour établir l’idempotence. + +La première tranche n’ajoute aucune commande ni fenêtre Tauri. Elle stabilise le contrat backend avant l’exposition dans `kb_app_demo`. Le wallet Devnet doit déjà disposer du solde nécessaire au plafond de frais configuré ; aucun airdrop implicite n’est déclenché par le parcours Memo. + +Le test réseau est opt-in avec `KB_DEVNET_MEMO_EXECUTION_TEST=1` et exige `KB_POSTGRES_TEST_URL`. Il reste en simulation seule par défaut. L’envoi réel demande en plus `KB_DEVNET_MEMO_SUBMIT=1`, ce qui constitue l’autorisation explicite de dépenser les frais Devnet et d’exécuter toute la post-validation. `KB_DEVNET_WALLET_DIR` permet de sélectionner le wallet persistant déjà financé. + +Le parcours a été validé réellement le 15 juillet 2026 : une simulation seule, puis trois envois v4 confirmés. Les trois transactions ont été insérées, extraites, décodées et matérialisées ; leurs seconds replays ont chacun compté un skip, zéro échec, zéro refus et zéro nouvelle sortie matérialisée. + + +## Préflight stateful Solana Core + +`inspect_solana_core_stateful_readiness(pool, request)` lit de manière bornée les comptes et l’époque nécessaires avant simulation. La requête contient un rôle HTTP, le cluster attendu Localnet/Devnet et un `SolanaCoreOperation`. Le résultat contient `Ready`, `Blocked` ou `NotRequired`, un slot de contexte, des contrôles ordonnés et des faits mesurés. + +La fonction couvre ALT, Config, Feature, Slashing et les contextes ZK ElGamal. Elle vérifie le genesis hash, mais ne construit pas le plan, ne signe pas, ne simule pas et n’envoie pas. Les erreurs de transport ou de forme RPC restent des `kb_core::Error`; une précondition métier non satisfaite produit un rapport `Blocked` exploitable par les CLI, workers et interfaces. + +## Préflight stateful SPL Token classique `0.4.4-pre.005` + +`inspect_spl_token_stateful_readiness` conserve l’exécuteur déterministe et sans I/O. Le pipeline vérifie le genesis Localnet/Devnet puis lit au maximum 128 comptes complets, chacun borné à la taille officielle maximale du multisig classique. Les parseurs locaux reproduisent exactement les layouts `Mint` de 82 octets, `Account` de 165 octets et `Multisig` de 355 octets, sans activer `bincode` et sans accepter de suffixe. + +Le rapport `Ready` ou `Blocked` expose owner programme, existence, layout, initialisation, mint, decimals, état frozen, solde brut, réserve native, delegate et allowance, autorités mint/freeze/owner/close, ainsi que `M/N` et les membres effectivement fournis. Les comptes à initialiser sont également comparés au minimum rent-exempt renvoyé par le cluster. `Batch` conserve l’ordre de ses enfants et mutualise les lectures de comptes. + +Les tests standards restent entièrement offline. Le test `optional_devnet_checked_transfer_readiness_from_env` est activé uniquement par `KB_DEVNET_SPL_TOKEN_PREFLIGHT_TEST=1`; il exige les variables `KB_DEVNET_SPL_TOKEN_SOURCE`, `KB_DEVNET_SPL_TOKEN_MINT`, `KB_DEVNET_SPL_TOKEN_DESTINATION` et `KB_DEVNET_SPL_TOKEN_AUTHORITY`. `KB_DEVNET_SPL_TOKEN_DECIMALS` et `KB_DEVNET_SPL_TOKEN_AMOUNT` sont optionnels. Ce test lit et vérifie un `TransferChecked`, mais ne signe, ne simule et n’envoie rien. Le parcours complet de création contrôlée, simulation, envoi et post-validation reste une étape d’orchestration distincte. + +## Orchestration SPL Token Devnet `0.4.4-pre.005-delta-fix-001` + +`simulate_devnet_spl_token` accepte une opération typée universelle mais impose Devnet dans ce parcours opérateur. Il exécute le préflight stateful, charge le wallet persistant du profil comme fee payer, construit le plan officiel, applique la safety commune, estime les frais et simule la transaction exacte avec une preuve liée au hash du message. Cette API ne dépend d’aucun store, ne signe pas et exige `submit=false`. + +`execute_devnet_spl_token` réutilise exactement la même préparation. L’envoi demande `submit=true`, la confirmation opérateur configurée et un wallet capable de résoudre tous les signataires du message ; une autorité externe ou un multisig non disponible est refusé avant signature. Après confirmation, l’orchestrateur hydrate la transaction canonique, exécute core extraction, rejoue uniquement le programme Token classique, lit les matérialisations de la signature et lance un second replay pour vérifier l’absence de nouvelle sortie. + +Le test réseau `optional_devnet_checked_transfer_simulation_and_submission_from_env` utilise les mêmes variables que le préflight, avec `KB_DEVNET_SPL_TOKEN_EXECUTION_TEST=1`. Il reste en simulation seule par défaut. `KB_DEVNET_SPL_TOKEN_SUBMIT=1` autorise l’envoi et exige alors `KB_POSTGRES_TEST_URL`; le wallet sélectionné par `KB_DEVNET_WALLET_DIR` doit correspondre à l’autorité Token fournie. + +La simulation puis l’envoi réel ont réussi sur Devnet le 15 juillet 2026 avec deux comptes Token auxiliaires classiques. Le test soumis vérifie désormais explicitement la soumission, la confirmation, le premier replay sans échec ni refus, la présence d’une matérialisation et le second replay sans nouvelle sortie ; avec `--nocapture`, il imprime la signature, le statut et le nombre de matérialisations. + +Le probe `optional_devnet_recent_instruction_probe_from_env`, activé par +`KB_DEVNET_SPL_TOKEN_RECENT_PROBE_TEST=1`, audite séparément les deux tags récents sans envoi. Son +`Batch` contient un `TransferChecked` de montant brut nul sur les comptes classiques déjà contrôlés. +`UnwrapLamports` utilise un compte wrapped SOL auxiliaire classique fourni par +`KB_DEVNET_SPL_TOKEN_NATIVE_ACCOUNT` et simule le retrait d'un lamport vers l'autorité. Le compte +natif doit être initialisé, possédé par le programme Token classique, contenir au moins un lamport +wrapped et avoir `KB_DEVNET_SPL_TOKEN_AUTHORITY` comme owner ou close authority. + +Le test n'impose pas le succès runtime : il imprime pour chaque tag `success`, l'erreur, les compute +units et les logs afin qu'un rejet de déploiement reste une preuve d'audit exploitable. Il échoue en +revanche lorsque le préflight, la configuration ou le transport RPC ne permettent pas d'atteindre +la simulation. Il ne signe et n'envoie aucune transaction. + +Le probe exécuté le 16 juillet 2026 sur le programme classique Devnet a réussi pour les deux tags : +`Batch` a consommé 270 compute units et `UnwrapLamports` 140, sans erreur runtime. Cette preuve +simulation-only établit le déploiement Devnet observé, mais ne vaut ni soumission ni validation de +déploiement Localnet, Testnet ou Mainnet. + +## Lifecycle SPL Token Devnet `0.4.4-pre.006` + +`prepare_devnet_spl_token_lifecycle_accounts` remplace la commande CLI historique `solana create-account`, absente de Solana CLI 4. Il génère trois keypairs éphémères, mesure le rent exact, construit trois `SystemCreateAccount` avec les tailles 82/165/165 et le propriétaire Token classique, simule, signe avec le payeur et le nouveau compte, confirme puis vérifie les données entièrement nulles. Cette préparation dépense du rent et exige donc `submit=true` et confirmation opérateur explicite. + +`execute_devnet_spl_token_lifecycle` accepte ensuite le mint et les deux comptes Token frais, rent-exempt, non initialisés et possédés par le programme classique. Il refuse les alias de comptes, les montants non canoniques, une délégation vers l'autorité elle-même et toute exécution sans `submit=true` et confirmation opérateur explicite. + +Le lifecycle conserve les montants bruts en chaînes et enchaîne onze appels à l'orchestrateur unitaire : `InitializeMint2`, deux `InitializeAccount3`, `MintToChecked`, `TransferChecked`, `ApproveChecked`, `Revoke`, deux `BurnChecked` et deux `CloseAccount`. Le montant minté est exactement réparti entre les deux burns. Chaque étape doit produire une signature confirmée, une matérialisation et un second replay sans nouvelle sortie avant le début de la suivante. Une séquence partiellement réussie n'est jamais présentée comme atomique ni automatiquement compensée. + +Le test opt-in prépare et consomme automatiquement des comptes frais avec `KB_DEVNET_SPL_TOKEN_LIFECYCLE_PREPARE=1`. Les variables manuelles `MINT`, `SOURCE`, `DESTINATION`, `DELEGATE` et `AUTHORITY` restent acceptées lorsque la préparation automatique est désactivée. + +Une reprise utilise `KB_DEVNET_SPL_TOKEN_LIFECYCLE_FIRST_STEP_INDEX` et exige `KB_DEVNET_SPL_TOKEN_LIFECYCLE_RESUME_PREDECESSOR_SIGNATURE`. La signature n'est pas un simple acquittement opérateur : elle doit produire la transaction canonique réussie et exactement l'opération matérialisée attendue pour l'étape précédente. `KB_DEVNET_SPL_TOKEN_LIFECYCLE_INTER_STEP_DELAY_MS`, borné à 30 secondes, espace les étapes ; le test imprime chaque signature dès la récupération ou la validation correspondante. + +## Orchestration ATA Devnet `0.4.5-pre.006` + +Le test opt-in `optional_devnet_operation_from_env` appelle le même orchestrateur que Tauri. Il +reste en simulation seule par défaut et demande `KB_DEVNET_SPL_ATA_EXECUTION_TEST=1`. Le mode +`create_idempotent`, utilisé par défaut, reçoit `KB_DEVNET_SPL_ATA_MINT`. Le mode +`recover_nested` exige en plus : + +```text +KB_DEVNET_SPL_ATA_OPERATION=recover_nested +KB_DEVNET_SPL_ATA_OWNER_MINT= +KB_DEVNET_SPL_ATA_NESTED_MINT= +KB_DEVNET_SPL_ATA_TOKEN_PROGRAM=classic|token_2022 +``` + +La fixture doit exister avant le test : les deux mints sont initialisés sous le Token Program +sélectionné ; l'ATA owner du wallet, le nested ATA dérivé avec cet ATA comme owner et l'ATA de +destination du wallet sont initialisés et cohérents. Un solde positif du nested mint rend le transfert +observable. `KB_DEVNET_SPL_ATA_SUBMIT=1` autorise ensuite explicitement la récupération destructive. +Le wallet persistant du profil doit être le wallet owner et signer ; aucun autre signataire n'est +résolu silencieusement. + +Après confirmation, le test exige la fermeture du nested ATA, la cohérence des deux comptes +restants, la projection lifecycle `nested_ata_recovered`, le fait distinct +`nested_ata_anti_pattern_recovered` sans score et un second replay sans nouvelle sortie. Les CPI +Token classiques restent la propriété des matérialiseurs Token ; les CPI Token-2022 ne commencent +pas le décodage général réservé à `0.4.6`. + +Le scénario classique contrôlé a été validé sur Devnet le 16 juillet 2026. La signature +`37LG6GdMRp5ECG8qf1RSYxmriJk75UtCwqwzXZWpArebkKo6BQvGhYEnbDh2A6KWiUaHK28Zy1gGGZ5zihvrHskM` +a déplacé 1 000 000 000 unités brutes vers l'ATA du wallet, fermé le nested ATA et produit exactement +deux matérialisations parent ATA. L'owner ATA est resté initialisé et le second replay n'a créé +aucune nouvelle sortie. + +## Validation de clôture `0.4.5` + +La régression finale du 16 juillet 2026 confirme 90 tests pipeline, dont les préflights et +postconditions ATA offline, ainsi que le test Devnet `RecoverNested` soumis. Les régressions +associées confirment 10 tests décodeur ATA, 10 tests exécuteur ATA, 113 tests RPC, 41 tests +configuration, 111 tests application, 46 tests PostgreSQL réels et Clippy global propre. + +## Validation finale `0.4.2` + +La suite finale compte 56 tests. Le test réseau opt-in `optional_devnet_system_transfer_from_env` a réussi avec un wallet Devnet persistant préfinancé, un transfert de 1 000 000 lamports et PostgreSQL réel. Il valide le parcours commun jusqu’à l’insertion canonique, l’extraction core et le decode replay ciblé. + +Cette preuve ne contourne pas les préflights propres aux opérations administratives. Une opération ALT, Config, Feature, Slashing, ZK, Stake, Vote ou Loader doit encore produire un rapport stateful admissible et une preuve cluster dédiée avant toute exposition mutable supplémentaire. + +### Préflight stateful Token-2022 borné + +`inspect_token_2022_preflight` compose les lectures RPC validées de `pre.040` avant simulation. La requête impose un plafond de comptes distincts, un budget cumulé de données, des rôles non vides et des exigences exactes par compte (`Mint`, `Account` ou `Multisig`). Les doublons strictement identiques sont dédupliqués dans l'ordre de première apparition ; les doublons contradictoires sont refusés. + +Le préflight peut vérifier le mint et le propriétaire attendus d'un Token Account, les decimals d'un Mint, les extensions requises et, lorsque nécessaire, un registre ElGamal lu et validé par son PDA officiel. Il retourne le slot contextuel maximal observé et ne simule ni n'envoie aucune transaction. + +### Corrélation instruction/snapshot Token-2022 + +`correlate_token_2022_instruction_with_snapshot` compare un fait instructionnel matérialisé avec l’inventaire d’extensions d’un snapshot final déjà validé. Le résultat est explicitement `Confirmed`, `Contradicted` ou `NotApplicable`; il ne produit ni score, ni violation, ni persistance implicite. + +## Préflight cryptographique Token-2022 + +`inspect_token_2022_cryptographic_preflight` valide avant simulation les comptes `ProofContextState` déjà vérifiés utilisés par les builders confidentiels. La lecture est bornée à huit comptes distincts. Chaque compte doit appartenir au programme natif ZK ElGamal Proof, être non exécutable, avoir la taille exacte du type de preuve attendu et conserver le discriminant officiel correspondant. Une autorité de fermeture attendue peut être exigée. Les doublons exacts sont dédupliqués ; les exigences contradictoires échouent avant tout appel RPC. + +Cette API ne génère, ne vérifie et ne déchiffre aucune preuve. Les preuves inline restent validées par leurs offsets et par la simulation du message exact ; les comptes context-state sont vérifiés ici avant cette simulation. + +### Orchestration des preuves Token-2022 + +`orchestrate_token_2022_proofs` relie les références de preuve des intents confidentiels au rapport de préflight ZK. Le contrat conserve l'ordre des preuves, refuse les kinds, offsets ou comptes context-state dupliqués, exige l'Instructions Sysvar seulement en présence d'au moins une preuve inline, impose simulation et plafonds non nuls, et refuse toute soumission non confirmée. Il ne génère aucune preuve et ne signe aucune transaction. + +### Orchestration d’exécution Token-2022 + +`validate_token_2022_execution_readiness` relie le plan exact de l’exécuteur, le hash du message compilé, la preuve de simulation, les préflights Token-2022 et ZK, l’orchestration ordonnée des preuves et la résolution complète des signataires. Une soumission est refusée si le message simulé diffère, si un signataire manque, si le plan reste en dry-run ou si la confirmation opérateur est absente. + +Les postconditions utilisent exclusivement `confirmed`, `contradicted` et `not_applicable`. Une postcondition non implémentée ne peut jamais être transformée en succès. + +## Validation de clôture Token-2022 + +Le module `solana_token_2022_validation` impose un vocabulaire de statut explicite et un inventaire borné des preuves de validation. Un scénario end-to-end ne peut être marqué `confirmed` que si les preuves d’hydratation canonique, extraction core, replay, matérialisation et second replay sont toutes présentes. Les scénarios non exécutés ou indisponibles restent explicitement `not_run` ou `unavailable`. + +### Matrice de validation Token-2022 + +`load_token_2022_validation_matrix` charge `docs/SPL_TOKEN_2022_VALIDATION_MATRIX.json` et impose l'inventaire exact des neuf scénarios, le vocabulaire des statuts et toutes les preuves requises avant un statut `confirmed`. Une preuve observée ne peut pas être attachée à un scénario `not_run` ou `unavailable`. diff --git a/olddocs/archivekbot2/kb_program_ids/README.md b/olddocs/archivekbot2/kb_program_ids/README.md new file mode 100644 index 0000000..18fcee7 --- /dev/null +++ b/olddocs/archivekbot2/kb_program_ids/README.md @@ -0,0 +1,30 @@ + + + +# kb_program_ids + +Ce crate centralise les identifiants de programmes Solana utilisés par les décodeurs, exécuteurs, stores, applications et outils du workspace. + +## Rôle + +Il fournit une source unique pour les `program_id` connus afin d’éviter les divergences entre les crates de lecture et les crates d’exécution. + +## Règle + +Les crates spécialisés peuvent conserver un fichier `constants.rs` pour leurs constantes internes, mais les identifiants de programmes doivent être référencés via `kb_program_ids::...`. + +## Registre énumérable + +`registered_program_ids()` expose les identifiants connus avec un code stable en lower snake case. `find_registered_program_id()` permet la résolution inverse exacte d’un program ID vers ce code. Ce registre sert notamment aux sélecteurs de l’application de démonstration sans dupliquer la liste des constantes. + +## Registre natif + +`native_program_ids()` expose séparément les dix-huit programmes exécutables runtime natifs, loaders, précompiles et surfaces historiques suivis par `0.4.x`. `native_well_known_account_ids()` expose les comptes natifs non exécutables nécessaires au décodage et à l’audit. Cette liste inclut notamment `vote`, les loaders BPF v1/v2/upgradeable, loader-v4 et les précompiles Ed25519, Secp256k1 et Secp256r1, ainsi que le stateless Slashing Program `S1ashing...`. + +## Registre SPL vérifié + +Le registre distingue les trois générations Memo (`v1`, `v3`, `v4`) et conserve `MEMO_PROGRAM_ID` comme alias de compatibilité vers Memo v3. Il expose également Single Pool, Account Compression, Noop, le registre ElGamal de Token-2022 et un alias explicite pour SPL Name Service. + +## Stake Config + +`StakeConfig11111111111111111111111111111111` est exposé par `STAKE_CONFIG_ACCOUNT_ID`. L’ancien nom `STAKE_CONFIG_PROGRAM_ID` reste un alias déprécié de compatibilité, mais l’adresse ne figure plus dans `native_program_ids()`. diff --git a/olddocs/archivekbot2/kb_rpc/README.md b/olddocs/archivekbot2/kb_rpc/README.md new file mode 100644 index 0000000..d247677 --- /dev/null +++ b/olddocs/archivekbot2/kb_rpc/README.md @@ -0,0 +1,209 @@ + + + +# kb_rpc + +Ce crate contient les clients et adaptateurs Solana JSON-RPC HTTP/WebSocket du workspace. Il reste indépendant des stores concrets, des décodeurs, des matérialiseurs, du wallet et de Tauri. + + +## API publique principale + +| Famille d’exports | Usage | +|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| +| `RpcEndpoint`, `SolanaRpcClient` | Configuration d’un endpoint et abstraction minimale d’un client RPC. | +| `HttpClient`, `HttpEndpointPool` | Appels JSON-RPC HTTP et routage déterministe par rôle/request kind. | +| `WsClient`, `WsEndpointPool` | Configuration WebSocket et sélection d’un endpoint compatible par rôle. | +| `StandardWsRequest`, `StandardWsNotification`, `WsSession` | Neuf contrats PubSub typés et runtime persistant multiplexé avec unsubscribe, reconnexion et réabonnement bornés. | +| `JsonRpcRequest`, `JsonRpcResponse`, `parse_json_rpc_text(...)` | Contrats et parsing JSON-RPC 2.0 communs aux transports. | +| `GetTransactionConfig`, `GetTransactionAdapter`, `CanonicalTransactionAdapter` | Acquisition et adaptation d’une transaction vers le modèle canonique. | +| `GetSignaturesForAddressConfig`, `AddressSignatureInfo` | Pagination bornée des signatures pour les backfills. | +| configurations/résultats `execution_rpc` | Paramètres et réponses typés pour cluster, blockhash, frais, simulation, comptes, airdrop, envoi et confirmation. | +| fonctions `adapt_*` | Conversion explicite d’une valeur JSON-RPC en contrat typé validé. | +| `validate_solana_hash_text`, `validate_solana_pubkey_text`, `validate_transaction_signature_text` | Validation base58 et longueur des identifiants Solana. | +| `request_kind_from_method(...)` | Normalisation stable du nom d’une méthode pour le routage d’endpoint. | +| `StandardHttpRequest`, requêtes `Get*Request`, configurations `Rpc*Config` | Contrats configurables propres à `kb_rpc` pour toutes les méthodes HTTP standard. | + +Les méthodes réseau retournent `kb_core::Result`. Les fonctions `adapt_*` sont utiles aux tests, aux transports alternatifs et à l’analyse de réponses déjà acquises ; elles n’effectuent aucun I/O. + +### Exemple minimal + +```rust +let config = kb_rpc::GetLatestBlockhashConfig::confirmed(); +let result = client.get_latest_blockhash(&config).await?; +let blockhash = result.blockhash; +``` + +L’application choisit un `HttpClient` direct ou un `HttpEndpointPool`. Le pool vérifie les rôles et request kinds avant d’appeler le client ; il ne modifie pas la sémantique du résultat. + +## Transports et routage + +- client HTTP JSON-RPC standard basé sur `reqwest` ; +- pool HTTP sélectionné par `role` et `request_kind` ; +- client WebSocket standard basé sur `tokio-tungstenite` ; +- pool WebSocket par rôle ; +- contrats JSON-RPC 2.0 communs ; +- tracing canonique `kb_rpc` sans journalisation des secrets intégrés aux URL. + +## Acquisition canonique + +### `getTransaction` + +`GetTransactionConfig`, `GetTransactionAdapter` et `CanonicalTransactionAdapter` transforment une réponse JSON-RPC standard en `kb_model::CanonicalTransaction` indépendante du fournisseur. + +### `getSignaturesForAddress` + +`GetSignaturesForAddressConfig` construit les pages bornées `before`/`until` et `AddressSignatureInfo` conserve les métadonnées nécessaires au backfill. + +## RPC d’exécution — `0.4.2-pre.004` à `pre.013` + +Les méthodes suivantes possèdent maintenant des configurations, résultats et adaptateurs typés : + +| Méthode | Entrée principale | Résultat | +|------------------------------------------------------|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------| +| `HttpClient::get_genesis_hash` | aucune | `GenesisHashResult` avec hash et classification Devnet/Testnet/Mainnet éventuelle. | +| `HttpClient::get_latest_blockhash` | `GetLatestBlockhashConfig` | `LatestBlockhashResult` avec contexte, blockhash et dernière block height valide. | +| `HttpClient::get_fee_for_message` | message legacy/v0 sérialisé en base64, `GetFeeForMessageConfig` | `FeeForMessageResult`, dont la valeur peut être absente si le blockhash n’est plus valide. | +| `HttpClient::simulate_transaction` | transaction sérialisée en base64, `SimulateTransactionConfig` | `SimulateTransactionResult` avec erreur runtime, logs, unités, frais, blockhash de remplacement et diagnostics optionnels. | +| `HttpClient::get_account_info` | public key, `GetAccountInfoConfig` | `AccountInfoResult` avec contexte, métadonnées, `space` et données complètes optionnelles bornées. | +| `HttpClient::get_minimum_balance_for_rent_exemption` | longueur de données, `GetMinimumBalanceForRentExemptionConfig` | minimum rent-exempt en lamports pour cette taille. | +| `HttpClient::get_balance` | public key, `GetBalanceConfig` | `BalanceResult` avec contexte et lamports. | +| `HttpClient::request_airdrop` | public key, lamports, `RequestAirdropConfig` | `AirdropResult` avec signature du faucet. | +| `HttpClient::send_transaction` | transaction signée base64, signature primaire attendue, `SendTransactionConfig` | `SendTransactionResult` uniquement si la signature RPC correspond à la transaction locale. | +| `HttpClient::get_signature_statuses` | une à 256 signatures, `GetSignatureStatusesConfig` | `SignatureStatusesResult` positionnel. | +| `HttpClient::get_block_height` | `GetBlockHeightConfig` | `BlockHeightResult`. | + +Chaque méthode existe également sur `HttpEndpointPool` avec le suffixe `_for_role` afin de conserver le routage configuré. + +`SimulateTransactionConfig::unsigned_with_replacement()` prépare une simulation sans vérification de signature avec remplacement du recent blockhash. Elle permet de simuler avant la phase de signature, conformément au pipeline d’exécution du projet. + +`SimulateTransactionResult::to_execution_result(...)` convertit le résultat RPC vers `kb_execution_api::ExecutionSimulationResult`. Le contexte de cluster, de blockhash récent ou de nonce durable reste fourni explicitement par l’orchestrateur ; `kb_rpc` ne l’invente pas. + +Les adaptateurs appliquent : + +- validation base58 des genesis hashes et blockhashes ; +- validation base64 non vide et bornée des messages/transactions ; +- limite locale du nombre de snapshots de comptes demandés ; +- conservation provider-neutral des erreurs, return data, inner instructions et comptes simulés ; +- lecture metadata-only de l’existence, du solde, de l’owner, de `space` et du statut executable avec `dataSlice.length = 0` ; +- lecture optionnelle des données complètes en base64 avec limite locale, contrôle de l’encodage et égalité stricte entre `space` et longueur décodée ; +- conservation explicite du minimum rent-exempt et de la longueur de données demandée ; +- distinction entre erreur de transport/JSON-RPC et erreur runtime de la transaction simulée. + +### Modes `getAccountInfo` + +`GetAccountInfoConfig::confirmed()` conserve le mode léger historique. La requête utilise `dataSlice = { offset: 0, length: 0 }` et l’adaptateur exige un payload décodé vide tout en conservant le champ `space` complet. + +`GetAccountInfoConfig::confirmed_with_data(max_data_bytes)` demande les données complètes en omettant `dataSlice`. La limite doit être comprise entre 1 et 65 536 octets. L’adaptateur refuse avant utilisation : + +- un `space` supérieur à la limite demandée ; +- un tuple `data` mal formé ; +- un encodage différent de `base64` ; +- un payload encodé ou décodé trop grand ; +- une longueur décodée différente de `space`. + +Ce mode est utilisé pour charger exactement les 80 octets d’un compte durable nonce avant validation dans `kb_execution_solana`. Le RPC ne décode pas lui-même la sémantique du compte. + +## Classification du cluster + +Les genesis hashes officiels Devnet, Testnet et Mainnet sont reconnus. Le hash Mainnet n’a pas changé ; `mainnet-beta` reste un alias historique encore utilisé par les endpoints RPC et la CLI. Le contrat public utilise `ExecutionCluster::Mainnet`, sérialisé `mainnet`, tout en acceptant `mainnet_beta` à la désérialisation pour compatibilité. Un hash différent reste non classifié : il peut correspondre à un validateur local ou à un cluster privé et doit être rapproché du contexte attendu par l’orchestrateur. + +Pour le chemin de signature, `SimulateTransactionConfig::unsigned_exact()` conserve le blockhash du message. `unsigned_with_replacement()` reste disponible pour le diagnostic, mais son résultat est marqué par le contrat commun et ne peut pas autoriser la signature ou l’envoi du message original. + +## Envoi et confirmation bornée + +`SendTransactionConfig` interdit `skipPreflight = true` dans le chemin d’exécution. Il peut être construit depuis `ExecutionConfig`, transmet `maxRetries` et `minContextSlot`, puis vérifie que la signature retournée par le nœud est exactement la signature primaire calculée localement. + +`ConfirmTransactionConfig` borne l’intervalle et le nombre de polls. `HttpEndpointPool::confirm_transaction_for_roles` interroge `getSignatureStatuses`, contrôle l’erreur runtime, compare le commitment demandé et utilise `getBlockHeight` lorsqu’une dernière block height valide est connue. Le résultat commun contient le statut, le slot éventuel, le nombre de tentatives, la dernière block height observée et le diagnostic éventuel. + +## Frontières + +`kb_rpc` ne construit pas le message, ne résout aucun signer et ne signe rien. Il accepte uniquement un payload déjà signé et conserve l’envoi séparé de la confirmation : + +```text +PreparedExecutionPlan + -> kb_execution_solana build/simulation/signature + -> kb_rpc sendTransaction + -> kb_rpc confirmation bornée + -> orchestration post-exécution +``` + +## Validation + +Les tests offline vérifient les paramètres JSON-RPC, les réponses valides/nulles, les erreurs runtime, les hashes invalides, les payloads base64 invalides, les limites des données de compte, les divergences `space`/longueur, la classification de cluster et la conversion vers le contrat d’exécution commun. + + +## Informations d’époque pour l’exécution stateful + +`GetEpochInfoConfig`, `EpochInfoResult`, `HttpClient::get_epoch_info` et `HttpEndpointPool::get_epoch_info_for_role` encapsulent `getEpochInfo` avec commitment et `minContextSlot` optionnel. Cette primitive est utilisée pour les fenêtres de slot ALT/Slashing et les délais de fermeture. Elle reste indépendante de toute logique métier d’exécution. +## Inventaire HTTP standard configurable — `0.4.2-pre.024` + +`STANDARD_HTTP_METHODS` enregistre exactement les 52 méthodes HTTP de la référence Solana. Elles possèdent maintenant toutes un contrat typé : les 14 adaptateurs spécialisés existants restent inchangés et les 38 méthodes auparavant limitées au JSON brut utilisent des requêtes `Get*Request` propres à `kb_rpc`. + +La couche configurable ne réexporte aucun DTO d’Agave. Les options sont des champs `Option` indépendants : une valeur absente n’est pas sérialisée, tandis que `Some(false)`, `Some(0)` ou `Some([])` reste distinguable lorsqu’il s’agit d’une valeur valide du contrat RPC. Les types officiels peuvent servir d’oracle dans les tests, mais ne constituent pas l’API publique du crate. + +```rust +let request = kb_rpc::GetProgramAccountsRequest { + program_id, + config: Some(kb_rpc::RpcProgramAccountsConfig { + filters: Some(vec![kb_rpc::RpcProgramAccountFilter::DataSize(165)]), + encoding: Some(kb_rpc::RpcAccountEncoding::Base64Zstd), + data_slice: None, + commitment: Some(kb_rpc::RpcCommitmentLevel::Confirmed), + min_context_slot: Some(anchor_slot), + with_context: Some(true), + sort_results: Some(true), + }), +}; +let response = client.execute_standard_request(&request).await?; +``` + +Le même contrat est disponible via `HttpEndpointPool::execute_standard_request_for_role`. La requête fournit son nom de méthode, construit le tableau positionnel exact et définit son type de réponse associé. Le transport refuse un type absent du registre ou déclaré avec un contrat autre que `typed_adapter`. + +Les validations locales couvrent notamment : + +- 100 comptes maximum pour `getMultipleAccounts` ; +- 128 comptes verrouillés maximum pour `getRecentPrioritizationFees` ; +- 500 000 slots maximum pour les plages et limites de blocs ; +- 720 entrées maximum pour `getRecentPerformanceSamples` ; +- 128 octets décodés maximum pour un filtre memcmp ; +- refus de `processed` pour les méthodes historiques qui ne l’acceptent pas ; +- incompatibilité `jsonParsed` / `dataSlice` ; +- validation base58 de toutes les clés et blockhashes structurants. + +| Surface | Inventaire | Contrat actuel | +|--------------------|-----------------------:|-----------------------------------------------------------------------------------| +| HTTP | 52 méthodes | 52 adaptateurs typés, 0 contrat standard limité au JSON brut | +| WebSocket | 9 paires / 18 méthodes | 9 requêtes typées, 9 notifications typées et runtime persistant réutilisable | +| WebSocket instable | 3 paires | `block`, `slotsUpdates` et `vote`, refusées sans capacité explicite de l’endpoint | + +`execute_standard_method_raw` reste disponible pour les outils bas niveau qui manipulent explicitement un `StandardHttpMethodSpec`, mais n’est plus nécessaire pour couvrir une méthode HTTP standard. + +## PubSub WebSocket standard — `0.4.2-pre.025` + +`StandardWsRequest` représente exactement les neuf familles officielles. Chaque variante construit son tableau de paramètres sans valeur implicite imposée par la bibliothèque : encodage, `dataSlice`, filtres, commitment, détails de bloc, rewards, version maximale et notification anticipée de signature restent sélectionnables indépendamment. + +`adapt_standard_ws_notification` transforme les neuf méthodes de notification en `StandardWsNotification`. Les réponses contextuelles, les comptes directs ou contextualisés de `programNotification`, le marqueur `receivedSignature`, les mises à jour de slots taguées et les votes gossip sont conservés dans des types propres à `kb_rpc`. + +```rust +let client = pool.select_client_for_role_and_method("slot_notifications", "slotSubscribe")?; +let session = kb_rpc::WsSession::connect( + client, + kb_rpc::StandardWsCapabilities::default(), + kb_rpc::WsReconnectPolicy::bounded(3, 250, 2_000)?, +) +.await?; +let mut events = session.subscribe_events(); +let acknowledgement = session + .subscribe(kb_rpc::StandardWsRequest::Slot(kb_rpc::SlotSubscribeRequest)) + .await?; +let remote_id = acknowledgement.subscription.remote_subscription_id; +``` + +La session possède un identifiant local stable par souscription et suit séparément l’identifiant distant attribué par le nœud. Après reconnexion, elle réémet les requêtes actives, remappe les IDs distants et publie `SubscriptionRemapped`. L’unsubscribe explicite attend une réponse booléenne vraie ; les requêtes et désabonnements ont leurs timeouts propres. Une notification terminale `signatureNotification` retire automatiquement la souscription one-shot, tandis que `receivedSignature` la conserve jusqu’au statut terminal. La fermeture envoie des désabonnements best-effort avant la frame Close. + +Les méthodes instables `blockSubscribe`, `slotsUpdatesSubscribe` et `voteSubscribe` ne sont jamais déduites d’un simple nom de méthode demandé : `StandardWsCapabilities::from_endpoint` exige qu’un rôle activé de l’endpoint annonce explicitement le request kind correspondant, ou un wildcard volontaire. + +La première souscription réelle sert de probe du nœud. Lorsqu’une réponse JSON-RPC indique que la méthode est absente, non activée, indisponible ou non supportée, `WsSession` désactive uniquement la capacité concernée, met à jour son snapshot et refuse localement les appels suivants. Une erreur de paramètres, d’authentification ou de rate limit ne désactive pas la capacité. + +La validation finale `0.4.2` compte 113 tests `kb_rpc`. Les logs Tauri réels confirment des souscriptions et désabonnements `slot`, `root` et `program`, ainsi que le garde-fou interdisant de changer d’endpoint sans fermer la session active. L’état détaillé est documenté dans `docs/SOLANA_NATIVE_RPC_CLOSURE_AUDIT.md`. + diff --git a/olddocs/archivekbot2/kb_store_core/README.md b/olddocs/archivekbot2/kb_store_core/README.md new file mode 100644 index 0000000..9164430 --- /dev/null +++ b/olddocs/archivekbot2/kb_store_core/README.md @@ -0,0 +1,222 @@ + + + +# kb_store_core + +`kb_store_core` déclare les contrats de stockage indépendants du backend concret. + +Ce crate ne dépend pas de PostgreSQL, SQLite, Tauri ou du RPC. Il sert de frontière commune entre le pipeline, les applications, les workers et les implémentations de stockage. + +## Rôle exact + +`kb_store_core` contient : + +- les traits repository backend-agnostiques ; +- les DTOs applicatifs ou repository ; +- les entities proches des lignes SQL, sans dépendance vers PostgreSQL ; +- les types communs de pagination, tri et limites ; +- les contrats de healthcheck et de statut migrations ; +- les helpers d'erreur storage basés sur `kb_core::Error` et `kb_core::Result`. + +`kb_store_core` ne contient pas : + +- de pool PostgreSQL ; +- de SQL ; +- de migrations ; +- de logique Tauri ; +- de client RPC ; +- de dépendance vers `kb_store_pg`. + +## Layout obligatoire + +```text +src/ + lib.rs + pagination.rs + health.rs + db_error.rs + dtos.rs + entities.rs + repositories.rs + dtos/ + entities/ + repositories/ +``` + +Les fichiers `dtos.rs`, `entities.rs` et `repositories.rs` servent uniquement de façade de modules. Ils évitent `mod.rs` et conservent les sous-dossiers spécialisés. + +## Conventions de dossiers + +| Dossier | Rôle | +|-----------------|--------------------------------------------| +| `entities/` | Représentations proches des lignes SQL. | +| `dtos/` | Contrats applicatifs, Tauri ou repository. | +| `repositories/` | Traits repository backend-agnostiques. | + +Les structures Rust ne doivent pas être placées dans des modules de requêtes SQL. + +## Contrats actifs `0.3.4` + +Les premiers contrats stabilisés sont volontairement minimaux : + +| Type | Rôle | +|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| +| `RawTransactionInsert` | Entrée d’écriture pour une transaction canonique dans `kb_sol_raw_transactions`; `from_canonical` calcule le JSON et le hash déterministes. | +| `TransactionObservationInsert` | Entrée d’écriture légère pour `kb_sol_obs_transaction_observations`, sans payload source complet. | +| `TransactionObservationOrigin` | Origine `Live`, `Backfill`, `Replay`, `Repair` ou `Migration`. | +| `TransactionObservationStatus` | État technique de détection, réception, normalisation, persistance, échec ou absence temporaire. | +| `CoreTransactionInsert` | Transaction normalisée liée à la ligne canonical raw. | +| `CoreAccountKeyInsert` | Compte résolu statique ou ALT avec flags signer/writable. | +| `CoreInstructionInsert` | Instruction top-level résolue avec chemin et hash de payload. | +| `CoreInnerInstructionInsert` | Instruction CPI résolue avec parent, chemin et hash de payload. | +| `CoreLogInsert` | Log ordonné avec rattachement prudent et hash de texte. | +| `CoreBalanceChangeInsert` | Delta SOL ou token exact, déterministe et lié au compte résolu. | +| `CoreInstructionReplayInput` | Instruction avec contexte extrait, dont les instructions outer ordonnées depuis le contrat `2`, pour les décodeurs. | +| `CoreInstructionReplayFilter` | Filtre de sélection des instructions à traiter ou rejouer. | +| `CoreInstructionLifecycleMark` | Marquage d'état pour une instruction normalisée. | +| `CoreInstructionProcessingState` | État opérationnel d'une instruction pour replay partiel. | +| `DecodedEventInsert` | Entrée d'écriture future pour `kb_sol_decode_decoded_events`. | +| `MaterializedEventInsert` | Entrée d'écriture future pour `kb_sol_mat_*`. | +| `ProcessingLedgerMark` | Contrat de marquage pour `kb_sol_ops_processing_ledger`. | +| `CoreExtractionSelectionFilter` | Sélection bornée par signatures, slots, état raw ou programme déjà indexé. | +| `ProcessingLedgerIdentity` | Identité stable stage/processor/version/input/hash. | +| `CoreExtractionBundle` | Graphe complet à persister atomiquement pour une signature. | +| `CoreExtractionFailure` | Échec rejouable avec code et message explicites. | +| `RawPayloadLifecycleMark` | Marquage d'état de rétention et de traitement raw. | +| `InsertOutcome` | Résultat commun d'insert, upsert ou skip. | +| `PageRequest` | Contrat de pagination borné. | +| `SortDirection` | Contrat de tri générique. | +| `StoreBackendDescriptor` | Diagnostic backend sans exposer le DSN complet. | +| `StoreMigrationSnapshot` | Diagnostic de version migrations sans imposer une stratégie SQL. | + +## Traits repository + +Les traits publics de `0.2.1` sont async et sans implémentation SQL : + +```text +StoreHealthStore +RawTransactionStore +CoreTransactionStore +CoreExtractionStore +ProgramObservationStore +DecodedEventStore +MaterializedEventStore +ProcessingLedgerStore +``` + +Ils définissent les frontières utilisées par `kb_store_pg`, `kb_store_sqlite`, le pipeline et les futures fenêtres de diagnostic. + +## Convention `Entity` + +Une `Entity` représente une ligne logique stockée. Elle reste proche de la DB, mais ne doit pas imposer PostgreSQL dans `kb_store_core`. + +Exemples actuels : + +```text +RawTransactionRow +TransactionObservationRow +CoreTransactionRow +CoreAccountKeyRow +CoreInstructionRow +CoreInnerInstructionRow +CoreLogRow +CoreBalanceChangeRow +DecodedEventRow +MaterializedEventRow +ProcessingLedgerRow +``` + +## Convention `Dto` + +Un `Dto` représente un contrat d'entrée, de sortie ou de diagnostic. + +Exemples actuels : + +```text +RawTransactionInsert +TransactionObservationInsert +CoreTransactionInsert +CoreAccountKeyInsert +CoreInstructionInsert +CoreInnerInstructionInsert +CoreLogInsert +CoreBalanceChangeInsert +CoreInstructionReplayInput +StoreBackendDescriptor +StoreMigrationSnapshot +``` + +## Tables Solana référencées + +Les traits et DTOs doivent référencer les tables Solana par convention logique, mais sans SQL concret. Le nom physique PostgreSQL suit : + +```text +kb_sol__ +``` + +Exemples : + +```text +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +kb_sol_core_transactions +kb_sol_core_account_keys +kb_sol_core_instructions +kb_sol_core_inner_instructions +kb_sol_core_logs +kb_sol_core_balance_changes +kb_sol_obs_program_observations +kb_sol_ops_processing_ledger +``` + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs`. +- Les erreurs passent par `kb_core::Error` et `kb_core::Result`. +- Le crate doit rester testable offline. + +## Replay instruction-level + +Le replay opérationnel doit pouvoir cibler `CoreInstructionRow`, pas seulement `CoreTransactionRow`. Cela permet à un décodeur de demander uniquement les instructions `Pending`, `Failed` ou `ReplayRequested`, filtrées par `program_id` et plage de slots. + +Le décodage réel doit ensuite recevoir `CoreInstructionReplayInput`, c'est-à-dire une instruction avec son contexte extrait : comptes résolus, inner instructions, logs, balances et erreur de transaction. Cette décision prépare les futures tables `kb_sol_core_instructions`, `kb_sol_core_logs`, `kb_sol_core_balance_changes` et `kb_sol_ops_processing_ledger` sans figer encore leur SQL exact. + + +## Extension `0.2.4` + +`0.2.4` rend les contrats core effectivement utilisés par `kb_store_pg`. Le replay reste planifié depuis `CoreInstructionRow`, mais les décodeurs reçoivent `CoreInstructionReplayInput` avec account keys, inner instructions, logs et balance changes. + +Le champ `balance_change_index` est ajouté au contrat `CoreBalanceChangeInsert` afin de dédupliquer les balance changes par ordre d'extraction dans une transaction. + +## Migration corrective `0.3.1` + +Les noms historiques `RawRpcTransaction*`, `RawWsNotification*`, `kb_sol_raw_rpc_transactions` et `kb_sol_raw_ws_notifications` restent uniquement dans les migrations et la documentation historique `0.2.x`. + +Le contrat actif utilise : + +```text +RawTransaction* +TransactionObservation* +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +``` + +La transaction canonique contient le document rejouable source-indépendant et sa version. L’observation conserve uniquement la provenance, la méthode, les timestamps, les tailles, les hashes et les statuts techniques. + +## Contrat atomique `0.3.4` + +`CoreExtractionStore` sépare la logique de transformation de l’implémentation SQL. Le pipeline peut sélectionner les lignes raw, vérifier le ledger, persister un `CoreExtractionBundle` ou enregistrer un `CoreExtractionFailure` sans dépendre de PostgreSQL. + +## Contrats decode et matérialisation `0.4.0` + +`DecodePipelineStore` regroupe les opérations backend-agnostiques de sélection, skip, couverture, persistance atomique decode, échec et matérialisation. Les DTOs `DecodePersistenceBundle` et `MaterializationPersistenceBundle` imposent la cohérence entre processor, version, input key/hash, signature, instruction path, sorties et ledger. + +La couverture machine-readable est portée par `DecodeCoverageDeclarationInsert`, `DecodeCoverageObservationInsert` et `DecodeCoverageSummaryRow`. + +## Contrat contextualisé `2` + +Depuis `0.4.1-pre.014`, `CoreInstructionReplayInput` transporte `outer_instructions_json`, obligatoirement un tableau JSON. Chaque entrée représente une instruction outer avec `instructionIndex`, `instructionPath`, `programId`, `payloadJson` et `payloadHash`. La liste inclut l’instruction cible et conserve l’ordre numérique du message. Ce champ participe à la sérialisation déterministe et donc au hash de replay. + +Ce changement est purement contractuel : il ne requiert aucune migration SQL et ne modifie pas les garanties d’idempotence ou de rollback des stores. diff --git a/olddocs/archivekbot2/kb_store_pg/README.md b/olddocs/archivekbot2/kb_store_pg/README.md new file mode 100644 index 0000000..b57f152 --- /dev/null +++ b/olddocs/archivekbot2/kb_store_pg/README.md @@ -0,0 +1,246 @@ + + + +# kb_store_pg + +`kb_store_pg` implémente le backend PostgreSQL destiné à la production. + +Ce crate dépend de `kb_store_core` pour les contrats et fournit les implémentations concrètes PostgreSQL : pool, healthcheck, migrations, requêtes SQL et repositories. + +## Rôle exact + +`kb_store_pg` contient : + +- le handle de store PostgreSQL ; +- la création effective du pool PostgreSQL ; +- le healthcheck PostgreSQL minimal ; +- les diagnostics backend : DSN masqué, schéma courant et version serveur ; +- la stratégie de migrations PostgreSQL ; +- les requêtes SQL dans `queries/` ; +- les implémentations repository dans `repositories/`. + +`kb_store_pg` ne contient pas : + +- de contrat applicatif générique qui devrait vivre dans `kb_store_core` ; +- de logique Tauri ; +- de logique RPC ; +- de décodeur ; +- de matérialisateur métier ; +- de création de schémas PostgreSQL applicatifs explicites ; +- de création des tables `decode`, `mat`, `catalog`, `agg` ou `wallet` avant les jalons dédiés ; la seule table `ops` active en `0.3.4` est le ledger générique de traitement. + +## Convention PostgreSQL + +`kb_store_pg` utilise le schéma courant/default du profil PostgreSQL, généralement `public`. + +Il est interdit de créer ou d'utiliser des schémas applicatifs explicites comme : + +```text +raw +core +obs +decode +mat +catalog +agg +ops +wallet +``` + +La séparation logique se fait dans le nom de table : + +```text +kb_sol__ +``` + +Exemples valides : + +```text +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +kb_sol_core_transactions +kb_sol_core_account_keys +kb_sol_core_instructions +kb_sol_core_inner_instructions +kb_sol_core_logs +kb_sol_core_balance_changes +kb_sol_obs_program_observations +kb_sol_obs_instruction_observations +kb_sol_decode_decoded_events +kb_sol_mat_trade_events +kb_sol_catalog_tokens +kb_sol_catalog_pools +kb_sol_catalog_pairs +kb_sol_ops_processing_ledger +``` + +Exemples interdits, écrits avec `DOT` pour que les audits textuels simples ne confondent pas documentation et usage réel : + +```text +raw DOT kb_sol_rpc_transactions +raw DOT sol_transactions +core DOT sol_instructions +obs DOT program_observations +decode DOT protocol_events +ops DOT processing_ledger +``` + +## Layout obligatoire + +```text +src/ + lib.rs + pg_store.rs + migrations.rs + queries/ + repositories/ +``` + +## Conventions de dossiers + +| Dossier | Rôle | +|-----------------|--------------------------------------------------------| +| `queries/` | SQL, bind et exécution SQL uniquement. | +| `repositories/` | Implémentations PostgreSQL des traits `kb_store_core`. | + +Aucune structure métier, DTO ou entity ne doit être créée dans `queries/`. + +## Infrastructure `0.2.2` + +Le jalon `0.2.2` introduit `PostgresStoreOptions` et `PostgresStore`. + +Le store sait : + +- construire ses options depuis `kb_config::PostgresConfig` ; +- valider `url`, `max_connections` et `connect_timeout_ms` ; +- créer un pool `sqlx::PgPool` ; +- masquer le DSN pour les logs et l'interface ; +- lire `current_schema()` ; +- lire `version()` ; +- exécuter un healthcheck `SELECT 1` ; +- lire un snapshot de migrations non destructif. + +Le store ne crée aucune table Solana lourde en `0.2.2`; raw est ajouté en `0.2.3` et core en `0.2.4`. + +## Migrations + +Le store applique un DDL idempotent contrôlé par le crate, dans le schéma courant du profil. Après validation réelle de la transition historique `0.2.x -> 0.3.1`, la baseline a été consolidée puis étendue par une migration additive dédiée au ledger : + +```text +0001_canonical_transaction_store.sql +0002_core_store.sql +0003_processing_ledger.sql +``` + +Ces fichiers ne créent que les tables canoniques actuelles. Les anciens noms RPC/WS et la logique de conversion historique restent documentés dans `CHANGELOG.md`, mais ne font plus partie du DDL runtime. + +Les futures migrations doivent : + +- utiliser uniquement le schéma courant du profil ; +- créer des tables non qualifiées comme `kb_sol_raw_transactions` ; +- ajouter des contraintes strictes mais réversibles ; +- privilégier des index minimaux par `signature`, `slot`, `program_id` et `created_at` selon table ; +- éviter les contraintes métier prématurées. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs`. +- Les erreurs passent par `kb_core::Error` et `kb_core::Result`. +- Les tests PostgreSQL réels sont reportables si aucun serveur local n'est garanti. + +## Raw store `0.2.3` + +Le jalon `0.2.3` ajoute les premières tables Solana réelles : + +```text +kb_sol_raw_rpc_transactions +kb_sol_raw_ws_notifications +``` + +Ces tables restent dans le schéma PostgreSQL courant du profil actif. Elles sont créées par une initialisation idempotente du store PostgreSQL et non par des schémas applicatifs explicites. + +La table RPC est dédupliquée par `signature`. La table WebSocket est dédupliquée par `notification_key`, avec signature optionnelle et lien optionnel vers une transaction RPC canonique déjà stockée. + +La méthode `PostgresStore::initialize_raw_store_schema()` applique uniquement le schéma raw minimal. Si `database.postgres.auto_initialize_schema` vaut `true`, cette initialisation est appelée après la connexion. + +`0.2.3` ne supprime pas encore physiquement les payloads raw. Les colonnes `retention_state`, `processing_state`, `raw_json_hash` et `lifecycle_reason` préparent la compaction, l'archivage et la purge future. + +## Core store `0.2.4` + +Le jalon `0.2.4` ajoute les tables core minimales : + +```text +kb_sol_core_transactions +kb_sol_core_account_keys +kb_sol_core_instructions +kb_sol_core_inner_instructions +kb_sol_core_logs +kb_sol_core_balance_changes +``` + +`PostgresStore::initialize_core_store_schema()` applique le schéma raw puis le schéma core, car les transactions core peuvent référencer les transactions raw. + +`PostgresStore::initialize_store_schema()` applique maintenant raw puis core. Si `database.postgres.auto_initialize_schema` vaut `true`, la connexion applique donc les deux familles de tables. + +Le repository `CoreTransactionStore` est implémenté pour : + +- insérer la transaction core canonique ; +- insérer les account keys résolus ; +- insérer les instructions replayables ; +- insérer les inner instructions comme contexte d'arbre ; +- insérer les logs ordonnés ; +- insérer les balance changes ; +- lister les instructions à rejouer ; +- construire `CoreInstructionReplayInput` avec contexte, dont toutes les instructions outer de la signature ordonnées par index numérique ; +- marquer le lifecycle d'une instruction. + +## Baseline canonique `0.3.1` + +`0.3.1` a validé sur PostgreSQL réel la transition des anciennes tables vers : + +```text +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +kb_sol_core_transactions.raw_transaction_id +``` + +La transaction raw est unique par signature et porte le document canonique versionné. Les observations sont légères et ne contiennent aucun payload transactionnel complet. Les repositories actifs exposent `RawTransactionInsert` et `TransactionObservationInsert`. + +Après validation, les scripts SQL historiques ont été remplacés par la baseline courante `0001`/`0002`. L’initialiseur crate-managed conserve temporairement un chemin de compatibilité idempotent pour les workspaces encore issus de `pre.001`; il ne recrée pas les anciennes tables. + +## Extraction core `0.3.4` + +`kb_store_pg` implémente `CoreExtractionStore` avec une transaction PostgreSQL unique par signature. Une extraction réussie : + +- remplace le graphe core de la signature par cascade ; +- insère transaction, account keys, instructions, inner instructions, logs et balance changes ; +- marque la ligne raw `core_extracted` ; +- upsert le ledger `kb_sol_ops_processing_ledger` avec la version et le hash canonique ; +- commit l’ensemble ou annule toutes les écritures. + +Les échecs d’extraction sont enregistrés séparément dans le ledger et dans l’état raw afin de rester rejouables. + +## Store decode et matérialisation `0.4.0` + +La migration additive `0004_decode_materialization_store.sql` crée dans le schéma courant : + +```text +kb_sol_decode_events +kb_sol_decode_coverage_declarations +kb_sol_decode_coverage_observations +kb_sol_mat_events +``` + +Ces tables réutilisent `kb_sol_ops_processing_ledger`. Les observations decode, leur couverture, l’état lifecycle et le ledger sont écrits dans une même transaction PostgreSQL. Les sorties materialized et leur ledger suivent la même règle. Les colonnes JSONB portent le suffixe `_jsonb`. + +## Tracing opérationnel + +`kb_store_pg` utilise le target canonique `kb_store_pg`. Les décisions SQL de decode/mat/ledger et leurs rollbacks sont émises par le store lui-même. Un `mark_decode_failed`, une persistance de bundle matérialisation en statut `failed` ou une erreur transactionnelle sont écrits au niveau `error` avec les identifiants de corrélation disponibles. + +Le store ne délègue pas ces détails à `kb_app_demo` et ne journalise jamais un DSN non masqué. + +## Contexte outer du replay `0.4.1-pre.014` + +La lecture contextualisée agrège directement `kb_sol_core_instructions` pour la signature ciblée. Elle expose les chemins outer purement numériques sous la forme stable `instructionIndex`, `instructionPath`, `programId`, `payloadJson`, `payloadHash`, avec un `ORDER BY instruction_path::BIGINT`. L’instruction cible reste présente dans le tableau. La requête est strictement en lecture et n’ajoute aucune migration. diff --git a/olddocs/archivekbot2/kb_store_sqlite/README.md b/olddocs/archivekbot2/kb_store_sqlite/README.md new file mode 100644 index 0000000..b7d592a --- /dev/null +++ b/olddocs/archivekbot2/kb_store_sqlite/README.md @@ -0,0 +1,17 @@ + + + +# kb_store_sqlite + +Ce crate conserve une compatibilité SQLite limitée pour les tests, imports et corpus legacy. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/kb_wallet/README.md b/olddocs/archivekbot2/kb_wallet/README.md new file mode 100644 index 0000000..7ca27a7 --- /dev/null +++ b/olddocs/archivekbot2/kb_wallet/README.md @@ -0,0 +1,25 @@ + + + +# kb_wallet + +Ce crate isole les secrets, le stockage local des keypairs et la signature. Les décodeurs, matérialisateurs, exécuteurs et interfaces utilisateur ne doivent jamais lire directement les octets privés. + +## Wallet temporaire persistant + +`TemporaryWalletStore` fournit une première implémentation destinée aux tests d'intégration, aux exécutables de développement et aux campagnes devnet : + +- alias validé et transformé en chemin déterministe `/.json` ; +- création sans écrasement d'un fichier existant ; +- chargement et validation stricte des 64 octets du keypair Solana ; +- format JSON standard sous forme de tableau d'octets ; +- permissions Unix `0700` pour le répertoire et `0600` pour le fichier ; +- copies sérialisées des secrets effacées de la mémoire après utilisation ; +- exposition limitée au public key, au résumé non secret et à l'interface `Signer` ; +- aucune exportation TS-rs du keypair ou de ses octets. + +Le terme « temporaire » décrit son usage de laboratoire et non nécessairement sa durée de vie : lorsque la persistance est activée dans la configuration, le même keypair est rechargé entre deux démarrages afin de pouvoir recevoir un airdrop, signer plusieurs transactions et valider leur historique. + +## Limites + +Cette tranche n'ajoute ni chiffrement par mot de passe, ni coffre système, ni hardware wallet. Ces backends devront implémenter la même frontière de signature sans modifier les exécuteurs. Un wallet temporaire persistant ne doit pas être sélectionné pour un envoi mainnet dans les profils fournis. diff --git a/olddocs/archivekbot2/kb_worker/README.md b/olddocs/archivekbot2/kb_worker/README.md new file mode 100644 index 0000000..83cd035 --- /dev/null +++ b/olddocs/archivekbot2/kb_worker/README.md @@ -0,0 +1,17 @@ + + + +# kb_worker + +Ce crate contient le futur worker asynchrone chargé des traitements continus. + +## Rôle dans l'écosystème + +Ce module fait partie du découpage strict de Khadhroony Bot2. Il doit conserver des dépendances limitées et ne pas contourner les interfaces communes du workspace. + +## Règles locales + +- Les commentaires de code restent en anglais. +- La documentation Markdown reste en français. +- Les exports publics sont contrôlés depuis `lib.rs` lorsque le crate expose une bibliothèque. +- Les binaires utilisent `main.rs` avec les attributs Rust obligatoires. diff --git a/olddocs/archivekbot2/prompts/001_version_session_template.md b/olddocs/archivekbot2/prompts/001_version_session_template.md new file mode 100644 index 0000000..4978000 --- /dev/null +++ b/olddocs/archivekbot2/prompts/001_version_session_template.md @@ -0,0 +1,60 @@ + + + +# Template de prompt de session + +## Contexte + +Tu travailles sur le workspace `khadhroony-bot2`. Le workspace utilise une architecture modulaire Rust avec séparation stricte entre modèles, RPC, stockage, pipeline, décodeurs, matérialisateurs, exécuteurs, applications et worker. + +## Règles obligatoires + +- Lire `RULES.md` avant toute proposition de modification. +- Ne pas modifier `CHANGELOG.md` avant validation explicite de version. +- Mettre les changements futurs dans `ROADMAP.md`. +- Ne pas utiliser `use` dans le code Rust sauf pour les traits nécessaires. +- Utiliser `crate::` pour les chemins internes à la crate courante. +- Utiliser le chemin complet de crate pour les dépendances externes du workspace. +- Préserver les en-têtes `file:` et `version:`. +- Garder la documentation de code en anglais et la documentation Markdown en français. +- Fournir uniquement un zip delta après le squelette initial. + +## Format de livraison attendu + +- Si le delta modifie la racine du workspace ou plusieurs modules : `khadhroony-bot2_vX.Y.Z-pre.abc.zip`. +- Si le delta modifie un seul module Rust : `kb_modulename_vX.Y.Z-pre.abc.zip`. +- Le zip doit contenir un `delta.md` non versionné. +- `delta.md` doit lister les fichiers ajoutés, modifiés, à supprimer manuellement, et les validations exécutées ou non exécutées. +- Le zip ne doit contenir que les fichiers ajoutés ou modifiés, plus `delta.md`. + +## Objectif de la session + +Décrire ici la version ciblée, le périmètre technique et les résultats attendus. + +## Fichiers à lire en priorité + +- `README.md` +- `RULES.md` +- `ROADMAP.md` +- `docs/ARCHITECTURE.md` +- `docs/DATABASE.md` +- `docs/NOMENCLATURE.md` +- `docs/DECODER_SURFACE_AUDIT.md` +- `docs/DELTA_WORKFLOW.md` + +## Travail demandé + +Décrire ici les fichiers ou crates à modifier, créer ou supprimer. + +## Validations attendues + +- `cargo build` +- `cargo test --workspace` +- `cargo clippy --workspace --all-targets` +- contrôles SQL si une migration ou une table est modifiée. + +## Interdictions + +- Ne pas ajouter de logiques métier dans les crates applicatifs. +- Ne pas fusionner decode et materialize. +- Ne pas promouvoir un décodeur réservé sans `program_id`, corpus et validation locale. diff --git a/olddocs/archivekbot2/prompts/002_program_registry_and_naming_audit.md b/olddocs/archivekbot2/prompts/002_program_registry_and_naming_audit.md new file mode 100644 index 0000000..f3ab0a0 --- /dev/null +++ b/olddocs/archivekbot2/prompts/002_program_registry_and_naming_audit.md @@ -0,0 +1,23 @@ + + + +# Prompt de session : audit du registre des programmes + +Objectif : contrôler les `program_id`, les noms sources, les aliases et les crates cibles avant tout renommage physique de dossiers. + +## Instructions + +- Utiliser `registry/program_registry_seed.toml` comme source de départ. +- Vérifier les doublons exacts de `program_id`. +- Vérifier les surfaces qui ont plusieurs noms historiques. +- Ne pas supprimer de crate tant que le `program_id` et la surface ne sont pas confirmés. +- Produire uniquement un delta après validation. +- Respecter la convention `kb_decoder___[_vN]`. + +## Résultat attendu + +- Une liste de renommages sûrs. +- Une liste de crates aliases à conserver temporairement. +- Une liste de surfaces réservées mais non prioritaires. +- Une mise à jour du registre et de la roadmap. + diff --git a/olddocs/archivekbot2/prompts/003_v0_1_logging_config_profiles.md b/olddocs/archivekbot2/prompts/003_v0_1_logging_config_profiles.md new file mode 100644 index 0000000..43cfb9d --- /dev/null +++ b/olddocs/archivekbot2/prompts/003_v0_1_logging_config_profiles.md @@ -0,0 +1,39 @@ + + + +# Prompt v0.1.x — logging, configuration et profils + +Objectif : finaliser `kb_logging` et `kb_config` avant SQL/RPC/wallet. + +## Phasage cible + +- `0.1.0` : `kb_logging` réel. +- `0.1.1` : `kb_config`, parsing JSON et validation des profils. +- `0.1.2` : liaison `kb_logging` depuis le profil actif. +- `0.1.3` : rôles d'endpoints HTTP/WS et limites par rôle. +- `0.1.4` : démo Tauri configuration/logging. + +## Contraintes + +- Conserver plusieurs profils de configuration avec un seul profil actif. +- Ne pas ajouter `api_key_env_var` : les placeholders de clés restent dans les URLs. +- Couvrir seulement HTTP JSON-RPC et WebSocket Solana standard avant `v1.x`. +- Ne pas implémenter gRPC, Helius enhanced WebSocket, Helius gRPC ou LaserStream dans cette version. +- Router les logs par target, niveau et sortie : console, fichier humain, fichier JSON, fichier erreurs. +- Router les endpoints par rôle et par type de requête. +- Conserver les règles Rust : pas de `use` sauf traits, `crate::` en interne, pas de `?` production, pas de `unwrap`. + +## Format de livraison attendu + +- Fournir un zip delta uniquement. +- Utiliser `khadhroony-bot2_v0.1.X-pre.abc.zip` si le delta touche plusieurs modules ou la racine. +- Utiliser `kb_logging_v0.1.X-pre.abc.zip` ou `kb_config_v0.1.X-pre.abc.zip` si le delta touche un seul module. +- Inclure `delta.md` non versionné dans le zip. + +## Livrables attendus + +- `kb_logging` fonctionnel. +- `kb_config` typé et validé. +- Exemple `config/example.config.json` complet. +- Démo Tauri de chargement de configuration. +- Tests unitaires de parsing/sérialisation. diff --git a/olddocs/archivekbot2/prompts/004_v0_2_sql_storage_materialization.md b/olddocs/archivekbot2/prompts/004_v0_2_sql_storage_materialization.md new file mode 100644 index 0000000..400788b --- /dev/null +++ b/olddocs/archivekbot2/prompts/004_v0_2_sql_storage_materialization.md @@ -0,0 +1,242 @@ + + + +# Prompt v0.2.x — conventions SQL, stockage PostgreSQL et contrats DB + +Objectif : ouvrir la phase `0.2.x` de `khadhroony-bot2` en cadrant d'abord les conventions de stockage avant d'implémenter les migrations, repositories et diagnostics DB. + +## État de départ attendu + +- `0.1.0` validée : `kb_logging` réel. +- `0.1.1` validée : `kb_config` typé, schéma JSON et profils. +- `0.1.2` validée : liaison `kb_logging` / `kb_config` / `kb_app_demo`. +- `0.1.3` validée : clients HTTP/WS Solana standard, rôles, pools et démos RPC. +- Le commit `v0.1.3` doit être considéré comme base propre. + +## Objectif de `0.2.0` + +`0.2.0` doit d'abord verrouiller les conventions DB. Ne pas commencer directement par un grand schéma SQL. + +Livrables attendus : + +- conventions de nommage PostgreSQL ; +- conventions de tables Solana ; +- conventions `entities/`, `dtos/`, `queries/`, `repositories/` ; +- rôle exact de `kb_store_core` et `kb_store_pg` ; +- premières tables candidates documentées ; +- prompt ou README de suite pour `0.2.1`. + +## Convention PostgreSQL obligatoire + +Ne pas créer de schemas PostgreSQL applicatifs explicites comme `raw`, `core`, `obs`, `decode`, `mat`, `catalog`, `agg`, `ops` ou `wallet`. + +PostgreSQL doit utiliser le schema courant/default du profil, généralement `public`. + +La séparation logique se fait dans le nom de table. + +## Convention de nommage des tables + +Format obligatoire : + +```text +kb_sol__ +``` + +Domaines autorisés au départ : + +```text +raw +core +obs +decode +mat +catalog +agg +ops +wallet +``` + +Exemples de tables candidates : + +```text +kb_sol_raw_rpc_transactions +kb_sol_raw_ws_notifications +kb_sol_core_transactions +kb_sol_core_account_keys +kb_sol_core_instructions +kb_sol_core_inner_instructions +kb_sol_core_logs +kb_sol_core_balance_changes +kb_sol_obs_program_observations +kb_sol_obs_instruction_observations +kb_sol_decode_decoded_events +kb_sol_mat_trade_events +kb_sol_catalog_tokens +kb_sol_catalog_pools +kb_sol_catalog_pairs +kb_sol_ops_processing_ledger +``` + +Interdictions, écrites avec `DOT` pour que les audits textuels simples ne confondent pas documentation et usage réel : + +```text +raw DOT kb_sol_rpc_transactions +core DOT kb_sol_transactions +obs DOT kb_sol_program_observations +decode DOT kb_sol_decoded_events +mat DOT kb_sol_trade_events +catalog DOT kb_sol_tokens +ops DOT kb_sol_processing_ledger +``` + +## Règles SQL générales + +- `id` : clé primaire technique. +- `created_at` : timestamp d'insertion. +- `updated_at` : timestamp de dernière modification si la table est mutable. +- `slot` : `BIGINT` côté SQL, converti explicitement côté Rust si nécessaire. +- `signature` : texte non vide. +- `program_id` : texte non vide quand applicable. +- `raw_json` : JSONB pour payload brut immuable. +- `payload_json` : JSONB pour payload décodé ou matérialisé. +- Index minimaux : signature, slot, program id, created_at selon table. +- Ne pas inventer de contraintes métier trop tôt : commencer strict mais réversible. + +## Layout Rust obligatoire + +Dans `kb_store_core` : + +```text +src/ + lib.rs + pagination.rs + health.rs + db_error.rs + dtos/ + entities/ + repositories/ +``` + +Dans `kb_store_pg` : + +```text +src/ + lib.rs + pg_store.rs + migrations.rs + queries/ + repositories/ +``` + +Règles : + +- `entities/` contient les représentations proches des lignes SQL. +- `dtos/` contient les contrats applicatifs, Tauri ou repository. +- `queries/` contient uniquement SQL, bind et exécution. +- `repositories/` contient les APIs de stockage. +- Ne pas placer de struct métier ou DB dans `queries/`. + +## Crates à auditer avant modification + +- `kb_core` +- `kb_config` +- `kb_store_core` +- `kb_store_pg` +- `kb_app_demo` +- `kb_rpc` seulement si le stockage raw RPC exige un type partagé. + +## Phasage recommandé + +### `0.2.0` + +- conventions storage ; +- conventions tables ; +- conventions Rust store ; +- README des crates store ; +- aucun gros schéma SQL. + +### `0.2.1` + +- contrats `kb_store_core` ; +- types communs ; +- DTO/entities minimaux ; +- traits repository offline. + +### `0.2.2` + +- connexion PostgreSQL dans `kb_store_pg` ; +- pool ; +- healthcheck ; +- stratégie de migrations ; +- tests offline autant que possible. + +### `0.2.3` + +- raw store Solana minimal : + - `kb_sol_raw_rpc_transactions` ; + - `kb_sol_raw_ws_notifications`. + +### `0.2.4` + +- core store Solana minimal : + - transactions ; + - account keys ; + - instructions ; + - inner instructions ; + - logs ; + - balance changes ; + - observations ; + - processing ledger. + +### `0.2.5` + +- fenêtre Tauri diagnostic DB : + - profil actif ; + - backend ; + - DSN masqué ; + - schema courant ; + - tables détectées ; + - migrations ; + - healthcheck. + +## Contraintes Rust à conserver + +- Rust 2024. +- `#![warn(missing_docs)]`. +- `#![deny(unreachable_pub)]`. +- `#![forbid(unsafe_code)]`. +- Pas de `use` sauf traits. +- `crate::` en interne. +- Pas de `?` en production. +- Pas de `unwrap`. +- Pas de `expect`. +- Pas de `anyhow`. +- Pas de `thiserror`. +- Erreurs via `kb_core::Error` et `kb_core::Result`. + +## Contraintes de livraison + +- Fournir un zip delta uniquement. +- Si plusieurs crates ou la racine sont touchées, utiliser : + - `khadhroony-bot2_v0.2.X-pre.abc.zip` +- Si une seule crate est touchée, utiliser : + - `kb_store_core_v0.2.X-pre.abc.zip` + - ou `kb_store_pg_v0.2.X-pre.abc.zip` +- Inclure `delta.md` non versionné dans le zip. +- Ne pas modifier `CHANGELOG.md` avant validation locale du jalon. + +## Validations attendues + +À adapter selon le delta : + +```bash +cargo test -p kb_store_core +cargo test -p kb_store_pg +cargo test -p kb_config +cargo test -p kb_app_demo +cargo clippy --all-targets +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + +Si aucun code n'est modifié, documenter explicitement que le delta est documentaire. + diff --git a/olddocs/archivekbot2/prompts/005_v0_2_2_pg_connection_migrations.md b/olddocs/archivekbot2/prompts/005_v0_2_2_pg_connection_migrations.md new file mode 100644 index 0000000..c1804d3 --- /dev/null +++ b/olddocs/archivekbot2/prompts/005_v0_2_2_pg_connection_migrations.md @@ -0,0 +1,58 @@ + + + +# Prompt de suite — `0.2.2` connexion PostgreSQL et migrations + +Objectif : ouvrir `0.2.2` après validation de `0.2.1`, en ajoutant l'infrastructure PostgreSQL minimale dans `kb_store_pg`, sans créer encore le grand schéma Solana. + +## Base attendue + +- `0.2.0` validée et commitée : conventions PostgreSQL et nommage `kb_sol__`. +- `0.2.1` validée et commitée : contrats `kb_store_core`, DTOs, entities, repositories abstraits, cycle de vie raw, replay par instruction et replay input contextualisé avec account keys, logs et balance changes. + +## Périmètre `0.2.2` + +Ajouter uniquement l'infrastructure PostgreSQL : + +- lecture de la configuration PostgreSQL depuis `kb_config` ; +- création d'un pool PostgreSQL dans `kb_store_pg` ; +- healthcheck minimal ; +- stratégie de migrations ; +- diagnostic du schema courant ; +- tests offline autant que possible. + +Ne pas créer encore les tables Solana finales. Les premières tables réelles restent prévues pour `0.2.3` et `0.2.4`. Les migrations doivent cependant rester compatibles avec les contrats `CoreInstructionReplayInput`, `CoreLogInsert`, `CoreAccountKeyInsert` et `CoreBalanceChangeInsert`. + +## Règle PostgreSQL obligatoire + +Ne pas créer de schemas applicatifs explicites comme `raw`, `core`, `obs`, `decode`, `mat`, `catalog`, `agg`, `ops` ou `wallet`. + +Le store utilise le schema courant du profil PostgreSQL, généralement `public`. + +La séparation logique reste dans le nom de table : + +```text +kb_sol__ +``` + +## Points à respecter + +- `kb_store_core` reste backend-agnostique. +- `kb_store_pg` contient les implémentations PostgreSQL. +- `queries/` contient SQL, bind et exécution. +- `repositories/` contient les repositories concrets. +- Aucune struct métier ou DB ne doit être placée dans `queries/`. +- Pas de `unwrap`, pas de `expect`, pas de `?` en production. +- Erreurs via `kb_core::Error` et `kb_core::Result`. +- `CHANGELOG.md` ne doit être modifié qu'après validation locale. + +## Validations attendues + +```bash +cargo test -p kb_store_core +cargo test -p kb_store_pg +cargo test -p kb_config +cargo test -p kb_app_demo +cargo clippy --all-targets +``` + diff --git a/olddocs/archivekbot2/prompts/005_v0_3_rpc_ingestion_ws.md b/olddocs/archivekbot2/prompts/005_v0_3_rpc_ingestion_ws.md new file mode 100644 index 0000000..cae6aa8 --- /dev/null +++ b/olddocs/archivekbot2/prompts/005_v0_3_rpc_ingestion_ws.md @@ -0,0 +1,40 @@ + + + +# Prompt historique — ancien périmètre RPC ingestion déplacé vers v0.4.x + +Objectif historique : ce périmètre est désormais remplacé par le phasage transaction canonique de `0.3.x`. Pour poursuivre la série active, utiliser `prompts/016_v0_3_2_canonical_transaction_contract.md`. + +## À faire + +- Implémenter pool HTTP par rôle. +- Implémenter pool WebSocket standard par rôle. +- Ajouter ingestion par signature. +- Stocker `kb_sol_raw_rpc_transactions`. +- Extraire comptes résolus, instructions, inner instructions, logs et deltas de balances. +- Construire `kb_sol_obs_program_observations`. +- Ajouter listeners `logsSubscribe`, `programSubscribe`, `accountSubscribe`, `slotSubscribe`, `rootSubscribe`. +- Produire des observations brutes sans exécuter d'achat/revente. +- Ajouter une page Tauri de diagnostic des endpoints et listeners. + + +## Rappel DB + +- Ne pas utiliser de schémas PostgreSQL applicatifs explicites. +- Ne pas revenir aux anciennes formes qualifiées écrites ici avec `DOT` : `raw DOT sol_transactions` ou `obs DOT program_observations`. +- Les tables Solana doivent rester au format `kb_sol__`. + +## Hors scope + +- gRPC. +- Helius gRPC. +- LaserStream. +- Matérialisation DEX détaillée. +- Exécution d'achat ou de revente. + +## Format de livraison attendu + +- Fournir un zip delta uniquement. +- Utiliser `khadhroony-bot2_v0.4.X-pre.abc.zip` si plusieurs modules ou fichiers racine sont touchés lorsque ce périmètre sera repris. +- Utiliser `kb_rpc_v0.4.X-pre.abc.zip` si seul `kb_rpc` est touché lorsque ce périmètre sera repris. +- Inclure `delta.md` non versionné dans le zip. diff --git a/olddocs/archivekbot2/prompts/006_v0_4_wallet_execution_demo.md b/olddocs/archivekbot2/prompts/006_v0_4_wallet_execution_demo.md new file mode 100644 index 0000000..2c39346 --- /dev/null +++ b/olddocs/archivekbot2/prompts/006_v0_4_wallet_execution_demo.md @@ -0,0 +1,25 @@ + + + +# Prompt historique — wallet, exécution core et démos devnet déplacés vers v0.5 + +Ce prompt utilisait l’ancien phasage `0.4.x`. Le phasage actuel reporte ce périmètre wallet et sécurité à `0.11.x`, après les décodeurs prioritaires et la validation des sources live. +## Objectif + +Rendre `kb_wallet`, `kb_execution_api`, `kb_execution_safety` et les exécuteurs Solana/SPL testables sur devnet depuis `kb_app_demo`. + +## Travail demandé + +- Charger un wallet local chiffré. +- Afficher l'adresse et les soldes SOL/SPL. +- Simuler un transfert SOL. +- Envoyer un transfert SOL devnet avec confirmation opérateur. +- Préparer un transfert SPL avec ATA contrôlé. +- Bloquer toute exécution mainnet tant que les garde-fous ne sont pas validés. + +## Validations attendues + +- `cargo build` +- démo Tauri wallet +- démo Tauri transfert SOL devnet +- logs de simulation et confirmation diff --git a/olddocs/archivekbot2/prompts/007_v0_5_core_decoders_listeners.md b/olddocs/archivekbot2/prompts/007_v0_5_core_decoders_listeners.md new file mode 100644 index 0000000..fccfc69 --- /dev/null +++ b/olddocs/archivekbot2/prompts/007_v0_5_core_decoders_listeners.md @@ -0,0 +1,23 @@ + + + +# Prompt historique — décodeurs core et premiers listeners déplacés vers v0.6 + +Ce prompt utilisait l’ancien phasage `0.5.x`. Le phasage actuel sépare ce périmètre : décodeurs Core/SPL en `0.4.x`, listeners et trading assisté en `0.12.x`. +## Objectif + +Décoder les programmes Solana/SPL de base et préparer les listeners nécessaires au trading assisté. + +## Travail demandé + +- Décoder system, compute budget, memo, address lookup table. +- Décoder SPL Token, Token-2022, ATA et stake pool si applicable. +- Matérialiser les transferts, mint, burn, close account et ATA. +- Ajouter listeners WebSocket par `program_id` prioritaire. +- Notifier créations de pools, migrations, liquidité et swaps quand les surfaces sont prêtes. + +## Validations attendues + +- `cargo build` +- replay de signatures contenant SPL Token et ATA +- notifications Tauri sur events core diff --git a/olddocs/archivekbot2/prompts/008_v0_6_priority_dex_router_surfaces.md b/olddocs/archivekbot2/prompts/008_v0_6_priority_dex_router_surfaces.md new file mode 100644 index 0000000..967b3a1 --- /dev/null +++ b/olddocs/archivekbot2/prompts/008_v0_6_priority_dex_router_surfaces.md @@ -0,0 +1,48 @@ + + + +# Prompt historique — surfaces DEX/router prioritaires déplacées vers v0.8 + +Ce prompt utilisait l’ancien phasage `0.6.x`. Le phasage actuel répartit les surfaces prioritaires de `0.5.x` à `0.9.x` : Pump, Meteora, Raydium, Orca, puis Jupiter et routeurs. +## Objectif + +Développer les premières surfaces prioritaires pour le trading assisté : Pump, Bags Fee Share, Raydium, Meteora, Orca et routers. + +## Travail demandé + +Pour chaque surface : + +- corpus de signatures ; +- décodeur minimal ; +- matérialisation minimale ; +- listener si utile ; +- exécuteur si la surface est appelable ; +- simulation ; +- démo Tauri ; +- validation post-transaction ; +- SQL anti-régression. + +## Surfaces prioritaires + +- `amm_pump_swap` +- `launchpad_pump_fun` +- `admin_pump_fees` +- `fees_bags_fee_share_v1` +- `fees_bags_fee_share_v2` +- `amm_raydium_lp_v4` +- `cpmm_raydium` +- `clmm_raydium` +- `launchpad_raydium_launchlab` +- `launchpad_meteora_dbc` +- `dlmm_meteora` +- `amm_meteora_damm_v1` +- `amm_meteora_damm_v2` +- `clmm_orca_whirlpool` +- `router_jupiter_aggregator_v6` +- `router_okx_labs_v2` + +## Validations attendues + +- démo Tauri par surface terminée ; +- matérialisation et validation post-transaction ; +- aucun envoi mainnet sans confirmation opérateur et limites actives. diff --git a/olddocs/archivekbot2/prompts/009_v0_2_1_store_core_contracts.md b/olddocs/archivekbot2/prompts/009_v0_2_1_store_core_contracts.md new file mode 100644 index 0000000..152029b --- /dev/null +++ b/olddocs/archivekbot2/prompts/009_v0_2_1_store_core_contracts.md @@ -0,0 +1,119 @@ + + + +# Prompt v0.2.1 — contrats `kb_store_core`, DTOs, entities et repositories offline + +Objectif : ouvrir `0.2.1` après le cadrage `0.2.0` et implémenter les premiers contrats backend-agnostiques de stockage sans écrire de SQL PostgreSQL. + +## État de départ attendu + +- `0.1.3` validée et commitée comme base propre. +- `0.2.0` appliquée : conventions PostgreSQL et table naming verrouillées. +- `CHANGELOG.md` ne doit pas être modifié tant que le jalon courant n'est pas validé localement. + +## Rappels obligatoires + +- Ne pas créer de schémas PostgreSQL applicatifs explicites. +- Utiliser le format de table `kb_sol__`. +- Ne pas créer de grand schéma SQL en `0.2.1`. +- Ne pas implémenter de pool PostgreSQL en `0.2.1`. +- Ne pas placer de struct métier ou DB dans `queries/`. +- Les types communs et traits repository vivent dans `kb_store_core`. +- Les implémentations PostgreSQL restent hors scope jusqu'à `0.2.2` ou `0.2.3` selon le cas. + +## Layout cible `kb_store_core` + +```text +src/ + lib.rs + pagination.rs + health.rs + db_error.rs + dtos/ + entities/ + repositories/ +``` + +## Travail demandé + +### Pagination et limites + +- Définir les types de pagination backend-agnostiques. +- Définir les limites minimales et maximales. +- Ajouter des validations offline sans `unwrap`, sans `expect` et sans `?` en production. + +### Healthcheck + +- Stabiliser le contrat de healthcheck store. +- Prévoir les champs nécessaires pour la future page Tauri DB : backend, statut, message, schema courant, migrations détectées. +- Garder les détails PostgreSQL concrets hors de `kb_store_core`. + +### Erreurs DB + +- Ajouter les helpers ou enums nécessaires autour de `kb_core::Error` et `kb_core::Result`. +- Ne pas ajouter `anyhow` ni `thiserror`. + +### DTOs et entities minimaux + +Créer les premiers types pour : + +- `kb_sol_raw_rpc_transactions` ; +- `kb_sol_raw_ws_notifications` ; +- `kb_sol_core_transactions` ; +- `kb_sol_core_instructions` ; +- `kb_sol_ops_processing_ledger`. + +Conventions de nommage attendues : + +```text +RawRpcTransactionEntity +RawWsNotificationEntity +CoreTransactionEntity +CoreInstructionEntity +ProcessingLedgerEntity +InsertRawRpcTransactionDto +UpsertRawRpcTransactionDto +InsertRawWsNotificationDto +RepositoryPageDto +StoreHealthDto +``` + +### Traits repository offline + +Créer ou stabiliser les traits pour : + +- raw RPC transaction ; +- raw WS notification ; +- core transaction read/write minimal ; +- core instruction read/write minimal ; +- processing ledger. + +Les traits ne doivent pas dépendre de PostgreSQL. + +## Crates à auditer avant modification + +- `kb_core` +- `kb_model` +- `kb_store_core` +- `kb_rpc` seulement si un type RPC doit être partagé + +## Validations attendues + +```bash +cargo test -p kb_store_core +cargo clippy -p kb_store_core --all-targets +``` + +Si `kb_model` est modifié : + +```bash +cargo test -p kb_model +cargo clippy -p kb_model --all-targets +``` + +## Format de livraison attendu + +- Si seul `kb_store_core` est touché : `kb_store_core_v0.2.1-pre.abc.zip`. +- Si plusieurs crates ou fichiers racine sont touchés : `khadhroony-bot2_v0.2.1-pre.abc.zip`. +- Inclure `delta.md` non versionné dans le zip. +- Ne fournir que les fichiers ajoutés ou modifiés. diff --git a/olddocs/archivekbot2/prompts/010_v0_2_2_postgres_connection_health_migrations.md b/olddocs/archivekbot2/prompts/010_v0_2_2_postgres_connection_health_migrations.md new file mode 100644 index 0000000..bae6299 --- /dev/null +++ b/olddocs/archivekbot2/prompts/010_v0_2_2_postgres_connection_health_migrations.md @@ -0,0 +1,52 @@ + + + +# Prompt `0.2.2` — connexion PostgreSQL, pool, healthcheck et stratégie migrations + +Objectif : ouvrir `0.2.2` après validation locale de `0.2.1`, en implémentant uniquement la frontière PostgreSQL minimale dans `kb_store_pg`. + +## Base attendue + +- `0.2.0` validée : conventions DB verrouillées. +- `0.2.1` validée : contrats `kb_store_core`, DTOs, entities et traits repository offline. +- `CHANGELOG.md` ne doit être modifié qu'après validation locale. + +## Contraintes PostgreSQL + +- Ne pas créer de schemas applicatifs PostgreSQL. +- Utiliser le schema courant/default du profil, généralement `public`. +- Les tables futures gardent le format `kb_sol__`. +- Ne pas implémenter le gros schéma raw/core dans `0.2.2`. + +## Livrables attendus + +- lecture du DSN PostgreSQL depuis le profil actif si le contrat de configuration existe déjà ; +- masquage du DSN pour diagnostics ; +- création d'un handle/pool PostgreSQL minimal dans `kb_store_pg` ; +- healthcheck PostgreSQL minimal ; +- inspection du schema courant ; +- stratégie de migrations documentée et scaffoldée ; +- tests offline pour masquage DSN, assemblage de configuration, noms de migrations et diagnostics ; +- README `kb_store_pg` mis à jour ; +- prompt de suite pour `0.2.3` raw store minimal. + +## Hors périmètre de `0.2.2` + +- tables raw concrètes ; +- tables core concrètes ; +- repositories SQL complets ; +- fenêtre Tauri DB ; +- tests d'intégration nécessitant un serveur PostgreSQL local obligatoire. + +## Validations attendues + +```bash +cargo test -p kb_store_core +cargo test -p kb_store_pg +cargo test -p kb_config +cargo test -p kb_app_demo +cargo clippy --all-targets +``` + +Si un serveur PostgreSQL local est disponible, ajouter une validation optionnelle documentée séparément, sans rendre le test obligatoire pour le jalon. + diff --git a/olddocs/archivekbot2/prompts/011_v0_2_3_raw_store_minimal.md b/olddocs/archivekbot2/prompts/011_v0_2_3_raw_store_minimal.md new file mode 100644 index 0000000..5549c16 --- /dev/null +++ b/olddocs/archivekbot2/prompts/011_v0_2_3_raw_store_minimal.md @@ -0,0 +1,167 @@ + + + +# Prompt `0.2.3` — raw store Solana minimal + +Objectif : ouvrir `0.2.3` après validation locale de `0.2.2`, en créant uniquement les premières tables raw PostgreSQL et leurs repositories minimaux. + +## Base attendue + +- `0.2.0` validée : conventions PostgreSQL et noms `kb_sol__`. +- `0.2.1` validée : contrats `kb_store_core`, raw lifecycle, replay instruction-level et contexte extrait. +- `0.2.2` validée : `PostgresStore`, pool PostgreSQL, healthcheck, schéma courant, DSN masqué et stratégie migrations non destructive. +- `CHANGELOG.md` ne doit être modifié qu'après validation locale du jalon. + +## Objectif strict + +Créer le raw store minimal : + +```text +kb_sol_raw_rpc_transactions +kb_sol_raw_ws_notifications +``` + +Ne pas créer les tables `core`, `obs`, `decode`, `mat`, `catalog`, `agg`, `ops` ou `wallet` dans ce jalon. + +## Convention PostgreSQL obligatoire + +- Ne pas créer de schémas applicatifs PostgreSQL. +- Utiliser le schéma courant/default du profil, généralement `public`. +- Créer des tables non qualifiées. +- Ne jamais utiliser `raw DOT ...`, `core DOT ...`, etc. + +## Table `kb_sol_raw_rpc_transactions` + +Objectif : stocker le résultat brut canonique des appels RPC transaction par signature. + +Champs candidats : + +```text +id +signature +slot +provider +endpoint_name +rpc_method +commitment +encoding +raw_json +raw_json_hash +retention_state +processing_state +linked_core_transaction_id +created_at +updated_at +``` + +Contraintes minimales : + +- `signature` non vide ; +- `slot` en `BIGINT` ; +- `raw_json` en `JSONB`, nullable uniquement si la ligne est compactée ou purgée ; +- `retention_state` et `processing_state` en texte contrôlé côté Rust au départ ; +- unique index sur `signature` pour la transaction canonique. + +Index minimaux : + +```text +signature +slot +provider +endpoint_name +created_at +processing_state +retention_state +``` + +## Table `kb_sol_raw_ws_notifications` + +Objectif : stocker les notifications WebSocket brutes utiles, dédupliquées par clé stable. + +Champs candidats : + +```text +id +notification_key +subscription_kind +provider +endpoint_name +slot +signature +program_id +account_key +raw_json +raw_json_hash +retention_state +processing_state +linked_raw_rpc_transaction_id +created_at +updated_at +``` + +Contraintes minimales : + +- `notification_key` non vide ; +- `signature` optionnelle ; +- `program_id` optionnel ; +- `account_key` optionnel ; +- `slot` optionnel au départ selon type de notification ; +- `raw_json` en `JSONB`, nullable uniquement si la ligne est compactée ou purgée ; +- unique index sur `notification_key`. + +Index minimaux : + +```text +notification_key +signature +slot +program_id +account_key +provider +endpoint_name +created_at +processing_state +retention_state +``` + +## Repositories attendus + +Implémenter dans `kb_store_pg` les méthodes de `RawTransactionStore` : + +```text +has_raw_rpc_signature +has_raw_ws_notification_key +insert_raw_rpc_transaction +insert_raw_ws_notification +mark_raw_payload_lifecycle +``` + +Les queries doivent rester dans `kb_store_pg/src/queries/`. + +Les implémentations repositories doivent rester dans `kb_store_pg/src/repositories/`. + +Ne pas créer de struct métier ou DB dans `queries/`. + +## Politique de rétention + +Prévoir sans activer agressivement : + +- `Full` : raw JSON conservé ; +- `Compacted` : raw JSON supprimable après hash et extraction core ; +- `Archived` : raw déplacé hors hot store plus tard ; +- `Purged` : raw supprimé, hash et lifecycle conservés. + +## Validations attendues + +```bash +cargo test -p kb_store_pg +cargo test -p kb_store_core +cargo clippy --all-targets +``` + +Si PostgreSQL local est disponible, ajouter une validation manuelle optionnelle : + +```bash +# créer une base de test dédiée puis lancer les migrations raw +# vérifier \dt kb_sol_raw_* +``` diff --git a/olddocs/archivekbot2/prompts/012_v0_2_4_core_store_minimal.md b/olddocs/archivekbot2/prompts/012_v0_2_4_core_store_minimal.md new file mode 100644 index 0000000..f94dab4 --- /dev/null +++ b/olddocs/archivekbot2/prompts/012_v0_2_4_core_store_minimal.md @@ -0,0 +1,92 @@ + + + +# Prompt de session — `0.2.4` core Solana normalisé minimal + +Objectif : ouvrir `0.2.4` après validation et commit de `0.2.3`. + +## État de départ attendu + +- `0.2.0` validée : conventions PostgreSQL et nommage `kb_sol__`. +- `0.2.1` validée : contrats `kb_store_core`, DTOs/entities/repositories et replay instruction-level contextualisé. +- `0.2.2` validée : infrastructure PostgreSQL minimale, pool, healthcheck et diagnostics. +- `0.2.3` validée : raw store minimal PostgreSQL avec : + - `kb_sol_raw_rpc_transactions` ; + - `kb_sol_raw_ws_notifications` ; + - repositories raw PostgreSQL ; + - initialisation idempotente du schéma raw. + +## Objectif de `0.2.4` + +Créer le store `core` minimal permettant d'extraire les composants Solana normalisés depuis le raw sans encore développer le pipeline complet d'extraction. + +## Tables candidates + +Créer uniquement les tables nécessaires au core minimal : + +```text +kb_sol_core_transactions +kb_sol_core_account_keys +kb_sol_core_instructions +kb_sol_core_inner_instructions +kb_sol_core_logs +kb_sol_core_balance_changes +``` + +Ne pas encore créer les tables `obs`, `decode`, `mat`, `catalog`, `agg`, `ops` ou `wallet`, sauf nécessité explicitement justifiée. + +## Principes obligatoires + +- Le replay doit sélectionner des instructions normalisées, pas des transactions entières. +- Les décodeurs doivent recevoir une instruction avec contexte : account keys, inner instructions, logs et balance changes. +- Les tables core doivent référencer la signature et le slot. +- Les instructions doivent avoir un `instruction_path` stable. +- Les inner instructions doivent conserver leur relation parent/enfant. +- Les logs doivent conserver l'ordre original. +- Les balance changes doivent rester suffisamment génériques pour native lamports et SPL tokens. +- Les états de traitement instruction-level doivent permettre : pending, decoded, materialized, ignored, failed, replay_requested. + +## Hors périmètre + +- Ne pas décoder les protocoles DEX. +- Ne pas matérialiser les trades ou liquidités. +- Ne pas supprimer physiquement le raw. +- Ne pas créer de fenêtre Tauri DB. +- Ne pas créer de grand schéma monolithique. + +## Contraintes Rust + +- Rust 2024. +- `#![warn(missing_docs)]`. +- `#![deny(unreachable_pub)]`. +- `#![forbid(unsafe_code)]`. +- Pas de `use` sauf traits. +- `crate::` en interne. +- Pas de `?` en production. +- Pas de `unwrap`. +- Pas de `expect`. +- Pas de `anyhow`. +- Pas de `thiserror`. +- Erreurs via `kb_core::Error` et `kb_core::Result`. + +## Validations attendues + +```bash +cargo test -p kb_store_pg +cargo test -p kb_store_core +cargo test -p kb_config +cargo test -p kb_app_demo +cargo clippy --all-targets +``` + +Test PostgreSQL optionnel à prévoir si une base locale existe : + +```bash +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana' cargo test -p kb_store_pg optional_postgres_core_store_roundtrip_from_env -- --nocapture +``` + +## Livraison + +- Fournir un zip delta uniquement. +- Ne pas modifier `CHANGELOG.md` avant validation locale. +- Inclure `delta.md` non versionné dans le zip. diff --git a/olddocs/archivekbot2/prompts/013_v0_2_5_db_diagnostics_tauri.md b/olddocs/archivekbot2/prompts/013_v0_2_5_db_diagnostics_tauri.md new file mode 100644 index 0000000..e4653f4 --- /dev/null +++ b/olddocs/archivekbot2/prompts/013_v0_2_5_db_diagnostics_tauri.md @@ -0,0 +1,50 @@ + + + +# Prompt `0.2.5` — diagnostic DB Tauri + +Objectif : ouvrir `0.2.5` après validation et commit de `0.2.4`, en ajoutant une fenêtre Tauri de diagnostic PostgreSQL sans modifier le schéma métier. + +## État attendu + +- `0.2.0` validée : conventions SQL et noms `kb_sol__`. +- `0.2.1` validée : contrats `kb_store_core`, replay instruction-level contextualisé. +- `0.2.2` validée : infrastructure PostgreSQL minimale, pool et healthcheck. +- `0.2.3` validée : raw store minimal. +- `0.2.4` validée : core store minimal avec transactions, account keys, instructions, inner instructions, logs et balance changes. + +## Objectif de `0.2.5` + +Ajouter une fenêtre `demo_db` ou `diagnostic_db` dans `kb_app_demo` affichant : + +- profil actif ; +- backend DB actif ; +- DSN masqué ; +- schema courant PostgreSQL ; +- version PostgreSQL ; +- healthcheck ; +- statut migrations ; +- tables `kb_sol_*` détectées ; +- présence des tables raw/core attendues ; +- compte rapide optionnel des tables raw/core si cela reste léger. + +## Contraintes + +- Ne pas créer de nouvelles tables métier. +- Ne pas exposer le mot de passe PostgreSQL côté UI. +- Utiliser `kb_store_pg::PostgresStoreOptions::from_active_app_config`. +- Garder les commandes Tauri typées et exportées TS-rs. +- Garder les tests offline autant que possible. +- Prévoir un test PostgreSQL optionnel via `KB_POSTGRES_TEST_URL` seulement si nécessaire. + +## Validations attendues + +```bash +cargo test -p kb_store_pg +cargo test -p kb_store_core +cargo test -p kb_config +cargo test -p kb_app_demo +cargo clippy --all-targets +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + diff --git a/olddocs/archivekbot2/prompts/014_v0_3_0_agave_local_research.md b/olddocs/archivekbot2/prompts/014_v0_3_0_agave_local_research.md new file mode 100644 index 0000000..fbb5f3f --- /dev/null +++ b/olddocs/archivekbot2/prompts/014_v0_3_0_agave_local_research.md @@ -0,0 +1,210 @@ + + + +# Prompt historique v0.3.0 — expérimentation Agave local et sources temps réel + +Ce prompt correspond au jalon historique `0.3.0`, validé puis abandonné comme axe actif après les mesures matérielles. Il ne doit plus être utilisé pour ouvrir une nouvelle session. + +Objectif historique : ouvrir la nouvelle phase `0.3.x` de `khadhroony-bot2` en testant un nœud Agave local non votant comme source temps réel potentielle avant de développer l'ingestion, le backfill et l'extracteur raw vers core. + +## État de départ attendu + +- `0.2.5` validée : diagnostics SQL PostgreSQL dans `kb_app_demo`. +- Tables raw/core PostgreSQL minimales disponibles. +- `demo_ws` existe déjà et peut servir de base pour tester les subscriptions. +- Le profil `agave_local_research` existe dans `config/example.config.json` mais n'est pas actif par défaut. +- L'ancien périmètre ingestion/backfill/extraction est reporté à `0.4.x`. + +## Objectif de `0.3.0` + +`0.3.0` ne doit pas lancer l'ingestion de production. + +Le jalon doit préparer l'expérimentation : + +- documentation Agave local ; +- profil dédié ; +- correction des rôles de listeners du profil Agave local ; +- stratégie des sources temps réel ; +- probes à ajouter dans `demo_ws` ou dans une nouvelle démo dédiée ; +- mesures à collecter ; +- règles de fallback ; +- critères de décision pour `0.4.x`. + +## Hypothèse à tester + +Un nœud local Agave non votant, avec ledger limité par shreds, pourrait permettre : + +- `blockSubscribe` local avec transactions complètes ; +- moins de `getTransaction` temps réel ; +- moins de listeners par programme ; +- filtrage local par program id, logs, instructions, balances et discriminators ; +- usage des providers externes surtout pour backfill historique, réparation et `sendTransaction`. + +Cette hypothèse doit être mesurée, pas supposée vraie. + +## Commande de départ à documenter/tester + +```bash +agave-validator \ + --no-voting \ + --full-rpc-api \ + --enable-rpc-transaction-history \ + --rpc-pubsub-enable-block-subscription \ + --limit-ledger-size \ + --ledger ./data/agave-ledger \ + --accounts ./data/agave-accounts \ + --rpc-port 8899 \ + --dynamic-port-range 8000-8020 +``` + +La commande peut être ajustée selon la version Agave installée. Ne pas masquer les échecs : documenter les erreurs de snapshots, ledger, ports, ressources et retard. + +## Probes attendus + +`0.3.0` doit documenter ces probes. L'implémentation automatique peut commencer en `0.3.2`. + +Tester au minimum : + +```text +getVersion +getHealth +getSlot +getBlockHeight +getMaxShredInsertSlot +blockSubscribe transactionDetails=none +slotSubscribe +slotsUpdatesSubscribe +rootSubscribe +logsSubscribe mentions +programSubscribe +accountSubscribe +``` + +Pour `blockSubscribe`, le probe minimal doit : + +```text +subscribe avec transactionDetails=none +attendre subscription id ou erreur +désabonner immédiatement +classer supported / unsupported / timeout / error +``` + +Paramètres manuels de départ dans `demo_ws` : + +```text +role: block_stream +method: blockSubscribe +filterJson: "all" +configJson: {"commitment":"confirmed","encoding":"json","transactionDetails":"none","showRewards":false} +``` + +## Mesures attendues + +- taille ledger ; +- taille accounts ; +- CPU ; +- RAM ; +- réseau RX/TX ; +- slot local ; +- slot externe de référence ; +- lag slots ; +- lag secondes ; +- débit WebSocket ; +- taille moyenne des notifications ; +- reconnects ; +- erreurs provider ou Agave. + +## Phasage recommandé + +### `0.3.0` + +- docs Agave local ; +- profil `agave_local_research` ; +- stratégie live source ; +- prompt et roadmap mis à jour. + +### `0.3.1` + +- script ou runbook de lancement Agave local ; +- mesures initiales ledger/shreds/ressources. + +### `0.3.2` + +- probes RPC/WS dans `demo_ws` ou nouvelle démo. + +### `0.3.3` + +- mesures de retard et stabilité avec plusieurs valeurs `--limit-ledger-size`. + +### `0.3.4` + +- test `blockSubscribe` complet : `none`, `signatures`, `full`. + +### `0.3.5` + +- test listeners multiples : logs/program/account/slot/root. + +### `0.3.6` + +- décision d'architecture live source et préparation `0.4.x`. + +## Hors périmètre strict + +- pas d'ingestion de production ; +- pas d'extracteur raw RPC vers core ; +- pas de décodage DEX ; +- pas de matérialisation ; +- pas de backfill historique ; +- pas d'achat/revente ; +- pas de dépendance obligatoire à Agave local. + +## Fichiers à lire/modifier en priorité + +- `ROADMAP.md` +- `config/example.config.json` +- `config/README.md` +- `docs/AGAVE_LOCAL_NODE.md` +- `docs/LIVE_SOURCE_STRATEGY.md` +- `docs/WS_LISTENERS.md` +- `docs/RPC_ENDPOINT_ROLES.md` +- `kb_app_demo/src/demo_ws.rs` +- `kb_app_demo/frontend/demo_ws.html` +- `kb_app_demo/frontend/ts/demo_ws.ts` +- `kb_rpc/` si des probes doivent être factorisés côté RPC. + +Pour `0.3.0`, privilégier les documents et la configuration. Ne modifier `demo_ws` ou `kb_rpc` que si le delta reste strictement préparatoire et sans ingestion. + +## Contraintes + +- Conserver Rust 2024. +- Conserver `#![warn(missing_docs)]`, `#![deny(unreachable_pub)]`, `#![forbid(unsafe_code)]`. +- Pas de `unwrap`, `expect`, `anyhow`, `thiserror`. +- Pas de `?` en production. +- Pas de `use` sauf traits. +- `crate::` en interne. +- Documentation Rust/TypeScript/SQL en anglais. +- Markdown projet en français. +- Ne pas modifier `CHANGELOG.md` avant validation locale du jalon. + +## Format de livraison attendu + +- Fournir un zip delta uniquement. +- Utiliser `khadhroony-bot2_v0.3.0-pre.abc.zip` si plusieurs modules ou la racine sont touchés. +- Utiliser `kb_rpc_v0.3.0-pre.abc.zip` ou `kb_app_demo_v0.3.0-pre.abc.zip` si un seul module est touché. +- Inclure `delta.md` non versionné dans le zip. +- Documenter les validations exécutées et celles non exécutées. + +## Validations attendues + +Selon le delta : + +```bash +cargo test -p kb_config +cargo test -p kb_rpc +cargo test -p kb_app_demo +cargo clippy --all-targets +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + +Les tests Agave réels peuvent rester manuels au début, mais les probes doivent reporter clairement les erreurs et timeouts. + diff --git a/olddocs/archivekbot2/prompts/015_v0_3_1_canonical_store_migration.md b/olddocs/archivekbot2/prompts/015_v0_3_1_canonical_store_migration.md new file mode 100644 index 0000000..b3f8fe6 --- /dev/null +++ b/olddocs/archivekbot2/prompts/015_v0_3_1_canonical_store_migration.md @@ -0,0 +1,48 @@ + + + +# Prompt historique v0.3.1 — transaction canonique et observations + +Ce prompt décrit le jalon `0.3.1` désormais validé. Il est conservé pour expliquer la transition, mais ne doit plus être utilisé comme prompt actif. + +## Résultat validé + +Le stockage actif repose sur : + +```text +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +kb_sol_core_transactions.raw_transaction_id +``` + +La transaction canonique contient le document rejouable source-indépendant. Les observations contiennent uniquement les informations de provenance, protocole, méthode, session, filtre, timestamps, taille, statut et erreur. Aucun payload complet WebSocket ou Protobuf n’est dupliqué dans les observations. + +## Transition historique + +La base PostgreSQL `0.2.x` a été convertie et contrôlée manuellement : + +- les anciennes tables RPC/WS sont absentes ; +- les tables canoniques sont présentes ; +- les colonnes `canonical_json`, `canonical_json_hash`, `canonical_format_version` et `raw_transaction_id` sont présentes ; +- les fixtures de test ont été nettoyées après validation. + +Après ce contrôle, le dossier `kb_store_pg/migrations/` a été consolidé en : + +```text +0001_canonical_transaction_store.sql +0002_core_store.sql +``` + +Les fichiers SQL actifs ne contiennent plus les anciennes définitions. Le DDL runtime conserve temporairement un chemin de compatibilité idempotent pour les workspaces encore issus de `pre.001`. L’historique reste dans `CHANGELOG.md` et la documentation. + +## Validations réalisées + +```text +cargo test -p kb_app_demo 32 tests +cargo test -p kb_store_core 30 tests +KB_POSTGRES_TEST_URL=... cargo test -p kb_store_pg -- --nocapture 32 tests +cargo clippy --all-targets OK +cargo tauri dev -c kb_app_demo/tauri.conf.json OK +``` + +Le prompt actif suivant est `016_v0_3_2_canonical_transaction_contract.md`. diff --git a/olddocs/archivekbot2/prompts/016_v0_3_2_canonical_transaction_contract.md b/olddocs/archivekbot2/prompts/016_v0_3_2_canonical_transaction_contract.md new file mode 100644 index 0000000..b85fbae --- /dev/null +++ b/olddocs/archivekbot2/prompts/016_v0_3_2_canonical_transaction_contract.md @@ -0,0 +1,112 @@ + + + +# Prompt v0.3.2 — contrat de transaction canonique et adaptateur HTTP + +## Contexte validé + +`0.3.1` a remplacé les responsabilités historiques RPC/WS par : + +```text +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +RawTransactionInsert +TransactionObservationInsert +``` + +Les observations ne contiennent aucun payload transactionnel complet. Les détails de fournisseur restent hors de la transaction canonique. La baseline SQL active est consolidée dans `0001_canonical_transaction_store.sql` et `0002_core_store.sql`; ne pas réintroduire les anciennes tables RPC/WS ni une logique de migration historique dans le DDL runtime. + +## Objectif + +Définir dans `kb_model` la représentation canonique complète d’une transaction Solana, puis ajouter dans `kb_rpc` l’adaptateur HTTP `getTransaction` qui produit exactement cette représentation. + +## Contrat canonique + +Couvrir au minimum : + +- transaction legacy et version 0 ; +- signatures ; +- message header ; +- static account keys ; +- address table lookups ; +- loaded writable et readonly addresses ; +- recent blockhash ; +- instructions externes ; +- inner instructions ; +- logs ; +- statut et erreur ; +- fee et compute units ; +- balances SOL pré/post ; +- balances SPL pré/post ; +- rewards ; +- return data ; +- block time quand disponible. + +Les signatures et public keys restent en base58. Les payloads binaires d’instruction restent en base64. Les nombres on-chain doivent être conservés sans perte. + +## Sérialisation et hash + +- définir `canonical_format_version = 1` ; +- garantir une sérialisation déterministe ; +- calculer `canonical_json_hash` sur la représentation canonique ; +- exclure du hash tout champ de fournisseur, endpoint, timestamp local ou protocole de transport ; +- tester qu’une même transaction représentée par deux fixtures compatibles produit le même hash. + +## Adaptateur HTTP dans `kb_rpc` + +Ajouter la conversion explicite : + +```text +getTransaction JSON-RPC + -> validation de la réponse + -> modèle canonique kb_model + -> RawTransactionInsert + -> TransactionObservationInsert +``` + +Ne pas créer de crate séparée. Les futurs adaptateurs Helius `transactionSubscribe` et Yellowstone gRPC resteront des modules internes de `kb_rpc` et devront cibler le même modèle. + +## Fixtures offline + +Ajouter des fixtures pour : + +- legacy succès ; +- legacy échec ; +- version 0 avec ALT ; +- CPI et inner instructions ; +- SPL Token ; +- Token-2022 ; +- transaction avec return data ; +- transaction sans block time ; +- champs optionnels absents. + +## Fichiers à lire en priorité + +- `kb_model/` ; +- `kb_rpc/` ; +- `kb_store_core/src/dtos/raw_dtos.rs` ; +- `kb_store_pg/src/queries/raw_queries.rs` ; +- `docs/TRANSACTION_ACQUISITION_MODEL.md` ; +- `docs/RAW_STORE.md` ; +- `ROADMAP.md`. + +## Hors périmètre + +- pas de modification du schéma PostgreSQL `0.3.1` ; +- pas de compte Helius Developer ; +- pas de Yellowstone gRPC réel ; +- pas de backfill paginé ; +- pas d’extraction vers les tables core ; +- pas de décodeur protocolaire. + +## Validation attendue + +```bash +cargo test -p kb_model +cargo test -p kb_rpc +cargo test -p kb_store_core +cargo test -p kb_store_pg +cargo clippy --all-targets +``` + +Vérifier également l’absence de tout nom de provider dans le JSON canonique et la stabilité du hash entre fixtures équivalentes. diff --git a/olddocs/archivekbot2/prompts/017_v0_3_3_http_backfill_free_tier.md b/olddocs/archivekbot2/prompts/017_v0_3_3_http_backfill_free_tier.md new file mode 100644 index 0000000..9e2a9eb --- /dev/null +++ b/olddocs/archivekbot2/prompts/017_v0_3_3_http_backfill_free_tier.md @@ -0,0 +1,186 @@ + + + +# Prompt historique v0.3.3 — backfill HTTP paginé sur comptes gratuits + +## État final validé + +Ce prompt est conservé comme historique. Le jalon `0.3.3` est clôturé avec `demo_backfill`, la pagination `before` / `until`, la sélection directe des signatures postérieures à l’ancre, la persistance canonique et l’arrêt coopératif borné. + +Validations finales : + +```text +cargo test -p kb_rpc: 54 tests passés +cargo test -p kb_pipeline: 10 tests passés +cargo test -p kb_store_core: 31 tests passés +cargo test -p kb_store_pg: 32 tests passés +cargo test -p kb_app_demo: 38 tests passés +cargo clippy --all-targets: validé +``` + +## Contexte validé attendu + +`0.3.2` est validée et clôturée. La baseline confirmée fournit : + +```text +kb_model::CanonicalTransaction +kb_rpc::GetTransactionConfig +kb_rpc::GetTransactionAdapter +kb_rpc::CanonicalTransactionAdapter +kb_store_core::RawTransactionInsert::from_canonical +``` + +Validations de référence : + +```text +cargo test -p kb_model: 23 tests passés +cargo test -p kb_rpc: 48 tests passés +cargo test -p kb_store_core: 31 tests passés +cargo test -p kb_store_pg avec PostgreSQL réel: 32 tests passés +cargo clippy --all-targets: validé +``` + +Le store actif reste : + +```text +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +``` + +Ne pas modifier le schéma PostgreSQL `0.3.1` sans nécessité démontrée. + +## Objectif + +Ajouter un backfill HTTP réutilisable avec les comptes gratuits des fournisseurs RPC : + +```text +getSignaturesForAddress paginé + -> signatures candidates + -> getTransaction + -> CanonicalTransaction + -> RawTransactionInsert + -> TransactionObservationInsert +``` + +## Périmètre fonctionnel + +- pagination `getSignaturesForAddress` avec `before`, `until`, limite et ordre explicite ; +- le mode `after` doit transmettre l’ancre via `until`, paginer avec `before` et utiliser des pages de 1000 signatures ; +- le mode `after` ne doit pas rechercher manuellement l’ancre depuis la tête sans borne RPC ; +- ne conserver que les `X` signatures plus récentes les plus proches de l’ancre ; +- backfill d’une signature explicite ; +- backfill d’un groupe de signatures ; +- backfill avant/après une signature d’ancrage pour un program id ; +- backfill avant/après une signature d’ancrage pour un mint de token ; +- backfill avant/après une signature d’ancrage pour une adresse de pool ; +- reprise après interruption avec curseur persistant ou exportable ; +- sélection d’endpoint via les pools et rôles existants ; +- rate limits, concurrency, timeout, retries et pause après 429 depuis `kb_config` ; +- idempotence par signature dans `kb_sol_raw_transactions` ; +- une observation par tentative et par source ; +- conservation des statuts `missing` et `failed` sans créer de transaction canonique vide ; +- arrêt propre et résumé de campagne ; +- file d’exécution bornée : ne jamais instancier une future par candidat sélectionné ; +- compteurs distincts pour candidats sélectionnés, démarrés, terminés, annulés et non démarrés ; +- curseur de reprise calculé depuis le dernier préfixe contigu réellement terminé. + +## Observations HTTP + +Chaque tentative doit produire une observation légère avec au minimum : + +```text +provider +endpoint_code +protocol = solana_http_json_rpc +acquisition_method = getTransaction +origin = backfill +commitment +capture_session_id +received_at +normalized_at +payload_size_bytes si disponible +source_payload_hash si disponible +status +error_code +error_message +``` + +Le payload HTTP complet ne doit pas être dupliqué dans la table d’observations. + +## UI et orchestration + +Ajouter une page Tauri de démonstration permettant : + +- une liste de signatures dans un textarea, séparées par des retours à la ligne ; +- un program id avec limite, direction `before`/`after` et signature d’ancrage ; +- un mint de token avec limite, direction `before`/`after` et signature d’ancrage ; +- une adresse de pool avec limite, direction `before`/`after` et signature d’ancrage ; +- les paramètres communs de rôle, commitment, page size, max pages, concurrence et retries ; +- le suivi des compteurs reçus, normalisés, persistés, ignorés, manquants et échoués ; +- un journal UI borné et un résumé JSON ; +- l’arrêt explicite et coopératif de la campagne ; +- un regroupement des sections dans des accordéons Bootstrap 5 en réutilisant le template global. + +La page ne doit pas contenir la logique de backfill profonde : elle appelle les APIs de `kb_pipeline`. + +## Corpus initial + +Préparer les premiers corpus dans cet ordre : + +1. Solana Core et SPL ; +2. Pump Fun, Pump Swap et Pump Fees ; +3. Meteora ; +4. Raydium ; +5. Orca. + +Jupiter peut apparaître dans les transactions routées, mais aucun flux temps réel payant n’est introduit dans cette tranche. + +## Hors périmètre + +- Helius Developer ; +- `transactionSubscribe` ; +- Yellowstone gRPC ; +- `logsSubscribe("all")` ; +- extraction vers les tables core ; +- décodeurs protocolaires ; +- matérialisation ; +- trading. + +## Fichiers à lire en priorité + +- `kb_rpc/src/get_transaction.rs` ; +- `kb_rpc/src/http_pool.rs` ; +- `kb_pipeline/` ; +- `kb_store_core/src/dtos/raw_dtos.rs` ; +- `kb_store_core/src/repositories/` ; +- `kb_store_pg/src/repositories/` ; +- `kb_app_demo/src/` ; +- `kb_app_demo/frontend/ts/` ; +- `docs/TRANSACTION_ACQUISITION_MODEL.md` ; +- `docs/RAW_STORE.md` ; +- `docs/BACKFILL_HTTP.md` ; +- `ROADMAP.md`. + +## Validation attendue + +```bash +cargo test -p kb_rpc +cargo test -p kb_pipeline +cargo test -p kb_store_core +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana_test' cargo test -p kb_store_pg -- --nocapture +cargo test -p kb_app_demo +cargo clippy --all-targets +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + +Utiliser de préférence une base PostgreSQL dédiée aux tests. Si la base de développement est utilisée volontairement, identifier puis supprimer explicitement les fixtures de roundtrip après la campagne. Aucun test ne doit effacer des données non créées par sa propre exécution. + +## Livraison + +Produire un zip delta : + +```text +khadhroony-bot2_v0.3.3-pre.004.zip +``` + +Le delta doit contenir `delta.md`, les fichiers ajoutés ou modifiés et la liste explicite des éventuelles suppressions manuelles. Ne pas modifier `CHANGELOG.md` avant validation complète de la tranche. diff --git a/olddocs/archivekbot2/prompts/018_v0_3_4_canonical_to_core_extraction.md b/olddocs/archivekbot2/prompts/018_v0_3_4_canonical_to_core_extraction.md new file mode 100644 index 0000000..49c0906 --- /dev/null +++ b/olddocs/archivekbot2/prompts/018_v0_3_4_canonical_to_core_extraction.md @@ -0,0 +1,335 @@ + + + +# Prompt v0.3.4 — extraction transaction canonique vers core + +## Statut + +Jalon validé et clôturé le 7 juillet 2026. Ce prompt est conservé comme contrat historique ; ne plus l’utiliser comme prompt actif. + +Résultats finaux : `kb_pipeline` 24 tests, `kb_store_pg` 39 tests avec rollback PostgreSQL réel, `kb_app_demo` 60 tests, `kb_program_ids` 2 tests, Clippy sans avertissement, 70 transactions core et 84 tentatives ledger après force replay. + +## État de clôture + +Le périmètre fonctionnel a été livré jusqu’à `0.3.4-pre.011`, puis validé localement. Les contrôles couvrent 70 transactions core, les requêtes d’intégrité, l’écriture CSV native, le skip et le force replay sur 14 signatures, le rollback PostgreSQL intermédiaire et l’annulation des futures RPC, du pacer et des pauses de retry/429. + +L’ancien jalon `0.3.5` est absorbé dans `0.3.4`. `CHANGELOG.md` et `ROADMAP.md` enregistrent la clôture de `0.3.x`; la suite active est directement `0.4.0`. + +## Contexte validé attendu + +`0.3.3` est validée et clôturée. La baseline fournit : + +```text +kb_model::CanonicalTransaction +kb_rpc::getTransaction +kb_pipeline::backfill +kb_sol_raw_transactions +kb_sol_obs_transaction_observations +kb_sol_core_transactions +kb_sol_core_account_keys +kb_sol_core_instructions +kb_sol_core_inner_instructions +kb_sol_core_logs +kb_sol_core_balance_changes +``` + +Validations de référence : + +```text +cargo test -p kb_rpc: 54 tests passés +cargo test -p kb_pipeline: 10 tests passés +cargo test -p kb_store_core: 31 tests passés +cargo test -p kb_store_pg: 32 tests passés +cargo test -p kb_app_demo: 38 tests passés +cargo clippy --all-targets: validé +``` + +Les backfills réels ont produit des transactions canoniques et des observations PostgreSQL. Les tables core sont encore vides par conception. + +## Objectif + +Ajouter un extracteur réutilisable et versionné : + +```text +kb_sol_raw_transactions.canonical_json + -> kb_model::CanonicalTransaction + -> validation + -> extraction transactionnelle + -> kb_sol_core_transactions + -> kb_sol_core_account_keys + -> kb_sol_core_instructions + -> kb_sol_core_inner_instructions + -> kb_sol_core_logs + -> kb_sol_core_balance_changes + -> kb_sol_ops_processing_ledger +``` + +L’extracteur prépare les futurs décodeurs sans effectuer de décodage protocolaire ni de matérialisation métier. + +## Périmètre fonctionnel + +### Lecture et sélection + +- ajouter les contrats backend-agnostiques nécessaires dans `kb_store_core` ; +- lire les transactions canoniques par signature, plage de slots, état de traitement ou lot borné ; +- ne jamais relire le payload fournisseur depuis les observations ; +- refuser un `canonical_json` absent, invalide ou incompatible avec `canonical_format_version` ; +- conserver une erreur explicite et rejouable pour chaque échec d’extraction. + +### Extraction transactionnelle + +- traiter une transaction canonique dans une transaction PostgreSQL unique ; +- ne laisser aucune ligne core partielle en cas d’échec ; +- relier `kb_sol_core_transactions.raw_transaction_id` à la ligne canonique ; +- rendre l’extraction idempotente par signature, index stable et instruction path ; +- permettre un replay forcé d’une signature en supprimant puis recréant ses lignes filles dans la même transaction, sans toucher aux autres signatures ; +- ne marquer le traitement comme réussi qu’après commit PostgreSQL. + +### Account keys + +Construire un espace d’index canonique unique dans cet ordre : + +```text +static account keys +loaded writable addresses +loaded readonly addresses +``` + +Pour chaque compte, extraire : + +- `account_index` stable ; +- public key ; +- source `static`, `loaded_writable` ou `loaded_readonly` ; +- signer ; +- writable ; +- executable uniquement lorsque l’information est réellement disponible, sinon `NULL`. + +Les flags des comptes statiques doivent être calculés strictement depuis le message header Solana. Les loaded writable ne sont pas signers ; les loaded readonly ne sont ni signers ni writable. + +### Instructions + +- résoudre `program_id_index` dans l’espace complet des comptes ; +- résoudre chaque index de compte de l’instruction vers sa public key ; +- conserver dans `accounts_json` au minimum les indices et les clés résolues dans l’ordre original ; +- conserver le payload canonique base64 dans une forme JSON stable ; +- produire des chemins top-level `0`, `1`, `2`, etc. ; +- produire des chemins inner `0/0`, `0/1`, `2/0`, etc. ; +- rattacher chaque inner instruction au chemin top-level parent ; +- refuser les indices hors limites au lieu de produire un programme ou un compte vide. + +### Logs + +- conserver l’ordre global via `log_index` ; +- conserver le texte original et un hash stable ; +- ne rattacher `program_id` ou `instruction_path` que lorsque la pile d’invocation est reconstruite sans ambiguïté ; +- laisser ces champs à `NULL` lorsque le lien n’est pas fiable ; +- tester les séquences `invoke`, `success` et `failed` avec profondeur CPI. + +### Balances + +- extraire les changements natifs en lamports avec précision entière ; +- extraire les changements SPL/Token-2022 sans utiliser les valeurs UI comme source de vérité ; +- conserver pre, post et delta dans des JSON numériques déterministes ; +- conserver `account_index`, `account_key`, `mint` et `owner` lorsque disponibles ; +- gérer les comptes présents uniquement avant ou uniquement après la transaction ; +- garantir un `balance_change_index` déterministe. + +### Ledger de traitement + +Ajouter `kb_sol_ops_processing_ledger` et son implémentation PostgreSQL avec au minimum : + +```text +stage +processor_name +processor_version +input_key +input_hash +status +attempt_count +started_at +finished_at +error_code +error_message +created_at +updated_at +``` + +Pour l’extracteur : + +```text +stage = core_extraction +processor_name = canonical_to_core +input_key = signature +input_hash = canonical_json_hash +``` + +Le ledger doit permettre : + +- skip d’une extraction déjà réussie avec même version et même hash ; +- replay après changement de version ou de hash ; +- retry explicite des statuts failed ; +- diagnostics sans ambiguïté. + +Créer une migration active dédiée sans réintroduire les anciennes tables `0.2.x`. Ne pas qualifier les tables par un schéma PostgreSQL applicatif explicite. + +## Orchestration `kb_pipeline` + +Ajouter un module distinct, par exemple `core_extraction.rs`, exposant : + +- extraction d’une signature ; +- extraction d’un lot borné ; +- filtre par plage de slots ; +- filtre par program id lorsque les comptes/instructions core existent déjà ; +- mode normal et mode force replay ; +- résumé avec selected, skipped, extracted, failed et cancelled ; +- arrêt coopératif et concurrence bornée selon les mêmes principes que le backfill. + +La logique profonde reste dans `kb_pipeline`; Tauri ne fait qu’appeler cette API. + +## Démo Tauri + +Ajouter ou étendre une fenêtre de démonstration permettant : + +- extraction par liste de signatures ; +- extraction d’un lot pending ; +- extraction par plage de slots ; +- force replay ; +- version d’extracteur visible ; +- journal borné ; +- résumé JSON ; +- arrêt coopératif ; +- rafraîchissement des diagnostics raw/core. + +Réutiliser le template global et les accordéons Bootstrap 5. Ne pas mélanger la fenêtre avec le décodage DEX. + +### Sélecteur SQL de candidats replay + +Ajouter une fenêtre read-only distincte `demo_sql_replay_candidates` afin de préparer les corpus sans pgAdmin ou DBeaver : + +- tableau des transactions/signatures avec filtres raw, ledger, slots, programme et entité ; +- tableau agrégé des programmes outer, inner et logs reliés ; +- tableaux distincts des mints, owners et account keys ; +- DataTables avec intégration Bootstrap 5, sélection par checkbox et pagination à 10 lignes ; +- reset des filtres et copie individuelle ou multiligne dans le presse-papiers ; +- affichage tronqué des identifiants longs avec tooltip et valeur intégrale pour tri, recherche, copie et export ; +- export CSV diagnostique écrit par Rust dans `data/exports_csv/` ; +- requêtes PostgreSQL statiques, paramétrées et limitées ; +- aucune exécution de SQL libre et aucune écriture en base. + +La fenêtre doit être accessible depuis le menu principal et depuis `demo_core_extraction`. + +## Tests offline obligatoires + +Couvrir au minimum : + +1. transaction legacy simple ; +2. transaction v0 avec ALT et loaded addresses ; +3. transaction échouée avec `err_json` ; +4. outer instructions multiples ; +5. inner instructions et CPI imbriqués ; +6. logs avec invoke/success/failed ; +7. balances SOL positives, négatives et nulles ; +8. balances SPL et Token-2022 ; +9. compte token créé ou fermé pendant la transaction ; +10. indice de programme hors limites ; +11. indice de compte hors limites ; +12. idempotence sur double extraction ; +13. replay forcé sans doublon ; +14. rollback complet après erreur intermédiaire ; +15. changement de version d’extracteur ; +16. changement de hash canonique ; +17. arrêt coopératif d’un lot. + +Les fixtures ne doivent effectuer aucun appel réseau. + +## Hors périmètre + +- décodeurs Solana Core/SPL ; +- décodeurs DEX ; +- matérialisation métier ; +- sources Helius `transactionSubscribe` ; +- Yellowstone gRPC ; +- Solscan ou `kb_external_sources` ; +- compaction ou purge du canonical JSON ; +- trading et wallet. + +## Fichiers à lire en priorité + +- `kb_model/src/canonical_transaction.rs` ; +- `kb_pipeline/src/backfill.rs` ; +- `kb_pipeline/src/lib.rs` ; +- `kb_store_core/src/dtos/core_dtos.rs` ; +- `kb_store_core/src/dtos/ledger_dtos.rs` ; +- `kb_store_core/src/entities/core_entities.rs` ; +- `kb_store_core/src/entities/ledger_entities.rs` ; +- `kb_store_core/src/repositories/storage_repositories.rs` ; +- `kb_store_pg/src/queries/core_queries.rs` ; +- `kb_store_pg/src/repositories/core_transaction_repository.rs` ; +- `kb_store_pg/migrations/0002_core_store.sql` ; +- `docs/CORE_EXTRACTION_CONTRACTS.md` ; +- `docs/CORE_STORE.md` ; +- `docs/INSTRUCTION_REPLAY_CONTRACTS.md` ; +- `ROADMAP.md` ; +- `RULES.md`. + +## Règles de réalisation + +- Rust 2024 ; +- async-first ; +- tracing obligatoire ; +- erreurs explicites ; +- aucun `?`, `unwrap`, `expect`, `anyhow` ou `thiserror` dans le code de production ; +- aucun `use` sauf pour les traits ; +- appels locaux via `crate::` ; +- `#![warn(missing_docs)]`, `#![deny(unreachable_pub)]` et `#![forbid(unsafe_code)]` ; +- documentation du code en anglais ; +- documentation Markdown en français ; +- headers `file` / `version` et version incrémentée à chaque modification ; +- aucune ligne vide dans les corps de fonctions ou structures ; +- une ligne vide finale dans chaque fichier ; +- TS-rs pour les types exposés à Tauri ; +- ne pas modifier `CHANGELOG.md` avant validation locale complète. + +## Validation attendue + +```bash +cargo test -p kb_model +cargo test -p kb_store_core +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana' cargo test -p kb_store_pg -- --nocapture +cargo test -p kb_pipeline +cargo test -p kb_app_demo +(cd kb_app_demo && npm run build) +cargo clippy --all-targets +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + +Ajouter des requêtes SQL de contrôle pour vérifier : + +- aucune transaction core sans raw lineage lorsque la source raw existe ; +- aucun compte, instruction, inner instruction, log ou balance change orphelin ; +- aucune duplication des clés uniques ; +- égalité entre les comptes résolus et le contrat canonique ; +- stabilité des instruction paths ; +- cohérence du ledger avec les lignes core créées. + +## Livraison historique + +La dernière préversion technique a été livrée sous : + +```text +khadhroony-bot2_v0.3.4-pre.011-delta.zip +``` + +Le delta final documentaire enregistre ensuite la version validée dans `CHANGELOG.md` et active `0.4.0`. + +## Clôture finale + +Les validations finales ont été exécutées avec succès : + +```text +cargo test -p kb_pipeline: 24 passed +KB_POSTGRES_TEST_URL=... cargo test -p kb_store_pg -- --nocapture: 39 passed +cargo clippy --all-targets: aucun avertissement +``` + +`0.3.4` est reportée dans `CHANGELOG.md`, l’ancien jalon `0.3.5` est absorbé et le prompt actif devient `prompts/019_v0_4_0_decoder_infrastructure.md`. diff --git a/olddocs/archivekbot2/prompts/019_v0_4_0_decoder_infrastructure.md b/olddocs/archivekbot2/prompts/019_v0_4_0_decoder_infrastructure.md new file mode 100644 index 0000000..211056f --- /dev/null +++ b/olddocs/archivekbot2/prompts/019_v0_4_0_decoder_infrastructure.md @@ -0,0 +1,288 @@ + + + +# Prompt v0.4.0 — infrastructure commune de décodage et matérialisation + +## Statut + +Prompt actif depuis la clôture de `0.3.4` le 7 juillet 2026. + +## Précondition satisfaite + +`0.3.4` est validée et inscrite dans `CHANGELOG.md`. Les validations finales ont confirmé `kb_pipeline` avec 24 tests, `kb_store_pg` avec 39 tests incluant le rollback PostgreSQL réel et `cargo clippy --all-targets` sans avertissement. + +La fondation disponible est : + +```text +kb_sol_raw_transactions + -> kb_sol_core_transactions + -> kb_sol_core_account_keys + -> kb_sol_core_instructions + -> kb_sol_core_inner_instructions + -> kb_sol_core_logs + -> kb_sol_core_balance_changes + -> kb_sol_ops_processing_ledger +``` + +Les campagnes core disposent déjà de la sélection par signatures, pending, slots et programme, du skip version/hash, du force replay, de la concurrence bornée, de l’arrêt coopératif et de `demo_sql_replay_candidates`. + +## Objectif + +Construire l’infrastructure générique permettant aux futurs décodeurs Solana Core, SPL et protocolaires de recevoir un input core contextualisé, de produire des observations décodées versionnées, puis de déclencher des matérialisations explicitement autorisées. + +`0.4.0` ne doit pas encore devenir une version de décodage maximal d’un protocole précis. Elle stabilise les contrats, le dispatch, le ledger, les stores, la couverture et le replay communs. + +## Principes obligatoires + +### Indépendance + +- un décodeur ne dépend pas de PostgreSQL, Tauri ou d’un fournisseur RPC ; +- `kb_decoder_api` dépend uniquement des modèles et contrats backend-agnostiques nécessaires ; +- `kb_materializer_api` reçoit des événements décodés stables et leur contexte ; +- `kb_pipeline` orchestre sélection, dispatch, persistance, replay et arrêt ; +- `kb_store_pg` implémente les repositories concrets. + +### Input contextualisé + +Le contrat de décodage doit fournir au minimum : + +- signature, slot et statut on-chain de la transaction ; +- `err_json` lorsque la transaction a échoué ; +- instruction path stable ; +- program ID ; +- comptes résolus dans l’ordre original ; +- payload brut déterministe et son hash ; +- inner instructions descendantes utiles ; +- logs reliés prudemment ; +- changements de balances pertinents ; +- version du contrat core. + +Réutiliser ou faire évoluer `CoreInstructionReplayInput` au lieu de recréer un modèle parallèle par décodeur. + +### Transactions échouées + +Les transactions on-chain échouées doivent être décodées lorsqu’un input structurel existe. + +Un événement décodé doit conserver explicitement : + +```text +transaction_failed +transaction_error +observation_committed = false lorsque la mutation a été annulée +``` + +Une transaction échouée peut produire : + +- une observation d’instruction tentée ; +- une observation d’événement loggé avant l’erreur ; +- une classification de l’échec ; +- des métriques de compute et de surface appelée. + +Elle ne doit pas produire automatiquement : + +- un trade réussi ; +- une modification de liquidité réussie ; +- un changement de catalogue considéré comme confirmé ; +- une candle normale issue d’un swap annulé. + +Le matérialiseur doit appliquer une politique explicite par famille d’événement, et non une simple hypothèse basée sur la présence d’un log. + +## Contrats de décodeur + +Stabiliser dans `kb_decoder_api` : + +- identité du décodeur ; +- version ; +- programmes et surfaces supportés ; +- capacité à reconnaître un input ; +- résultat `decoded`, `ignored`, `unsupported` ou `failed` ; +- confiance et preuve de décodage ; +- événements décodés typés ; +- diagnostics sans `anyhow` ni `thiserror` ; +- couverture déclarée des instructions, événements et discriminants. + +Le dispatch doit être déterministe par : + +```text +program_id +surface_code éventuel +instruction_path +payload/discriminator +contexte inner/logs +``` + +Aucun dispatch ne doit reposer sur le nom d’une crate ou sur un ordre implicite non documenté. + +## Contrats de matérialisation + +Stabiliser dans `kb_materializer_api` : + +- identité et version du matérialiseur ; +- familles d’événements acceptées ; +- politique pour transaction réussie/échouée ; +- sortie métier typée ; +- idempotence et clés stables ; +- résultat inséré, remplacé, ignoré ou refusé. + +Le matérialiseur ne doit jamais modifier directement les tables core. + +## Persistance et ledger + +Définir les tables actives nécessaires avec le nommage : + +```text +kb_sol_decode_* +kb_sol_mat_* +kb_sol_ops_processing_ledger +``` + +Ne pas créer de schema PostgreSQL applicatif explicite. + +Le ledger doit distinguer au minimum : + +```text +stage = instruction_decode +stage = event_materialization +processor_name +processor_version +input_key +input_hash +status +attempt_count +error_code +error_message +``` + +Le skip doit dépendre de la version du processor et d’un hash déterministe de l’input pertinent. Le force replay doit remplacer uniquement les sorties appartenant au processor et à l’input ciblés. + +## Couverture + +Ajouter une matrice machine-readable permettant de comparer : + +- entrées déclarées par le décodeur ; +- entrées observées dans le corpus ; +- entrées reconnues ; +- entrées décodées ; +- événements matérialisés ; +- erreurs et inconnues ; +- transactions réussies et échouées. + +Ne pas considérer une surface clôturée tant que toutes les instructions et événements connus, y compris historiques et non directement liés au trading, ne sont pas classifiés. + +## Orchestration `kb_pipeline` + +Ajouter un pipeline versionné avec : + +- sélection bornée des instructions core `pending`, `failed` ou `replay_requested` ; +- sélection explicite par signatures, slots, program IDs et instruction paths ; +- dispatch vers zéro, un ou plusieurs décodeurs compatibles selon la politique déclarée ; +- concurrence bornée ; +- arrêt coopératif ; +- skip version/hash ; +- force replay ; +- résumé par processor et statut ; +- persistance atomique des événements décodés et du ledger ; +- appel optionnel des matérialiseurs après succès de persistance du décodage. + +## Démo Tauri + +Ajouter une fenêtre distincte, par exemple `demo_decode_replay`, sans surcharger `demo_core_extraction`. + +Fonctions minimales : + +- sélection de signatures copiées depuis `demo_sql_replay_candidates` ; +- filtre program ID et instruction state ; +- choix des décodeurs disponibles ; +- version visible ; +- force replay ; +- journal et résumé ; +- arrêt ; +- liens vers diagnostics core, decode, ledger et couverture. + +Aucun SQL libre. + +## Tests obligatoires + +Couvrir au minimum : + +1. dispatch exact par program ID ; +2. instruction inconnue classée sans faux décodage ; +3. décodage réussi avec hash stable ; +4. skip même version/hash ; +5. replay après changement de version ; +6. force replay sans duplication ; +7. rollback des événements décodés et du ledger ; +8. transaction échouée décodée comme observation non commitée ; +9. refus de matérialiser un trade réussi depuis une transaction échouée ; +10. arrêt coopératif et candidats non démarrés ; +11. couverture déclarée contre couverture observée ; +12. tests PostgreSQL optionnels sous `KB_POSTGRES_TEST_URL`. + +Les tests unitaires doivent être offline. + +## Hors périmètre + +- décodage maximal System/SPL, prévu dans `0.4.1+` ; +- Pump, Meteora, Raydium, Orca et autres protocoles ; +- Helius `transactionSubscribe` ; +- Yellowstone gRPC ; +- wallet et trading ; +- pools/paires déduits par heuristique depuis de simples account keys. + +## Fichiers à lire en priorité + +- `ROADMAP.md` ; +- `RULES.md` ; +- `docs/CORE_EXTRACTION_CONTRACTS.md` ; +- `docs/CORE_EXTRACTION_SELECTION_AND_REPLAY.md` ; +- `docs/INSTRUCTION_REPLAY_CONTRACTS.md` ; +- `kb_decoder_api/` ; +- `kb_materializer_api/` ; +- `kb_store_core/src/dtos/core_dtos.rs` ; +- `kb_store_core/src/repositories/storage_repositories.rs` ; +- `kb_pipeline/src/core_extraction.rs` ; +- `kb_store_pg/src/queries/core_extraction_queries.rs` ; +- `kb_app_demo/src/demo_core_extraction.rs` ; +- `kb_program_ids/src/lib.rs`. + +## Règles de réalisation + +- Rust 2024 ; +- async-first ; +- tracing obligatoire ; +- erreurs explicites ; +- aucun `?`, `unwrap`, `expect`, `anyhow` ou `thiserror` dans le code de production ; +- aucun `use` sauf pour les traits ; +- appels locaux via `crate::` ; +- `#![warn(missing_docs)]`, `#![deny(unreachable_pub)]` et `#![forbid(unsafe_code)]` ; +- documentation du code en anglais ; +- documentation Markdown en français ; +- headers `file` / `version` incrémentés à chaque modification ; +- aucune ligne vide dans les corps de fonctions ou structures ; +- TS-rs pour les types Tauri ; +- ne pas modifier `CHANGELOG.md` avant validation complète. + +## Validation attendue + +```bash +cargo test -p kb_decoder_api +cargo test -p kb_materializer_api +cargo test -p kb_store_core +cargo test -p kb_pipeline +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana_test' \ + cargo test -p kb_store_pg -- --nocapture +cargo test -p kb_app_demo +(cd kb_app_demo && npm run build) +cargo clippy --all-targets +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + +## Livraison + +Produire uniquement un zip delta : + +```text +khadhroony-bot2_v0.4.0-pre.001-delta.zip +``` + +Le delta doit contenir `delta.md`, les fichiers ajoutés ou modifiés et la liste explicite des suppressions manuelles. Ne pas produire d’archive complète sauf demande explicite. diff --git a/olddocs/archivekbot2/prompts/020_v0_4_1_native_solana_programs.md b/olddocs/archivekbot2/prompts/020_v0_4_1_native_solana_programs.md new file mode 100644 index 0000000..6c6bc55 --- /dev/null +++ b/olddocs/archivekbot2/prompts/020_v0_4_1_native_solana_programs.md @@ -0,0 +1,691 @@ + + + +# Prompt de session — `0.4.1` programmes Solana natifs, loaders et précompiles + +## 1. Mission + +Poursuivre `khadhroony-bot2` depuis la version validée `0.4.0` et réaliser `0.4.1`. + +Le but est de transformer le classifieur natif introduit en `0.4.0` en un décodeur maximal, vérifiable et rejouable pour les programmes Solana natifs/runtime, les programmes historiques, les loaders et les précompiles. La version doit décoder toutes les variantes connues et officiellement vérifiables, y compris celles qui ne sont pas directement liées au trading. + +Le travail doit rester dans l’architecture existante : + +```text +canonical transaction + -> core extraction + -> contextual instruction replay + -> kb_decoder_solana_core + -> decoded native events + -> optional generic materialization + -> coverage + processing ledger +``` + +Ne pas commencer SPL Token, Token-2022, Pump, Meteora, Raydium, Orca, Jupiter, wallet, exécution ou ingestion live dans cette version. + +## 2. Base de travail et règle de livraison + +La base attendue est la dernière archive complète ou le dernier workspace utilisateur contenant les correctifs validés jusqu’à `0.4.0-pre.011`. + +Avant toute modification : + +1. lire `RULES.md`, `README.md`, `ROADMAP.md` et `CHANGELOG.md` ; +2. lire `prompts/019_v0_4_0_decoder_infrastructure.md` ; +3. auditer les crates et fichiers réellement présents ; +4. vérifier les versions de headers `file:` / `version:` ; +5. ne pas supposer qu’un fichier ou une API existe sans l’avoir inspecté. + +Après l’archive complète initiale, livrer uniquement des ZIP delta. Le delta racine doit suivre une nomenclature du type : + +```text +khadhroony-bot2_v0.4.1-pre.001-delta.zip +``` + +Chaque delta doit contenir : + +- uniquement les fichiers ajoutés ou modifiés ; +- `delta.md` non versionné ; +- `manifest.json` avec chemins, tailles et SHA-256 ; +- la liste explicite des suppressions manuelles, normalement vide. + +Ne fournir une archive complète que sur demande explicite. + +## 3. État validé à préserver + +`0.4.0` est validée avec : + +- `kb_config` : 36 tests ; +- `kb_pipeline` : 41 tests ; +- `kb_store_pg` : 44 tests, PostgreSQL réel compris ; +- `kb_app_demo` : 75 tests ; +- `cargo clippy --all-targets` propre ; +- replay contextualisé borné par programmes compatibles ; +- skip processor/version/hash ; +- force replay ciblé par signatures ; +- autorisation explicite « toutes les signatures » avec limite ; +- matérialisation refusée sans matérialiseur ; +- persistance atomique ledger/decode/mat/couverture ; +- `campaign_id` corrélé entre application, pipeline, store et décodeur ; +- arrêt coopératif avec : + - `started + not_started = selected` ; + - `completed = started` ; +- validation réelle finale : + - 382 inputs Compute Budget sélectionnés ; + - 45 démarrés et terminés ; + - 337 non démarrés ; + - aucun unmatched ; + - aucun échec ; + - 45 dispatchs `unsupported` ; + - `errors.jsonl` vide ; +- couverture actuelle : + - 18 déclarations natives alors exposées ; `pre.008` a corrigé Stake Config et le registre exécutable en contient désormais 17 ; + - 382 observations Compute Budget reconnues ; + - 94 observations System reconnues ; + - aucun faux événement décodé ou matérialisé. + +Ces comportements ne doivent pas régresser. + +## 4. Contraintes normatives du workspace + +Respecter strictement `RULES.md`, notamment : + +- Rust 2024 ; +- async-first lorsqu’un I/O est impliqué ; +- `kb_core::Error` et `kb_core::Result` ; +- pas de `anyhow` ni `thiserror` ; +- pas de `unwrap`, `expect`, panic volontaire ou `unsafe` en production ; +- pas d’opérateur `?` dans les commandes Tauri si les règles locales l’interdisent ; +- retours explicites selon les lints du workspace ; +- `warn(missing_docs)`, `deny(unreachable_pub)`, `forbid(unsafe)` ; +- imports uniquement pour les traits lorsque possible ; +- chemins pleinement qualifiés et `crate::` pour l’intra-crate ; +- noms de fichiers et dossiers ASCII anglais ; +- documentation de code en anglais ; +- Markdown projet en français ; +- header obligatoire `file:` puis `version:` dans chaque fichier modifié ; +- incrémenter exactement une fois la version d’un fichier modifié ; +- aucune ligne vide inutile à l’intérieur des corps selon les conventions du projet ; +- une ligne vide finale ; +- exports TS-rs obligatoires pour les payloads Tauri partagés ; +- aucune logique métier lourde dans `kb_app_demo` ; +- aucun SQL libre exposé dans l’interface ; +- ne pas modifier `CHANGELOG.md` avant validation complète du jalon ; +- utiliser une interface officielle Solana/SPL étroite lorsqu’elle expose le contrat nécessaire ; +- préférer `wincode`, puis Borsh, et conserver un parser local borné lorsque l’interface officielle n’expose que `bincode` ; +- ne jamais ajouter de dépendance directe à `bincode` ; +- toute crate opérationnelle utilise un target `tracing` canonique égal au package Cargo ; +- tout statut decode `failed`/`unsupported`, input unmatched, matérialisation `failed` ou erreur de persistance doit produire un événement `error` structuré ; +- une transaction on-chain échouée mais correctement décodée et un refus de politique conforme ne sont pas des erreurs logicielles. + +## 5. Sources de vérité + +La précision des formats binaires est bloquante. + +### Ordre de priorité + +1. code et contrats du workspace ; +2. sources officielles actuelles Agave/Solana SDK ; +3. crates officielles d’interface Solana correspondant au programme, avec leurs features de sérialisation réellement activées ; +4. tests, encodeurs et fixtures officiels ; +5. documentation officielle ; +6. transactions mainnet réelles déjà présentes ou acquises par le workspace. + +Ne pas utiliser un blog, un parser tiers ou un souvenir comme source normative lorsqu’une source officielle existe. + +### Règles de recherche + +Pour chaque programme : + +- identifier le program ID depuis `kb_program_ids` ; +- identifier la définition officielle actuelle et les variantes historiques ; +- relever le format de sérialisation exact ; +- relever l’ordre exact des comptes, flags signer/writable et règles optionnelles ; +- relever les variantes ajoutées ou supprimées selon les versions ; +- documenter la source et, lorsque possible, le commit/tag consulté ; +- créer une fixture à partir d’un encodeur officiel ou d’une transaction réelle vérifiée ; +- vérifier d’abord si l’interface expose `wincode` ou Borsh ; ne pas activer une feature `bincode` uniquement pour éviter un parser local ; +- ajouter la dépendance officielle uniquement à la crate qui consomme réellement ses types ; +- ne jamais deviner un discriminant, un tag, un offset, une taille ou une sémantique. + +Si deux sources officielles divergent, conserver les deux variantes lorsque les transactions historiques peuvent encore les contenir et documenter la règle de dispatch. + +## 6. Périmètre exact des programmes + +### 6.1 Runtime natif principal + +Décoder maximalement : + +- `11111111111111111111111111111111` — System Program ; +- `Vote111111111111111111111111111111111111111` — Vote Program ; +- `Stake11111111111111111111111111111111111111` — Stake Program ; +- `Config1111111111111111111111111111111111111` — Config Program ; +- `ComputeBudget111111111111111111111111111111` — Compute Budget Program ; +- `AddressLookupTab1e1111111111111111111111111` — Address Lookup Table Program ; +- `ZkE1Gama1Proof11111111111111111111111111111` — ZK ElGamal Proof Program. + +### 6.2 Programmes historiques encore observables + +Décoder/classifier correctement : + +- `Feature111111111111111111111111111111111111` — Feature Program ; +- `ZkTokenProof1111111111111111111111111111111` — ancien ZK Token Proof Program. + +### 6.3 Compte natif historique non exécutable + +- `StakeConfig11111111111111111111111111111111` — compte de configuration Stake historique déprécié. + +Cette adresse doit rester dans `native_well_known_account_ids()` et ne doit produire aucune surface de décodage, aucun dispatch et aucun plan d’exécution. L’alias historique `STAKE_CONFIG_PROGRAM_ID` reste uniquement déprécié au profit de `STAKE_CONFIG_ACCOUNT_ID`. + +### 6.4 Loaders + +Décoder maximalement : + +- `NativeLoader1111111111111111111111111111111` ; +- `BPFLoader1111111111111111111111111111111111` ; +- `BPFLoader2111111111111111111111111111111111` ; +- `BPFLoaderUpgradeab1e11111111111111111111111` ; +- `LoaderV411111111111111111111111111111111111`. + +### 6.5 Précompiles + +Décoder : + +- `Ed25519SigVerify111111111111111111111111111` ; +- `KeccakSecp256k11111111111111111111111111111` ; +- `Secp256r1SigVerify1111111111111111111111111`. + +Les précompiles n’utilisent pas nécessairement une enum sérialisée classique. Leur parser doit valider les compteurs, tables d’offsets, références à d’autres instructions, tailles et bornes avant toute lecture. + +### 6.6 Exclusion explicite + +`MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr` et `Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo` ne font pas partie de `0.4.1`. Memo appartient aux programmes SPL et sera traité dans la série correspondante. + +## 7. Couverture fonctionnelle minimale attendue + +La liste suivante est un guide de couverture, pas une autorisation à coder depuis la mémoire. Les noms et formats définitifs doivent être confirmés dans les sources officielles. + +### 7.1 System Program + +Couvrir au minimum toutes les variantes officielles observables, notamment : + +- create account ; +- assign ; +- transfer ; +- create account with seed ; +- advance nonce account ; +- withdraw nonce account ; +- initialize nonce account ; +- authorize nonce account ; +- allocate ; +- allocate with seed ; +- assign with seed ; +- transfer with seed ; +- upgrade nonce account ; +- toute variante historique ou checked officiellement définie. + +Produire des événements structurés avec : + +- lamports ; +- space ; +- owner ; +- base/seed lorsque présents ; +- autorités ; +- comptes source/destination/nonce ; +- état on-chain succès/échec. + +### 7.2 Compute Budget + +Couvrir toutes les variantes officielles, y compris les formes historiques encore décodables, par exemple : + +- request units deprecated ; +- request heap frame ; +- set compute unit limit ; +- set compute unit price ; +- set loaded accounts data size limit ; +- toute nouvelle variante réellement présente dans la source officielle utilisée. + +Les paramètres doivent rester numériques sans perte. Le décodeur doit reproduire le comportement réel du runtime : lorsqu’Agave utilise une désérialisation unchecked qui accepte des octets suffixes, décoder la valeur officielle minimale et conserver le suffixe par taille, préfixe borné et SHA-256 au lieu de le rejeter ou de l’ignorer silencieusement. + +### 7.3 Address Lookup Table + +Couvrir : + +- create lookup table ; +- freeze lookup table ; +- extend lookup table ; +- deactivate lookup table ; +- close lookup table. + +Conserver slot récent, bump seed, autorité, adresses ajoutées et comptes concernés lorsque présents. + +### 7.4 Vote + +Couvrir toutes les instructions officielles actuelles et historiques observables : + +- initialize account ; +- authorize et authorize checked ; +- vote et variantes compactes ; +- vote/state update ; +- tower sync lorsqu’officiel ; +- withdraw ; +- update validator identity ; +- update commission ; +- seed/checked variants ; +- toute variante ajoutée dans les interfaces officielles. + +Ne pas matérialiser une mise à jour de vote comme mutation réussie lorsque la transaction on-chain a échoué. + +### 7.5 Stake + +Couvrir toutes les instructions officielles actuelles et historiques observables : + +- initialize et initialize checked ; +- authorize, authorize with seed et variantes checked ; +- delegate stake ; +- split ; +- merge ; +- withdraw ; +- deactivate ; +- set lockup et checked ; +- get minimum delegation ; +- deactivate delinquent ; +- redelegate ; +- move stake / move lamports lorsqu’officiels ; +- toute variante historique encore sérialisable. + +Conserver autorités, vote account, custodian, lockup, lamports, seeds et relations de comptes. + +### 7.6 Config et Feature + +Décoder le format exact de leurs mises à jour et données de configuration. Stake Config reste explicitement exclu, car il s’agit d’un compte et non d’une surface d’instruction. Lorsque le programme ne fournit pas une sémantique métier plus fine, produire un événement générique explicite avec : + +- type d’opération officiel ; +- clés signataires/configurées ; +- payload borné ou hashé selon la taille ; +- statut de décodage ; +- aucune interprétation inventée. + +### 7.7 ZK proofs + +Pour `zk_elgamal_proof` et `zk_token_proof` : + +- couvrir chaque type de preuve officiellement déclaré ; +- valider tailles et tags ; +- éviter de recopier inutilement de gros blobs ; +- conserver le type de preuve, tailles, références et hashes nécessaires à l’audit ; +- distinguer preuve reconnue, preuve complètement décodée et payload invalide. + +### 7.8 Loaders + +Couvrir les variantes officielles de chaque loader, notamment selon le loader concerné : + +- write ; +- finalize ; +- initialize buffer ; +- deploy/deploy with max data length ; +- upgrade ; +- set authority et checked ; +- close ; +- extend program ; +- truncate ; +- retract ; +- transfer authority ; +- finalize ; +- migration éventuelle si officiellement définie. + +Conserver les offsets, longueurs, autorités, program/programdata/buffer accounts et paramètres de déploiement. + +### 7.9 Précompiles + +Pour chaque signature décrite : + +- valider le nombre d’entrées ; +- décoder les offsets et instruction indexes ; +- résoudre les références à l’instruction courante ou à une autre instruction du même message ; +- borner toutes les slices ; +- conserver l’algorithme, la clé/adresse, la signature, le message ou son hash selon la taille ; +- conserver le résultat on-chain de la transaction, sans prétendre revalider cryptographiquement si le décodeur ne le fait pas ; +- tester les offsets invalides, références hors bornes, tailles tronquées et compteurs incohérents. + +## 8. Modèle d’événements + +### 8.1 Principes + +Les événements doivent être : + +- versionnés ; +- déterministes ; +- sérialisables sans perte ; +- indépendants de PostgreSQL ; +- indépendants de Tauri ; +- stables pour le replay ; +- explicites sur le programme et la variante ; +- reliés à la signature, au slot, au chemin d’instruction et au contexte outer/inner ; +- explicites sur `transaction_succeeded` ou équivalent ; +- capables de conserver les comptes résolus et rôles utiles. + +Ne pas créer un type unique rempli de champs optionnels incohérents si des enums typées par famille sont plus sûres. + +### 8.2 Statuts + +Conserver les distinctions : + +- `recognized` : programme/surface reconnue ; +- `decoded` : format complet validé et événement produit ; +- `ignored` : variante volontairement non matérialisée mais comprise ; +- `unsupported` : variante officielle pas encore supportée ; +- `failed` : payload invalide, tronqué ou incohérent ; +- `unmatched` : aucun processor compatible, normalement zéro dans une sélection bornée correctement. + +Une reconnaissance du program ID sans décodage du payload ne doit pas incrémenter `decoded`. + +### 8.3 Inconnus + +Pour un discriminant/tag inconnu : + +- ne pas paniquer ; +- produire un diagnostic borné ; +- enregistrer la couverture inconnue ; +- conserver le tag et un hash du payload ; +- ne pas inventer un nom d’instruction ; +- permettre un futur replay après changement de version du décodeur. + +## 9. Matérialisation + +### 9.1 Principe + +La version vise d’abord le décodage maximal. Ajouter une matérialisation uniquement lorsqu’elle apporte une projection générique stable qui n’est pas déjà représentée proprement dans core. + +Candidats autorisés après justification : + +- transferts SOL ; +- création/initialisation/autorisation/withdraw/upgrade de nonce accounts ; +- changements d’autorité stake/vote/config/loader ; +- lifecycle des Address Lookup Tables ; +- lifecycle des programmes/buffers/programdata upgradeables ; +- paramètres Compute Budget demandés par transaction ; +- opérations administratives natives utiles au risque/audit. + +### 9.2 Interdictions + +- ne pas matérialiser une mutation réussie depuis une transaction échouée ; +- ne pas dupliquer sans raison les account keys, balances ou instructions core ; +- ne pas créer une table par instruction ; +- ne pas introduire de schéma PostgreSQL explicite ; +- conserver la convention `kb_sol__` ; +- documenter chaque clé d’idempotence et règle de replacement par version ; +- ne pas ajouter un matérialiseur vide uniquement pour activer le bouton de démo. + +Si aucune projection n’est suffisamment stable dans un premier delta, conserver la matérialisation désactivée et documenter ce choix. + +## 10. Stockage, ledger et couverture + +Préserver les invariants `0.4.0` : + +- persistance atomique ; +- skip exact par processor/version/input hash ; +- force replay ciblé ou global explicitement autorisé ; +- remplacement versionné sans duplication ; +- couverture déclarée synchronisée ; +- couverture observée par programme/surface/entry ; +- séparation succès/échec on-chain ; +- `campaign_id` propagé ; +- aucune réapplication DDL par commande Tauri ; +- rollback complet en cas d’erreur intermédiaire. + +Une migration SQL n’est autorisée que si les types actuels ne peuvent réellement pas représenter les événements ou matérialisations. Préférer les tables génériques versionnées existantes lorsque leur contrat est suffisant. + +## 11. Corpus et fixtures + +### 11.1 Corpus existant + +La base validée contient au moins : + +- 382 observations Compute Budget ; +- 94 observations System ; +- 170 transactions core au moment des validations précédentes ; +- des transactions réussies et échouées ; +- des instructions outer et inner. + +Commencer par System et Compute Budget pour valider rapidement le passage de `unsupported` à `decoded`. + +### 11.2 Acquisition de nouveaux corpus + +Utiliser les outils existants : + +1. `demo_sql_replay_candidates` pour détecter les programmes présents ; +2. `demo_backfill` pour acquérir des signatures réelles ; +3. `demo_core_extraction` pour créer les inputs core ; +4. `demo_decode_replay` pour décoder/rejouer ; +5. diagnostics decode/ledger/couverture pour vérifier les compteurs. + +Pour les programmes rares, utiliser des fixtures synthétiques dérivées des encodeurs officiels. Ne pas bloquer tout le jalon sur l’absence immédiate d’un corpus mainnet, mais distinguer clairement : + +- couvert par fixture officielle ; +- observé dans une transaction réelle ; +- décodé et rejoué sur PostgreSQL réel. + +### 11.3 Fichiers de corpus + +Conserver les fixtures dans les crates concernées ou dans un dossier de fixtures déjà normalisé par le workspace. Ne pas ajouter de payload massif dupliqué. Pour chaque fixture, documenter : + +- programme ; +- variante ; +- succès/échec ; +- outer/inner ; +- source ; +- attendu ; +- raison de la fixture. + +## 12. Tests obligatoires + +### 12.1 Tests unitaires par décodeur + +Pour chaque variante : + +- payload valide ; +- payload tronqué ; +- tag inconnu ; +- champs numériques limites ; +- comptes manquants ou index invalides ; +- transaction réussie ; +- transaction échouée ; +- sérialisation déterministe ; +- stabilité de l’event kind ; +- input hash stable. + +### 12.2 Précompiles + +Ajouter des tests spécifiques : + +- zéro entrée si autorisé/interdit par le format ; +- plusieurs signatures ; +- références à l’instruction courante ; +- références à une autre instruction ; +- index hors bornes ; +- offset hors bornes ; +- chevauchement/troncature ; +- message vide ; +- message volumineux borné/hashé. + +### 12.3 Pipeline + +Préserver et compléter : + +- dispatch exact ; +- skip même version/hash ; +- replay après changement de version ; +- force replay ciblé ; +- replay global autorisé et limité ; +- annulation avant admission ; +- annulation partielle avec `completed = started` ; +- couverture declared/observed/decoded/error ; +- transaction échouée ; +- matérialisation refusée si aucune implémentation active. + +### 12.4 PostgreSQL réel + +Ajouter ou étendre les tests optionnels contrôlés par `KB_POSTGRES_TEST_URL` : + +- persistance d’événements natifs ; +- idempotence ; +- skip ; +- force replay ; +- remplacement de version ; +- rollback atomique ; +- couverture ; +- aucune matérialisation réussie depuis une transaction échouée. + +## 13. Démo Tauri + +Réutiliser `demo_decode_replay`. + +N’ajouter des champs que s’ils sont nécessaires à l’inspection des événements natifs. Ne pas introduire de SQL libre. + +Le résumé doit continuer à afficher : + +- `campaignId` ; +- selected/started/completed/notStarted ; +- unmatched/failed/cancelled ; +- compteurs par processor ; +- decoded/ignored/unsupported/failed ; +- matérialisations. + +Les diagnostics doivent permettre de vérifier : + +- tables decode/mat/ledger ; +- couverture par programme/surface/entry ; +- événements décodés récents ; +- sorties matérialisées récentes si elles existent. + +Conserver les validations frontend du backfill et la désactivation de la matérialisation lorsque la liste de matérialiseurs est vide. + +## 14. Phasage recommandé + +### Phase A — audit et modèle + +- auditer l’existant ; +- établir la matrice officielle programmes/variantes/sources ; +- stabiliser les enums d’événements et erreurs de parsing ; +- ajouter les utilitaires de lecture bornée nécessaires. + +### Phase B — System et Compute Budget + +- implémenter les deux surfaces déjà présentes dans le corpus ; +- replay réel ; +- vérifier `decoded > 0`, `unsupported` en baisse, `failed = 0` sur les variantes connues ; +- valider skip et force replay. + +### Phase C — Address Lookup Table et loaders + +- ajouter ALT ; +- ajouter loaders deprecated/v2/upgradeable/v4/native ; +- fixtures officielles et corpus réel lorsque disponible ; +- matérialisation lifecycle si justifiée. + +### Phase D — Vote, Stake, Config et programmes historiques + +- couvrir les enums complètes ; +- traiter les variantes checked/seed/historiques ; +- ajouter corpus et tests de transactions échouées. + +### Phase E — Précompiles et ZK + +- implémenter les parsers à offsets bornés ; +- ajouter tests adversariaux ; +- vérifier absence de panic et erreurs explicites. + +### Phase F — matérialisation, diagnostics et clôture + +- ajouter uniquement les projections justifiées ; +- replay global du corpus ; +- contrôler couverture et ledger ; +- vérifier absence de régression ; +- mettre à jour README/ROADMAP/docs ; +- mettre à jour CHANGELOG uniquement après validation utilisateur. + +Chaque phase peut produire un delta `pre.xxx`. Ne pas attendre la fin complète pour livrer une correction bloquante, mais conserver une base cohérente à chaque delta. + +## 15. Validations de clôture + +Adapter les comptes de tests au résultat réel, sans les inventer. + +Exécuter au minimum : + +```bash +cargo test -p kb_program_ids +cargo test -p kb_decoder_api +cargo test -p kb_decoder_solana_core +cargo test -p kb_materializer_api +cargo test -p kb_pipeline +cargo test -p kb_store_core + +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana_test' \ + cargo test -p kb_store_pg -- --nocapture + +cargo test -p kb_app_demo +cargo clippy --all-targets + +(cd kb_app_demo && npm run build) + +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + +Selon les crates réellement modifiées, ajouter leurs tests spécifiques. + +### Scénarios Tauri obligatoires + +1. replay System/Compute Budget sur signatures explicites ; +2. second replay sans force : tous les inputs courants doivent être skipped ; +3. force replay ciblé : aucun skip ; +4. replay global avec petite limite : limite strictement respectée ; +5. transaction on-chain échouée : événement décodé d’intention/échec, aucune mutation matérialisée réussie ; +6. tag inconnu ou fixture invalide : `failed`/unknown correctement compté sans panic ; +7. annulation : `completed = started` et `started + not_started = selected` ; +8. nouvelle campagne après annulation ; +9. même `campaign_id` dans app/pipeline/store/décodeur ; +10. `error.jsonl` global et les `error.jsonl` par crate vides hors erreurs volontairement injectées et contrôlées ; +11. diagnostics de couverture cohérents ; +12. absence de duplication après replay/force replay. + +## 16. Documentation à maintenir + +Mettre à jour au fil des deltas : + +- `README.md` ; +- `ROADMAP.md` ; +- README des crates touchées ; +- `docs/NATIVE_SOLANA_PROGRAMS.md` ; +- `docs/DECODER_MATERIALIZATION_CONTRACTS.md` si le contrat change ; +- `docs/TRACING_CONTRACT.md`, `docs/LOGGING.md` et `docs/SOLANA_INTERFACE_DEPENDENCIES.md` si leur matrice change ; +- document de matrice/couverture si distinct ; +- exemples ou procédures de corpus. + +Ne modifier `CHANGELOG.md` qu’après validation complète et explicite de l’utilisateur. + +## 17. Critères de sortie de `0.4.1` + +Le jalon est clôturable uniquement si : + +- chaque program ID du périmètre possède une déclaration de couverture ; +- toutes les variantes officiellement identifiées sont décodées ou explicitement documentées comme non observables/non supportables avec justification ; +- aucun discriminant n’est inventé ; +- les payloads invalides ne paniquent pas ; +- System et Compute Budget sont validés sur corpus réel ; +- les autres familles sont couvertes au minimum par fixtures officielles vérifiables ; +- le ledger skip/force/version fonctionne ; +- les transactions échouées respectent la politique de non-mutation ; +- la couverture et les diagnostics sont cohérents ; +- les tests PostgreSQL réels passent ; +- le build frontend passe ; +- clippy est propre ; +- les scénarios Tauri passent ; +- aucune régression `0.4.0` n’est constatée ; +- la documentation est alignée ; +- l’utilisateur a explicitement validé la clôture. + +## 18. Règle de conduite pendant la session + +Ne pas demander confirmation pour chaque détail mineur. Inspecter d’abord le workspace et faire le meilleur choix compatible avec les règles et l’architecture. Signaler rapidement toute incohérence détectée, livrer des deltas minimaux et réutilisables, et ne jamais masquer une validation non exécutée. + +Ne pas modifier ou supprimer des données PostgreSQL utilisateur sans commande explicite. Les scripts destructifs doivent rester manuels, documentés et hors exécution automatique. diff --git a/olddocs/archivekbot2/prompts/021_v0_4_2_executor_solana_core.md b/olddocs/archivekbot2/prompts/021_v0_4_2_executor_solana_core.md new file mode 100644 index 0000000..53e7780 --- /dev/null +++ b/olddocs/archivekbot2/prompts/021_v0_4_2_executor_solana_core.md @@ -0,0 +1,281 @@ + + + +# Prompt de session — `0.4.2` infrastructure d’exécution et `kb_executor_solana_core` + +## 1. Mission + +Reprendre `khadhroony-bot2` après la clôture validée de `0.4.1` et démarrer `0.4.2`. + +Le but de `0.4.2` est de transformer les exécuteurs réservés en une infrastructure d’exécution sûre, testable et explicitement bornée, puis de couvrir progressivement toutes les instructions natives officiellement appelables dans `kb_executor_solana_core`. + +Les crates produites doivent rester universelles et réutilisables par des CLI, workers, applications Tauri, outils d’administration ou futurs exécutables non liés au trading. Une opération dangereuse doit être implémentée et testée avec une politique renforcée ; elle peut rester non exposée dans `kb_app_demo`. + +`0.4.2` ne doit pas commencer les décodeurs SPL, Pump, Meteora, Raydium, Orca, Jupiter ou DEX. Le jalon porte sur l’exécution native Solana Core uniquement. + +## 2. Base de travail + +La base attendue est le workspace complet après application et validation de : + +```text +khadhroony-bot2_v0.4.1-pre.022-full.zip +khadhroony-bot2_v0.4.1-pre.023-delta.zip +``` + +Avant modification : + +1. lire `RULES.md`, `README.md`, `ROADMAP.md` et `CHANGELOG.md` ; +2. lire `docs/EXECUTION_MODEL.md` ; +3. lire `docs/NATIVE_SOLANA_CLOSURE_AUDIT.md` ; +4. lire `docs/NATIVE_SOLANA_MATERIALIZATION_AUDIT.md` ; +5. lire `prompts/020_v0_4_1_native_solana_programs.md` pour comprendre les surfaces décodées ; +6. auditer les crates `kb_executor_solana_core`, `kb_wallet`, `kb_rpc`, `kb_pipeline`, `kb_app_demo`, `kb_decoder_solana_core` et les crates de matérialisation natives ; +7. ne pas supposer qu’un type, builder, fonction ou dépendance existe sans l’avoir inspecté. + +Après l’archive complète initiale, livrer uniquement des ZIP delta. + +## 3. État validé à préserver + +`0.4.1` est validée avec : + +```text +kb_program_ids 5 tests +kb_decoder_solana_core 114 tests +kb_materializer_lifecycle 16 tests +kb_materializer_admin 7 tests +kb_materializer_compliance_audit 7 tests +kb_materializer_staking 8 tests +kb_config 36 tests +kb_pipeline 45 tests +kb_store_pg 45 tests avec PostgreSQL réel +kb_app_demo 78 tests +cargo clippy --all-targets propre +``` + +Les replays mainnet de clôture rapportent notamment : + +```text +System 817 decoded, 258 outputs, 52 expected refusals +Config 96 decoded, 96 outputs +Stake 448 decoded, 447 outputs, 1 expected refusal +Vote 600 decoded, 600 outputs +ComputeBudget 2746 decoded, 1603 transaction profiles +ZkElGamal 151 decoded, 139 context outputs +ALT 104 decoded, 104 lifecycle outputs +``` + +Les transactions échouées restent décodées comme intentions ou diagnostics. Les matérialiseurs mutables ne produisent pas de mutation réussie pour une transaction non commitée. + +## 4. Contraintes normatives + +Respecter strictement les règles du workspace : + +- Rust 2024 ; +- async-first pour l’I/O ; +- `kb_core::Error` et `kb_core::Result` ; +- pas de `anyhow` ni `thiserror` ; +- pas de `unwrap`, `expect`, `unsafe` ou panic de production ; +- retours explicites ; +- `warn(missing_docs)`, `deny(unreachable_pub)`, `forbid(unsafe_code)` ; +- imports seulement pour les traits lorsque possible ; +- chemins pleinement qualifiés et `crate::` en intra-crate ; +- documentation de code en anglais ; +- Markdown projet en français ; +- header `file:` puis `version:` dans chaque fichier modifié ; +- version de fichier incrémentée exactement une fois ; +- aucun `bincode` direct ; +- aucune logique métier lourde dans `kb_app_demo` ; +- aucun SQL libre exposé dans l’interface ; +- `CHANGELOG.md` inchangé jusqu’à validation complète du jalon ; +- toute crate opérationnelle utilise un target `tracing` canonique égal au package Cargo. + +## 5. Principes d’exécution + +Un décodeur lit une transaction passée. Un exécuteur prépare une opération future. + +L’exécution doit être découpée en étapes explicites : + +```text +intent + -> execution plan + -> policy checks + -> transaction build + -> simulation / dry-run + -> signature + -> send + -> confirmation + -> post-execution decode replay validation +``` + +Ne jamais mélanger construction, signature, envoi et validation dans une seule fonction opaque. + +Par défaut : + +- dry-run activé ; +- simulation obligatoire ; +- mainnet désactivé ou exigeant une confirmation explicite ; +- plafond de lamports/frais obligatoire pour les opérations dépensières ; +- cluster attendu vérifié ; +- signataires requis listés avant signature ; +- blockhash ou nonce durable contrôlé ; +- post-validation possible via replay decode/materialization. + +## 6. Objectifs `0.4.2` + +### 6.1 API d’exécution + +Stabiliser ou créer les contrats nécessaires dans `kb_execution_api` et `kb_execution_safety` si ces crates existent déjà, ou les créer uniquement si le ROADMAP et le workspace les attendent réellement. + +Contrats attendus : + +- intent typé ; +- plan d’exécution ; +- instruction planifiée ; +- comptes et signataires requis ; +- politique de cluster ; +- politique de simulation ; +- coût/plafond ; +- résultat de simulation ; +- résultat d’envoi ; +- diagnostic post-exécution. + +Si les crates n’existent pas encore, privilégier un delta minimal et cohérent plutôt qu’un design trop large. + +### 6.2 `kb_executor_solana_core` + +Remplacer tout support générique `Maybe` par des capacités exactes : + +```text +Supported(operation) +Unsupported(reason) +``` + +Premières opérations candidates : + +- System transfer SOL ; +- System create account contrôlé ; +- System allocate ; +- System assign ; +- durable nonce initialize/advance/authorize/withdraw, seulement si la politique de sécurité est claire ; +- Compute Budget set compute unit limit ; +- Compute Budget set compute unit price. + +Après les premières opérations, étendre la bibliothèque à : + +- toutes les variantes System et durable nonce officiellement constructibles ; +- Address Lookup Table ; +- Stake et Vote avec politiques d’autorité dédiées ; +- loaders et changements d’autorité ; +- Config, Feature, ZK et Slashing ; +- précompiles lorsqu’un constructeur officiel ou un layout runtime vérifiable existe. + +`Unsupported(reason)` doit rester temporaire et justifié. La dangerosité impose une politique, des confirmations et des tests cluster ; elle ne constitue pas une raison de supprimer définitivement le builder. + +### 6.3 Builders officiels + +Chaque instruction construite doit être comparée à un builder officiel ou à un layout officiel vérifiable. Ne pas inventer de layout. + +Pour les opérations supportées : + +- tester le program ID ; +- tester le nom d’opération ; +- tester les comptes ; +- tester le payload ; +- tester les signataires ; +- tester les limites et erreurs de politique ; +- tester le refus sur cluster ou contexte interdit. + +### 6.4 Wallet temporaire + +Ajouter dans `kb_wallet` un signer de laboratoire universel avant l’orchestration d’envoi : + +- génération en mémoire ; +- persistance optionnelle sous `wallets/` avec alias validé ; +- création sans écrasement ; +- format keypair Solana standard ; +- permissions privées et exclusion Git ; +- aucune clé privée dans les logs, TS-rs, Tauri ou PostgreSQL ; +- profils mainnet fournis sans wallet temporaire actif. + +Le wallet temporaire persistant sert à conserver la même adresse entre les sessions devnet. Les backends chiffrés, coffre système et hardware wallet restent prévus pour la couche wallet de production. + +### 6.5 Démo Tauri + +Ajouter ou étendre une démo uniquement si nécessaire, sans logique métier lourde : + +- visualiser un plan ; +- afficher les signataires requis ; +- lancer une simulation ; +- ne pas envoyer réellement sur mainnet sans confirmation explicite ; +- ne pas exposer de SQL libre. + +Si l’UI n’est pas indispensable dans un premier delta, valider d’abord les crates d’API et d’exécution par tests unitaires. + +## 7. Matérialisations et validation post-exécution + +Une exécution réussie doit pouvoir être validée après coup par le pipeline existant : + +```text +signature envoyée + -> backfill / canonical insert + -> core extraction + -> decode replay + -> materialization +``` + +Ne pas faire dépendre l’exécuteur du décodeur. La validation post-exécution peut être orchestrée par `kb_pipeline` ou `kb_app_demo`, mais le builder d’instruction doit rester indépendant. + +## 8. Interdictions dans `0.4.2` + +Ne pas : + +- commencer SPL Memo, SPL Token ou Token-2022 ; +- ajouter Pump/Meteora/Raydium/Orca/Jupiter ; +- activer un exécuteur mainnet par défaut ; +- envoyer une transaction sans simulation explicite ; +- cacher les signataires requis ; +- créer une abstraction « supporté peut-être » ; +- exposer dans `kb_app_demo` une opération dangereuse sans besoin opérateur explicite, politique dédiée et validation cluster ; +- utiliser `bincode` directement ; +- déplacer de logique métier dans `kb_app_demo`. + +## 9. Validations attendues + +Selon les fichiers touchés, exécuter au minimum : + +```bash +cargo test -p kb_executor_solana_core +cargo test -p kb_pipeline +cargo test -p kb_app_demo +cargo test -p kb_config +cargo clippy --all-targets +``` + +Si `kb_store_pg` ou l’orchestration post-exécution est touchée : + +```bash +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana_test' \ + cargo test -p kb_store_pg -- --nocapture +``` + +Si Tauri est touché : + +```bash +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + +## 10. Livraison + +Livrer des deltas incrémentaux nommés : + +```text +khadhroony-bot2_v0.4.2-pre.NNN-delta.zip +``` + +Le ZIP doit contenir : + +- uniquement les fichiers ajoutés ou modifiés ; +- `delta.md` ; +- `manifest.json` ; +- aucune archive complète sauf demande explicite ; +- aucune modification de `CHANGELOG.md` avant validation finale du jalon. diff --git a/olddocs/archivekbot2/prompts/022_v0_4_3_spl_memo.md b/olddocs/archivekbot2/prompts/022_v0_4_3_spl_memo.md new file mode 100644 index 0000000..a1cb43f --- /dev/null +++ b/olddocs/archivekbot2/prompts/022_v0_4_3_spl_memo.md @@ -0,0 +1,401 @@ + + + +# Prompt de session — `0.4.3` SPL Memo v1, v3 et v4 + +## 1. Mission + +Reprendre `khadhroony-bot2` après la clôture validée de `0.4.2` et démarrer `0.4.3`. + +Le jalon doit traiter **complètement** la surface SPL Memo avant de commencer SPL Token : + +```text +program IDs v1 / v3 / v4 + -> décodage maximal + -> projection métier explicite + -> exécuteur typé pour les générations réellement constructibles + -> simulation et validation post-exécution +``` + +L'objectif n'est pas seulement de reconnaître une chaîne UTF-8. Il faut produire un contrat stable pour l'audit, la recherche, la corrélation de paiements, les annotations de transaction et les futures contraintes Token-2022 MemoTransfer. + +Le worker d'acquisition historique décrit dans `docs/HISTORICAL_DATA_ACQUISITION_PLAN.md` reste différé et hors périmètre. Ne créer aucune crate historique et ne consommer aucun temps du jalon sur Explorer, Solscan, BigQuery ou Old Faithful. + +## 2. Base de travail + +La base attendue est le commit Git qui clôture `0.4.2` et contient notamment : + +- `ROADMAP.md` avec `0.4.3 — SPL Memo v1, v3 et v4` ; +- `RULES.md` avec la règle de livraison `delta-fix-NNN` ; +- `prompts/022_v0_4_3_spl_memo.md` ; +- `docs/HISTORICAL_DATA_ACQUISITION_PLAN.md` hors ROADMAP actif. + +Avant toute modification : + +1. lire `RULES.md`, `README.md`, `ROADMAP.md` et `CHANGELOG.md` ; +2. lire `prompts/020_v0_4_1_native_solana_programs.md` et `prompts/021_v0_4_2_executor_solana_core.md` pour préserver les contrats de décodage, matérialisation et exécution ; +3. lire `docs/EXECUTION_MODEL.md`, `docs/SOLANA_INTERFACE_DEPENDENCIES.md` et les audits de clôture `0.4.1`/`0.4.2` ; +4. auditer `kb_decoder_spl_memo`, `kb_executor_spl_memo`, `kb_program_ids`, `kb_decoder_api`, `kb_materializer_api`, les matérialiseurs existants, `kb_execution_api`, `kb_execution_safety`, `kb_execution_solana`, `kb_pipeline`, `kb_rpc`, `kb_store_core`, `kb_store_pg` et `kb_app_demo` ; +5. inspecter les types et conventions réellement présents ; ne pas supposer qu'un helper ou schéma existe ; +6. vérifier la version exacte de `spl-memo-interface` résolue par Cargo et les sources officielles/historiques des trois générations avant d'écrire le wire. + +## 3. État validé à préserver + +La clôture `0.4.2` a été validée avec : + +```text +kb_program_ids 5 tests +kb_decoder_solana_core 116 tests +kb_executor_solana_core 88 tests +kb_execution_api 22 tests +kb_execution_safety 15 tests +kb_execution_solana 12 tests +kb_rpc 113 tests +kb_pipeline 56 tests +kb_config 41 tests +kb_app_demo 88 tests +kb_store_pg 45 tests avec PostgreSQL réel +cargo clippy --all-targets propre +cargo tauri dev validé avec Vite +``` + +Le parcours Devnet réel System transfer a été validé avec simulation, signature, envoi, confirmation, insertion canonique, extraction core et decode replay. Les 52 méthodes HTTP et neuf paires WS standards restent couvertes ; les méthodes WS instables restent activables par endpoint et désactivables automatiquement après rejet du nœud. + +Aucune régression de ces invariants n'est acceptable. + +## 4. Sources normatives + +Utiliser en priorité : + +- le registre local `kb_program_ids` pour les trois IDs déjà vérifiés ; +- le dépôt officiel Memo : ; +- la crate `spl-memo-interface` déjà cataloguée dans le workspace ; +- les tags et sources historiques officiels pour v1 et v3 ; +- le code runtime officiel pour la validation UTF-8 et les comptes signataires ; +- des transactions réelles et des fixtures synthétiques contrôlées. + +Le dépôt officiel publie actuellement une interface `2.1.x` et une génération de programme v4. Ne pas mettre à jour automatiquement une dépendance ou considérer les trois générations identiques sans audit. Si l'interface officielle ne construit que l'ID courant, les instructions historiques ne peuvent être reproduites manuellement qu'après preuve que leur layout exact est le même. + +## 5. Program IDs + +Le jalon couvre exactement : + +```text +SPL_MEMO_V1_PROGRAM_ID = Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo +SPL_MEMO_V3_PROGRAM_ID = MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr +SPL_MEMO_V4_PROGRAM_ID = Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH +``` + +`MEMO_PROGRAM_ID` reste l'alias historique déjà défini dans `kb_program_ids`; ne pas l'utiliser lorsqu'une génération exacte est nécessaire. + +## 6. Contraintes normatives du workspace + +Respecter strictement : + +- Rust 2024 ; +- async-first pour l'I/O ; +- `kb_core::Error` et `kb_core::Result` ; +- aucun `anyhow`, `thiserror`, `unwrap`, `expect`, `unsafe`, panic de production ou opérateur `?` dans les nouveaux chemins de production ; +- `warn(missing_docs)`, `deny(unreachable_pub)`, `forbid(unsafe_code)` ; +- imports de traits uniquement lorsque possible, chemins pleinement qualifiés et `crate::` en intra-crate ; +- commentaires/docstrings Rust en anglais, Markdown projet en français ; +- header `file:` puis `version:` avec un seul incrément par fichier modifié ; +- aucun `bincode` direct ; +- aucune logique métier lourde dans `kb_app_demo` ; +- `CHANGELOG.md` inchangé avant validation complète du jalon ; +- `TRACING_TARGET` canonique dans `src/constants.rs` pour toute crate opérationnelle ; +- aucune valeur JSON Tauri exportée en `bigint` lorsqu'elle traverse `invoke`, `emit` ou `JSON.stringify`. + +## 7. Audit préalable obligatoire + +Avant d'implémenter, produire un tableau de vérité pour v1, v3 et v4 : + +- ID et statut actuel/historique ; +- format exact de l'instruction ; +- validation UTF-8 ; +- comportement du payload vide ; +- traitement des comptes ; +- obligation `is_signer` ; +- prise en compte de l'ordre et des doublons ; +- logs runtime ; +- différences de limites ou coûts ; +- disponibilité d'un builder officiel ; +- invocabilité actuelle sur Localnet/Devnet/Mainnet ; +- corpus réel disponible. + +Toute différence entre générations doit apparaître explicitement dans les types, la matrice de couverture et les tests. Ne pas fusionner v1/v3/v4 sous un comportement supposé commun. + +## 8. `kb_decoder_spl_memo` + +### 8.1 Remplacement du scaffold + +- remplacer `DecoderSupport::Maybe` par `Yes` pour les trois IDs exacts et `No` pour les autres ; +- déplacer la cible tracing legacy vers `src/constants.rs` avec la valeur exacte `kb_decoder_spl_memo` ; +- ajouter `tracing` uniquement si des événements runtime réels sont émis ; +- ne produire aucun événement pour une observation hors surface. + +### 8.2 Événement décodé + +Définir un contrat stable qui conserve au minimum : + +- génération Memo v1/v3/v4 ; +- Program ID exact ; +- texte lorsque le payload est UTF-8 valide ; +- longueur exacte en octets ; +- SHA-256 du payload ; +- préfixe hex borné pour diagnostic/replay ; +- liste ordonnée des comptes fournis ; +- pour chaque compte : pubkey, signer, writable et position ; +- liste des signataires exigés/observés selon le contrat de la génération ; +- chemin outer/inner et index stable ; +- succès/échec de la transaction ; +- `committed` ou intention non commitée ; +- statut de validation UTF-8 et de validation des signataires ; +- diagnostic borné pour une tentative invalide. + +Le texte complet peut être conservé si sa taille est intrinsèquement bornée par la transaction Solana et par une limite explicite du décodeur. La limite et la stratégie de troncature éventuelle doivent être testées et documentées. + +### 8.3 Transactions échouées + +Une transaction échouée doit pouvoir produire une intention structurée lorsque le payload et les comptes sont suffisamment lisibles, sans prétendre que le runtime a validé UTF-8, vérifié les signataires ou commit l'annotation. + +Distinguer clairement : + +- payload valide et transaction réussie ; +- payload valide mais transaction échouée ; +- payload UTF-8 invalide ; +- compte requis non signer ; +- observation tronquée ou mal formée ; +- génération/ID inconnu. + +### 8.4 Couverture et corpus + +Créer une matrice machine-readable dédiée, par exemple : + +```text +docs/SPL_MEMO_MATRIX.json +``` + +Elle doit être vérifiée par un test Rust et couvrir les trois program IDs, les cas de succès, les erreurs et les différences de génération. + +Corpus minimal : + +- payload vide ; +- ASCII ; +- Unicode multi-octets ; +- taille proche de la limite pratique ; +- octets UTF-8 invalides ; +- zéro, un et plusieurs signataires ; +- compte non signer ; +- comptes supplémentaires ou dupliqués si acceptés par le runtime ; +- outer instruction ; +- inner/CPI ; +- transaction réussie ; +- transaction échouée ; +- au moins une signature réelle par génération lorsque disponible. + +## 9. Matérialisation + +Le décodage maximal doit être stabilisé avant la projection. + +Le domaine attendu est une **annotation de transaction** consultable. Ne pas détourner arbitrairement `metadata`, `admin`, `lifecycle` ou `trades`. + +Après audit des contrats existants : + +1. utiliser un matérialiseur existant seulement si son domaine couvre explicitement les annotations de transaction ; +2. sinon créer une crate dédiée, par exemple `kb_materializer_transaction_annotations`, avec un contrat réutilisable au-delà de Memo ; +3. garder les faits de vérification/audit séparables du texte si plusieurs consommateurs sont nécessaires. + +Projection minimale : + +- signature et instruction path ; +- génération et Program ID ; +- texte ou représentation bornée ; +- longueur et hash ; +- signataires vérifiés ; +- état committed ; +- provenance du processor et version ; +- clé d'idempotence déterministe. + +Règles : + +- aucune projection réussie mutable pour une transaction non commitée ; +- replay identique = skip/idempotence ; +- changement de version = remplacement déterministe selon le ledger ; +- ne pas dupliquer les logs ou données core déjà stockés ; +- documenter explicitement toute donnée laissée uniquement dans l'événement décodé. + +## 10. `kb_executor_spl_memo` + +### 10.1 Contrat typé + +Remplacer le plan réservé par une voie typée fondée sur `kb_execution_api`. + +Types candidats : + +```text +SplMemoGeneration +SplMemoOperation::AddMemo +SplMemoExecutionIntent +SplMemoSigner +``` + +Le contrat doit permettre : + +- choix explicite de la génération ; +- payload UTF-8 validé avant plan ; +- signataires ordonnés et déclarés ; +- absence de compte writable inventé ; +- limites de taille explicites ; +- coût de dépense nul hors frais réseau ; +- `Supported`/`Unsupported(reason)` exact par génération. + +### 10.2 Builders et wire + +- utiliser `spl-memo-interface` lorsque son builder et son Program ID correspondent exactement à la génération demandée ; +- comparer les instructions produites aux builders officiels ; +- pour une génération historique sans builder courant, construire manuellement uniquement après validation du layout depuis les sources officielles ; +- le payload Memo est constitué des octets exacts du message, sans préfixe, discriminator, Borsh ou `bincode` inventé ; +- chaque compte signer doit apparaître avec les flags officiels exacts ; +- rejeter les doublons ou formes anormales seulement si le contrat officiel les rejette réellement. + +### 10.3 Politiques + +- simulation obligatoire ; +- dry-run par défaut ; +- aucune activation Mainnet par défaut ; +- signataires visibles avant signature ; +- fee payer déclaré ; +- plafond de frais appliqué par l'infrastructure commune ; +- aucune clé privée dans les logs, Tauri ou les payloads JSON ; +- post-validation par hydratation, core extraction et decode replay Memo. + +Les générations historiques peuvent rester `Unsupported(reason)` côté exécuteur si leur invocabilité actuelle ou leur builder ne peut pas être prouvé. Elles restent néanmoins obligatoires côté décodeur. + +## 11. Pipeline, store et démo + +- enregistrer le décodeur et le matérialiseur dans le replay commun ; +- ajouter les déclarations de couverture et tests de sélection ; +- toucher `kb_store_pg` uniquement si une nouvelle projection nécessite réellement un contrat de persistance ; +- conserver les écritures atomiques avec le ledger decode/materialize ; +- utiliser `demo_decode_replay` pour les corpus et résumés ; +- ne créer une nouvelle fenêtre Tauri que si l'exécution Memo Devnet ne peut pas être validée avec les surfaces existantes ; +- une démo d'exécution peut rester backend/test opt-in si l'UI n'apporte pas de valeur supplémentaire. + +## 12. Validation Devnet + +Ajouter un test opt-in ou un petit parcours opérateur qui : + +1. charge le wallet temporaire Devnet existant ; +2. construit un Memo de la génération courante validée ; +3. simule ; +4. signe et envoie seulement avec autorisation explicite ; +5. confirme ; +6. appelle `getTransaction` ; +7. insère la transaction canonique ; +8. exécute core extraction ; +9. exécute decode replay Memo ; +10. vérifie la projection et l'idempotence. + +Ne pas exiger l'envoi des générations historiques si elles ne sont plus officiellement déployées ou supportées sur Devnet. + +## 13. Documentation attendue + +Mettre à jour au minimum : + +```text +kb_decoder_spl_memo/README.md +kb_executor_spl_memo/README.md +README.md +ROADMAP.md +docs/SOLANA_INTERFACE_DEPENDENCIES.md +docs/SPL_MEMO_MATRIX.json +``` + +Ajouter le README du matérialiseur créé ou modifié. Documenter : + +- différences v1/v3/v4 ; +- types d'événements ; +- projection choisie ; +- opérations exécutables ; +- limites et refus ; +- corpus et signatures réelles utilisées ; +- résultats Localnet/Devnet ; +- absence volontaire de projection ou d'exécution, le cas échéant. + +`CHANGELOG.md` ne doit être modifié qu'après validation complète de `0.4.3`. + +## 14. Interdictions + +Ne pas : + +- commencer SPL Token, ATA, Token-2022, Stake Pool, Pump, Meteora, Raydium, Orca ou Jupiter ; +- créer ou commencer W2/historical acquisition ; +- fusionner Memo dans `kb_decoder_solana_core` ; +- considérer les trois IDs comme identiques sans preuve ; +- utiliser les logs RPC comme seule source du texte lorsque l'instruction est disponible ; +- inventer un discriminator ou une structure sérialisée ; +- exposer un envoi Mainnet par défaut ; +- produire une projection committed pour une transaction échouée ; +- ajouter du SQL libre à l'UI ; +- générer des bindings TypeScript contenant des `bigint` dans les frontières Tauri JSON. + +## 15. Validations minimales + +Selon les fichiers touchés : + +```bash +cargo test -p kb_program_ids +cargo test -p kb_decoder_spl_memo +cargo test -p kb_materializer_transaction_annotations # si créée +cargo test -p kb_executor_spl_memo +cargo test -p kb_execution_api +cargo test -p kb_execution_safety +cargo test -p kb_execution_solana +cargo test -p kb_pipeline +cargo test -p kb_rpc +cargo test -p kb_app_demo +cargo clippy --all-targets +``` + +Si le store ou la projection est touché : + +```bash +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana_test' \ + cargo test -p kb_store_pg -- --nocapture +``` + +Si Tauri est touché : + +```bash +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + +Le serveur Vite lancé par Tauri constitue la validation frontend normale ; ne pas imposer un `npm run build` séparé sans besoin particulier. + +## 16. Livraison + +Livrer des tranches fonctionnelles sous la forme : + +```text +khadhroony-bot2_v0.4.3-pre.NNN-delta.zip +``` + +Après la livraison d'un delta `pre.NNN`, tout correctif conserve le même numéro : + +```text +khadhroony-bot2_v0.4.3-pre.NNN-delta-fix-001.zip +khadhroony-bot2_v0.4.3-pre.NNN-delta-fix-002.zip +``` + +Ne pas incrémenter `NNN` pour réparer une archive déjà livrée. Le numéro suivant est réservé à une nouvelle tranche fonctionnelle. + +Chaque archive doit contenir : + +- uniquement les fichiers ajoutés ou modifiés ; +- `delta.md` non versionné ; +- `manifest.json` ; +- les suppressions manuelles explicitement listées ; +- les validations exécutées et non exécutées ; +- aucune archive complète sauf demande explicite ; +- aucune modification de `CHANGELOG.md` avant validation finale du jalon. diff --git a/olddocs/archivekbot2/prompts/023_v0_4_4_spl_token.md b/olddocs/archivekbot2/prompts/023_v0_4_4_spl_token.md new file mode 100644 index 0000000..7cb4ea5 --- /dev/null +++ b/olddocs/archivekbot2/prompts/023_v0_4_4_spl_token.md @@ -0,0 +1,447 @@ + + + +# Prompt de session — `0.4.4` SPL Token + +## 1. Mission + +Reprendre `khadhroony-bot2` après la clôture validée de `0.4.3` et démarrer `0.4.4`. + +Le jalon couvre exclusivement le programme SPL Token classique : + +```text +TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA + -> audit du wire historique et courant + -> décodage maximal des instructions outer et inner + -> projections métier explicites et idempotentes + -> exécuteur typé pour toutes les opérations officiellement constructibles + -> simulation, politiques d’autorité/multisig et validation post-exécution +``` + +Le décodeur doit comprendre les instructions anciennes, actuelles et officiellement publiées même lorsqu’une opération récente n’est pas encore déployée sur tous les clusters. L’exécuteur est une bibliothèque universelle : il ne doit pas interdire artificiellement un cluster. La disponibilité du programme et d’une instruction est prouvée par l’audit de déploiement et la simulation ; les applications et politiques communes décident ensuite si un envoi est autorisé. + +Ne pas commencer SPL Associated Token Account, Token-2022, ses extensions, Transfer Hook, MemoTransfer, Stake Pool ou une surface DEX. Le worker décrit dans `docs/HISTORICAL_DATA_ACQUISITION_PLAN.md` reste différé et hors périmètre. + +## 2. Base de travail + +La base attendue est le commit Git qui clôture `0.4.3` et contient notamment : + +- `ROADMAP.md` avec `0.4.3` coché et `0.4.4 — SPL Token` actif ; +- `CHANGELOG.md` avec l’entrée validée `0.4.3` ; +- `prompts/022_v0_4_3_spl_memo.md` conservé comme historique ; +- `prompts/023_v0_4_4_spl_token.md` comme contrat actif ; +- `docs/HISTORICAL_DATA_ACQUISITION_PLAN.md` hors ROADMAP actif. + +Avant toute modification : + +1. lire `RULES.md`, `README.md`, `ROADMAP.md` et `CHANGELOG.md` ; +2. lire `prompts/020_v0_4_1_native_solana_programs.md`, `prompts/021_v0_4_2_executor_solana_core.md` et `prompts/022_v0_4_3_spl_memo.md` pour préserver les contrats de décodage, matérialisation, exécution et validation post-exécution ; +3. lire `docs/EXECUTION_MODEL.md`, `docs/SOLANA_INTERFACE_DEPENDENCIES.md`, `docs/SPL_MEMO_MATRIX.json` et les audits de clôture `0.4.1`/`0.4.2` ; +4. auditer `kb_decoder_spl_token`, `kb_executor_spl_token`, `kb_program_ids`, `kb_decoder_api`, `kb_materializer_api`, `kb_materializer_token_accounts`, `kb_materializer_admin`, `kb_materializer_fees`, `kb_materializer_risk`, `kb_execution_api`, `kb_execution_safety`, `kb_execution_solana`, `kb_pipeline`, `kb_rpc`, `kb_store_core`, `kb_store_pg` et `kb_app_demo` ; +5. inspecter les types réellement présents et les événements core déjà extraits, notamment les balances SPL, sans supposer qu’un helper, snapshot de compte ou schéma métier existe ; +6. vérifier avec Cargo la version exacte de `spl-token-interface` résolue depuis la contrainte workspace `^3.0`, ses features effectives et ses sources locales avant d’écrire le wire ; +7. comparer cette version à la version réellement déployée du programme sur Localnet, Devnet et Mainnet, instruction par instruction. + +État de départ connu : `kb_decoder_spl_token` et `kb_executor_spl_token` sont encore des scaffolds `Maybe`; `kb_materializer_token_accounts`, `kb_materializer_fees` et `kb_materializer_risk` sont des scaffolds inactifs ; `kb_materializer_admin` est déjà réel et ne doit pas régresser. + +## 3. État validé à préserver + +La clôture `0.4.3` a été validée avec : + +```text +kb_program_ids 5 tests +kb_decoder_spl_memo 9 tests +kb_materializer_transaction_annotations 7 tests +kb_executor_spl_memo 15 tests +kb_execution_api 22 tests +kb_execution_safety 15 tests +kb_execution_solana 12 tests +kb_pipeline 61 tests +kb_rpc 113 tests +kb_app_demo 96 tests +kb_store_pg 46 tests avec PostgreSQL réel +cargo clippy --all-targets propre +``` + +Le parcours Memo v4 Devnet réel a validé simulation, signature, envoi, confirmation, insertion canonique, extraction core, decode replay, annotation et second replay idempotent. Les trois générations Memo restent décodables et exécutables par la bibliothèque. Les 52 méthodes HTTP et neuf paires WS standard restent couvertes. + +Aucune régression de ces invariants n’est acceptable. + +## 4. Sources normatives + +Utiliser en priorité : + +- `kb_program_ids::SPL_TOKEN_PROGRAM_ID` pour l’ID exact ; +- le dépôt officiel SPL Token : ; +- le tag exact correspondant à la crate `spl-token-interface` résolue ; +- `interface/src/instruction.rs`, les builders officiels et le processor runtime officiel ; +- les layouts officiels `state::Mint`, `state::Account` et `state::Multisig` lorsque leur lecture est nécessaire ; +- la documentation officielle Solana Token ; +- des transactions Mainnet réelles et des fixtures synthétiques contrôlées ; +- des scénarios Localnet/Devnet pour les opérations stateful et les instructions nouvellement publiées. + +Au 15 juillet 2026, le catalogue workspace déclare `spl-token-interface = ^3.0` sans feature. La publication officielle `3.0.0` ajoute notamment `UnwrapLamports` au tag `45` et `Batch` au tag `255`. Ne pas conclure qu’elles sont déployées partout, ni les ignorer parce qu’elles sont récentes. Auditer séparément : + +- le layout publié par l’interface ; +- le processor et le binaire déployé par cluster ; +- la constructibilité du builder ; +- le résultat de simulation ; +- le corpus réel disponible. + +Ne pas activer `bincode`. Utiliser l’unpack officiel lorsqu’il correspond exactement au runtime audité ou reproduire localement un wire borné avec tests différentiels. + +## 5. Program ID et frontières + +Le jalon couvre exactement : + +```text +SPL_TOKEN_PROGRAM_ID = TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA +``` + +Le Native Mint `So11111111111111111111111111111111111111112` est un compte mint spécial du programme SPL Token, pas un autre programme. Il doit être pris en compte pour `SyncNative`, `CloseAccount`, retraits de lamports et transferts wrapped SOL, sans être enregistré comme décodeur distinct. + +Sont hors surface de dispatch `0.4.4` : + +- `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` et toutes les extensions Token-2022 ; +- `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL` ; +- Metaplex Token Metadata ; +- Token Group, Token Metadata Interface et Transfer Hook tiers ; +- les programmes DEX qui invoquent SPL Token par CPI. + +Une instruction SPL Token en CPI reste toutefois décodée par `kb_decoder_spl_token` grâce à son Program ID exact et à son chemin inner stable. + +## 6. Contraintes normatives du workspace + +Respecter strictement : + +- Rust 2024 ; +- async-first pour l’I/O ; +- `kb_core::Error` et `kb_core::Result` ; +- aucun `anyhow`, `thiserror`, `unwrap`, `expect`, `unsafe`, panic de production ou opérateur `?` dans les nouveaux chemins de production ; +- `warn(missing_docs)`, `deny(unreachable_pub)`, `forbid(unsafe_code)` ; +- imports de traits uniquement lorsque possible, chemins pleinement qualifiés et `crate::` en intra-crate ; +- commentaires/docstrings Rust en anglais, Markdown projet en français ; +- header `file:` puis `version:` avec un seul incrément par fichier modifié ; +- aucun `bincode` direct ; +- aucune logique métier lourde dans `kb_app_demo` ; +- `CHANGELOG.md` inchangé avant validation complète de `0.4.4` ; +- `TRACING_TARGET` canonique dans `src/constants.rs` pour toute crate opérationnelle ; +- aucune valeur JSON Tauri exportée en `bigint` lorsqu’elle traverse `invoke`, `emit` ou `JSON.stringify` ; +- montants on-chain bruts sérialisés sans perte, sous forme de chaîne à la frontière Tauri si nécessaire. + +## 7. Audit préalable obligatoire + +Créer une matrice machine-readable dédiée, par exemple : + +```text +docs/SPL_TOKEN_MATRIX.json +``` + +Elle doit être vérifiée par un test Rust et contenir au minimum, pour chaque instruction officielle : + +- nom canonique et tag wire ; +- statut historique, courant, récent ou réservé ; +- layout exact et tailles autorisées ; +- comptes requis, ordre, writable et signer ; +- forme autorité simple et forme multisig ; +- champs décodés et limites ; +- événement produit ; +- projection(s) autorisée(s) ; +- builder officiel disponible ; +- support exécuteur exact avec éventuel motif `Unsupported` ; +- statut observé Localnet/Devnet/Mainnet ; +- fixtures synthétiques et signatures réelles. + +L’audit doit couvrir l’ensemble de `TokenInstruction` de la version résolue, y compris : + +- initialisation mint/account/multisig et variantes sans Rent ; +- `Transfer`, `Approve`, `Revoke`, `SetAuthority`, `MintTo`, `Burn` ; +- `CloseAccount`, `FreezeAccount`, `ThawAccount` ; +- les variantes `Checked` ; +- `SyncNative` ; +- `GetAccountDataSize`, `InitializeImmutableOwner`, conversions amount/UI amount ; +- `WithdrawExcessLamports` ; +- `UnwrapLamports` si présent dans la version résolue ; +- `Batch` si présent, avec parsing récursif borné et interdiction des batchs imbriqués selon le runtime officiel ; +- tout autre tag publié dans la version effectivement résolue. + +Ne pas recopier une ancienne liste supposée de 25 instructions. L’égalité entre la matrice, l’interface résolue, les déclarations de couverture et les opérations compilées doit être testée. + +## 8. `kb_decoder_spl_token` + +### 8.1 Remplacement du scaffold + +- remplacer `DecoderSupport::Maybe` par `Yes` uniquement pour l’ID SPL Token classique exact et `No` pour les autres ; +- déplacer le target tracing legacy vers `src/constants.rs` avec la valeur exacte `kb_decoder_spl_token` ; +- ajouter `tracing` seulement si des événements runtime réels sont émis ; +- ne produire aucun événement pour une observation hors surface. + +### 8.2 Contrat décodé commun + +Chaque observation lisible doit conserver au minimum : + +- Program ID exact ; +- instruction et tag wire ; +- chemin outer/inner et index stable ; +- succès/échec de la transaction et état `committed` ; +- comptes ordonnés avec position, pubkey, signer et writable ; +- rôles de comptes résolus sans inventer un rôle absent ; +- forme d’autorité simple ou multisig ; +- autorité déclarée, signataires fournis et validation structurelle ; +- montants bruts exacts, decimals lorsqu’ils sont dans le wire et aucune valeur UI inventée ; +- mint explicite lorsqu’il est fourni ; +- diagnostic borné et préfixe hex/hash pour un wire invalide ou inconnu ; +- source de toute inférence issue du contexte core. + +Les transactions échouées doivent produire des intentions structurées lorsque le wire et les comptes restent lisibles, sans prétendre que l’état Token a muté. + +### 8.3 Sémantique et inférences + +- Un `Transfer` non checked ne porte pas le mint ni les decimals dans son wire. Ne pas les inventer. Une corrélation via les token balance changes core peut être exposée avec provenance et confiance explicites ; une lecture RPC n’appartient pas au décodeur. +- Les variantes checked portent le mint et les decimals attendus, mais une transaction échouée ne prouve pas qu’ils ont été validés par le runtime. +- Distinguer owner, delegate, mint authority, freeze authority, close authority et multisig authority. +- Conserver l’ordre et les doublons des comptes réellement fournis. Valider `MIN_SIGNERS`, `MAX_SIGNERS`, `M` et `N` selon le runtime, sans confondre comptes membres du multisig et signataires effectifs de l’instruction. +- `InitializeImmutableOwner` est un no-op de compatibilité sur SPL Token classique si le runtime audité le confirme ; le représenter explicitement sans inventer une extension Token-2022. +- Les instructions de return data doivent conserver l’intention et, si la donnée de retour est disponible dans la transaction canonique, la valider sans dépendre des logs texte. +- `Batch` doit conserver ses sous-instructions, slices de comptes, ordre et diagnostics. Imposer des bornes de profondeur, compteur, longueur et comptes ; ne jamais accepter silencieusement un suffixe mal formé. + +### 8.4 Corpus minimal + +Le corpus synthétique et réel doit couvrir : + +- chaque tag officiel de la version résolue ; +- autorité simple et multisig `1..11`, seuils valides et invalides ; +- montants `0`, `1`, `u64::MAX` et valeurs intermédiaires ; +- decimals `0`, `9`, maximum wire et mismatch runtime ; +- authorities présentes, révoquées et `COption::None` ; +- comptes manquants, supplémentaires, dupliqués et flags incorrects ; +- outer instruction et CPI inner ; +- transaction réussie et échouée ; +- wrapped SOL et comptes non natifs ; +- payload vide, tag inconnu, taille tronquée, suffixe et UTF-8 invalide pour `UiAmountToAmount` ; +- batch vide, plusieurs sous-instructions, longueurs invalides et batch imbriqué ; +- transactions Mainnet réelles représentatives, avec signatures documentées. + +## 9. Matérialisation + +Stabiliser le décodage maximal avant les projections. Auditer d’abord les contrats existants ; ne pas conserver les sorties simplistes des scaffolds. + +### 9.1 `kb_materializer_token_accounts` + +Projeter les faits métier commités utiles concernant comptes et mints, par exemple : + +- initialisation de mint, compte et multisig ; +- transfert, mint et burn comme mutation instructionnelle ; +- freeze/thaw ; +- close et wrapped SOL sync/unwrap ; +- état de délégation lorsqu’il relève explicitement du compte token. + +Ne pas dupliquer les balance changes core. Les projections instructionnelles doivent référencer signature, path, comptes, mint connu ou inconnu, montant brut, provenance et clé d’idempotence. Elles ne doivent pas prétendre reconstruire un snapshot final de compte sans lecture stateful prouvée. + +### 9.2 `kb_materializer_admin` + +Étendre le matérialiseur réel uniquement pour les changements d’autorité Token et la configuration multisig qui appartiennent clairement au domaine admin. Préserver ses surfaces natives existantes et ses tests. + +### 9.3 `kb_materializer_risk` + +Activer une projection seulement pour des faits de risque stables et explicitement justifiés, par exemple délégation/allowance, freeze/thaw, autorité révoquée ou configuration multisig faible. Séparer constat on-chain et interprétation de risque ; ne pas produire un score arbitraire. + +### 9.4 `kb_materializer_fees` + +SPL Token classique ne possède pas les transfer fees de Token-2022. Ne pas fabriquer de frais à partir d’un transfert, ni dupliquer les frais réseau core. Si aucune instruction du runtime audité ne justifie une projection `fee`, documenter explicitement `no projection` et laisser le scaffold inactif jusqu’à un futur consommateur légitime. + +### 9.5 Règles communes + +- aucune projection mutable réussie pour une transaction non commitée ; +- replay identique = skip/idempotence ; +- changement de version = remplacement déterministe selon le ledger ; +- une sous-instruction `Batch` produit des identités stables dérivées du path parent et de sa position ; +- ne pas dupliquer logs, account keys, balances ou données core ; +- documenter les faits conservés uniquement dans le decode ; +- réutiliser `kb_sol_mat_events` sauf preuve qu’un contrat de persistance spécialisé est indispensable. + +## 10. `kb_executor_spl_token` + +### 10.1 Contrat typé + +Remplacer le plan réservé par des intents explicites couvrant les opérations officiellement constructibles. Le contrat doit exposer : + +- opération exacte ; +- Program ID exact ; +- comptes et rôles ordonnés ; +- mint, compte source/destination et authority selon l’opération ; +- montant brut et decimals séparés ; +- autorité simple ou multisig avec signataires ordonnés ; +- création ou initialisation stateful clairement séparée ; +- politique de simulation obligatoire, dry-run par défaut et plafond de frais ; +- coût token/SOL déclaré sans confondre montant transféré, rent et frais réseau ; +- `Supported` ou `Unsupported(reason)` exact par opération. + +### 10.2 Builders et wire + +- utiliser les builders `spl-token-interface` lorsqu’ils correspondent exactement à l’opération et au Program ID ; +- comparer chaque instruction produite au builder officiel et aux fixtures wire ; +- ne pas inventer de discriminator, Borsh ou sérialisation ; +- préserver strictement l’ordre, writable et signer des metas ; +- valider les formes multisig et dédupliquer seulement les signataires transactionnels requis, pas les metas si le contrat officiel les conserve ; +- construire les opérations publiées récentes, y compris `UnwrapLamports` ou `Batch`, seulement après preuve exacte du layout et du builder ; +- classer séparément constructibilité, déploiement et autorisation d’envoi. + +La bibliothèque ne doit pas être limitée à Devnet. Mainnet reste gouverné par `kb_execution_safety`, les profils applicatifs et la confirmation explicite. Une instruction future/test peut être constructible et simulable sur un cluster qui la déploie même si Mainnet ne la supporte pas encore. + +### 10.3 Préflight stateful + +Définir dans `kb_pipeline`, lorsque nécessaire, des lectures préflight bornées pour : + +- owner du compte et Program ID ; +- mint, decimals et état initialisé ; +- solde token et native reserve ; +- delegate et allowance ; +- authority/freeze authority ; +- multisig `M/N` et membres ; +- rent exemption et état de comptes à initialiser ; +- cohérence source/destination/mint ; +- préconditions close, freeze/thaw, mint, burn, sync et unwrap. + +Le décodeur reste sans RPC. L’exécuteur reste sans wallet/RPC. L’orchestrateur possède les lectures stateful, la simulation, la signature, l’envoi et la validation. + +## 11. Pipeline, store et démo + +- enregistrer le décodeur et les matérialiseurs Token validés dans le replay commun ; +- ajouter les déclarations de couverture et tests de sélection exacts ; +- conserver les écritures atomiques avec le ledger decode/materialize ; +- toucher `kb_store_pg` seulement si un nouveau contrat de requête ou persistance est réellement nécessaire ; +- utiliser `demo_backfill`, `demo_core_extraction`, `demo_sql_replay_candidates` et `demo_decode_replay` pour le corpus Mainnet ; +- étendre le navigateur de matérialisations seulement avec des filtres bornés et des DTOs typés, sans SQL libre ; +- réutiliser la fenêtre d’exécution Devnet existante si une validation opérateur Token apporte une valeur claire ; +- ne pas créer une WebView par opération. + +Pour la visualisation, afficher les mutations Token comme journal métier filtrable par signature, mint, compte, famille et opération. Les OHLC restent réservées aux futurs trades agrégés ; elles ne sont pas une représentation de SPL Token brut. + +## 12. Validation cluster + +Ajouter des tests opt-in et un parcours opérateur représentatif qui : + +1. utilise Localnet ou Devnet selon le déploiement de l’instruction ; +2. prépare des comptes temporaires sans dépendre de l’ATA pour la logique du jalon ; +3. construit et simule l’opération exacte ; +4. signe et envoie seulement avec autorisation explicite ; +5. confirme ; +6. appelle `getTransaction` ; +7. insère la transaction canonique ; +8. exécute core extraction ; +9. exécute decode replay SPL Token ; +10. vérifie les projections attendues et l’idempotence. + +Le scénario minimal Devnet devrait couvrir au moins initialisation contrôlée, mint, transfer checked, approve/revoke, burn et close, avec autorité simple. Ajouter un scénario multisig si le financement et la complexité restent raisonnables. Tester les instructions récentes sur Localnet lorsque le binaire Devnet ne les expose pas. + +Ne pas utiliser le programme ATA pour masquer l’initialisation de comptes Token dans la couverture `0.4.4`; ATA sera traité en `0.4.5`. + +## 13. Documentation attendue + +Mettre à jour au minimum : + +```text +kb_decoder_spl_token/README.md +kb_executor_spl_token/README.md +kb_materializer_token_accounts/README.md +README.md +ROADMAP.md +docs/SOLANA_INTERFACE_DEPENDENCIES.md +docs/SPL_TOKEN_MATRIX.json +``` + +Mettre aussi à jour les README des matérialiseurs réellement modifiés. Documenter : + +- version résolue de l’interface et différences avec le programme déployé ; +- inventaire exact des instructions et tags ; +- événements et diagnostics ; +- projections par famille et absences volontaires ; +- opérations exécutables et `Unsupported(reason)` ; +- règles simple authority/multisig ; +- corpus et signatures réelles ; +- résultats Localnet/Devnet/Mainnet ; +- limites et non-revendications. + +`CHANGELOG.md` ne doit être modifié qu’après validation complète de `0.4.4`. + +## 14. Interdictions + +Ne pas : + +- commencer ATA ou Token-2022 ; +- absorber les extensions Token-2022 dans le décodeur SPL Token classique ; +- créer ou commencer l’acquisition historique différée ; +- fusionner Token dans `kb_decoder_solana_core` ; +- déduire silencieusement un mint absent d’un `Transfer` non checked ; +- utiliser les logs RPC comme source principale lorsque l’instruction est disponible ; +- inventer des fees, snapshots finaux, balances ou autorités validées ; +- produire une projection committed pour une transaction échouée ; +- considérer les membres d’un multisig comme tous signataires de chaque instruction ; +- désactiver une opération dans la bibliothèque uniquement parce qu’elle n’est pas encore déployée sur Mainnet ; +- exposer un envoi Mainnet par défaut dans la démo ; +- ajouter du SQL libre à l’UI ; +- générer des bindings TypeScript contenant des `bigint` dans les frontières Tauri JSON. + +## 15. Validations minimales + +Selon les fichiers touchés : + +```bash +cargo test -p kb_program_ids +cargo test -p kb_decoder_spl_token +cargo test -p kb_materializer_token_accounts +cargo test -p kb_materializer_admin +cargo test -p kb_materializer_fees +cargo test -p kb_materializer_risk +cargo test -p kb_executor_spl_token +cargo test -p kb_execution_api +cargo test -p kb_execution_safety +cargo test -p kb_execution_solana +cargo test -p kb_pipeline +cargo test -p kb_rpc +cargo test -p kb_app_demo +cargo clippy --all-targets +``` + +Si le store ou une projection est touché : + +```bash +KB_POSTGRES_TEST_URL='postgres://solana:solana@localhost:5432/solana_test' \ + cargo test -p kb_store_pg -- --nocapture +``` + +Si Tauri est touché : + +```bash +cargo tauri dev -c kb_app_demo/tauri.conf.json +``` + +Le serveur Vite lancé par Tauri constitue la validation frontend normale ; ne pas imposer un `npm run build` séparé sans besoin particulier. + +## 16. Livraison + +Livrer des tranches fonctionnelles sous la forme : + +```text +khadhroony-bot2_v0.4.4-pre.NNN-delta.zip +``` + +Après la livraison d’un delta `pre.NNN`, tout correctif conserve le même numéro : + +```text +khadhroony-bot2_v0.4.4-pre.NNN-delta-fix-001.zip +khadhroony-bot2_v0.4.4-pre.NNN-delta-fix-002.zip +``` + +Ne pas incrémenter `NNN` pour réparer une archive déjà livrée. Le numéro suivant est réservé à une nouvelle tranche fonctionnelle. + +Chaque archive doit contenir : + +- uniquement les fichiers ajoutés ou modifiés ; +- `delta.md` non versionné ; +- `manifest.json` ; +- les suppressions manuelles explicitement listées ; +- les validations exécutées et non exécutées ; +- aucune archive complète sauf demande explicite ; +- aucune modification de `CHANGELOG.md` avant validation finale du jalon. diff --git a/olddocs/archivekbot2/prompts/024_v0_4_5_spl_associated_token_account.md b/olddocs/archivekbot2/prompts/024_v0_4_5_spl_associated_token_account.md new file mode 100644 index 0000000..6e92ad0 --- /dev/null +++ b/olddocs/archivekbot2/prompts/024_v0_4_5_spl_associated_token_account.md @@ -0,0 +1,244 @@ + + + +# Prompt de session — `0.4.5` SPL Associated Token Account + +## 1. Mission + +Reprendre `khadhroony-bot2` après la clôture validée de `0.4.4` et développer exclusivement la +surface SPL Associated Token Account : + +```text +ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL + -> audit exact de l'interface et du processor résolus + -> décodage maximal de Create, CreateIdempotent et RecoverNested + -> dérivation et validation explicites des adresses associées + -> lifecycle ATA matérialisé sans duplication SPL Token + -> exécuteur typé simulation-first après validation du décodeur et des projections +``` + +Le jalon couvre les ATA ciblant le programme SPL Token classique et le programme Token-2022, car le +Program ID Token cible fait partie du contrat ATA. Il ne commence toutefois pas le décodage général +des instructions ou extensions Token-2022, réservé à `0.4.6`. + +## 2. Base de travail + +La base attendue clôt `0.4.4` et contient : + +- `CHANGELOG.md` avec l'entrée validée SPL Token ; +- `ROADMAP.md` avec `0.4.4` entièrement coché et `0.4.5` actif ; +- `docs/SPL_TOKEN_MATRIX.json` et les preuves Mainnet/Devnet conservées ; +- `kb_decoder_spl_token`, ses matérialiseurs, son exécuteur et son orchestration validés ; +- `kb_decoder_spl_associated_token_account` et + `kb_executor_spl_associated_token_account` encore à l'état de scaffolds ; +- la dépendance workspace `spl-associated-token-account-interface = ^2.0` avec feature `borsh`. + +Avant toute modification : + +1. lire `RULES.md`, `README.md`, `ROADMAP.md`, `CHANGELOG.md` et ce prompt ; +2. relire `prompts/023_v0_4_4_spl_token.md`, `docs/EXECUTION_MODEL.md` et + `docs/SOLANA_INTERFACE_DEPENDENCIES.md` ; +3. inspecter la version réellement résolue de l'interface ATA et ses sources locales avec Cargo ; +4. comparer instruction enum, layouts Borsh, builders, dérivation PDA et processor officiels ; +5. auditer les transactions réelles outer et CPI pour Token classique et Token-2022 ; +6. ne pas supposer qu'un helper, un matérialiseur ou un préflight ATA existe déjà. + +## 3. Invariants `0.4.4` à préserver + +- décodage exact des 28 tags SPL Token classique ; +- montants bruts et decimals sans perte ; +- aucune invention de mint sur les instructions qui ne le transportent pas ; +- projections `token_account`, `admin` et `risk` instructionnelles et idempotentes ; +- 24 opérations exécuteur Token, préflight stateful et garde-fous communs ; +- simulation obligatoire, signature après autorisation seulement et replay post-exécution exact ; +- journal Tauri borné et aucune logique métier lourde dans la WebView ; +- aucune régression Memo, RPC standard, PostgreSQL ou exécution Solana. + +État final de référence communiqué : + +```text +kb_program_ids 5 tests +kb_decoder_spl_token 8 tests +kb_executor_spl_token 15 tests +kb_decoder_spl_memo 9 tests +kb_materializer_transaction_annotations 7 tests +kb_execution_api 22 tests +kb_execution_safety 15 tests +kb_execution_solana 12 tests +kb_pipeline 81 tests +kb_rpc 113 tests +kb_config 41 tests +kb_app_demo 102 tests +kb_store_pg 46 tests avec PostgreSQL réel +cargo clippy --all-targets propre +``` + +## 4. Frontières strictes + +Dans le périmètre : + +- Program ID ATA exact ; +- les variantes réellement publiées par l'interface résolue ; +- ATA destinés à SPL Token classique et Token-2022 ; +- dérivation canonique à partir du wallet, du Token Program ID et du mint ; +- création, création idempotente, récupération nested et échecs lisibles ; +- instructions outer et inner/CPI ; +- simulation et scénarios Localnet/Devnet bornés. + +Hors périmètre : + +- décodage général de `TokenInstruction` Token-2022 et de ses extensions ; +- Transfer Hook, Confidential Transfer, Token Group et Metadata Interface ; +- Metaplex Token Metadata ; +- fermeture ou transfert générique de comptes Token déjà couverts par `0.4.4` ; +- nouveaux DEX, stratégies, trading automatisé ou acquisition historique différée ; +- migration vers une table SQL dédiée sans preuve qu'elle est nécessaire. + +## 5. Matrice machine-readable obligatoire + +Créer `docs/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json`, vérifiée par un test Rust. Pour chaque +variante publiée, enregistrer : + +- discriminant et encodage exact ; +- comptes requis, ordre, signer et writable ; +- Program IDs système, Token et ATA attendus ; +- seeds PDA et adresse dérivée attendue ; +- différences Token classique/Token-2022 ; +- règles de création normale, idempotente et nested recovery ; +- événements décodés et projections autorisées ; +- support exécuteur et motif stable si decode-only ; +- preuves synthétiques, Localnet, Devnet et corpus réel ; +- limites de ce qui est prouvé et non testé. + +Imposer par test l'égalité entre matrice, surfaces compilées, déclarations de couverture et capacités +de l'exécuteur. Ne pas recopier une ancienne enum supposée sans vérifier la version résolue. + +## 6. Décodeur + +Remplacer `DecoderSupport::Maybe` par un dispatch exact. Le décodeur doit conserver : + +- Program ID, instruction path outer/inner et statut committed ; +- comptes ordonnés, doublons et flags observés ; +- funding account, ATA, wallet owner, mint, System Program et Token Program ; +- adresse ATA attendue, adresse observée et résultat de validation ; +- type de Token Program cible sans prétendre décoder ses extensions ; +- pour RecoverNested, owner ATA, nested ATA, owner mint et nested mint sans inverser les rôles ; +- transaction échouée comme intention structurée lorsque le wire reste lisible ; +- diagnostic borné pour données inconnues, tronquées ou comptes incomplets. + +La dérivation PDA doit être canonique et testée différentiellement contre les helpers officiels. Une +adresse observée incorrecte doit rester décodable avec un diagnostic explicite, jamais être corrigée +silencieusement. + +Déplacer le target tracing legacy vers `src/constants.rs` avec la valeur exacte du nom Cargo. Ne pas +émettre de faux événement pour un autre Program ID. + +## 7. Matérialisation + +Auditer en priorité `kb_materializer_token_accounts`, `kb_materializer_lifecycle`, +`kb_materializer_admin` et `kb_materializer_risk` avant d'ajouter une nouvelle projection. + +Le résultat doit : + +- matérialiser le lifecycle ATA créé/réutilisé/récupéré avec provenance et idempotence ; +- distinguer création normale et idempotente ; +- conserver wallet, mint, ATA et Token Program cible ; +- ne pas dupliquer les mutations SPL Token déjà produites par les CPI internes ; +- ne pas prétendre reconstruire un solde Token ou un snapshot final ; +- refuser les sorties mutables pour les transactions échouées/non commitées ; +- conserver les faits de tentative et diagnostics détaillés dans le decode lorsque nécessaire. + +Tester explicitement une transaction ATA dont les CPI Token sont également décodées : une seule +projection doit posséder chaque fait métier. + +## 8. Exécuteur et préflight + +Après validation du décodeur et des projections, remplacer le scaffold exécuteur par des intents +typés pour toutes les variantes officiellement constructibles. Utiliser les builders officiels +lorsqu'ils correspondent exactement à l'interface auditée. + +Le plan doit exposer : + +- payer, wallet owner, mint, ATA dérivé et Token Program cible ; +- comptes exacts dans l'ordre officiel ; +- signataires uniques sans modifier l'ordre des metas ; +- coût SOL maximal correspondant au rent et aux frais ; +- simulation obligatoire et dry-run par défaut ; +- validation post-exécution adaptée à la création ou à l'idempotence. + +Le préflight stateful Localnet/Devnet doit au minimum vérifier : + +- cluster et Program IDs ; +- existence et owner du mint ; +- dérivation exacte de l'ATA ; +- absence du compte pour Create, ou état compatible pour CreateIdempotent ; +- owner, mint et Token Program du compte existant ; +- conditions exactes de RecoverNested ; +- rent et plafonds de dépense ; +- disponibilité de tous les signataires requis. + +La bibliothèque exécuteur reste universelle. Les politiques de cluster, wallet, confirmation et +Mainnet restent dans les couches communes. + +## 9. Corpus et scénarios cluster + +Prévoir un corpus offline couvrant au minimum : + +- les trois variantes publiées si confirmées par l'interface résolue ; +- Token classique et Token-2022 comme programmes cibles ; +- création réussie, compte déjà existant, idempotence réussie et conflits ; +- ATA attendu correct et adresse incorrecte ; +- wallet/mint/Token Program erronés ; +- comptes absents, supplémentaires, dupliqués et flags incorrects ; +- outer et CPI inner ; +- transaction réussie et échouée ; +- RecoverNested valide et formes structurellement invalides. + +Ajouter ensuite des tests opt-in Localnet/Devnet. Toute dépense réelle exige des comptes contrôlés, +un plafond explicite et une confirmation. Les endpoints publics peuvent retourner `429` : conserver +les signatures déjà confirmées et prévoir une reprise bornée plutôt que recréer aveuglément les +comptes. + +## 10. Tauri + +Réutiliser la fenêtre d'exécution Solana existante. Ne pas créer une WebView par opération. + +Le panneau ATA représentatif doit montrer : + +- profil Devnet ; +- Token Program cible ; +- payer/wallet, mint et ATA dérivé readonly ; +- mode Create ou CreateIdempotent ; +- préflight, simulation, coût/rent et garde-fou de confirmation ; +- confirmation, extraction, decode, matérialisation et idempotence après envoi ; +- journal lifecycle filtrable sans exposer de clé privée. + +`RecoverNested` peut rester hors UI si son scénario contrôlé est mieux couvert par un test opt-in, +mais il ne doit pas être absent du décodeur ni de l'exécuteur si l'interface le publie. + +## 11. Contraintes du workspace + +Respecter Rust 2024, async-first, `kb_core::Error`/`Result`, les lints workspace et les headers de +version. Aucun `anyhow`, `thiserror`, `unsafe`, `unwrap`, `expect`, panic de production, opérateur `?` +dans les nouveaux chemins de production, `bincode` direct ou logique métier lourde dans Tauri. +Commentaires Rust en anglais, Markdown projet en français. Les montants et lamports traversant Tauri +restent JSON-safe et sans perte. + +Mettre `ROADMAP.md` à jour à chaque tranche. Conserver `CHANGELOG.md` inchangé jusqu'à la validation +complète de `0.4.5`. + +## 12. Critères de clôture + +`0.4.5` ne peut être clôturé qu'après : + +- matrice et égalité compilée validées ; +- corpus offline complet ; +- non-duplication avec SPL Token démontrée ; +- préflight et exécuteur simulation-first validés ; +- scénario cluster contrôlé et reprise documentée si nécessaire ; +- PostgreSQL réel, second replay idempotent et journal Tauri validés ; +- régression `0.4.4`, RPC, configuration, application et Clippy propres ; +- README, ROADMAP et CHANGELOG synchronisés seulement après validation finale. + +Commencer par l'audit de l'interface réellement résolue et de son processor. Ne pas écrire le wire, +les événements ou l'exécuteur avant d'avoir publié la première version de la matrice ATA. diff --git a/olddocs/archivekbot2/prompts/025_v0_4_6_spl_token_2022.md b/olddocs/archivekbot2/prompts/025_v0_4_6_spl_token_2022.md new file mode 100644 index 0000000..724a462 --- /dev/null +++ b/olddocs/archivekbot2/prompts/025_v0_4_6_spl_token_2022.md @@ -0,0 +1,338 @@ + + + +# Prompt de session — `0.4.6` Token-2022, extensions et registre ElGamal + +## 1. Mission + +Reprendre `khadhroony-bot2` après la clôture validée de `0.4.5` et développer exclusivement la +surface Token-2022 et les interfaces qui font réellement partie de son contrat audité : + +```text +TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb + -> audit exact des interfaces, versions Cargo et processors résolus + -> décodage maximal des instructions de base et des extensions identifiables + -> lecture exacte des TLV Mint/Account/Multisig sans perte ni invention + -> matérialisation maximale avec un propriétaire unique par fait métier + -> exécuteur extension par extension après validation du decode et des projections + +regVY... registre ElGamal + -> programme distinct du ZK ElGamal Proof natif + -> Program ID exact à confirmer depuis les sources réellement résolues + -> décodage, matérialisation et politique d'exécution propres +``` + +La règle du jalon est exhaustive : tout ce qui est officiellement identifiable doit être décodé, +qu'il soit historique, courant ou expérimental ; tout fait stable et prouvé doit être matérialisé +sans doublon ; toute opération actuelle officiellement constructible doit être exécutable après +préflight, sauf preuve explicite qu'elle est historique, obsolète, désactivée ou non déployée. + +### Décision de périmètre Token-2022 / registre ElGamal + +Token-2022 et le registre ElGamal restent initialement dans le même jalon parce que le registre est +fonctionnellement lié aux extensions confidentielles. Le reporter sans audit pourrait conduire à +déclarer à tort une couverture Token-2022 maximale alors qu'une dépendance directe du parcours +confidentiel resterait inconnue. + +Cette proximité fonctionnelle n'autorise aucune fusion technique. Les deux surfaces doivent garder : + +- des Program IDs, dispatchs et déclarations de couverture séparés ; +- des matrices machine-readable séparées ; +- des événements, diagnostics et propriétaires de matérialisation explicites ; +- des corpus synthétiques et réels ainsi que des preuves cluster séparés ; +- des capacités d'exécution et des critères d'activation indépendants ; +- une distinction stricte avec le programme natif ZK ElGamal Proof déjà couvert. + +Le jalon doit progresser dans cet ordre : + +1. audit complet Token-2022 et publication de sa première matrice ; +2. décodeur Token-2022 de base, puis extensions par groupes cohérents ; +3. audit dédié du registre ElGamal et publication de sa matrice propre ; +4. matérialisations Token-2022 et ElGamal avec preuve de non-duplication ; +5. exécution Token-2022 extension par extension après validation stateful ; +6. exécution du registre uniquement pour ses opérations actuelles, constructibles et validées. + +La taille de `0.4.6` ne justifie jamais une réduction de couverture ou de qualité. Si l'audit prouve +que le registre ElGamal est autonome, sensiblement plus volumineux que prévu ou qu'il exige un +cycle de preuves indépendant, il peut être reporté vers un jalon séparé. Ce report doit être une +décision documentée issue de la première matrice et de l'audit des sources résolues, avec mise à +jour explicite du ROADMAP et des critères de clôture ; il ne doit pas être décidé par commodité +avant l'audit. + +## 2. Base de travail validée + +La base attendue clôt `0.4.5` et contient : + +- le décodeur SPL Token classique couvrant ses 28 tags et son exécuteur de 24 opérations ; +- le décodeur ATA couvrant `Create`, `CreateIdempotent`, `RecoverNested` et `Create` vide ; +- la dérivation ATA dépendant explicitement du Token Program cible ; +- les matérialisations ATA lifecycle/risk sans duplication des CPI Token ; +- l'exécuteur ATA des trois variantes, son préflight stateful et son orchestration Devnet ; +- les preuves Devnet classiques, Token-2022 ATA et RecoverNested ; +- PostgreSQL réel, second replay idempotent, Tauri/Vite et Clippy validés ; +- toutes les versions workspace, npm et Tauri synchronisées en `0.4.5`. + +État final de référence communiqué : + +```text +kb_program_ids 5 tests +kb_decoder_spl_token 8 tests +kb_executor_spl_token 15 tests +kb_decoder_spl_associated_token_account 10 tests +kb_executor_spl_associated_token_account 10 tests +kb_decoder_spl_memo 9 tests +kb_materializer_transaction_annotations 7 tests +kb_materializer_token_accounts 9 tests +kb_materializer_risk 6 tests +kb_materializer_lifecycle 17 tests +kb_materializer_admin 9 tests +kb_materializer_fees 3 tests +kb_execution_api 22 tests +kb_execution_safety 15 tests +kb_execution_solana 12 tests +kb_pipeline 90 tests +kb_rpc 113 tests +kb_config 41 tests +kb_app_demo 111 tests +kb_store_pg 46 tests avec PostgreSQL réel +cargo clippy --all-targets propre +``` + +## 3. Lecture et audit obligatoires avant modification + +1. lire `RULES.md`, `README.md`, `ROADMAP.md`, `CHANGELOG.md` et ce prompt ; +2. relire `prompts/023_v0_4_4_spl_token.md`, + `prompts/024_v0_4_5_spl_associated_token_account.md`, + `docs/SPL_TOKEN_MATRIX.json`, `docs/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json`, + `docs/EXECUTION_MODEL.md` et `docs/SOLANA_INTERFACE_DEPENDENCIES.md` ; +3. inspecter `Cargo.toml`, `Cargo.lock`, `cargo tree`, `cargo metadata` et les sources Cargo locales + pour connaître les versions réellement résolues des interfaces Token-2022 et extensions ; +4. comparer enum d'instruction, unpack/pack, TLV, builders, validation d'état et processors officiels ; +5. distinguer strictement ce que publie une interface, ce qu'implémente le processor, ce qui est + déployé sur chaque cluster et ce qu'un corpus réel prouve ; +6. auditer les crates décodeur, exécuteur et matérialiseurs existants avant tout remaniement ; +7. publier la première matrice machine-readable avant d'écrire le wire, les événements ou + l'exécuteur. + +Ne recopier aucune ancienne enum, liste d'extensions, taille de compte ou règle TLV supposée. Une +version ou feature mentionnée dans le catalogue workspace n'est pas une preuve de résolution ni de +consommation par une crate feuille. + +## 4. Frontières strictes + +Dans le périmètre : + +- Program ID Token-2022 exact ; +- instructions de base héritées de SPL Token et variantes propres à Token-2022 ; +- extensions Mint et Account officiellement identifiables, y compris leurs instructions + d'initialisation, mise à jour, lecture et lifecycle lorsqu'elles existent ; +- TLV, préfixes de base Mint/Account/Multisig, longueurs, padding, types et autorités ; +- Transfer Fee, Interest Bearing, NonTransferable, Permanent Delegate, CPI Guard, + Immutable Owner, Default Account State, Memo Transfer, Reallocate, pausable/confidential et + autres extensions uniquement selon les sources réellement résolues ; +- Transfer Hook, Token Group et Token Metadata Interface comme interfaces séparées pouvant être + implémentées par des Program IDs tiers ; +- registre ElGamal comme programme distinct ; +- instructions outer et inner/CPI, transactions réussies et échouées ; +- corpus offline, corpus réel et scénarios Localnet/Devnet bornés ; +- exécution des opérations actuelles constructibles après audit, matérialisation et préflight. + +Hors périmètre : + +- Metaplex Token Metadata ; +- programmes tiers implémentant une interface tant que leur Program ID n'est pas explicitement + audité et inclus ; +- preuve cryptographique locale ou déchiffrement de données confidentielles ; +- invention d'un solde, d'un withheld amount final, d'intérêts courus ou d'un état de compte final + depuis la seule instruction ; +- migration SQL dédiée sans preuve de cardinalité ou de requêtage qui la rende nécessaire ; +- nouveaux DEX, stratégies, trading automatisé ou acquisition historique différée. + +## 5. Matrices machine-readable obligatoires + +Créer au minimum `docs/SPL_TOKEN_2022_MATRIX.json`, vérifiée par des tests Rust. Créer une matrice +séparée pour le registre ElGamal ou les interfaces externes si leur contrat ne peut pas être décrit +sans mélanger des Program IDs et processors distincts. + +Pour chaque instruction et extension, enregistrer : + +- discriminant, sous-discriminant, encodage, taille minimale/exacte et règle de suffixe ; +- état historique, courant, expérimental, désactivé ou obsolète avec preuve ; +- comptes requis dans l'ordre, signer/writable et comptes optionnels ; +- type d'état ciblé : Mint, Account, Multisig, TLV ou compte de programme externe ; +- type TLV, layout, longueur, padding, répétition permise et incompatibilités ; +- autorités, montants bruts, decimals, epochs, timestamps et clés publiques sans perte ; +- événements décodés et projections autorisées avec propriétaire unique ; +- support exécuteur, builder officiel ou miroir justifié, et motif stable si decode-only ; +- support outer/inner, succès/échec et diagnostics attendus ; +- preuves synthétiques, Localnet, Devnet, Mainnet et corpus réel ; +- limites explicites de ce qui n'est pas prouvé. + +Imposer l'égalité entre matrice, surfaces compilées, déclarations de couverture, propriétaires de +matérialisation et capacités exécuteur. Une extension publiée mais non implémentée ne peut pas +disparaître : elle doit être classée avec une raison stable. + +## 6. Décodeur maximal + +Remplacer le scaffold `kb_decoder_spl_token_2022` par un dispatch exact du seul Program ID +Token-2022. Le décodeur doit : + +- conserver Program ID, instruction path outer/inner, accounts ordonnés, doublons, flags, statut + committed et erreur transactionnelle ; +- décoder maximalement les instructions de base et extension selon le processor résolu ; +- préserver montants `u64`, decimals, epochs et timestamps sans conversion flottante ; +- ne jamais inventer un mint lorsqu'il n'est pas dans le wire ou le contrat de comptes ; +- distinguer données d'instruction, état de compte observé et état final non disponible ; +- parser les TLV de façon bornée, conserver ordre/type/longueur, détecter types dupliqués, + tronqués, inconnus, padding invalide et incompatibilités ; +- conserver une extension inconnue comme fait opaque borné lorsque sa structure externe reste + lisible, sans prétendre connaître sa sémantique ; +- décoder les transactions échouées comme intentions structurées lorsque le wire reste lisible ; +- refuser tout faux événement pour SPL Token classique, ATA, programme de hook, groupe, metadata, + registre ElGamal ou programme ZK natif ; +- borner instructions, comptes, vecteurs, strings, TLV, données opaques et diagnostics. + +Les tests différentiels doivent utiliser les unpackers/builders officiels lorsqu'ils existent. Les +miroirs locaux ne sont acceptables qu'après audit prouvant qu'une feature interdite ou l'absence de +helper empêche l'usage direct, avec layout documenté et fixtures officielles comparées. + +## 7. Interfaces externes et registre ElGamal + +Transfer Hook, Token Group et Token Metadata Interface ne doivent pas être absorbés automatiquement +dans le décodeur Token-2022. Auditer leurs Program IDs, discriminants et mécanismes d'interface : + +- une instruction exécutée par Token-2022 appartient au décodeur Token-2022 ; +- une CPI vers un programme implémentant une interface appartient au décodeur de ce Program ID ; +- les données TLV pointant vers un programme externe restent un lien, pas un décodage de ce + programme ; +- un même fait métier ne doit pas être matérialisé à la fois depuis le parent Token-2022 et la CPI. + +Le registre ElGamal doit avoir un Program ID exact confirmé, un dispatch et une matrice propres. Ne +pas le confondre avec `ZkE1Gama1Proof11111111111111111111111111111`, déjà traité comme programme +natif de preuve. Aucun vérificateur cryptographique local n'est requis : conserver les clés, +handles, comptes, hashes, tailles et résultats runtime prouvés. + +Sa présence dans la même version que Token-2022 exprime uniquement la nécessité d'auditer le lien +fonctionnel avec les extensions confidentielles. Elle ne permet pas de partager artificiellement +une enum, un décodeur, une matrice, un événement ou une capacité exécuteur entre les deux Program +IDs. + +## 8. Matérialisation maximale sans doublon + +Auditer au minimum `kb_materializer_token_accounts`, `kb_materializer_admin`, +`kb_materializer_fees`, `kb_materializer_compliance_audit`, `kb_materializer_risk`, +`kb_materializer_lifecycle` et les matérialiseurs metadata existants avant d'en créer un nouveau. + +Attribuer chaque fait stable à un seul propriétaire, par exemple : + +- lifecycle et mutations de comptes/mints dans `token_accounts` ; +- autorités et configuration dans `admin` ; +- paramètres et prélèvements de transfer fee prouvés dans `fees` ; +- garde-fous, exigences memo, hooks et opérations confidentielles dans `compliance_audit` ou + `risk` selon la nature factuelle ; +- metadata/group uniquement si le wire et le Program ID audités le prouvent. + +Chaque projection doit être instructionnelle, commitée, idempotente et explicite sur ses limites. +Elle ne doit pas reconstruire un snapshot, un solde, un rendement, un montant withheld global ou un +état confidentiel final. Tester les transactions contenant parent Token-2022 et CPI externes afin +qu'une seule projection possède chaque fait métier. + +## 9. Exécuteur et préflight + +Ne commencer `kb_executor_spl_token_2022` qu'après validation du décodeur, de la matrice et des +projections. Développer par tranches cohérentes d'extensions, mais maintenir dans la matrice la +surface exhaustive. + +Pour chaque opération actuelle officiellement constructible : + +- utiliser le builder officiel lorsqu'il correspond exactement à l'interface auditée ; +- exposer intent typé, comptes exacts, ordre des metas, signataires uniques et Program IDs ; +- conserver montants, decimals, epochs et coûts en représentations JSON sans perte ; +- calculer le coût SOL maximal pour rent, reallocate et frais réseau ; +- imposer simulation et dry-run par défaut ; +- fournir une validation post-exécution adaptée à l'opération ; +- classer decode-only toute opération historique/obsolète/désactivée avec preuve et motif stable. + +Le préflight stateful Localnet/Devnet doit contrôler cluster, Program IDs, owner des comptes, +préfixe de base, TLV existants, espace requis, rent, compatibilités d'extensions, autorités, +signataires, mint/account relations, soldes nécessaires et plafonds. Les extensions confidentielles +ou à hook doivent vérifier tous les comptes additionnels connus sans exécuter de cryptographie ni +faire confiance à une liste fournie par la WebView. + +La bibliothèque exécuteur reste universelle. Les politiques de cluster, wallet, confirmation et +Mainnet restent dans les couches communes. + +## 10. Corpus et scénarios cluster + +Le corpus offline doit couvrir chaque instruction/extension publiée, ses formes minimales et +limites, inconnus/tronqués/suffixés, comptes manquants/supplémentaires/dupliqués, flags invalides, +outer/inner, succès/échec et incompatibilités TLV. Ajouter des fixtures de comptes Mint et Account +avec zéro, une et plusieurs extensions, ordre différent, padding et types inconnus. + +Auditer ensuite un corpus réel Mainnet/Devnet. Les preuves doivent séparer : + +- interface publiée ; +- processor source ; +- builder constructible ; +- programme déployé ; +- transaction observée ; +- simulation réussie ; +- soumission contrôlée et postconditions. + +Toute dépense réelle exige comptes contrôlés, plafond explicite, confirmation et reprise bornée. +Après `429` ou interruption, conserver les signatures déjà confirmées, vérifier leurs postconditions +et reprendre depuis le dernier jalon exact plutôt que recréer comptes ou extensions. + +## 11. Tauri + +Réutiliser la fenêtre d'exécution Solana existante et son journal borné. Ne pas créer une WebView +par extension. Ajouter seulement un parcours représentatif Devnet lorsque backend, préflight et +post-validation sont déjà validés. + +Le panneau doit montrer profil, Token Program, mint/account, extensions sélectionnées, espace +requis, rent, signataires, préflight, simulation, confirmation et postconditions. Les secrets, +proof data non nécessaires et clés privées restent côté Rust. Les montants et lamports traversent +Tauri sous forme JSON-safe sans perte. Les extensions non exposées dans l'UI restent obligatoires +dans le décodeur et dans la bibliothèque exécuteur lorsqu'elles sont actuelles et constructibles. + +## 12. Contraintes du workspace + +Respecter Rust 2024, async-first, `kb_core::Error`/`Result`, lints workspace et headers de version. +Aucun `anyhow`, `thiserror`, `unsafe`, `unwrap`, `expect`, panic de production, opérateur `?` dans +les nouveaux chemins de production, `bincode` direct ou logique métier lourde dans Tauri. +Commentaires Rust en anglais, Markdown projet en français. + +Conserver le style d'organisation des crates existantes. Un remaniement est autorisé seulement +lorsqu'il est nécessaire pour le contrat Token-2022, avec justification, périmètre borné et tests +de non-régression. Mettre `ROADMAP.md` à jour à chaque tranche et conserver `CHANGELOG.md` inchangé +jusqu'à la validation complète de `0.4.6`. + +Livrer uniquement des deltas : + +```text +khadhroony-bot2_v0.4.6-pre.001-delta.zip +khadhroony-bot2_v0.4.6-pre.001-delta-fix-001.zip +``` + +Chaque archive contient `delta.md` non versionné avec fichiers ajoutés/modifiés, suppressions +manuelles, dépendance aux deltas précédents et validations exécutées ou non exécutées. + +## 13. Critères de clôture + +`0.4.6` ne peut être clôturé qu'après : + +- matrices exhaustives et égalités compilées validées ; +- corpus offline complet et corpus réel documenté ; +- décodage maximal des instructions, extensions et programmes distincts inclus ; +- matérialisation maximale sans doublon parent/CPI ni snapshot inventé ; +- exécuteur couvrant toutes les opérations actuelles constructibles et motifs decode-only stables ; +- préflight, simulation-first et postconditions validés ; +- scénarios cluster contrôlés et reprise documentée ; +- PostgreSQL réel, second replay idempotent et journal Tauri validés ; +- régressions `0.4.5`, RPC, configuration, application et Clippy propres ; +- versions Cargo/npm/Tauri et dépendances consommées auditées ; +- README, ROADMAP et CHANGELOG synchronisés seulement après validation finale. + +Commencer par l'audit des versions réellement résolues, des sources locales et des processors. +Publier la première matrice Token-2022 avant toute implémentation du wire, des événements ou de +l'exécuteur. diff --git a/olddocs/archivekbot2/prompts/026_v0_4_7_metaplex_token_metadata.md b/olddocs/archivekbot2/prompts/026_v0_4_7_metaplex_token_metadata.md new file mode 100644 index 0000000..63459b0 --- /dev/null +++ b/olddocs/archivekbot2/prompts/026_v0_4_7_metaplex_token_metadata.md @@ -0,0 +1,155 @@ + + + +# Prompt de session — `0.4.7` Metaplex Token Metadata + +## 1. Mission + +Reprendre `khadhroony-bot2` après la clôture validée de `0.4.6` et implémenter la couverture maximale et strictement bornée de Metaplex Token Metadata. + +Metaplex Token Metadata est un programme indépendant de la Metaplex Foundation. Il complète les mints SPL Token classique et Token-2022 par des metadata externes, des éditions, collections, standards de token et configurations programmables. Il ne doit être absorbé ni par `kb_decoder_spl_token`, ni par `kb_decoder_spl_token_2022`, ni confondu avec les metadata incorporées de Token-2022 ou avec Metaplex Core. + +Program ID canonique à vérifier depuis les sources officielles avant code : + +```text +metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s +``` + +## 2. Base validée + +La base `0.4.6` comprend : + +- Solana Core, loaders et précompiles ; +- SPL Memo, SPL Token classique, ATA et Token-2022 ; +- registre ElGamal séparé du programme ZK ElGamal Proof ; +- replay contextualisé avec `incomplete_signatures` ; +- PostgreSQL idempotent sans doublon decode/mat ; +- `kb_store_core` 41/41 ; +- `kb_store_pg` 46/46 avec PostgreSQL réel ; +- `kb_pipeline` 124/124 ; +- `kb_app_demo` 118/118 ; +- `cargo clippy --all-targets` propre. + +Lire `docs/V0_4_6_VALIDATION.md` avant toute modification. + +## 3. Lectures obligatoires + +1. `RULES.md`, `README.md`, `ROADMAP.md`, `CHANGELOG.md` et ce prompt ; +2. `docs/DECODER_MATERIALIZATION_CONTRACTS.md`, `docs/EXECUTION_MODEL.md`, `docs/REPLAY_PIPELINE.md`, `docs/INSTRUCTION_REPLAY_CONTRACTS.md` et `docs/SOLANA_INTERFACE_DEPENDENCIES.md` ; +3. `docs/SPL_TOKEN_MATRIX.json`, `docs/SPL_TOKEN_2022_MATRIX.json` et les contrats metadata existants ; +4. `kb_decoder_api`, `kb_store_core`, `kb_store_pg`, `kb_pipeline`, `kb_materializer_metadata`, `kb_materializer_admin`, `kb_materializer_lifecycle`, `kb_materializer_risk` et le registre runtime de `kb_app_demo` ; +5. les sources officielles Metaplex réellement résolues dans Cargo et les IDL/layouts publiés, sans supposer qu’un fichier local est actuel ou authentique. + +## 4. Audit avant code + +Établir d’abord une matrice machine-readable couvrant au minimum : + +- toutes les instructions actuellement publiées et les variantes historiques encore observables ; +- comptes ordonnés, signer/writable, formes optionnelles et autorités ; +- discriminateurs, arguments Borsh, suffixes et limites ; +- PDA `metadata`, `edition`, `master edition`, `collection authority record`, `use authority record`, `token record`, `metadata delegate record` et autres comptes réellement officiels ; +- versions de `Metadata`, `MasterEdition`, `Edition`, `EditionMarker`, `TokenRecord` et comptes auxiliaires ; +- `TokenStandard`, créateurs, collection, uses, programmable config, authorization rules et délégations ; +- différences entre metadata externes Metaplex, metadata Token-2022 incorporées et Metaplex Core ; +- builders/interfaces officiels disponibles et surfaces sans builder stable. + +Ne commencer le décodage maximal qu’après validation de cette matrice contre les sources officielles et un corpus synthétique. + +## 5. Architecture attendue + +Créer une frontière dédiée, typiquement `kb_decoder_metaplex_token_metadata`, avec : + +- compatibilité `Yes` uniquement pour le Program ID Metaplex vérifié ; +- provenance exacte du programme, de la version de layout et de l’instruction ; +- outer/CPI, chemin d’instruction, comptes ordonnés et statut de transaction ; +- diagnostics stables pour troncature, discriminant inconnu, comptes invalides, suffixes et variantes futures ; +- aucune interprétation par simple ressemblance de PDA ou de discriminant sous un autre Program ID. + +Réutiliser les API communes existantes. Ne pas créer une infrastructure Anchor dans ce jalon : Metaplex Token Metadata n’en dépend pas. Anchor reste planifié en `0.4.18`, juste avant Meteora. + +## 6. Décodage instructionnel maximal + +Couvrir les générations actuelles et historiques réellement publiées, notamment les familles : + +- création/mise à jour de metadata ; +- création d’édition et master edition ; +- mint d’éditions ; +- vérification/dé-vérification de créateurs et collections ; +- collection size et collection details ; +- uses ; +- délégations/revocations metadata, collection, use, sale, transfer, utility, staking et programmable ; +- burn, lock, unlock, transfer et autres opérations programmables ; +- migration/versionnement lorsqu’officiellement défini. + +Chaque variante doit préserver les données brutes significatives, les autorités, les comptes et la provenance sans inventer de valeur absente du wire. + +## 7. Comptes et PDA + +Pour chaque compte : + +- vérifier owner/program ID avant layout ; +- vérifier PDA et ordre exact des seeds lorsqu’une dérivation canonique existe ; +- borner chaînes, vecteurs, options, créateurs et enums ; +- distinguer tailles minimales, tailles exactes et comptes extensibles ; +- conserver les variantes futures en `Unsupported` plutôt que produire une projection partielle trompeuse ; +- corréler mint, edition, collection, token account et rule set uniquement lorsque les identités sont prouvées. + +## 8. Matérialisation + +Attribuer un propriétaire unique à chaque fait stable : + +- `metadata` : nom, symbole, URI, seller fee, créateurs, collection, uses, token standard, mutabilité, programmable config et provenance ; +- `admin` : update authority, collection authority, delegates et changements d’autorité ; +- `lifecycle` : création, mise à jour, vérification, édition, burn, lock/unlock et transitions prouvées ; +- `risk/compliance` : royalties, mutabilité, créateurs non vérifiés, rule sets et délégations sensibles, sans dupliquer les faits metadata. + +Conserver simultanément metadata Metaplex externe et metadata Token-2022 incorporée. Ne jamais les fusionner silencieusement ; exposer source, autorité, slot et éventuels conflits. + +## 9. JSON externe référencé par URI + +Le fetch HTTP/IPFS/Arweave doit rester optionnel, borné et séparé du replay canonique on-chain : + +- timeout, taille maximale, content type et redirections bornés ; +- cache/provenance/hash explicites ; +- aucune dépendance du statut de décodage on-chain à la disponibilité du contenu externe ; +- aucune confiance implicite dans le JSON distant ; +- pas de SSRF ni d’accès arbitraire aux réseaux locaux. + +Une première version peut documenter et réserver ce contrat sans activer le fetch si son isolation n’est pas suffisamment prouvée. + +## 10. Exécution + +N’ajouter des builders/exécuteurs qu’après validation exacte des interfaces officielles, comptes, autorités, coûts et préconditions. Toute opération doit rester simulation-first, dry-run par défaut, signataires exacts et plafond de dépense explicite. + +Les opérations destructives ou sensibles — burn, update authority, verify/unverify, delegate/revoke, lock/unlock — exigent une confirmation opérateur dédiée et des postconditions stateful. + +## 11. Corpus et validations + +Ajouter au minimum : + +- corpus synthétique pour chaque famille d’instruction et de compte ; +- fixtures réelles Mainnet avec tokens fongibles, NFT, SFT, collections et programmable NFT ; +- outer et CPI ; +- transactions réussies et échouées ; +- mauvais Program ID, mauvais owner, mauvais PDA, comptes manquants/dupliqués, payloads tronqués, suffixes et discriminants inconnus ; +- conflits entre metadata Metaplex externe et Token-2022 incorporée ; +- replay PostgreSQL idempotent, absence de doublons decode/mat et validation de `incomplete_signatures` ; +- démo `kb_app_demo` pour consulter les observations et projections pertinentes. + +## 12. Documentation et clôture + +Mettre à jour : + +- `README.md` ; +- `ROADMAP.md` ; +- `CHANGELOG.md` seulement après validation ; +- `docs/SOLANA_INTERFACE_DEPENDENCIES.md` ; +- une matrice Metaplex Token Metadata dédiée ; +- les README des crates modifiées ; +- le prompt de la session suivante `0.4.8 — Metaplex Core`. + +La clôture exige les tests ciblés, PostgreSQL réel, replay idempotent, tests Tauri si l’UI est modifiée et `cargo clippy --all-targets` propre. + +## 13. Livraisons + +Après la base initiale, livrer uniquement des ZIP delta avec `delta.md` et `manifest.sha256`. Les correctifs d’une même préversion conservent son numéro et utilisent `-delta-fix-XXX.zip`, avec une numérotation recommençant à `fix-001` pour chaque nouvelle préversion. diff --git a/olddocs/archivekbot2/prompts/README.md b/olddocs/archivekbot2/prompts/README.md new file mode 100644 index 0000000..f6d1509 --- /dev/null +++ b/olddocs/archivekbot2/prompts/README.md @@ -0,0 +1,51 @@ + + + +# Prompts de session + +Ce dossier contient les prompts utilisés pour ouvrir ou reprendre des sessions d'assistance par version. + +## Règles + +- Les noms de fichiers doivent être en anglais, sans espaces, accents ni caractères spéciaux inutiles. +- Les fichiers restent en Markdown et sont rédigés en français. +- Un prompt doit décrire le contexte, les règles applicables, les objectifs, les fichiers à lire, les interdictions et les validations attendues. +- Les prompts ne remplacent pas `ROADMAP.md` et ne doivent pas modifier `CHANGELOG.md` avant validation. +- Les prompts doivent rappeler le format du zip delta attendu. + +## Format de livraison attendu + +- Workspace ou plusieurs modules : `khadhroony-bot2_vX.Y.Z-pre.abc-delta.zip`. +- Un seul module Rust : `kb_modulename_vX.Y.Z-pre.abc-delta.zip`. +- Correctif d'un delta déjà livré : conserver `pre.abc` et utiliser `-delta-fix-001.zip`, puis `-fix-002.zip`; ne pas incrémenter `abc` pour une réparation. +- Chaque zip delta ou correctif doit contenir `delta.md` non versionné. +- `delta.md` doit lister les fichiers ajoutés, modifiés, à supprimer manuellement, les dépendances d'application du correctif, et les validations exécutées ou non exécutées. + +## Prompts actuels + +- `001_version_session_template.md` : modèle générique. +- `002_program_registry_and_naming_audit.md` : audit des noms, aliases et registres. +- `003_v0_1_logging_config_profiles.md` : logging et configuration multi-profils. +- `004_v0_2_sql_storage_materialization.md` : conventions storage, PostgreSQL et contrats DB historiques. +- `005_v0_3_rpc_ingestion_ws.md` : ancien prompt d’ingestion, conservé uniquement comme historique. +- `006_v0_4_wallet_execution_demo.md` : ancien phasage wallet, désormais reporté à `0.11.x`. +- `007_v0_5_core_decoders_listeners.md` : ancien phasage décodeurs, désormais remplacé par `0.4.x` à `0.10.x`. +- `008_v0_6_priority_dex_router_surfaces.md` : ancien phasage surfaces, conservé comme source historique. +- `009_v0_2_1_store_core_contracts.md` : contrats backend-agnostiques `kb_store_core` pour `0.2.1`. +- `010_v0_2_2_postgres_connection_health_migrations.md` : connexion PostgreSQL, pool, healthcheck et stratégie migrations. +- `011_v0_2_3_raw_store_minimal.md` : premières tables raw historiques. +- `012_v0_2_4_core_store_minimal.md` : tables core Solana minimales et repositories historiques. +- `013_v0_2_5_db_diagnostics_tauri.md` : diagnostics DB PostgreSQL dans `kb_app_demo`. +- `014_v0_3_0_agave_local_research.md` : prompt historique du cadrage Agave local validé puis abandonné comme axe actif. +- `015_v0_3_1_canonical_store_migration.md` : prompt historique de la transition vers la transaction canonique et les observations légères. +- `016_v0_3_2_canonical_transaction_contract.md` : prompt historique de l’implémentation du contrat canonique et de l’adaptateur HTTP. +- `017_v0_3_3_http_backfill_free_tier.md` : prompt historique du backfill HTTP paginé et de `demo_backfill`, validé et clôturé. +- `018_v0_3_4_canonical_to_core_extraction.md` : prompt historique validé et clôturé pour l’extraction transactionnelle, le replay core et la fondation `0.3.x`. +- `019_v0_4_0_decoder_infrastructure.md` : prompt historique validé pour les contrats, le dispatch, le ledger et le replay communs aux décodeurs et matérialiseurs. +- `020_v0_4_1_native_solana_programs.md` : prompt historique validé pour le décodage et les matérialisations natives Solana. +- `021_v0_4_2_executor_solana_core.md` : prompt historique validé pour l’infrastructure d’exécution et `kb_executor_solana_core`. +- `022_v0_4_3_spl_memo.md` : prompt historique validé pour le décodeur, la matérialisation et l’exécuteur SPL Memo v1/v3/v4. +- `023_v0_4_4_spl_token.md` : prompt historique validé pour le décodeur maximal, les matérialisations et l’exécuteur SPL Token classique. +- `024_v0_4_5_spl_associated_token_account.md` : prompt historique validé pour le décodeur, les matérialisations et l'exécuteur SPL Associated Token Account. +- `025_v0_4_6_spl_token_2022.md` : prompt historique validé pour Token-2022, ses extensions, ses interfaces externes et le registre ElGamal distinct. +- `026_v0_4_7_metaplex_token_metadata.md` : prompt actif pour Metaplex Token Metadata, ses comptes, PDA, NFT/collections, metadata externes et provenance. diff --git a/olddocs/archivekbot2/sql/README.md b/olddocs/archivekbot2/sql/README.md new file mode 100644 index 0000000..58d46b4 --- /dev/null +++ b/olddocs/archivekbot2/sql/README.md @@ -0,0 +1,8 @@ + + + +# SQL + +Ce répertoire est réservé aux scripts SQL généraux qui ne sont pas des validations. + +Les migrations propres à PostgreSQL doivent rester dans le crate `kb_store_pg`.