v0.1.0-pre.012

This commit is contained in:
2026-07-24 15:59:00 +02:00
parent 60660ca555
commit e753a80c3a
179 changed files with 5653 additions and 10813 deletions

View File

@@ -1,5 +1,5 @@
<!-- file: kb-lib/README.md -->
<!-- version: 8 -->
<!-- version: 9 -->
# kb-lib
@@ -88,9 +88,8 @@ discriminateurs `0..=57`, conserve les arguments Borsh, les comptes positionnels
les placeholders optionnels, les chemins outer/CPI et les transactions échouées
comme intentions non commitées.
Le module public
`kb_lib::decoder::metadata::metaplex_token_metadata` expose aussi les parseurs
bornés des 15 variantes `Key 0..=14` : Metadata, Edition et Master Edition,
La façade `kb_lib` expose aussi les parseurs bornés des 15 variantes
`Key 0..=14` : Metadata, Edition et Master Edition,
Edition Marker V1/V2, Token Record, records de délégation et dautorité, Token
Owned Escrow et Reservation List historiques. Chaque parseur vérifie lowner,
le PDA, le bump, la longueur et les suffixes avant projection. Les comptes
@@ -111,7 +110,8 @@ politique dexécution définitivement interdite. La matrice normative est
- `DcToken2022State`, `DcToken2022StateKind`, `DcToken2022TlvEntry` et `decoder_spl_token2022_token2022_state()` : API publique de lecture détat Token2022 ;
- `DcSplElgamalRegistryDecoder`, `DcSplElGamalRegistryState` et `decoder_spl_elgamal_registry_parse_elgamal_registry_state()` : API publique du registre ElGamal ;
- `DcMetadataMetaplexTokenMetadataDecoder` : décodeur exact du programme Metaplex Token Metadata ;
- `kb_lib::decoder::metadata::metaplex_token_metadata` : parseurs et snapshots publics des comptes Metaplex ;
- les fonctions `decoder_metadata_metaplex_token_metadata_*` et les types `DcMetadataMtm*` : parseurs et snapshots publics des comptes Metaplex ;
- les 98 types réservés `Dc*Decoder` : squelettes compatibles avec `DcApiProtocolDecoder`, exposant 97 Program IDs enregistrés et la frontière générique Anchor sans Program ID ;
- `DcApiInstructionDecoder` : contrat de reconnaissance, couverture et décodage contextualisé ;
- `DcApiProtocolDecoder` : contrat de compatibilité avec les observations historiques ;
- `MdCoreInstructionReplayInput` : input source-neutral produit par lextraction core ;
@@ -123,11 +123,11 @@ Les helpers, constantes wire et types intermédiaires de chaque composant resten
## Exemple
```rust
let decoder = kb_lib::SolanaCoreDecoder;
let recognition = kb_lib::InstructionDecoder::recognize(&decoder, &input);
let decoder = kb_lib::DcSolanaCoreDecoder;
let recognition = kb_lib::DcApiInstructionDecoder::recognize(&decoder, &input);
```
Lappel de décodage complet utilise `InstructionDecoder::decode` après une reconnaissance compatible. Le pipeline demeure responsable de la sélection du décodeur et de la persistance du résultat.
Lappel de décodage complet utilise `DcApiInstructionDecoder::decode` après une reconnaissance compatible. Le pipeline demeure responsable de la sélection du décodeur et de la persistance du résultat.
## Frontières
@@ -135,4 +135,5 @@ Lappel de décodage complet utilise `InstructionDecoder::decode` après une r
- Les décodeurs ne lisent pas un état RPC courant pour reconstruire une transaction historique.
- Une transaction échouée peut produire une intention structurée, jamais une mutation commitée.
- Un matérialiseur externe dépend uniquement des contrats et modèles publics de `kb-lib`, jamais dun décodeur concret.
- Les autres matérialisateurs et les exécuteurs sont portés dans des tranches séparées.
- Les squelettes réservés répondent uniquement `Maybe` pour leur Program ID et retournent une liste vide ; ils ne prétendent pas décoder une surface avant son port fonctionnel.
- Les exécuteurs sont portés dans des tranches séparées.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder.rs
// version: 7
// version: 8
//! Consolidated decoder modules.
@@ -33,37 +33,338 @@ mod vesting;
mod wallet;
mod weighted;
/// Internal inventory of pending decoder migration boundaries.
#[allow(dead_code)]
pub(crate) const DC_MIGRATION_BOUNDARIES: &[&[(&str, &str)]] = &[
self::adapter::DC_ADAPTER_MIGRATION_BOUNDARIES,
self::admin::DC_ADMIN_MIGRATION_BOUNDARIES,
self::amm::DC_AMM_MIGRATION_BOUNDARIES,
self::anchor::DC_ANCHOR_MIGRATION_BOUNDARIES,
self::bridge::DC_BRIDGE_MIGRATION_BOUNDARIES,
self::clmm::DC_CLMM_MIGRATION_BOUNDARIES,
self::cpmm::DC_CPMM_MIGRATION_BOUNDARIES,
self::dlmm::DC_DLMM_MIGRATION_BOUNDARIES,
self::fees::DC_FEES_MIGRATION_BOUNDARIES,
self::governance::DC_GOVERNANCE_MIGRATION_BOUNDARIES,
self::launchpad::DC_LAUNCHPAD_MIGRATION_BOUNDARIES,
self::lending::DC_LENDING_MIGRATION_BOUNDARIES,
self::lock::DC_LOCK_MIGRATION_BOUNDARIES,
self::metadata::DC_METADATA_MIGRATION_BOUNDARIES,
self::nft::DC_NFT_MIGRATION_BOUNDARIES,
self::orderbook::DC_ORDERBOOK_MIGRATION_BOUNDARIES,
self::perpetuals::DC_PERPETUALS_MIGRATION_BOUNDARIES,
self::router::DC_ROUTER_MIGRATION_BOUNDARIES,
self::rwa::DC_RWA_MIGRATION_BOUNDARIES,
self::spl::DC_SPL_MIGRATION_BOUNDARIES,
self::stable::DC_STABLE_MIGRATION_BOUNDARIES,
self::staking::DC_STAKING_MIGRATION_BOUNDARIES,
self::treasury::DC_TREASURY_MIGRATION_BOUNDARIES,
self::vault::DC_VAULT_MIGRATION_BOUNDARIES,
self::vesting::DC_VESTING_MIGRATION_BOUNDARIES,
self::wallet::DC_WALLET_MIGRATION_BOUNDARIES,
self::weighted::DC_WEIGHTED_MIGRATION_BOUNDARIES,
];
/// Reserved `kb_decoder_adapter_saber_decimal_wrapper` decoder.
pub use self::adapter::DcAdapterSaberDecimalWrapperDecoder;
/// Reserved `kb_decoder_admin_jupiter_lock` decoder.
pub use self::admin::DcAdminJupiterLockDecoder;
/// Reserved `kb_decoder_admin_pump_fees` decoder.
pub use self::admin::DcAdminPumpFeesDecoder;
/// Reserved `kb_decoder_amm_aldrin_v1` decoder.
pub use self::amm::DcAmmAldrinV1Decoder;
/// Reserved `kb_decoder_amm_aldrin_v2` decoder.
pub use self::amm::DcAmmAldrinV2Decoder;
/// Reserved `kb_decoder_amm_alphaq` decoder.
pub use self::amm::DcAmmAlphaqDecoder;
/// Reserved `kb_decoder_amm_believe` decoder.
pub use self::amm::DcAmmBelieveDecoder;
/// Reserved `kb_decoder_amm_bonk_swap` decoder.
pub use self::amm::DcAmmBonkSwapDecoder;
/// Reserved `kb_decoder_amm_fluxbeam` decoder.
pub use self::amm::DcAmmFluxbeamDecoder;
/// Reserved `kb_decoder_amm_goon_fi` decoder.
pub use self::amm::DcAmmGoonFiDecoder;
/// Reserved `kb_decoder_amm_goosefx_gamma` decoder.
pub use self::amm::DcAmmGoosefxGammaDecoder;
/// Reserved `kb_decoder_amm_goosefx_v2` decoder.
pub use self::amm::DcAmmGoosefxV2Decoder;
/// Reserved `kb_decoder_amm_guac_swap` decoder.
pub use self::amm::DcAmmGuacSwapDecoder;
/// Reserved `kb_decoder_amm_lifinity_swap_v2` decoder.
pub use self::amm::DcAmmLifinitySwapV2Decoder;
/// Reserved `kb_decoder_amm_metadao_futarchy_amm` decoder.
pub use self::amm::DcAmmMetadaoFutarchyAmmDecoder;
/// Reserved `kb_decoder_amm_metadao_v0_5` decoder.
pub use self::amm::DcAmmMetadaoV05Decoder;
/// Reserved `kb_decoder_amm_meteora_damm_v1` decoder.
pub use self::amm::DcAmmMeteoraDammV1Decoder;
/// Reserved `kb_decoder_amm_meteora_damm_v2` decoder.
pub use self::amm::DcAmmMeteoraDammV2Decoder;
/// Reserved `kb_decoder_amm_obric_v2` decoder.
pub use self::amm::DcAmmObricV2Decoder;
/// Reserved `kb_decoder_amm_one_dex` decoder.
pub use self::amm::DcAmmOneDexDecoder;
/// Reserved `kb_decoder_amm_pump_swap` decoder.
pub use self::amm::DcAmmPumpSwapDecoder;
/// Reserved `kb_decoder_amm_raydium_lp_v4` decoder.
pub use self::amm::DcAmmRaydiumLpV4Decoder;
/// Reserved `kb_decoder_amm_solfi` decoder.
pub use self::amm::DcAmmSolfiDecoder;
/// Reserved `kb_decoder_amm_solfi_v2` decoder.
pub use self::amm::DcAmmSolfiV2Decoder;
/// Reserved `kb_decoder_amm_vertigo` decoder.
pub use self::amm::DcAmmVertigoDecoder;
/// Reserved `kb_decoder_amm_virtuals` decoder.
pub use self::amm::DcAmmVirtualsDecoder;
/// Reserved `kb_decoder_amm_woofi` decoder.
pub use self::amm::DcAmmWoofiDecoder;
/// Reserved `kb_decoder_amm_zero_fi` decoder.
pub use self::amm::DcAmmZeroFiDecoder;
/// Reserved `kb_decoder_amm_zora` decoder.
pub use self::amm::DcAmmZoraDecoder;
/// Reserved `kb_decoder_anchor` decoder.
pub use self::anchor::DcAnchorDecoder;
/// Current contextual core instruction input contract version.
pub use self::api::DC_API_CORE_INSTRUCTION_INPUT_CONTRACT_VERSION;
/// Stable contextual decoded observation.
pub use self::api::DcApiDecodedObservation;
/// Machine-readable decoder coverage declaration.
pub use self::api::DcApiDecoderCoverageDeclaration;
/// Declared decoder coverage entry kind.
pub use self::api::DcApiDecoderCoverageEntryKind;
/// Structured decoder diagnostic.
pub use self::api::DcApiDecoderDiagnostic;
/// Complete decoder execution result.
pub use self::api::DcApiDecoderExecutionResult;
/// Stable decoder identity.
pub use self::api::DcApiDecoderIdentity;
/// Decoder terminal result status.
pub use self::api::DcApiDecoderOutcomeStatus;
/// Explicit decoding proof.
pub use self::api::DcApiDecoderProof;
/// Decoding proof category.
pub use self::api::DcApiDecoderProofKind;
/// Deterministic decoder recognition result.
pub use self::api::DcApiDecoderRecognition;
/// Exposes the decoder support level.
pub use self::api::DcApiDecoderSupport;
/// One statically declared decoder surface.
pub use self::api::DcApiDecoderSurface;
/// Initial decoder implementation placeholder for API-level tests.
pub use self::api::DcApiInitialDecoder;
/// Contextual instruction decoder contract.
pub use self::api::DcApiInstructionDecoder;
/// Exposes the common protocol decoder trait.
pub use self::api::DcApiProtocolDecoder;
/// Computes the deterministic contextual input hash.
pub use self::api::decoder_api_decoder_api_contextual_input_hash;
/// Returns true when a decoder declares the exact program id.
pub use self::api::decoder_api_decoder_handles_program_id;
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.
pub use self::api::decoder_api_deterministic_json_hash;
/// Extracts the first eight payload bytes as hexadecimal when available.
pub use self::api::decoder_api_discriminator_8_hex;
/// Reserved `kb_decoder_bridge_circle_cctp_token_messenger_minter` decoder.
pub use self::bridge::DcBridgeCircleCctpTokenMessengerMinterDecoder;
/// Reserved `kb_decoder_bridge_circle_cctp_token_messenger_minter_v2` decoder.
pub use self::bridge::DcBridgeCircleCctpTokenMessengerMinterV2Decoder;
/// Reserved `kb_decoder_bridge_layer_zero_endpoint` decoder.
pub use self::bridge::DcBridgeLayerZeroEndpointDecoder;
/// Reserved `kb_decoder_bridge_layer_zero_executor` decoder.
pub use self::bridge::DcBridgeLayerZeroExecutorDecoder;
/// Reserved `kb_decoder_clmm_byreal` decoder.
pub use self::clmm::DcClmmByrealDecoder;
/// Reserved `kb_decoder_clmm_fusion` decoder.
pub use self::clmm::DcClmmFusionDecoder;
/// Reserved `kb_decoder_clmm_orca_whirlpool` decoder.
pub use self::clmm::DcClmmOrcaWhirlpoolDecoder;
/// Reserved `kb_decoder_clmm_pancake_swap` decoder.
pub use self::clmm::DcClmmPancakeSwapDecoder;
/// Reserved `kb_decoder_clmm_raydium` decoder.
pub use self::clmm::DcClmmRaydiumDecoder;
/// Reserved `kb_decoder_clmm_stabble` decoder.
pub use self::clmm::DcClmmStabbleDecoder;
/// Reserved `kb_decoder_cpmm_raydium` decoder.
pub use self::cpmm::DcCpmmRaydiumDecoder;
/// Reserved `kb_decoder_dlmm_meteora` decoder.
pub use self::dlmm::DcDlmmMeteoraDecoder;
/// Reserved `kb_decoder_fees_bags_fee_share_v1` decoder.
pub use self::fees::DcFeesBagsFeeShareV1Decoder;
/// Reserved `kb_decoder_fees_bags_fee_share_v2` decoder.
pub use self::fees::DcFeesBagsFeeShareV2Decoder;
/// Reserved `kb_decoder_governance_metadao_bid_wall` decoder.
pub use self::governance::DcGovernanceMetadaoBidWallDecoder;
/// Reserved `kb_decoder_launchpad_boop_fun` decoder.
pub use self::launchpad::DcLaunchpadBoopFunDecoder;
/// Reserved `kb_decoder_launchpad_metadao_ico` decoder.
pub use self::launchpad::DcLaunchpadMetadaoIcoDecoder;
/// Reserved `kb_decoder_launchpad_meteora_dbc` decoder.
pub use self::launchpad::DcLaunchpadMeteoraDbcDecoder;
/// Reserved `kb_decoder_launchpad_moonit` decoder.
pub use self::launchpad::DcLaunchpadMoonitDecoder;
/// Reserved `kb_decoder_launchpad_orca_wavebreak` decoder.
pub use self::launchpad::DcLaunchpadOrcaWavebreakDecoder;
/// Reserved `kb_decoder_launchpad_printr` decoder.
pub use self::launchpad::DcLaunchpadPrintrDecoder;
/// Reserved `kb_decoder_launchpad_pump_fun` decoder.
pub use self::launchpad::DcLaunchpadPumpFunDecoder;
/// Reserved `kb_decoder_launchpad_pump_pumpup_ai` decoder.
pub use self::launchpad::DcLaunchpadPumpPumpupAiDecoder;
/// Reserved `kb_decoder_launchpad_raydium_launchlab` decoder.
pub use self::launchpad::DcLaunchpadRaydiumLaunchlabDecoder;
/// Reserved `kb_decoder_lending_clone` decoder.
pub use self::lending::DcLendingCloneDecoder;
/// Reserved `kb_decoder_lending_jupiter_lend_borrow` decoder.
pub use self::lending::DcLendingJupiterLendBorrowDecoder;
/// Reserved `kb_decoder_lending_jupiter_lend_earn` decoder.
pub use self::lending::DcLendingJupiterLendEarnDecoder;
/// Reserved `kb_decoder_lending_jupiter_lend_flash_loan` decoder.
pub use self::lending::DcLendingJupiterLendFlashLoanDecoder;
/// Reserved `kb_decoder_lending_jupiter_lend_liquidity` decoder.
pub use self::lending::DcLendingJupiterLendLiquidityDecoder;
/// Reserved `kb_decoder_lending_kamino` decoder.
pub use self::lending::DcLendingKaminoDecoder;
/// Reserved `kb_decoder_lending_marginfi_v2` decoder.
pub use self::lending::DcLendingMarginfiV2Decoder;
/// Reserved `kb_decoder_lock_raydium_lp` decoder.
pub use self::lock::DcLockRaydiumLpDecoder;
/// Exhaustive published Metaplex account-key inventory.
pub use self::metadata::DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT;
/// Exact decoder for the Metaplex Token Metadata program.
pub use self::metadata::DcMetadataMetaplexTokenMetadataDecoder;
/// Canonical projection shared by Collection and Use Authority records.
pub use self::metadata::DcMetadataMtmAuthorityRecordAccountSnapshot;
/// Stable identity and policy of one canonical account snapshot.
pub use self::metadata::DcMetadataMtmCanonicalAccountIdentity;
/// Lifecycle class of one canonical account layout.
pub use self::metadata::DcMetadataMtmCanonicalAccountLifecycle;
/// Provenance retained for one canonical account observation.
pub use self::metadata::DcMetadataMtmCanonicalAccountProvenance;
/// Execution policy separated from historical materialization.
pub use self::metadata::DcMetadataMtmCanonicalExecutionPolicy;
/// Materialization policy for active or historical state.
pub use self::metadata::DcMetadataMtmCanonicalMaterializationPolicy;
/// Canonical account envelope used by materializers and replay.
pub use self::metadata::DcMetadataMtmCanonicalMetadataAccountSnapshot;
/// Typed canonical Metaplex account state.
pub use self::metadata::DcMetadataMtmCanonicalMetadataAccountState;
/// Origin of one canonical account observation.
pub use self::metadata::DcMetadataMtmCanonicalObservationSource;
/// Canonical projection shared by Metadata and Holder delegate records.
pub use self::metadata::DcMetadataMtmDelegateRecordAccountSnapshot;
/// Supported edition account layout.
pub use self::metadata::DcMetadataMtmEditionAccountKind;
/// Canonical bounded projection of one edition or master-edition account.
pub use self::metadata::DcMetadataMtmEditionAccountSnapshot;
/// Supported Edition Marker account layout.
pub use self::metadata::DcMetadataMtmEditionMarkerAccountKind;
/// Canonical bounded projection of one Edition Marker account.
pub use self::metadata::DcMetadataMtmEditionMarkerAccountSnapshot;
/// Bounded error returned while decoding a Metadata account.
pub use self::metadata::DcMetadataMtmMetadataAccountDecodeError;
/// One entry in the exhaustive published account-key audit.
pub use self::metadata::DcMetadataMtmMetadataAccountLayoutAuditEntry;
/// Canonical bounded projection of one Metadata account.
pub use self::metadata::DcMetadataMtmMetadataAccountSnapshot;
/// One bounded historical reservation entry.
pub use self::metadata::DcMetadataMtmReservationEntrySnapshot;
/// Historical Reservation List account generation.
pub use self::metadata::DcMetadataMtmReservationListAccountKind;
/// Canonical decode-only projection of a historical Reservation List account.
pub use self::metadata::DcMetadataMtmReservationListAccountSnapshot;
/// Canonical projection of one Token Owned Escrow account.
pub use self::metadata::DcMetadataMtmTokenOwnedEscrowAccountSnapshot;
/// Authority form used by one Token Owned Escrow account.
pub use self::metadata::DcMetadataMtmTokenOwnedEscrowAuthorityKind;
/// Canonical bounded projection of one programmable Token Record account.
pub use self::metadata::DcMetadataMtmTokenRecordAccountSnapshot;
/// Reserved `kb_decoder_metadata_spl_name_service` decoder.
pub use self::metadata::DcMetadataSplNameServiceDecoder;
/// Decodes one Collection Authority Record account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_collection_authority_record_account;
/// Decodes and validates one edition or master-edition account snapshot.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_edition_account;
/// Decodes and validates one Edition Marker account snapshot.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_edition_marker_account;
/// Decodes one Holder Delegate Record account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_holder_delegate_record_account;
/// Decodes and validates one canonical Metadata account snapshot.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_account;
/// Decodes one Metadata Delegate Record account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_delegate_record_account;
/// Decodes one historical Reservation List V1 or V2 account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_reservation_list_account;
/// Decodes one Token Owned Escrow account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_token_owned_escrow_account;
/// Decodes and validates one programmable Token Record account snapshot.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_token_record_account;
/// Decodes one Use Authority Record account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_use_authority_record_account;
/// Reserved `kb_decoder_nft_metaplex_bubblegum` decoder.
pub use self::nft::DcNftMetaplexBubblegumDecoder;
/// Reserved `kb_decoder_orderbook_jupiter_limit_order` decoder.
pub use self::orderbook::DcOrderbookJupiterLimitOrderDecoder;
/// Reserved `kb_decoder_orderbook_jupiter_limit_order_v2` decoder.
pub use self::orderbook::DcOrderbookJupiterLimitOrderV2Decoder;
/// Reserved `kb_decoder_orderbook_openbook_v2` decoder.
pub use self::orderbook::DcOrderbookOpenbookV2Decoder;
/// Reserved `kb_decoder_perpetuals_drift_v2` decoder.
pub use self::perpetuals::DcPerpetualsDriftV2Decoder;
/// Reserved `kb_decoder_perpetuals_jupiter` decoder.
pub use self::perpetuals::DcPerpetualsJupiterDecoder;
/// Reserved `kb_decoder_perpetuals_zeta` decoder.
pub use self::perpetuals::DcPerpetualsZetaDecoder;
/// Reserved `kb_decoder_router_dflow_aggregator_v4` decoder.
pub use self::router::DcRouterDflowAggregatorV4Decoder;
/// Reserved `kb_decoder_router_jupiter_aggregator_v4` decoder.
pub use self::router::DcRouterJupiterAggregatorV4Decoder;
/// Reserved `kb_decoder_router_jupiter_aggregator_v6` decoder.
pub use self::router::DcRouterJupiterAggregatorV6Decoder;
/// Reserved `kb_decoder_router_jupiter_dca` decoder.
pub use self::router::DcRouterJupiterDcaDecoder;
/// Reserved `kb_decoder_router_okx_labs_v1` decoder.
pub use self::router::DcRouterOkxLabsV1Decoder;
/// Reserved `kb_decoder_router_okx_labs_v2` decoder.
pub use self::router::DcRouterOkxLabsV2Decoder;
pub use self::rwa::DcRwaOndoGlobalMarketsDecoder;
/// Runtime-native Solana decoder with phased maximal native coverage.
pub use self::solana::DcSolanaCoreDecoder;
/// Exact byte length of one SPL ElGamal registry account.
pub use self::spl::DC_SPL_ELGAMAL_REGISTRY_ACCOUNT_LEN;
/// Reserved `kb_decoder_rwa_ondo_global_markets` decoder.
/// Reserved `kb_decoder_spl_account_compression` decoder.
pub use self::spl::DcSplAccountCompressionDecoder;
/// Exact decoder for the SPL Associated Token Account program.
pub use self::spl::DcSplAssociatedTokenAccountDecoder;
/// Parsed SPL ElGamal public-key registry account.
pub use self::spl::DcSplElGamalRegistryState;
/// Exact decoder for the SPL ElGamal registry program.
pub use self::spl::DcSplElgamalRegistryDecoder;
/// Exact decoder for the three registered SPL Memo generations.
pub use self::spl::DcSplMemoDecoder;
/// Reserved `kb_decoder_spl_noop` decoder.
pub use self::spl::DcSplNoopDecoder;
/// Reserved `kb_decoder_spl_single_pool` decoder.
pub use self::spl::DcSplSinglePoolDecoder;
/// Reserved `kb_decoder_spl_stake_pool` decoder.
pub use self::spl::DcSplStakePoolDecoder;
/// Exact decoder for the Token-2022 program.
pub use self::spl::DcSplToken2022Decoder;
/// Exact decoder for the classic SPL Token program.
pub use self::spl::DcSplTokenDecoder;
/// Parsed Token-2022 Mint, Account, or Multisig state.
pub use self::spl::DcToken2022State;
/// Exact Token-2022 base account state kind.
pub use self::spl::DcToken2022StateKind;
/// One exact Token-2022 TLV entry.
pub use self::spl::DcToken2022TlvEntry;
/// Parses one exact SPL ElGamal registry account.
pub use self::spl::decoder_spl_elgamal_registry_parse_elgamal_registry_state;
/// Parses one Token-2022 Mint, Account, or Multisig state.
pub use self::spl::decoder_spl_token2022_parse_token2022_state;
/// Reserved `kb_decoder_stable_swap_hylo_exchange` decoder.
pub use self::stable::DcStableSwapHyloExchangeDecoder;
/// Reserved `kb_decoder_stable_swap_jupiter_stable` decoder.
pub use self::stable::DcStableSwapJupiterStableDecoder;
/// Reserved `kb_decoder_stable_swap_numeraire` decoder.
pub use self::stable::DcStableSwapNumeraireDecoder;
/// Reserved `kb_decoder_stable_swap_stabble` decoder.
pub use self::stable::DcStableSwapStabbleDecoder;
/// Reserved `kb_decoder_staking_kamino_farm` decoder.
pub use self::staking::DcStakingKaminoFarmDecoder;
/// Reserved `kb_decoder_staking_marinade_finance` decoder.
pub use self::staking::DcStakingMarinadeFinanceDecoder;
/// Reserved `kb_decoder_staking_solayer` decoder.
pub use self::staking::DcStakingSolayerDecoder;
/// Reserved `kb_decoder_treasury_helium_treasury_management` decoder.
pub use self::treasury::DcTreasuryHeliumTreasuryManagementDecoder;
/// Reserved `kb_decoder_vault_carrot_defi` decoder.
pub use self::vault::DcVaultCarrotDefiDecoder;
/// Reserved `kb_decoder_vault_hylo_stability_pool` decoder.
pub use self::vault::DcVaultHyloStabilityPoolDecoder;
/// Reserved `kb_decoder_vault_kamino` decoder.
pub use self::vault::DcVaultKaminoDecoder;
/// Reserved `kb_decoder_vault_kamino_v2` decoder.
pub use self::vault::DcVaultKaminoV2Decoder;
/// Reserved `kb_decoder_vault_kamino_yvaults` decoder.
pub use self::vault::DcVaultKaminoYvaultsDecoder;
/// Reserved `kb_decoder_vault_meteora` decoder.
pub use self::vault::DcVaultMeteoraDecoder;
/// Reserved `kb_decoder_vesting_streamflow` decoder.
pub use self::vesting::DcVestingStreamflowDecoder;
/// Reserved `kb_decoder_wallet_jupiter_apepro_smart_wallet` decoder.
pub use self::wallet::DcWalletJupiterApeproSmartWalletDecoder;
/// Reserved `kb_decoder_weighted_swap_stabble` decoder.
pub use self::weighted::DcWeightedSwapStabbleDecoder;
/// Approve Collection Authority discriminator.
pub(crate) use self::metadata::DC_METADATA_MTM_APPROVE_COLLECTION_AUTHORITY_DISCRIMINATOR;
@@ -393,139 +694,139 @@ pub(crate) use self::spl::decoder_spl_token2022_entry_for_tag;
/// Returns the first byte of one retained Token-2022 payload.
pub(crate) use self::spl::decoder_spl_token2022_payload_tag;
/// Current contextual core instruction input contract version.
pub use self::api::DC_API_CORE_INSTRUCTION_INPUT_CONTRACT_VERSION;
/// Stable contextual decoded observation.
pub use self::api::DcApiDecodedObservation;
/// Machine-readable decoder coverage declaration.
pub use self::api::DcApiDecoderCoverageDeclaration;
/// Declared decoder coverage entry kind.
pub use self::api::DcApiDecoderCoverageEntryKind;
/// Structured decoder diagnostic.
pub use self::api::DcApiDecoderDiagnostic;
/// Complete decoder execution result.
pub use self::api::DcApiDecoderExecutionResult;
/// Stable decoder identity.
pub use self::api::DcApiDecoderIdentity;
/// Decoder terminal result status.
pub use self::api::DcApiDecoderOutcomeStatus;
/// Explicit decoding proof.
pub use self::api::DcApiDecoderProof;
/// Decoding proof category.
pub use self::api::DcApiDecoderProofKind;
/// Deterministic decoder recognition result.
pub use self::api::DcApiDecoderRecognition;
/// Exposes the decoder support level.
pub use self::api::DcApiDecoderSupport;
/// One statically declared decoder surface.
pub use self::api::DcApiDecoderSurface;
/// Initial decoder implementation placeholder for API-level tests.
pub use self::api::DcApiInitialDecoder;
/// Contextual instruction decoder contract.
pub use self::api::DcApiInstructionDecoder;
/// Exposes the common protocol decoder trait.
pub use self::api::DcApiProtocolDecoder;
/// Computes the deterministic contextual input hash.
pub use self::api::decoder_api_decoder_api_contextual_input_hash;
/// Returns true when a decoder declares the exact program id.
pub use self::api::decoder_api_decoder_handles_program_id;
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.
pub use self::api::decoder_api_deterministic_json_hash;
/// Extracts the first eight payload bytes as hexadecimal when available.
pub use self::api::decoder_api_discriminator_8_hex;
/// Exhaustive published Metaplex account-key inventory.
pub use self::metadata::DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT;
/// Exact decoder for the Metaplex Token Metadata program.
pub use self::metadata::DcMetadataMetaplexTokenMetadataDecoder;
/// Canonical projection shared by Collection and Use Authority records.
pub use self::metadata::DcMetadataMtmAuthorityRecordAccountSnapshot;
/// Stable identity and policy of one canonical account snapshot.
pub use self::metadata::DcMetadataMtmCanonicalAccountIdentity;
/// Lifecycle class of one canonical account layout.
pub use self::metadata::DcMetadataMtmCanonicalAccountLifecycle;
/// Provenance retained for one canonical account observation.
pub use self::metadata::DcMetadataMtmCanonicalAccountProvenance;
/// Execution policy separated from historical materialization.
pub use self::metadata::DcMetadataMtmCanonicalExecutionPolicy;
/// Materialization policy for active or historical state.
pub use self::metadata::DcMetadataMtmCanonicalMaterializationPolicy;
/// Canonical account envelope used by materializers and replay.
pub use self::metadata::DcMetadataMtmCanonicalMetadataAccountSnapshot;
/// Typed canonical Metaplex account state.
pub use self::metadata::DcMetadataMtmCanonicalMetadataAccountState;
/// Origin of one canonical account observation.
pub use self::metadata::DcMetadataMtmCanonicalObservationSource;
/// Canonical projection shared by Metadata and Holder delegate records.
pub use self::metadata::DcMetadataMtmDelegateRecordAccountSnapshot;
/// Supported edition account layout.
pub use self::metadata::DcMetadataMtmEditionAccountKind;
/// Canonical bounded projection of one edition or master-edition account.
pub use self::metadata::DcMetadataMtmEditionAccountSnapshot;
/// Supported Edition Marker account layout.
pub use self::metadata::DcMetadataMtmEditionMarkerAccountKind;
/// Canonical bounded projection of one Edition Marker account.
pub use self::metadata::DcMetadataMtmEditionMarkerAccountSnapshot;
/// Bounded error returned while decoding a Metadata account.
pub use self::metadata::DcMetadataMtmMetadataAccountDecodeError;
/// One entry in the exhaustive published account-key audit.
pub use self::metadata::DcMetadataMtmMetadataAccountLayoutAuditEntry;
/// Canonical bounded projection of one Metadata account.
pub use self::metadata::DcMetadataMtmMetadataAccountSnapshot;
/// One bounded historical reservation entry.
pub use self::metadata::DcMetadataMtmReservationEntrySnapshot;
/// Historical Reservation List account generation.
pub use self::metadata::DcMetadataMtmReservationListAccountKind;
/// Canonical decode-only projection of a historical Reservation List account.
pub use self::metadata::DcMetadataMtmReservationListAccountSnapshot;
/// Canonical projection of one Token Owned Escrow account.
pub use self::metadata::DcMetadataMtmTokenOwnedEscrowAccountSnapshot;
/// Authority form used by one Token Owned Escrow account.
pub use self::metadata::DcMetadataMtmTokenOwnedEscrowAuthorityKind;
/// Canonical bounded projection of one programmable Token Record account.
pub use self::metadata::DcMetadataMtmTokenRecordAccountSnapshot;
/// Decodes one Collection Authority Record account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_collection_authority_record_account;
/// Decodes and validates one edition or master-edition account snapshot.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_edition_account;
/// Decodes and validates one Edition Marker account snapshot.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_edition_marker_account;
/// Decodes one Holder Delegate Record account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_holder_delegate_record_account;
/// Decodes and validates one canonical Metadata account snapshot.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_account;
/// Decodes one Metadata Delegate Record account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_delegate_record_account;
/// Decodes one historical Reservation List V1 or V2 account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_reservation_list_account;
/// Decodes one Token Owned Escrow account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_token_owned_escrow_account;
/// Decodes and validates one programmable Token Record account snapshot.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_token_record_account;
/// Decodes one Use Authority Record account.
pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_use_authority_record_account;
/// Runtime-native Solana decoder with phased maximal native coverage.
pub use self::solana::DcSolanaCoreDecoder;
/// Exact byte length of one SPL ElGamal registry account.
pub use self::spl::DC_SPL_ELGAMAL_REGISTRY_ACCOUNT_LEN;
/// Exact decoder for the SPL Associated Token Account program.
pub use self::spl::DcSplAssociatedTokenAccountDecoder;
/// Parsed SPL ElGamal public-key registry account.
pub use self::spl::DcSplElGamalRegistryState;
/// Exact decoder for the SPL ElGamal registry program.
pub use self::spl::DcSplElgamalRegistryDecoder;
/// Exact decoder for the three registered SPL Memo generations.
pub use self::spl::DcSplMemoDecoder;
/// Exact decoder for the Token-2022 program.
pub use self::spl::DcSplToken2022Decoder;
/// Exact decoder for the classic SPL Token program.
pub use self::spl::DcSplTokenDecoder;
/// Parsed Token-2022 Mint, Account, or Multisig state.
pub use self::spl::DcToken2022State;
/// Exact Token-2022 base account state kind.
pub use self::spl::DcToken2022StateKind;
/// One exact Token-2022 TLV entry.
pub use self::spl::DcToken2022TlvEntry;
/// Parses one exact SPL ElGamal registry account.
pub use self::spl::decoder_spl_elgamal_registry_parse_elgamal_registry_state;
/// Parses one Token-2022 Mint, Account, or Multisig state.
pub use self::spl::decoder_spl_token2022_parse_token2022_state;
#[cfg(test)]
mod reserved_decoder_tests {
#[test]
fn every_reserved_decoder_exposes_only_registered_program_ids() {
let decoders: [&dyn crate::DcApiProtocolDecoder; 98] = [
&crate::DcAdapterSaberDecimalWrapperDecoder,
&crate::DcAdminJupiterLockDecoder,
&crate::DcAdminPumpFeesDecoder,
&crate::DcAmmAldrinV1Decoder,
&crate::DcAmmAldrinV2Decoder,
&crate::DcAmmAlphaqDecoder,
&crate::DcAmmBelieveDecoder,
&crate::DcAmmBonkSwapDecoder,
&crate::DcAmmFluxbeamDecoder,
&crate::DcAmmGoonFiDecoder,
&crate::DcAmmGoosefxGammaDecoder,
&crate::DcAmmGoosefxV2Decoder,
&crate::DcAmmGuacSwapDecoder,
&crate::DcAmmLifinitySwapV2Decoder,
&crate::DcAmmMetadaoFutarchyAmmDecoder,
&crate::DcAmmMetadaoV05Decoder,
&crate::DcAmmMeteoraDammV1Decoder,
&crate::DcAmmMeteoraDammV2Decoder,
&crate::DcAmmObricV2Decoder,
&crate::DcAmmOneDexDecoder,
&crate::DcAmmPumpSwapDecoder,
&crate::DcAmmRaydiumLpV4Decoder,
&crate::DcAmmSolfiDecoder,
&crate::DcAmmSolfiV2Decoder,
&crate::DcAmmVertigoDecoder,
&crate::DcAmmVirtualsDecoder,
&crate::DcAmmWoofiDecoder,
&crate::DcAmmZeroFiDecoder,
&crate::DcAmmZoraDecoder,
&crate::DcAnchorDecoder,
&crate::DcBridgeCircleCctpTokenMessengerMinterDecoder,
&crate::DcBridgeCircleCctpTokenMessengerMinterV2Decoder,
&crate::DcBridgeLayerZeroEndpointDecoder,
&crate::DcBridgeLayerZeroExecutorDecoder,
&crate::DcClmmByrealDecoder,
&crate::DcClmmFusionDecoder,
&crate::DcClmmOrcaWhirlpoolDecoder,
&crate::DcClmmPancakeSwapDecoder,
&crate::DcClmmRaydiumDecoder,
&crate::DcClmmStabbleDecoder,
&crate::DcCpmmRaydiumDecoder,
&crate::DcDlmmMeteoraDecoder,
&crate::DcFeesBagsFeeShareV1Decoder,
&crate::DcFeesBagsFeeShareV2Decoder,
&crate::DcGovernanceMetadaoBidWallDecoder,
&crate::DcLaunchpadBoopFunDecoder,
&crate::DcLaunchpadMetadaoIcoDecoder,
&crate::DcLaunchpadMeteoraDbcDecoder,
&crate::DcLaunchpadMoonitDecoder,
&crate::DcLaunchpadOrcaWavebreakDecoder,
&crate::DcLaunchpadPrintrDecoder,
&crate::DcLaunchpadPumpFunDecoder,
&crate::DcLaunchpadPumpPumpupAiDecoder,
&crate::DcLaunchpadRaydiumLaunchlabDecoder,
&crate::DcLendingCloneDecoder,
&crate::DcLendingJupiterLendBorrowDecoder,
&crate::DcLendingJupiterLendEarnDecoder,
&crate::DcLendingJupiterLendFlashLoanDecoder,
&crate::DcLendingJupiterLendLiquidityDecoder,
&crate::DcLendingKaminoDecoder,
&crate::DcLendingMarginfiV2Decoder,
&crate::DcLockRaydiumLpDecoder,
&crate::DcMetadataSplNameServiceDecoder,
&crate::DcNftMetaplexBubblegumDecoder,
&crate::DcOrderbookJupiterLimitOrderDecoder,
&crate::DcOrderbookJupiterLimitOrderV2Decoder,
&crate::DcOrderbookOpenbookV2Decoder,
&crate::DcPerpetualsDriftV2Decoder,
&crate::DcPerpetualsJupiterDecoder,
&crate::DcPerpetualsZetaDecoder,
&crate::DcRouterDflowAggregatorV4Decoder,
&crate::DcRouterJupiterAggregatorV4Decoder,
&crate::DcRouterJupiterAggregatorV6Decoder,
&crate::DcRouterJupiterDcaDecoder,
&crate::DcRouterOkxLabsV1Decoder,
&crate::DcRouterOkxLabsV2Decoder,
&crate::DcRwaOndoGlobalMarketsDecoder,
&crate::DcSplAccountCompressionDecoder,
&crate::DcSplNoopDecoder,
&crate::DcSplSinglePoolDecoder,
&crate::DcSplStakePoolDecoder,
&crate::DcStableSwapHyloExchangeDecoder,
&crate::DcStableSwapJupiterStableDecoder,
&crate::DcStableSwapNumeraireDecoder,
&crate::DcStableSwapStabbleDecoder,
&crate::DcStakingKaminoFarmDecoder,
&crate::DcStakingMarinadeFinanceDecoder,
&crate::DcStakingSolayerDecoder,
&crate::DcTreasuryHeliumTreasuryManagementDecoder,
&crate::DcVaultCarrotDefiDecoder,
&crate::DcVaultHyloStabilityPoolDecoder,
&crate::DcVaultKaminoDecoder,
&crate::DcVaultKaminoV2Decoder,
&crate::DcVaultKaminoYvaultsDecoder,
&crate::DcVaultMeteoraDecoder,
&crate::DcVestingStreamflowDecoder,
&crate::DcWalletJupiterApeproSmartWalletDecoder,
&crate::DcWeightedSwapStabbleDecoder,
];
let mut names = std::collections::BTreeSet::new();
for decoder in decoders {
assert!(names.insert(decoder.decoder_name()));
if decoder.decoder_name() == "kb_decoder_anchor" {
assert!(decoder.program_ids().is_empty());
continue;
}
assert_eq!(decoder.program_ids().len(), 1);
for program_id in decoder.program_ids() {
assert!(kb_program_ids::find_registered_program_id(program_id).is_some());
let observation = crate::MdProgramObservation {
signature: crate::MdSignature("signature".to_string()),
slot: crate::MdSlot(1),
instruction_path: crate::MdInstructionPath("0".to_string()),
program_id: crate::MdProgramId((*program_id).to_string()),
discriminator_8: std::option::Option::None,
data_len: 0,
accounts_len: 0,
failed: false,
};
assert_eq!(
decoder.supports_observation(&observation),
crate::DcApiDecoderSupport::Maybe
);
let decode_result = decoder.decode_observation(&observation);
assert!(decode_result.is_ok());
assert!(decode_result.is_ok_and(|events| return events.is_empty()));
}
}
assert_eq!(names.len(), 98);
}
}

View File

@@ -1,12 +1,9 @@
// file: kb-lib/src/decoder/adapter.rs
// version: 2
// version: 3
//! `adapter` decoder family.
mod saber_decimal_wrapper;
/// Pending `adapter` decoder migration boundaries.
pub(crate) const DC_ADAPTER_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[(
self::saber_decimal_wrapper::DC_ADAPTER_SABER_DECIMAL_WRAPPER_LEGACY_CRATE,
self::saber_decimal_wrapper::DC_ADAPTER_SABER_DECIMAL_WRAPPER_MIGRATION_STATUS,
)];
/// Reserved `kb_decoder_adapter_saber_decimal_wrapper` decoder.
pub use self::saber_decimal_wrapper::DcAdapterSaberDecimalWrapperDecoder;

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/adapter/saber_decimal_wrapper.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_adapter_saber_decimal_wrapper`.
//! Reserved protocol decoder for `adapter_saber_decimal_wrapper`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ADAPTER_SABER_DECIMAL_WRAPPER_LEGACY_CRATE: &str =
"kb_decoder_adapter_saber_decimal_wrapper";
/// Reserved decoder for the `adapter_saber_decimal_wrapper` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAdapterSaberDecimalWrapperDecoder;
/// Current porting status.
pub(crate) const DC_ADAPTER_SABER_DECIMAL_WRAPPER_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAdapterSaberDecimalWrapperDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_adapter_saber_decimal_wrapper";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ADAPTER_SABER_DECIMAL_WRAPPER_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,19 +1,12 @@
// file: kb-lib/src/decoder/admin.rs
// version: 2
// version: 3
//! `admin` decoder family.
mod jupiter_lock;
mod pump_fees;
/// Pending `admin` decoder migration boundaries.
pub(crate) const DC_ADMIN_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[
(
self::jupiter_lock::DC_ADMIN_JUPITER_LOCK_LEGACY_CRATE,
self::jupiter_lock::DC_ADMIN_JUPITER_LOCK_MIGRATION_STATUS,
),
(
self::pump_fees::DC_ADMIN_PUMP_FEES_LEGACY_CRATE,
self::pump_fees::DC_ADMIN_PUMP_FEES_MIGRATION_STATUS,
),
];
/// Reserved `kb_decoder_admin_jupiter_lock` decoder.
pub use self::jupiter_lock::DcAdminJupiterLockDecoder;
/// Reserved `kb_decoder_admin_pump_fees` decoder.
pub use self::pump_fees::DcAdminPumpFeesDecoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/admin/jupiter_lock.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_admin_jupiter_lock`.
//! Reserved protocol decoder for `admin_jupiter_lock`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ADMIN_JUPITER_LOCK_LEGACY_CRATE: &str = "kb_decoder_admin_jupiter_lock";
/// Reserved decoder for the `admin_jupiter_lock` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAdminJupiterLockDecoder;
/// Current porting status.
pub(crate) const DC_ADMIN_JUPITER_LOCK_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAdminJupiterLockDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_admin_jupiter_lock";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ADMIN_JUPITER_LOCK_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/admin/pump_fees.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_admin_pump_fees`.
//! Reserved protocol decoder for `admin_pump_fees`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ADMIN_PUMP_FEES_LEGACY_CRATE: &str = "kb_decoder_admin_pump_fees";
/// Reserved decoder for the `admin_pump_fees` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAdminPumpFeesDecoder;
/// Current porting status.
pub(crate) const DC_ADMIN_PUMP_FEES_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAdminPumpFeesDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_admin_pump_fees";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ADMIN_PUMP_FEES_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/amm.rs
// version: 2
// version: 3
//! `amm` decoder family.
@@ -30,107 +30,55 @@ mod woofi;
mod zero_fi;
mod zora;
/// Pending `amm` decoder migration boundaries.
pub(crate) const DC_AMM_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[
(
self::aldrin_v1::DC_AMM_ALDRIN_V1_LEGACY_CRATE,
self::aldrin_v1::DC_AMM_ALDRIN_V1_MIGRATION_STATUS,
),
(
self::aldrin_v2::DC_AMM_ALDRIN_V2_LEGACY_CRATE,
self::aldrin_v2::DC_AMM_ALDRIN_V2_MIGRATION_STATUS,
),
(
self::alphaq::DC_AMM_ALPHAQ_LEGACY_CRATE,
self::alphaq::DC_AMM_ALPHAQ_MIGRATION_STATUS,
),
(
self::believe::DC_AMM_BELIEVE_LEGACY_CRATE,
self::believe::DC_AMM_BELIEVE_MIGRATION_STATUS,
),
(
self::bonk_swap::DC_AMM_BONK_SWAP_LEGACY_CRATE,
self::bonk_swap::DC_AMM_BONK_SWAP_MIGRATION_STATUS,
),
(
self::fluxbeam::DC_AMM_FLUXBEAM_LEGACY_CRATE,
self::fluxbeam::DC_AMM_FLUXBEAM_MIGRATION_STATUS,
),
(
self::goon_fi::DC_AMM_GOON_FI_LEGACY_CRATE,
self::goon_fi::DC_AMM_GOON_FI_MIGRATION_STATUS,
),
(
self::goosefx_gamma::DC_AMM_GOOSEFX_GAMMA_LEGACY_CRATE,
self::goosefx_gamma::DC_AMM_GOOSEFX_GAMMA_MIGRATION_STATUS,
),
(
self::goosefx_v2::DC_AMM_GOOSEFX_V2_LEGACY_CRATE,
self::goosefx_v2::DC_AMM_GOOSEFX_V2_MIGRATION_STATUS,
),
(
self::guac_swap::DC_AMM_GUAC_SWAP_LEGACY_CRATE,
self::guac_swap::DC_AMM_GUAC_SWAP_MIGRATION_STATUS,
),
(
self::lifinity_swap_v2::DC_AMM_LIFINITY_SWAP_V2_LEGACY_CRATE,
self::lifinity_swap_v2::DC_AMM_LIFINITY_SWAP_V2_MIGRATION_STATUS,
),
(
self::metadao_futarchy_amm::DC_AMM_METADAO_FUTARCHY_AMM_LEGACY_CRATE,
self::metadao_futarchy_amm::DC_AMM_METADAO_FUTARCHY_AMM_MIGRATION_STATUS,
),
(
self::metadao_v0_5::DC_AMM_METADAO_V0_5_LEGACY_CRATE,
self::metadao_v0_5::DC_AMM_METADAO_V0_5_MIGRATION_STATUS,
),
(
self::meteora_damm_v1::DC_AMM_METEORA_DAMM_V1_LEGACY_CRATE,
self::meteora_damm_v1::DC_AMM_METEORA_DAMM_V1_MIGRATION_STATUS,
),
(
self::meteora_damm_v2::DC_AMM_METEORA_DAMM_V2_LEGACY_CRATE,
self::meteora_damm_v2::DC_AMM_METEORA_DAMM_V2_MIGRATION_STATUS,
),
(
self::obric_v2::DC_AMM_OBRIC_V2_LEGACY_CRATE,
self::obric_v2::DC_AMM_OBRIC_V2_MIGRATION_STATUS,
),
(
self::one_dex::DC_AMM_ONE_DEX_LEGACY_CRATE,
self::one_dex::DC_AMM_ONE_DEX_MIGRATION_STATUS,
),
(
self::pump_swap::DC_AMM_PUMP_SWAP_LEGACY_CRATE,
self::pump_swap::DC_AMM_PUMP_SWAP_MIGRATION_STATUS,
),
(
self::raydium_lp_v4::DC_AMM_RAYDIUM_LP_V4_LEGACY_CRATE,
self::raydium_lp_v4::DC_AMM_RAYDIUM_LP_V4_MIGRATION_STATUS,
),
(
self::solfi::DC_AMM_SOLFI_LEGACY_CRATE,
self::solfi::DC_AMM_SOLFI_MIGRATION_STATUS,
),
(
self::solfi_v2::DC_AMM_SOLFI_V2_LEGACY_CRATE,
self::solfi_v2::DC_AMM_SOLFI_V2_MIGRATION_STATUS,
),
(
self::vertigo::DC_AMM_VERTIGO_LEGACY_CRATE,
self::vertigo::DC_AMM_VERTIGO_MIGRATION_STATUS,
),
(
self::virtuals::DC_AMM_VIRTUALS_LEGACY_CRATE,
self::virtuals::DC_AMM_VIRTUALS_MIGRATION_STATUS,
),
(
self::woofi::DC_AMM_WOOFI_LEGACY_CRATE,
self::woofi::DC_AMM_WOOFI_MIGRATION_STATUS,
),
(
self::zero_fi::DC_AMM_ZERO_FI_LEGACY_CRATE,
self::zero_fi::DC_AMM_ZERO_FI_MIGRATION_STATUS,
),
(self::zora::DC_AMM_ZORA_LEGACY_CRATE, self::zora::DC_AMM_ZORA_MIGRATION_STATUS),
];
/// Reserved `kb_decoder_amm_aldrin_v1` decoder.
pub use self::aldrin_v1::DcAmmAldrinV1Decoder;
/// Reserved `kb_decoder_amm_aldrin_v2` decoder.
pub use self::aldrin_v2::DcAmmAldrinV2Decoder;
/// Reserved `kb_decoder_amm_alphaq` decoder.
pub use self::alphaq::DcAmmAlphaqDecoder;
/// Reserved `kb_decoder_amm_believe` decoder.
pub use self::believe::DcAmmBelieveDecoder;
/// Reserved `kb_decoder_amm_bonk_swap` decoder.
pub use self::bonk_swap::DcAmmBonkSwapDecoder;
/// Reserved `kb_decoder_amm_fluxbeam` decoder.
pub use self::fluxbeam::DcAmmFluxbeamDecoder;
/// Reserved `kb_decoder_amm_goon_fi` decoder.
pub use self::goon_fi::DcAmmGoonFiDecoder;
/// Reserved `kb_decoder_amm_goosefx_gamma` decoder.
pub use self::goosefx_gamma::DcAmmGoosefxGammaDecoder;
/// Reserved `kb_decoder_amm_goosefx_v2` decoder.
pub use self::goosefx_v2::DcAmmGoosefxV2Decoder;
/// Reserved `kb_decoder_amm_guac_swap` decoder.
pub use self::guac_swap::DcAmmGuacSwapDecoder;
/// Reserved `kb_decoder_amm_lifinity_swap_v2` decoder.
pub use self::lifinity_swap_v2::DcAmmLifinitySwapV2Decoder;
/// Reserved `kb_decoder_amm_metadao_futarchy_amm` decoder.
pub use self::metadao_futarchy_amm::DcAmmMetadaoFutarchyAmmDecoder;
/// Reserved `kb_decoder_amm_metadao_v0_5` decoder.
pub use self::metadao_v0_5::DcAmmMetadaoV05Decoder;
/// Reserved `kb_decoder_amm_meteora_damm_v1` decoder.
pub use self::meteora_damm_v1::DcAmmMeteoraDammV1Decoder;
/// Reserved `kb_decoder_amm_meteora_damm_v2` decoder.
pub use self::meteora_damm_v2::DcAmmMeteoraDammV2Decoder;
/// Reserved `kb_decoder_amm_obric_v2` decoder.
pub use self::obric_v2::DcAmmObricV2Decoder;
/// Reserved `kb_decoder_amm_one_dex` decoder.
pub use self::one_dex::DcAmmOneDexDecoder;
/// Reserved `kb_decoder_amm_pump_swap` decoder.
pub use self::pump_swap::DcAmmPumpSwapDecoder;
/// Reserved `kb_decoder_amm_raydium_lp_v4` decoder.
pub use self::raydium_lp_v4::DcAmmRaydiumLpV4Decoder;
/// Reserved `kb_decoder_amm_solfi` decoder.
pub use self::solfi::DcAmmSolfiDecoder;
/// Reserved `kb_decoder_amm_solfi_v2` decoder.
pub use self::solfi_v2::DcAmmSolfiV2Decoder;
/// Reserved `kb_decoder_amm_vertigo` decoder.
pub use self::vertigo::DcAmmVertigoDecoder;
/// Reserved `kb_decoder_amm_virtuals` decoder.
pub use self::virtuals::DcAmmVirtualsDecoder;
/// Reserved `kb_decoder_amm_woofi` decoder.
pub use self::woofi::DcAmmWoofiDecoder;
/// Reserved `kb_decoder_amm_zero_fi` decoder.
pub use self::zero_fi::DcAmmZeroFiDecoder;
/// Reserved `kb_decoder_amm_zora` decoder.
pub use self::zora::DcAmmZoraDecoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/aldrin_v1.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_aldrin_v1`.
//! Reserved protocol decoder for `amm_aldrin_v1`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_ALDRIN_V1_LEGACY_CRATE: &str = "kb_decoder_amm_aldrin_v1";
/// Reserved decoder for the `amm_aldrin_v1` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmAldrinV1Decoder;
/// Current porting status.
pub(crate) const DC_AMM_ALDRIN_V1_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmAldrinV1Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_aldrin_v1";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_ALDRIN_V1_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/aldrin_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_aldrin_v2`.
//! Reserved protocol decoder for `amm_aldrin_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_ALDRIN_V2_LEGACY_CRATE: &str = "kb_decoder_amm_aldrin_v2";
/// Reserved decoder for the `amm_aldrin_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmAldrinV2Decoder;
/// Current porting status.
pub(crate) const DC_AMM_ALDRIN_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmAldrinV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_aldrin_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_ALDRIN_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/alphaq.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_alphaq`.
//! Reserved protocol decoder for `amm_alphaq`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_ALPHAQ_LEGACY_CRATE: &str = "kb_decoder_amm_alphaq";
/// Reserved decoder for the `amm_alphaq` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmAlphaqDecoder;
/// Current porting status.
pub(crate) const DC_AMM_ALPHAQ_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmAlphaqDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_alphaq";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_ALPHAQ_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/believe.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_believe`.
//! Reserved protocol decoder for `amm_believe`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_BELIEVE_LEGACY_CRATE: &str = "kb_decoder_amm_believe";
/// Reserved decoder for the `amm_believe` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmBelieveDecoder;
/// Current porting status.
pub(crate) const DC_AMM_BELIEVE_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmBelieveDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_believe";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_BELIEVE_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/bonk_swap.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_bonk_swap`.
//! Reserved protocol decoder for `amm_bonk_swap`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_BONK_SWAP_LEGACY_CRATE: &str = "kb_decoder_amm_bonk_swap";
/// Reserved decoder for the `amm_bonk_swap` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmBonkSwapDecoder;
/// Current porting status.
pub(crate) const DC_AMM_BONK_SWAP_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmBonkSwapDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_bonk_swap";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_BONK_SWAP_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/fluxbeam.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_fluxbeam`.
//! Reserved protocol decoder for `amm_fluxbeam`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_FLUXBEAM_LEGACY_CRATE: &str = "kb_decoder_amm_fluxbeam";
/// Reserved decoder for the `amm_fluxbeam` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmFluxbeamDecoder;
/// Current porting status.
pub(crate) const DC_AMM_FLUXBEAM_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmFluxbeamDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_fluxbeam";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_FLUXBEAM_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/goon_fi.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_goon_fi`.
//! Reserved protocol decoder for `amm_goon_fi`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_GOON_FI_LEGACY_CRATE: &str = "kb_decoder_amm_goon_fi";
/// Reserved decoder for the `amm_goon_fi` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmGoonFiDecoder;
/// Current porting status.
pub(crate) const DC_AMM_GOON_FI_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmGoonFiDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_goon_fi";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_GOON_FI_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/goosefx_gamma.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_goosefx_gamma`.
//! Reserved protocol decoder for `amm_goosefx_gamma`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_GOOSEFX_GAMMA_LEGACY_CRATE: &str = "kb_decoder_amm_goosefx_gamma";
/// Reserved decoder for the `amm_goosefx_gamma` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmGoosefxGammaDecoder;
/// Current porting status.
pub(crate) const DC_AMM_GOOSEFX_GAMMA_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmGoosefxGammaDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_goosefx_gamma";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_GOOSEFX_GAMMA_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/goosefx_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_goosefx_v2`.
//! Reserved protocol decoder for `amm_goosefx_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_GOOSEFX_V2_LEGACY_CRATE: &str = "kb_decoder_amm_goosefx_v2";
/// Reserved decoder for the `amm_goosefx_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmGoosefxV2Decoder;
/// Current porting status.
pub(crate) const DC_AMM_GOOSEFX_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmGoosefxV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_goosefx_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_GOOSEFX_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/guac_swap.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_guac_swap`.
//! Reserved protocol decoder for `amm_guac_swap`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_GUAC_SWAP_LEGACY_CRATE: &str = "kb_decoder_amm_guac_swap";
/// Reserved decoder for the `amm_guac_swap` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmGuacSwapDecoder;
/// Current porting status.
pub(crate) const DC_AMM_GUAC_SWAP_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmGuacSwapDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_guac_swap";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_GUAC_SWAP_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/lifinity_swap_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_lifinity_swap_v2`.
//! Reserved protocol decoder for `amm_lifinity_swap_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_LIFINITY_SWAP_V2_LEGACY_CRATE: &str = "kb_decoder_amm_lifinity_swap_v2";
/// Reserved decoder for the `amm_lifinity_swap_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmLifinitySwapV2Decoder;
/// Current porting status.
pub(crate) const DC_AMM_LIFINITY_SWAP_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmLifinitySwapV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_lifinity_swap_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_LIFINITY_SWAP_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/amm/metadao_futarchy_amm.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_metadao_futarchy_amm`.
//! Reserved protocol decoder for `amm_metadao_futarchy_amm`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_METADAO_FUTARCHY_AMM_LEGACY_CRATE: &str =
"kb_decoder_amm_metadao_futarchy_amm";
/// Reserved decoder for the `amm_metadao_futarchy_amm` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmMetadaoFutarchyAmmDecoder;
/// Current porting status.
pub(crate) const DC_AMM_METADAO_FUTARCHY_AMM_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmMetadaoFutarchyAmmDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_metadao_futarchy_amm";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_METADAO_FUTARCHY_AMM_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/metadao_v0_5.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_metadao_v0_5`.
//! Reserved protocol decoder for `amm_metadao_v0_5`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_METADAO_V0_5_LEGACY_CRATE: &str = "kb_decoder_amm_metadao_v0_5";
/// Reserved decoder for the `amm_metadao_v0_5` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmMetadaoV05Decoder;
/// Current porting status.
pub(crate) const DC_AMM_METADAO_V0_5_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmMetadaoV05Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_metadao_v0_5";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_METADAO_V0_5_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/meteora_damm_v1.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_meteora_damm_v1`.
//! Reserved protocol decoder for `amm_meteora_damm_v1`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_METEORA_DAMM_V1_LEGACY_CRATE: &str = "kb_decoder_amm_meteora_damm_v1";
/// Reserved decoder for the `amm_meteora_damm_v1` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmMeteoraDammV1Decoder;
/// Current porting status.
pub(crate) const DC_AMM_METEORA_DAMM_V1_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmMeteoraDammV1Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_meteora_damm_v1";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_METEORA_DAMM_V1_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/meteora_damm_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_meteora_damm_v2`.
//! Reserved protocol decoder for `amm_meteora_damm_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_METEORA_DAMM_V2_LEGACY_CRATE: &str = "kb_decoder_amm_meteora_damm_v2";
/// Reserved decoder for the `amm_meteora_damm_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmMeteoraDammV2Decoder;
/// Current porting status.
pub(crate) const DC_AMM_METEORA_DAMM_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmMeteoraDammV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_meteora_damm_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_METEORA_DAMM_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/obric_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_obric_v2`.
//! Reserved protocol decoder for `amm_obric_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_OBRIC_V2_LEGACY_CRATE: &str = "kb_decoder_amm_obric_v2";
/// Reserved decoder for the `amm_obric_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmObricV2Decoder;
/// Current porting status.
pub(crate) const DC_AMM_OBRIC_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmObricV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_obric_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_OBRIC_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/one_dex.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_one_dex`.
//! Reserved protocol decoder for `amm_one_dex`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_ONE_DEX_LEGACY_CRATE: &str = "kb_decoder_amm_one_dex";
/// Reserved decoder for the `amm_one_dex` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmOneDexDecoder;
/// Current porting status.
pub(crate) const DC_AMM_ONE_DEX_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmOneDexDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_one_dex";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_ONE_DEX_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/pump_swap.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_pump_swap`.
//! Reserved protocol decoder for `amm_pump_swap`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_PUMP_SWAP_LEGACY_CRATE: &str = "kb_decoder_amm_pump_swap";
/// Reserved decoder for the `amm_pump_swap` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmPumpSwapDecoder;
/// Current porting status.
pub(crate) const DC_AMM_PUMP_SWAP_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmPumpSwapDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_pump_swap";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_PUMP_SWAP_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/raydium_lp_v4.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_raydium_lp_v4`.
//! Reserved protocol decoder for `amm_raydium_lp_v4`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_RAYDIUM_LP_V4_LEGACY_CRATE: &str = "kb_decoder_amm_raydium_lp_v4";
/// Reserved decoder for the `amm_raydium_lp_v4` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmRaydiumLpV4Decoder;
/// Current porting status.
pub(crate) const DC_AMM_RAYDIUM_LP_V4_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmRaydiumLpV4Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_raydium_lp_v4";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_RAYDIUM_LP_V4_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/solfi.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_solfi`.
//! Reserved protocol decoder for `amm_solfi`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_SOLFI_LEGACY_CRATE: &str = "kb_decoder_amm_solfi";
/// Reserved decoder for the `amm_solfi` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmSolfiDecoder;
/// Current porting status.
pub(crate) const DC_AMM_SOLFI_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmSolfiDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_solfi";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_SOLFI_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/solfi_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_solfi_v2`.
//! Reserved protocol decoder for `amm_solfi_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_SOLFI_V2_LEGACY_CRATE: &str = "kb_decoder_amm_solfi_v2";
/// Reserved decoder for the `amm_solfi_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmSolfiV2Decoder;
/// Current porting status.
pub(crate) const DC_AMM_SOLFI_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmSolfiV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_solfi_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_SOLFI_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/vertigo.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_vertigo`.
//! Reserved protocol decoder for `amm_vertigo`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_VERTIGO_LEGACY_CRATE: &str = "kb_decoder_amm_vertigo";
/// Reserved decoder for the `amm_vertigo` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmVertigoDecoder;
/// Current porting status.
pub(crate) const DC_AMM_VERTIGO_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmVertigoDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_vertigo";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_VERTIGO_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/virtuals.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_virtuals`.
//! Reserved protocol decoder for `amm_virtuals`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_VIRTUALS_LEGACY_CRATE: &str = "kb_decoder_amm_virtuals";
/// Reserved decoder for the `amm_virtuals` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmVirtualsDecoder;
/// Current porting status.
pub(crate) const DC_AMM_VIRTUALS_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmVirtualsDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_virtuals";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_VIRTUALS_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/woofi.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_woofi`.
//! Reserved protocol decoder for `amm_woofi`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_WOOFI_LEGACY_CRATE: &str = "kb_decoder_amm_woofi";
/// Reserved decoder for the `amm_woofi` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmWoofiDecoder;
/// Current porting status.
pub(crate) const DC_AMM_WOOFI_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmWoofiDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_woofi";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_WOOFI_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/zero_fi.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_zero_fi`.
//! Reserved protocol decoder for `amm_zero_fi`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_ZERO_FI_LEGACY_CRATE: &str = "kb_decoder_amm_zero_fi";
/// Reserved decoder for the `amm_zero_fi` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmZeroFiDecoder;
/// Current porting status.
pub(crate) const DC_AMM_ZERO_FI_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmZeroFiDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_zero_fi";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_ZERO_FI_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/amm/zora.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_amm_zora`.
//! Reserved protocol decoder for `amm_zora`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_AMM_ZORA_LEGACY_CRATE: &str = "kb_decoder_amm_zora";
/// Reserved decoder for the `amm_zora` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmZoraDecoder;
/// Current porting status.
pub(crate) const DC_AMM_ZORA_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAmmZoraDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_zora";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_ZORA_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,9 @@
// file: kb-lib/src/decoder/anchor.rs
// version: 2
// version: 3
//! `anchor` decoder family.
mod core;
/// Pending `anchor` decoder migration boundaries.
pub(crate) const DC_ANCHOR_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[(
self::core::DC_ANCHOR_CORE_LEGACY_CRATE,
self::core::DC_ANCHOR_CORE_MIGRATION_STATUS,
)];
/// Reserved `kb_decoder_anchor` decoder.
pub use self::core::DcAnchorDecoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/anchor/core.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_anchor`.
//! Reserved protocol decoder for `anchor`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ANCHOR_CORE_LEGACY_CRATE: &str = "kb_decoder_anchor";
/// Reserved decoder for the `anchor` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAnchorDecoder;
/// Current porting status.
pub(crate) const DC_ANCHOR_CORE_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcAnchorDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_anchor";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/bridge.rs
// version: 2
// version: 3
//! `bridge` decoder family.
@@ -8,22 +8,11 @@ mod circle_cctp_token_messenger_minter_v2;
mod layer_zero_endpoint;
mod layer_zero_executor;
/// Pending `bridge` decoder migration boundaries.
pub(crate) const DC_BRIDGE_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[
(
self::circle_cctp_token_messenger_minter::DC_BRIDGE_CIRCLE_CCTP_TOKEN_MESSENGER_MINTER_LEGACY_CRATE,
self::circle_cctp_token_messenger_minter::DC_BRIDGE_CIRCLE_CCTP_TOKEN_MESSENGER_MINTER_MIGRATION_STATUS,
),
(
self::circle_cctp_token_messenger_minter_v2::DC_BRIDGE_CIRCLE_CCTP_TOKEN_MESSENGER_MINTER_V2_LEGACY_CRATE,
self::circle_cctp_token_messenger_minter_v2::DC_BRIDGE_CIRCLE_CCTP_TOKEN_MESSENGER_MINTER_V2_MIGRATION_STATUS,
),
(
self::layer_zero_endpoint::DC_BRIDGE_LAYER_ZERO_ENDPOINT_LEGACY_CRATE,
self::layer_zero_endpoint::DC_BRIDGE_LAYER_ZERO_ENDPOINT_MIGRATION_STATUS,
),
(
self::layer_zero_executor::DC_BRIDGE_LAYER_ZERO_EXECUTOR_LEGACY_CRATE,
self::layer_zero_executor::DC_BRIDGE_LAYER_ZERO_EXECUTOR_MIGRATION_STATUS,
),
];
/// Reserved `kb_decoder_bridge_circle_cctp_token_messenger_minter` decoder.
pub use self::circle_cctp_token_messenger_minter::DcBridgeCircleCctpTokenMessengerMinterDecoder;
/// Reserved `kb_decoder_bridge_circle_cctp_token_messenger_minter_v2` decoder.
pub use self::circle_cctp_token_messenger_minter_v2::DcBridgeCircleCctpTokenMessengerMinterV2Decoder;
/// Reserved `kb_decoder_bridge_layer_zero_endpoint` decoder.
pub use self::layer_zero_endpoint::DcBridgeLayerZeroEndpointDecoder;
/// Reserved `kb_decoder_bridge_layer_zero_executor` decoder.
pub use self::layer_zero_executor::DcBridgeLayerZeroExecutorDecoder;

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/bridge/circle_cctp_token_messenger_minter.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_bridge_circle_cctp_token_messenger_minter`.
//! Reserved protocol decoder for `bridge_circle_cctp_token_messenger_minter`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_BRIDGE_CIRCLE_CCTP_TOKEN_MESSENGER_MINTER_LEGACY_CRATE: &str =
"kb_decoder_bridge_circle_cctp_token_messenger_minter";
/// Reserved decoder for the `bridge_circle_cctp_token_messenger_minter` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcBridgeCircleCctpTokenMessengerMinterDecoder;
/// Current porting status.
pub(crate) const DC_BRIDGE_CIRCLE_CCTP_TOKEN_MESSENGER_MINTER_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcBridgeCircleCctpTokenMessengerMinterDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_bridge_circle_cctp_token_messenger_minter";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::BRIDGE_CIRCLE_CCTP_TOKEN_MESSENGER_MINTER_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/bridge/circle_cctp_token_messenger_minter_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_bridge_circle_cctp_token_messenger_minter_v2`.
//! Reserved protocol decoder for `bridge_circle_cctp_token_messenger_minter_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_BRIDGE_CIRCLE_CCTP_TOKEN_MESSENGER_MINTER_V2_LEGACY_CRATE: &str =
"kb_decoder_bridge_circle_cctp_token_messenger_minter_v2";
/// Reserved decoder for the `bridge_circle_cctp_token_messenger_minter_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcBridgeCircleCctpTokenMessengerMinterV2Decoder;
/// Current porting status.
pub(crate) const DC_BRIDGE_CIRCLE_CCTP_TOKEN_MESSENGER_MINTER_V2_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcBridgeCircleCctpTokenMessengerMinterV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_bridge_circle_cctp_token_messenger_minter_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::BRIDGE_CIRCLE_CCTP_TOKEN_MESSENGER_MINTER_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/bridge/layer_zero_endpoint.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_bridge_layer_zero_endpoint`.
//! Reserved protocol decoder for `bridge_layer_zero_endpoint`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_BRIDGE_LAYER_ZERO_ENDPOINT_LEGACY_CRATE: &str =
"kb_decoder_bridge_layer_zero_endpoint";
/// Reserved decoder for the `bridge_layer_zero_endpoint` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcBridgeLayerZeroEndpointDecoder;
/// Current porting status.
pub(crate) const DC_BRIDGE_LAYER_ZERO_ENDPOINT_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcBridgeLayerZeroEndpointDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_bridge_layer_zero_endpoint";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::BRIDGE_LAYER_ZERO_ENDPOINT_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/bridge/layer_zero_executor.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_bridge_layer_zero_executor`.
//! Reserved protocol decoder for `bridge_layer_zero_executor`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_BRIDGE_LAYER_ZERO_EXECUTOR_LEGACY_CRATE: &str =
"kb_decoder_bridge_layer_zero_executor";
/// Reserved decoder for the `bridge_layer_zero_executor` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcBridgeLayerZeroExecutorDecoder;
/// Current porting status.
pub(crate) const DC_BRIDGE_LAYER_ZERO_EXECUTOR_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcBridgeLayerZeroExecutorDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_bridge_layer_zero_executor";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::BRIDGE_LAYER_ZERO_EXECUTOR_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/clmm.rs
// version: 2
// version: 3
//! `clmm` decoder family.
@@ -10,30 +10,15 @@ mod pancake_swap;
mod raydium;
mod stabble;
/// Pending `clmm` decoder migration boundaries.
pub(crate) const DC_CLMM_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[
(
self::byreal::DC_CLMM_BYREAL_LEGACY_CRATE,
self::byreal::DC_CLMM_BYREAL_MIGRATION_STATUS,
),
(
self::fusion::DC_CLMM_FUSION_LEGACY_CRATE,
self::fusion::DC_CLMM_FUSION_MIGRATION_STATUS,
),
(
self::orca_whirlpool::DC_CLMM_ORCA_WHIRLPOOL_LEGACY_CRATE,
self::orca_whirlpool::DC_CLMM_ORCA_WHIRLPOOL_MIGRATION_STATUS,
),
(
self::pancake_swap::DC_CLMM_PANCAKE_SWAP_LEGACY_CRATE,
self::pancake_swap::DC_CLMM_PANCAKE_SWAP_MIGRATION_STATUS,
),
(
self::raydium::DC_CLMM_RAYDIUM_LEGACY_CRATE,
self::raydium::DC_CLMM_RAYDIUM_MIGRATION_STATUS,
),
(
self::stabble::DC_CLMM_STABBLE_LEGACY_CRATE,
self::stabble::DC_CLMM_STABBLE_MIGRATION_STATUS,
),
];
/// Reserved `kb_decoder_clmm_byreal` decoder.
pub use self::byreal::DcClmmByrealDecoder;
/// Reserved `kb_decoder_clmm_fusion` decoder.
pub use self::fusion::DcClmmFusionDecoder;
/// Reserved `kb_decoder_clmm_orca_whirlpool` decoder.
pub use self::orca_whirlpool::DcClmmOrcaWhirlpoolDecoder;
/// Reserved `kb_decoder_clmm_pancake_swap` decoder.
pub use self::pancake_swap::DcClmmPancakeSwapDecoder;
/// Reserved `kb_decoder_clmm_raydium` decoder.
pub use self::raydium::DcClmmRaydiumDecoder;
/// Reserved `kb_decoder_clmm_stabble` decoder.
pub use self::stabble::DcClmmStabbleDecoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/clmm/byreal.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_clmm_byreal`.
//! Reserved protocol decoder for `clmm_byreal`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_CLMM_BYREAL_LEGACY_CRATE: &str = "kb_decoder_clmm_byreal";
/// Reserved decoder for the `clmm_byreal` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcClmmByrealDecoder;
/// Current porting status.
pub(crate) const DC_CLMM_BYREAL_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcClmmByrealDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_clmm_byreal";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::CLMM_BYREAL_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/clmm/fusion.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_clmm_fusion`.
//! Reserved protocol decoder for `clmm_fusion`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_CLMM_FUSION_LEGACY_CRATE: &str = "kb_decoder_clmm_fusion";
/// Reserved decoder for the `clmm_fusion` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcClmmFusionDecoder;
/// Current porting status.
pub(crate) const DC_CLMM_FUSION_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcClmmFusionDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_clmm_fusion";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::CLMM_FUSION_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/clmm/orca_whirlpool.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_clmm_orca_whirlpool`.
//! Reserved protocol decoder for `clmm_orca_whirlpool`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_CLMM_ORCA_WHIRLPOOL_LEGACY_CRATE: &str = "kb_decoder_clmm_orca_whirlpool";
/// Reserved decoder for the `clmm_orca_whirlpool` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcClmmOrcaWhirlpoolDecoder;
/// Current porting status.
pub(crate) const DC_CLMM_ORCA_WHIRLPOOL_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcClmmOrcaWhirlpoolDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_clmm_orca_whirlpool";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::CLMM_ORCA_WHIRLPOOL_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/clmm/pancake_swap.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_clmm_pancake_swap`.
//! Reserved protocol decoder for `clmm_pancake_swap`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_CLMM_PANCAKE_SWAP_LEGACY_CRATE: &str = "kb_decoder_clmm_pancake_swap";
/// Reserved decoder for the `clmm_pancake_swap` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcClmmPancakeSwapDecoder;
/// Current porting status.
pub(crate) const DC_CLMM_PANCAKE_SWAP_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcClmmPancakeSwapDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_clmm_pancake_swap";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::CLMM_PANCAKE_SWAP_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/clmm/raydium.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_clmm_raydium`.
//! Reserved protocol decoder for `clmm_raydium`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_CLMM_RAYDIUM_LEGACY_CRATE: &str = "kb_decoder_clmm_raydium";
/// Reserved decoder for the `clmm_raydium` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcClmmRaydiumDecoder;
/// Current porting status.
pub(crate) const DC_CLMM_RAYDIUM_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcClmmRaydiumDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_clmm_raydium";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::CLMM_RAYDIUM_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/clmm/stabble.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_clmm_stabble`.
//! Reserved protocol decoder for `clmm_stabble`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_CLMM_STABBLE_LEGACY_CRATE: &str = "kb_decoder_clmm_stabble";
/// Reserved decoder for the `clmm_stabble` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcClmmStabbleDecoder;
/// Current porting status.
pub(crate) const DC_CLMM_STABBLE_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcClmmStabbleDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_clmm_stabble";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::CLMM_STABBLE_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,9 @@
// file: kb-lib/src/decoder/cpmm.rs
// version: 2
// version: 3
//! `cpmm` decoder family.
mod raydium;
/// Pending `cpmm` decoder migration boundaries.
pub(crate) const DC_CPMM_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[(
self::raydium::DC_CPMM_RAYDIUM_LEGACY_CRATE,
self::raydium::DC_CPMM_RAYDIUM_MIGRATION_STATUS,
)];
/// Reserved `kb_decoder_cpmm_raydium` decoder.
pub use self::raydium::DcCpmmRaydiumDecoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/cpmm/raydium.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_cpmm_raydium`.
//! Reserved protocol decoder for `cpmm_raydium`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_CPMM_RAYDIUM_LEGACY_CRATE: &str = "kb_decoder_cpmm_raydium";
/// Reserved decoder for the `cpmm_raydium` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcCpmmRaydiumDecoder;
/// Current porting status.
pub(crate) const DC_CPMM_RAYDIUM_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcCpmmRaydiumDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_cpmm_raydium";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::CPMM_RAYDIUM_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,9 @@
// file: kb-lib/src/decoder/dlmm.rs
// version: 2
// version: 3
//! `dlmm` decoder family.
mod meteora;
/// Pending `dlmm` decoder migration boundaries.
pub(crate) const DC_DLMM_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[(
self::meteora::DC_DLMM_METEORA_LEGACY_CRATE,
self::meteora::DC_DLMM_METEORA_MIGRATION_STATUS,
)];
/// Reserved `kb_decoder_dlmm_meteora` decoder.
pub use self::meteora::DcDlmmMeteoraDecoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/dlmm/meteora.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_dlmm_meteora`.
//! Reserved protocol decoder for `dlmm_meteora`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_DLMM_METEORA_LEGACY_CRATE: &str = "kb_decoder_dlmm_meteora";
/// Reserved decoder for the `dlmm_meteora` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcDlmmMeteoraDecoder;
/// Current porting status.
pub(crate) const DC_DLMM_METEORA_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcDlmmMeteoraDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_dlmm_meteora";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::DLMM_METEORA_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,19 +1,12 @@
// file: kb-lib/src/decoder/fees.rs
// version: 2
// version: 3
//! `fees` decoder family.
mod bags_fee_share_v1;
mod bags_fee_share_v2;
/// Pending `fees` decoder migration boundaries.
pub(crate) const DC_FEES_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[
(
self::bags_fee_share_v1::DC_FEES_BAGS_FEE_SHARE_V1_LEGACY_CRATE,
self::bags_fee_share_v1::DC_FEES_BAGS_FEE_SHARE_V1_MIGRATION_STATUS,
),
(
self::bags_fee_share_v2::DC_FEES_BAGS_FEE_SHARE_V2_LEGACY_CRATE,
self::bags_fee_share_v2::DC_FEES_BAGS_FEE_SHARE_V2_MIGRATION_STATUS,
),
];
/// Reserved `kb_decoder_fees_bags_fee_share_v1` decoder.
pub use self::bags_fee_share_v1::DcFeesBagsFeeShareV1Decoder;
/// Reserved `kb_decoder_fees_bags_fee_share_v2` decoder.
pub use self::bags_fee_share_v2::DcFeesBagsFeeShareV2Decoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/fees/bags_fee_share_v1.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_fees_bags_fee_share_v1`.
//! Reserved protocol decoder for `fees_bags_fee_share_v1`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_FEES_BAGS_FEE_SHARE_V1_LEGACY_CRATE: &str = "kb_decoder_fees_bags_fee_share_v1";
/// Reserved decoder for the `fees_bags_fee_share_v1` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcFeesBagsFeeShareV1Decoder;
/// Current porting status.
pub(crate) const DC_FEES_BAGS_FEE_SHARE_V1_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcFeesBagsFeeShareV1Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_fees_bags_fee_share_v1";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::FEES_BAGS_FEE_SHARE_V1_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/fees/bags_fee_share_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_fees_bags_fee_share_v2`.
//! Reserved protocol decoder for `fees_bags_fee_share_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_FEES_BAGS_FEE_SHARE_V2_LEGACY_CRATE: &str = "kb_decoder_fees_bags_fee_share_v2";
/// Reserved decoder for the `fees_bags_fee_share_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcFeesBagsFeeShareV2Decoder;
/// Current porting status.
pub(crate) const DC_FEES_BAGS_FEE_SHARE_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcFeesBagsFeeShareV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_fees_bags_fee_share_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::FEES_BAGS_FEE_SHARE_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,9 @@
// file: kb-lib/src/decoder/governance.rs
// version: 2
// version: 3
//! `governance` decoder family.
mod metadao_bid_wall;
/// Pending `governance` decoder migration boundaries.
pub(crate) const DC_GOVERNANCE_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[(
self::metadao_bid_wall::DC_GOVERNANCE_METADAO_BID_WALL_LEGACY_CRATE,
self::metadao_bid_wall::DC_GOVERNANCE_METADAO_BID_WALL_MIGRATION_STATUS,
)];
/// Reserved `kb_decoder_governance_metadao_bid_wall` decoder.
pub use self::metadao_bid_wall::DcGovernanceMetadaoBidWallDecoder;

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/governance/metadao_bid_wall.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_governance_metadao_bid_wall`.
//! Reserved protocol decoder for `governance_metadao_bid_wall`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_GOVERNANCE_METADAO_BID_WALL_LEGACY_CRATE: &str =
"kb_decoder_governance_metadao_bid_wall";
/// Reserved decoder for the `governance_metadao_bid_wall` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcGovernanceMetadaoBidWallDecoder;
/// Current porting status.
pub(crate) const DC_GOVERNANCE_METADAO_BID_WALL_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcGovernanceMetadaoBidWallDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_governance_metadao_bid_wall";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::GOVERNANCE_METADAO_BID_WALL_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/launchpad.rs
// version: 2
// version: 3
//! `launchpad` decoder family.
@@ -13,42 +13,21 @@ mod pump_fun;
mod pump_pumpup_ai;
mod raydium_launchlab;
/// Pending `launchpad` decoder migration boundaries.
pub(crate) const DC_LAUNCHPAD_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[
(
self::boop_fun::DC_LAUNCHPAD_BOOP_FUN_LEGACY_CRATE,
self::boop_fun::DC_LAUNCHPAD_BOOP_FUN_MIGRATION_STATUS,
),
(
self::metadao_ico::DC_LAUNCHPAD_METADAO_ICO_LEGACY_CRATE,
self::metadao_ico::DC_LAUNCHPAD_METADAO_ICO_MIGRATION_STATUS,
),
(
self::meteora_dbc::DC_LAUNCHPAD_METEORA_DBC_LEGACY_CRATE,
self::meteora_dbc::DC_LAUNCHPAD_METEORA_DBC_MIGRATION_STATUS,
),
(
self::moonit::DC_LAUNCHPAD_MOONIT_LEGACY_CRATE,
self::moonit::DC_LAUNCHPAD_MOONIT_MIGRATION_STATUS,
),
(
self::orca_wavebreak::DC_LAUNCHPAD_ORCA_WAVEBREAK_LEGACY_CRATE,
self::orca_wavebreak::DC_LAUNCHPAD_ORCA_WAVEBREAK_MIGRATION_STATUS,
),
(
self::printr::DC_LAUNCHPAD_PRINTR_LEGACY_CRATE,
self::printr::DC_LAUNCHPAD_PRINTR_MIGRATION_STATUS,
),
(
self::pump_fun::DC_LAUNCHPAD_PUMP_FUN_LEGACY_CRATE,
self::pump_fun::DC_LAUNCHPAD_PUMP_FUN_MIGRATION_STATUS,
),
(
self::pump_pumpup_ai::DC_LAUNCHPAD_PUMP_PUMPUP_AI_LEGACY_CRATE,
self::pump_pumpup_ai::DC_LAUNCHPAD_PUMP_PUMPUP_AI_MIGRATION_STATUS,
),
(
self::raydium_launchlab::DC_LAUNCHPAD_RAYDIUM_LAUNCHLAB_LEGACY_CRATE,
self::raydium_launchlab::DC_LAUNCHPAD_RAYDIUM_LAUNCHLAB_MIGRATION_STATUS,
),
];
/// Reserved `kb_decoder_launchpad_boop_fun` decoder.
pub use self::boop_fun::DcLaunchpadBoopFunDecoder;
/// Reserved `kb_decoder_launchpad_metadao_ico` decoder.
pub use self::metadao_ico::DcLaunchpadMetadaoIcoDecoder;
/// Reserved `kb_decoder_launchpad_meteora_dbc` decoder.
pub use self::meteora_dbc::DcLaunchpadMeteoraDbcDecoder;
/// Reserved `kb_decoder_launchpad_moonit` decoder.
pub use self::moonit::DcLaunchpadMoonitDecoder;
/// Reserved `kb_decoder_launchpad_orca_wavebreak` decoder.
pub use self::orca_wavebreak::DcLaunchpadOrcaWavebreakDecoder;
/// Reserved `kb_decoder_launchpad_printr` decoder.
pub use self::printr::DcLaunchpadPrintrDecoder;
/// Reserved `kb_decoder_launchpad_pump_fun` decoder.
pub use self::pump_fun::DcLaunchpadPumpFunDecoder;
/// Reserved `kb_decoder_launchpad_pump_pumpup_ai` decoder.
pub use self::pump_pumpup_ai::DcLaunchpadPumpPumpupAiDecoder;
/// Reserved `kb_decoder_launchpad_raydium_launchlab` decoder.
pub use self::raydium_launchlab::DcLaunchpadRaydiumLaunchlabDecoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/launchpad/boop_fun.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_launchpad_boop_fun`.
//! Reserved protocol decoder for `launchpad_boop_fun`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LAUNCHPAD_BOOP_FUN_LEGACY_CRATE: &str = "kb_decoder_launchpad_boop_fun";
/// Reserved decoder for the `launchpad_boop_fun` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLaunchpadBoopFunDecoder;
/// Current porting status.
pub(crate) const DC_LAUNCHPAD_BOOP_FUN_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLaunchpadBoopFunDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_launchpad_boop_fun";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LAUNCHPAD_BOOP_FUN_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/launchpad/metadao_ico.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_launchpad_metadao_ico`.
//! Reserved protocol decoder for `launchpad_metadao_ico`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LAUNCHPAD_METADAO_ICO_LEGACY_CRATE: &str = "kb_decoder_launchpad_metadao_ico";
/// Reserved decoder for the `launchpad_metadao_ico` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLaunchpadMetadaoIcoDecoder;
/// Current porting status.
pub(crate) const DC_LAUNCHPAD_METADAO_ICO_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLaunchpadMetadaoIcoDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_launchpad_metadao_ico";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LAUNCHPAD_METADAO_ICO_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/launchpad/meteora_dbc.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_launchpad_meteora_dbc`.
//! Reserved protocol decoder for `launchpad_meteora_dbc`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LAUNCHPAD_METEORA_DBC_LEGACY_CRATE: &str = "kb_decoder_launchpad_meteora_dbc";
/// Reserved decoder for the `launchpad_meteora_dbc` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLaunchpadMeteoraDbcDecoder;
/// Current porting status.
pub(crate) const DC_LAUNCHPAD_METEORA_DBC_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLaunchpadMeteoraDbcDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_launchpad_meteora_dbc";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LAUNCHPAD_METEORA_DBC_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/launchpad/moonit.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_launchpad_moonit`.
//! Reserved protocol decoder for `launchpad_moonit`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LAUNCHPAD_MOONIT_LEGACY_CRATE: &str = "kb_decoder_launchpad_moonit";
/// Reserved decoder for the `launchpad_moonit` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLaunchpadMoonitDecoder;
/// Current porting status.
pub(crate) const DC_LAUNCHPAD_MOONIT_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLaunchpadMoonitDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_launchpad_moonit";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LAUNCHPAD_MOONIT_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/launchpad/orca_wavebreak.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_launchpad_orca_wavebreak`.
//! Reserved protocol decoder for `launchpad_orca_wavebreak`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LAUNCHPAD_ORCA_WAVEBREAK_LEGACY_CRATE: &str =
"kb_decoder_launchpad_orca_wavebreak";
/// Reserved decoder for the `launchpad_orca_wavebreak` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLaunchpadOrcaWavebreakDecoder;
/// Current porting status.
pub(crate) const DC_LAUNCHPAD_ORCA_WAVEBREAK_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLaunchpadOrcaWavebreakDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_launchpad_orca_wavebreak";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LAUNCHPAD_ORCA_WAVEBREAK_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/launchpad/printr.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_launchpad_printr`.
//! Reserved protocol decoder for `launchpad_printr`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LAUNCHPAD_PRINTR_LEGACY_CRATE: &str = "kb_decoder_launchpad_printr";
/// Reserved decoder for the `launchpad_printr` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLaunchpadPrintrDecoder;
/// Current porting status.
pub(crate) const DC_LAUNCHPAD_PRINTR_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLaunchpadPrintrDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_launchpad_printr";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LAUNCHPAD_PRINTR_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/launchpad/pump_fun.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_launchpad_pump_fun`.
//! Reserved protocol decoder for `launchpad_pump_fun`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LAUNCHPAD_PUMP_FUN_LEGACY_CRATE: &str = "kb_decoder_launchpad_pump_fun";
/// Reserved decoder for the `launchpad_pump_fun` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLaunchpadPumpFunDecoder;
/// Current porting status.
pub(crate) const DC_LAUNCHPAD_PUMP_FUN_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLaunchpadPumpFunDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_launchpad_pump_fun";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LAUNCHPAD_PUMP_FUN_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/launchpad/pump_pumpup_ai.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_launchpad_pump_pumpup_ai`.
//! Reserved protocol decoder for `launchpad_pump_pumpup_ai`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LAUNCHPAD_PUMP_PUMPUP_AI_LEGACY_CRATE: &str =
"kb_decoder_launchpad_pump_pumpup_ai";
/// Reserved decoder for the `launchpad_pump_pumpup_ai` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLaunchpadPumpPumpupAiDecoder;
/// Current porting status.
pub(crate) const DC_LAUNCHPAD_PUMP_PUMPUP_AI_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLaunchpadPumpPumpupAiDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_launchpad_pump_pumpup_ai";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LAUNCHPAD_PUMP_PUMPUP_AI_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/launchpad/raydium_launchlab.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_launchpad_raydium_launchlab`.
//! Reserved protocol decoder for `launchpad_raydium_launchlab`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LAUNCHPAD_RAYDIUM_LAUNCHLAB_LEGACY_CRATE: &str =
"kb_decoder_launchpad_raydium_launchlab";
/// Reserved decoder for the `launchpad_raydium_launchlab` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLaunchpadRaydiumLaunchlabDecoder;
/// Current porting status.
pub(crate) const DC_LAUNCHPAD_RAYDIUM_LAUNCHLAB_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLaunchpadRaydiumLaunchlabDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_launchpad_raydium_launchlab";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LAUNCHPAD_RAYDIUM_LAUNCHLAB_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/lending.rs
// version: 2
// version: 3
//! `lending` decoder family.
@@ -11,34 +11,17 @@ mod jupiter_lend_liquidity;
mod kamino;
mod marginfi_v2;
/// Pending `lending` decoder migration boundaries.
pub(crate) const DC_LENDING_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[
(
self::clone::DC_LENDING_CLONE_LEGACY_CRATE,
self::clone::DC_LENDING_CLONE_MIGRATION_STATUS,
),
(
self::jupiter_lend_borrow::DC_LENDING_JUPITER_LEND_BORROW_LEGACY_CRATE,
self::jupiter_lend_borrow::DC_LENDING_JUPITER_LEND_BORROW_MIGRATION_STATUS,
),
(
self::jupiter_lend_earn::DC_LENDING_JUPITER_LEND_EARN_LEGACY_CRATE,
self::jupiter_lend_earn::DC_LENDING_JUPITER_LEND_EARN_MIGRATION_STATUS,
),
(
self::jupiter_lend_flash_loan::DC_LENDING_JUPITER_LEND_FLASH_LOAN_LEGACY_CRATE,
self::jupiter_lend_flash_loan::DC_LENDING_JUPITER_LEND_FLASH_LOAN_MIGRATION_STATUS,
),
(
self::jupiter_lend_liquidity::DC_LENDING_JUPITER_LEND_LIQUIDITY_LEGACY_CRATE,
self::jupiter_lend_liquidity::DC_LENDING_JUPITER_LEND_LIQUIDITY_MIGRATION_STATUS,
),
(
self::kamino::DC_LENDING_KAMINO_LEGACY_CRATE,
self::kamino::DC_LENDING_KAMINO_MIGRATION_STATUS,
),
(
self::marginfi_v2::DC_LENDING_MARGINFI_V2_LEGACY_CRATE,
self::marginfi_v2::DC_LENDING_MARGINFI_V2_MIGRATION_STATUS,
),
];
/// Reserved `kb_decoder_lending_clone` decoder.
pub use self::clone::DcLendingCloneDecoder;
/// Reserved `kb_decoder_lending_jupiter_lend_borrow` decoder.
pub use self::jupiter_lend_borrow::DcLendingJupiterLendBorrowDecoder;
/// Reserved `kb_decoder_lending_jupiter_lend_earn` decoder.
pub use self::jupiter_lend_earn::DcLendingJupiterLendEarnDecoder;
/// Reserved `kb_decoder_lending_jupiter_lend_flash_loan` decoder.
pub use self::jupiter_lend_flash_loan::DcLendingJupiterLendFlashLoanDecoder;
/// Reserved `kb_decoder_lending_jupiter_lend_liquidity` decoder.
pub use self::jupiter_lend_liquidity::DcLendingJupiterLendLiquidityDecoder;
/// Reserved `kb_decoder_lending_kamino` decoder.
pub use self::kamino::DcLendingKaminoDecoder;
/// Reserved `kb_decoder_lending_marginfi_v2` decoder.
pub use self::marginfi_v2::DcLendingMarginfiV2Decoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/lending/clone.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_lending_clone`.
//! Reserved protocol decoder for `lending_clone`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LENDING_CLONE_LEGACY_CRATE: &str = "kb_decoder_lending_clone";
/// Reserved decoder for the `lending_clone` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLendingCloneDecoder;
/// Current porting status.
pub(crate) const DC_LENDING_CLONE_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLendingCloneDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_lending_clone";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LENDING_CLONE_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/lending/jupiter_lend_borrow.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_lending_jupiter_lend_borrow`.
//! Reserved protocol decoder for `lending_jupiter_lend_borrow`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LENDING_JUPITER_LEND_BORROW_LEGACY_CRATE: &str =
"kb_decoder_lending_jupiter_lend_borrow";
/// Reserved decoder for the `lending_jupiter_lend_borrow` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLendingJupiterLendBorrowDecoder;
/// Current porting status.
pub(crate) const DC_LENDING_JUPITER_LEND_BORROW_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLendingJupiterLendBorrowDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_lending_jupiter_lend_borrow";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LENDING_JUPITER_LEND_BORROW_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/lending/jupiter_lend_earn.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_lending_jupiter_lend_earn`.
//! Reserved protocol decoder for `lending_jupiter_lend_earn`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LENDING_JUPITER_LEND_EARN_LEGACY_CRATE: &str =
"kb_decoder_lending_jupiter_lend_earn";
/// Reserved decoder for the `lending_jupiter_lend_earn` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLendingJupiterLendEarnDecoder;
/// Current porting status.
pub(crate) const DC_LENDING_JUPITER_LEND_EARN_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLendingJupiterLendEarnDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_lending_jupiter_lend_earn";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LENDING_JUPITER_LEND_EARN_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/lending/jupiter_lend_flash_loan.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_lending_jupiter_lend_flash_loan`.
//! Reserved protocol decoder for `lending_jupiter_lend_flash_loan`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LENDING_JUPITER_LEND_FLASH_LOAN_LEGACY_CRATE: &str =
"kb_decoder_lending_jupiter_lend_flash_loan";
/// Reserved decoder for the `lending_jupiter_lend_flash_loan` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLendingJupiterLendFlashLoanDecoder;
/// Current porting status.
pub(crate) const DC_LENDING_JUPITER_LEND_FLASH_LOAN_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLendingJupiterLendFlashLoanDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_lending_jupiter_lend_flash_loan";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LENDING_JUPITER_LEND_FLASH_LOAN_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/lending/jupiter_lend_liquidity.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_lending_jupiter_lend_liquidity`.
//! Reserved protocol decoder for `lending_jupiter_lend_liquidity`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LENDING_JUPITER_LEND_LIQUIDITY_LEGACY_CRATE: &str =
"kb_decoder_lending_jupiter_lend_liquidity";
/// Reserved decoder for the `lending_jupiter_lend_liquidity` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLendingJupiterLendLiquidityDecoder;
/// Current porting status.
pub(crate) const DC_LENDING_JUPITER_LEND_LIQUIDITY_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLendingJupiterLendLiquidityDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_lending_jupiter_lend_liquidity";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LENDING_JUPITER_LEND_LIQUIDITY_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/lending/kamino.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_lending_kamino`.
//! Reserved protocol decoder for `lending_kamino`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LENDING_KAMINO_LEGACY_CRATE: &str = "kb_decoder_lending_kamino";
/// Reserved decoder for the `lending_kamino` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLendingKaminoDecoder;
/// Current porting status.
pub(crate) const DC_LENDING_KAMINO_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLendingKaminoDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_lending_kamino";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LENDING_KAMINO_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/lending/marginfi_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_lending_marginfi_v2`.
//! Reserved protocol decoder for `lending_marginfi_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LENDING_MARGINFI_V2_LEGACY_CRATE: &str = "kb_decoder_lending_marginfi_v2";
/// Reserved decoder for the `lending_marginfi_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLendingMarginfiV2Decoder;
/// Current porting status.
pub(crate) const DC_LENDING_MARGINFI_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLendingMarginfiV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_lending_marginfi_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LENDING_MARGINFI_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,9 @@
// file: kb-lib/src/decoder/lock.rs
// version: 2
// version: 3
//! `lock` decoder family.
mod raydium_lp;
/// Pending `lock` decoder migration boundaries.
pub(crate) const DC_LOCK_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[(
self::raydium_lp::DC_LOCK_RAYDIUM_LP_LEGACY_CRATE,
self::raydium_lp::DC_LOCK_RAYDIUM_LP_MIGRATION_STATUS,
)];
/// Reserved `kb_decoder_lock_raydium_lp` decoder.
pub use self::raydium_lp::DcLockRaydiumLpDecoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/lock/raydium_lp.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_lock_raydium_lp`.
//! Reserved protocol decoder for `lock_raydium_lp`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_LOCK_RAYDIUM_LP_LEGACY_CRATE: &str = "kb_decoder_lock_raydium_lp";
/// Reserved decoder for the `lock_raydium_lp` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcLockRaydiumLpDecoder;
/// Current porting status.
pub(crate) const DC_LOCK_RAYDIUM_LP_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcLockRaydiumLpDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_lock_raydium_lp";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LOCK_RAYDIUM_LP_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,16 +1,83 @@
// file: kb-lib/src/decoder/metadata.rs
// version: 3
// version: 4
//! `metadata` decoder family.
mod metaplex_token_metadata;
mod spl_name_service;
/// Pending `metadata` decoder migration boundaries.
pub(crate) const DC_METADATA_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[(
self::spl_name_service::DC_METADATA_SPL_NAME_SERVICE_LEGACY_CRATE,
self::spl_name_service::DC_METADATA_SPL_NAME_SERVICE_MIGRATION_STATUS,
)];
/// Exhaustive published Metaplex account-key inventory.
pub use self::metaplex_token_metadata::DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT;
/// Exact decoder for the Metaplex Token Metadata program.
pub use self::metaplex_token_metadata::DcMetadataMetaplexTokenMetadataDecoder;
/// Canonical projection shared by Collection and Use Authority records.
pub use self::metaplex_token_metadata::DcMetadataMtmAuthorityRecordAccountSnapshot;
/// Stable identity and policy of one canonical account snapshot.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalAccountIdentity;
/// Lifecycle class of one canonical account layout.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalAccountLifecycle;
/// Provenance retained for one canonical account observation.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalAccountProvenance;
/// Execution policy separated from historical materialization.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalExecutionPolicy;
/// Materialization policy for active or historical state.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalMaterializationPolicy;
/// Canonical account envelope used by materializers and replay.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalMetadataAccountSnapshot;
/// Typed canonical Metaplex account state.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalMetadataAccountState;
/// Origin of one canonical account observation.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalObservationSource;
/// Canonical projection shared by Metadata and Holder delegate records.
pub use self::metaplex_token_metadata::DcMetadataMtmDelegateRecordAccountSnapshot;
/// Supported edition account layout.
pub use self::metaplex_token_metadata::DcMetadataMtmEditionAccountKind;
/// Canonical bounded projection of one edition or master-edition account.
pub use self::metaplex_token_metadata::DcMetadataMtmEditionAccountSnapshot;
/// Supported Edition Marker account layout.
pub use self::metaplex_token_metadata::DcMetadataMtmEditionMarkerAccountKind;
/// Canonical bounded projection of one Edition Marker account.
pub use self::metaplex_token_metadata::DcMetadataMtmEditionMarkerAccountSnapshot;
/// Bounded error returned while decoding a Metadata account.
pub use self::metaplex_token_metadata::DcMetadataMtmMetadataAccountDecodeError;
/// One entry in the exhaustive published account-key audit.
pub use self::metaplex_token_metadata::DcMetadataMtmMetadataAccountLayoutAuditEntry;
/// Canonical bounded projection of one Metadata account.
pub use self::metaplex_token_metadata::DcMetadataMtmMetadataAccountSnapshot;
/// One bounded historical reservation entry.
pub use self::metaplex_token_metadata::DcMetadataMtmReservationEntrySnapshot;
/// Historical Reservation List account generation.
pub use self::metaplex_token_metadata::DcMetadataMtmReservationListAccountKind;
/// Canonical decode-only projection of a historical Reservation List account.
pub use self::metaplex_token_metadata::DcMetadataMtmReservationListAccountSnapshot;
/// Canonical projection of one Token Owned Escrow account.
pub use self::metaplex_token_metadata::DcMetadataMtmTokenOwnedEscrowAccountSnapshot;
/// Authority form used by one Token Owned Escrow account.
pub use self::metaplex_token_metadata::DcMetadataMtmTokenOwnedEscrowAuthorityKind;
/// Canonical bounded projection of one programmable Token Record account.
pub use self::metaplex_token_metadata::DcMetadataMtmTokenRecordAccountSnapshot;
/// Decodes one Collection Authority Record account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_collection_authority_record_account;
/// Decodes and validates one edition or master-edition account snapshot.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_edition_account;
/// Decodes and validates one Edition Marker account snapshot.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_edition_marker_account;
/// Decodes one Holder Delegate Record account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_holder_delegate_record_account;
/// Decodes and validates one canonical Metadata account snapshot.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_account;
/// Decodes one Metadata Delegate Record account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_delegate_record_account;
/// Decodes one historical Reservation List V1 or V2 account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_reservation_list_account;
/// Decodes one Token Owned Escrow account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_token_owned_escrow_account;
/// Decodes and validates one programmable Token Record account snapshot.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_token_record_account;
/// Decodes one Use Authority Record account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_use_authority_record_account;
/// Reserved `kb_decoder_metadata_spl_name_service` decoder.
pub use self::spl_name_service::DcMetadataSplNameServiceDecoder;
/// Approve Collection Authority discriminator.
pub(crate) use self::metaplex_token_metadata::DC_METADATA_MTM_APPROVE_COLLECTION_AUTHORITY_DISCRIMINATOR;
@@ -150,74 +217,3 @@ pub(crate) use self::metaplex_token_metadata::decoder_metadata_metaplex_token_me
pub(crate) use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_entry_for_discriminator;
/// Crate-root access to `payload_discriminator` from `instruction`.
pub(crate) use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_payload_discriminator;
/// Exhaustive published Metaplex account-key inventory.
pub use self::metaplex_token_metadata::DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT;
/// Exact decoder for the Metaplex Token Metadata program.
pub use self::metaplex_token_metadata::DcMetadataMetaplexTokenMetadataDecoder;
/// Canonical projection shared by Collection and Use Authority records.
pub use self::metaplex_token_metadata::DcMetadataMtmAuthorityRecordAccountSnapshot;
/// Stable identity and policy of one canonical account snapshot.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalAccountIdentity;
/// Lifecycle class of one canonical account layout.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalAccountLifecycle;
/// Provenance retained for one canonical account observation.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalAccountProvenance;
/// Execution policy separated from historical materialization.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalExecutionPolicy;
/// Materialization policy for active or historical state.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalMaterializationPolicy;
/// Canonical account envelope used by materializers and replay.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalMetadataAccountSnapshot;
/// Typed canonical Metaplex account state.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalMetadataAccountState;
/// Origin of one canonical account observation.
pub use self::metaplex_token_metadata::DcMetadataMtmCanonicalObservationSource;
/// Canonical projection shared by Metadata and Holder delegate records.
pub use self::metaplex_token_metadata::DcMetadataMtmDelegateRecordAccountSnapshot;
/// Supported edition account layout.
pub use self::metaplex_token_metadata::DcMetadataMtmEditionAccountKind;
/// Canonical bounded projection of one edition or master-edition account.
pub use self::metaplex_token_metadata::DcMetadataMtmEditionAccountSnapshot;
/// Supported Edition Marker account layout.
pub use self::metaplex_token_metadata::DcMetadataMtmEditionMarkerAccountKind;
/// Canonical bounded projection of one Edition Marker account.
pub use self::metaplex_token_metadata::DcMetadataMtmEditionMarkerAccountSnapshot;
/// Bounded error returned while decoding a Metadata account.
pub use self::metaplex_token_metadata::DcMetadataMtmMetadataAccountDecodeError;
/// One entry in the exhaustive published account-key audit.
pub use self::metaplex_token_metadata::DcMetadataMtmMetadataAccountLayoutAuditEntry;
/// Canonical bounded projection of one Metadata account.
pub use self::metaplex_token_metadata::DcMetadataMtmMetadataAccountSnapshot;
/// One bounded historical reservation entry.
pub use self::metaplex_token_metadata::DcMetadataMtmReservationEntrySnapshot;
/// Historical Reservation List account generation.
pub use self::metaplex_token_metadata::DcMetadataMtmReservationListAccountKind;
/// Canonical decode-only projection of a historical Reservation List account.
pub use self::metaplex_token_metadata::DcMetadataMtmReservationListAccountSnapshot;
/// Canonical projection of one Token Owned Escrow account.
pub use self::metaplex_token_metadata::DcMetadataMtmTokenOwnedEscrowAccountSnapshot;
/// Authority form used by one Token Owned Escrow account.
pub use self::metaplex_token_metadata::DcMetadataMtmTokenOwnedEscrowAuthorityKind;
/// Canonical bounded projection of one programmable Token Record account.
pub use self::metaplex_token_metadata::DcMetadataMtmTokenRecordAccountSnapshot;
/// Decodes one Collection Authority Record account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_collection_authority_record_account;
/// Decodes and validates one edition or master-edition account snapshot.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_edition_account;
/// Decodes and validates one Edition Marker account snapshot.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_edition_marker_account;
/// Decodes one Holder Delegate Record account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_holder_delegate_record_account;
/// Decodes and validates one canonical Metadata account snapshot.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_account;
/// Decodes one Metadata Delegate Record account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_delegate_record_account;
/// Decodes one historical Reservation List V1 or V2 account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_reservation_list_account;
/// Decodes one Token Owned Escrow account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_token_owned_escrow_account;
/// Decodes and validates one programmable Token Record account snapshot.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_token_record_account;
/// Decodes one Use Authority Record account.
pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_use_authority_record_account;

View File

@@ -9,6 +9,77 @@ mod constants;
mod decoder;
mod instruction;
/// Exhaustive published Metaplex account-key inventory.
pub use self::account::DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT;
/// Canonical projection shared by Collection and Use Authority records.
pub use self::account::DcMetadataMtmAuthorityRecordAccountSnapshot;
/// Canonical projection shared by Metadata and Holder delegate records.
pub use self::account::DcMetadataMtmDelegateRecordAccountSnapshot;
/// Supported edition account layout.
pub use self::account::DcMetadataMtmEditionAccountKind;
/// Canonical bounded projection of one edition or master-edition account.
pub use self::account::DcMetadataMtmEditionAccountSnapshot;
/// Supported Edition Marker account layout.
pub use self::account::DcMetadataMtmEditionMarkerAccountKind;
/// Canonical bounded projection of one Edition Marker account.
pub use self::account::DcMetadataMtmEditionMarkerAccountSnapshot;
/// Bounded error returned while decoding a Metadata account.
pub use self::account::DcMetadataMtmMetadataAccountDecodeError;
/// One entry in the exhaustive published account-key audit.
pub use self::account::DcMetadataMtmMetadataAccountLayoutAuditEntry;
/// Canonical bounded projection of one Metadata account.
pub use self::account::DcMetadataMtmMetadataAccountSnapshot;
/// One bounded historical reservation entry.
pub use self::account::DcMetadataMtmReservationEntrySnapshot;
/// Historical Reservation List account generation.
pub use self::account::DcMetadataMtmReservationListAccountKind;
/// Canonical decode-only projection of a historical Reservation List account.
pub use self::account::DcMetadataMtmReservationListAccountSnapshot;
/// Canonical projection of one Token Owned Escrow account.
pub use self::account::DcMetadataMtmTokenOwnedEscrowAccountSnapshot;
/// Authority form used by one Token Owned Escrow account.
pub use self::account::DcMetadataMtmTokenOwnedEscrowAuthorityKind;
/// Canonical bounded projection of one programmable Token Record account.
pub use self::account::DcMetadataMtmTokenRecordAccountSnapshot;
/// Decodes one Collection Authority Record account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_collection_authority_record_account;
/// Decodes and validates one edition or master-edition account snapshot.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_edition_account;
/// Decodes and validates one Edition Marker account snapshot.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_edition_marker_account;
/// Decodes one Holder Delegate Record account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_holder_delegate_record_account;
/// Decodes and validates one canonical Metadata account snapshot.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_metadata_account;
/// Decodes one Metadata Delegate Record account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_metadata_delegate_record_account;
/// Decodes one historical Reservation List V1 or V2 account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_reservation_list_account;
/// Decodes one Token Owned Escrow account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_token_owned_escrow_account;
/// Decodes and validates one programmable Token Record account snapshot.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_token_record_account;
/// Decodes one Use Authority Record account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_use_authority_record_account;
/// Stable identity and policy of one canonical account snapshot.
pub use self::canonical::DcMetadataMtmCanonicalAccountIdentity;
/// Lifecycle class of one canonical account layout.
pub use self::canonical::DcMetadataMtmCanonicalAccountLifecycle;
/// Provenance retained for one canonical account observation.
pub use self::canonical::DcMetadataMtmCanonicalAccountProvenance;
/// Execution policy separated from historical materialization.
pub use self::canonical::DcMetadataMtmCanonicalExecutionPolicy;
/// Materialization policy for active or historical state.
pub use self::canonical::DcMetadataMtmCanonicalMaterializationPolicy;
/// Canonical account envelope used by materializers and replay.
pub use self::canonical::DcMetadataMtmCanonicalMetadataAccountSnapshot;
/// Typed canonical Metaplex account state.
pub use self::canonical::DcMetadataMtmCanonicalMetadataAccountState;
/// Origin of one canonical account observation.
pub use self::canonical::DcMetadataMtmCanonicalObservationSource;
/// Exact Metaplex Token Metadata decoder.
pub use self::decoder::DcMetadataMetaplexTokenMetadataDecoder;
/// Approve Collection Authority discriminator.
pub(crate) use self::constants::DC_METADATA_MTM_APPROVE_COLLECTION_AUTHORITY_DISCRIMINATOR;
/// Approve Use Authority discriminator.
@@ -147,74 +218,3 @@ pub(crate) use self::instruction::decoder_metadata_metaplex_token_metadata_decod
pub(crate) use self::instruction::decoder_metadata_metaplex_token_metadata_entry_for_discriminator;
/// Crate-root access to `payload_discriminator` from `instruction`.
pub(crate) use self::instruction::decoder_metadata_metaplex_token_metadata_payload_discriminator;
/// Exhaustive published Metaplex account-key inventory.
pub use self::account::DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT;
/// Canonical projection shared by Collection and Use Authority records.
pub use self::account::DcMetadataMtmAuthorityRecordAccountSnapshot;
/// Canonical projection shared by Metadata and Holder delegate records.
pub use self::account::DcMetadataMtmDelegateRecordAccountSnapshot;
/// Supported edition account layout.
pub use self::account::DcMetadataMtmEditionAccountKind;
/// Canonical bounded projection of one edition or master-edition account.
pub use self::account::DcMetadataMtmEditionAccountSnapshot;
/// Supported Edition Marker account layout.
pub use self::account::DcMetadataMtmEditionMarkerAccountKind;
/// Canonical bounded projection of one Edition Marker account.
pub use self::account::DcMetadataMtmEditionMarkerAccountSnapshot;
/// Bounded error returned while decoding a Metadata account.
pub use self::account::DcMetadataMtmMetadataAccountDecodeError;
/// One entry in the exhaustive published account-key audit.
pub use self::account::DcMetadataMtmMetadataAccountLayoutAuditEntry;
/// Canonical bounded projection of one Metadata account.
pub use self::account::DcMetadataMtmMetadataAccountSnapshot;
/// One bounded historical reservation entry.
pub use self::account::DcMetadataMtmReservationEntrySnapshot;
/// Historical Reservation List account generation.
pub use self::account::DcMetadataMtmReservationListAccountKind;
/// Canonical decode-only projection of a historical Reservation List account.
pub use self::account::DcMetadataMtmReservationListAccountSnapshot;
/// Canonical projection of one Token Owned Escrow account.
pub use self::account::DcMetadataMtmTokenOwnedEscrowAccountSnapshot;
/// Authority form used by one Token Owned Escrow account.
pub use self::account::DcMetadataMtmTokenOwnedEscrowAuthorityKind;
/// Canonical bounded projection of one programmable Token Record account.
pub use self::account::DcMetadataMtmTokenRecordAccountSnapshot;
/// Decodes one Collection Authority Record account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_collection_authority_record_account;
/// Decodes and validates one edition or master-edition account snapshot.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_edition_account;
/// Decodes and validates one Edition Marker account snapshot.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_edition_marker_account;
/// Decodes one Holder Delegate Record account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_holder_delegate_record_account;
/// Decodes and validates one canonical Metadata account snapshot.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_metadata_account;
/// Decodes one Metadata Delegate Record account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_metadata_delegate_record_account;
/// Decodes one historical Reservation List V1 or V2 account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_reservation_list_account;
/// Decodes one Token Owned Escrow account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_token_owned_escrow_account;
/// Decodes and validates one programmable Token Record account snapshot.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_token_record_account;
/// Decodes one Use Authority Record account.
pub use self::account::decoder_metadata_metaplex_token_metadata_decode_use_authority_record_account;
/// Stable identity and policy of one canonical account snapshot.
pub use self::canonical::DcMetadataMtmCanonicalAccountIdentity;
/// Lifecycle class of one canonical account layout.
pub use self::canonical::DcMetadataMtmCanonicalAccountLifecycle;
/// Provenance retained for one canonical account observation.
pub use self::canonical::DcMetadataMtmCanonicalAccountProvenance;
/// Execution policy separated from historical materialization.
pub use self::canonical::DcMetadataMtmCanonicalExecutionPolicy;
/// Materialization policy for active or historical state.
pub use self::canonical::DcMetadataMtmCanonicalMaterializationPolicy;
/// Canonical account envelope used by materializers and replay.
pub use self::canonical::DcMetadataMtmCanonicalMetadataAccountSnapshot;
/// Typed canonical Metaplex account state.
pub use self::canonical::DcMetadataMtmCanonicalMetadataAccountState;
/// Origin of one canonical account observation.
pub use self::canonical::DcMetadataMtmCanonicalObservationSource;
/// Exact Metaplex Token Metadata decoder.
pub use self::decoder::DcMetadataMetaplexTokenMetadataDecoder;

View File

@@ -3,6 +3,101 @@
//! Bounded decoding and PDA validation for Metaplex Token Metadata accounts.
/// Exhaustive inventory of every published Metaplex Token Metadata `Key` variant.
pub const DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT:
&[DcMetadataMtmMetadataAccountLayoutAuditEntry] = &[
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "Uninitialized",
discriminant: 0,
decoder: "reject_uninitialized",
lifecycle: "sentinel",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "EditionV1",
discriminant: 1,
decoder: "decode_edition_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "MasterEditionV1",
discriminant: 2,
decoder: "decode_edition_account",
lifecycle: "historical_materializable",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "ReservationListV1",
discriminant: 3,
decoder: "decode_reservation_list_account",
lifecycle: "historical_materializable",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "MetadataV1",
discriminant: 4,
decoder: "decode_metadata_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "ReservationListV2",
discriminant: 5,
decoder: "decode_reservation_list_account",
lifecycle: "historical_materializable",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "MasterEditionV2",
discriminant: 6,
decoder: "decode_edition_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "EditionMarker",
discriminant: 7,
decoder: "decode_edition_marker_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "UseAuthorityRecord",
discriminant: 8,
decoder: "decode_use_authority_record_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "CollectionAuthorityRecord",
discriminant: 9,
decoder: "decode_collection_authority_record_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "TokenOwnedEscrow",
discriminant: 10,
decoder: "decode_token_owned_escrow_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "TokenRecord",
discriminant: 11,
decoder: "decode_token_record_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "MetadataDelegate",
discriminant: 12,
decoder: "decode_metadata_delegate_record_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "EditionMarkerV2",
discriminant: 13,
decoder: "decode_edition_marker_account",
lifecycle: "active_experimental",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "HolderDelegate",
discriminant: 14,
decoder: "decode_holder_delegate_record_account",
lifecycle: "active",
},
];
const MAX_METADATA_ACCOUNT_BYTES: usize = 1_024;
const MAX_NAME_BYTES: usize = 32;
const MAX_SYMBOL_BYTES: usize = 10;
@@ -105,101 +200,6 @@ pub struct DcMetadataMtmMetadataAccountLayoutAuditEntry {
pub lifecycle: &'static str,
}
/// Exhaustive inventory of every published Metaplex Token Metadata `Key` variant.
pub const DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT:
&[DcMetadataMtmMetadataAccountLayoutAuditEntry] = &[
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "Uninitialized",
discriminant: 0,
decoder: "reject_uninitialized",
lifecycle: "sentinel",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "EditionV1",
discriminant: 1,
decoder: "decode_edition_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "MasterEditionV1",
discriminant: 2,
decoder: "decode_edition_account",
lifecycle: "historical_materializable",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "ReservationListV1",
discriminant: 3,
decoder: "decode_reservation_list_account",
lifecycle: "historical_materializable",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "MetadataV1",
discriminant: 4,
decoder: "decode_metadata_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "ReservationListV2",
discriminant: 5,
decoder: "decode_reservation_list_account",
lifecycle: "historical_materializable",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "MasterEditionV2",
discriminant: 6,
decoder: "decode_edition_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "EditionMarker",
discriminant: 7,
decoder: "decode_edition_marker_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "UseAuthorityRecord",
discriminant: 8,
decoder: "decode_use_authority_record_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "CollectionAuthorityRecord",
discriminant: 9,
decoder: "decode_collection_authority_record_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "TokenOwnedEscrow",
discriminant: 10,
decoder: "decode_token_owned_escrow_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "TokenRecord",
discriminant: 11,
decoder: "decode_token_record_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "MetadataDelegate",
discriminant: 12,
decoder: "decode_metadata_delegate_record_account",
lifecycle: "active",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "EditionMarkerV2",
discriminant: 13,
decoder: "decode_edition_marker_account",
lifecycle: "active_experimental",
},
DcMetadataMtmMetadataAccountLayoutAuditEntry {
key_name: "HolderDelegate",
discriminant: 14,
decoder: "decode_holder_delegate_record_account",
lifecycle: "active",
},
];
/// Canonical bounded projection of one Metadata account.
#[derive(Clone, Debug, PartialEq)]
pub struct DcMetadataMtmMetadataAccountSnapshot {

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/metadata/spl_name_service.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_metadata_spl_name_service`.
//! Reserved protocol decoder for `metadata_spl_name_service`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_METADATA_SPL_NAME_SERVICE_LEGACY_CRATE: &str =
"kb_decoder_metadata_spl_name_service";
/// Reserved decoder for the `metadata_spl_name_service` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcMetadataSplNameServiceDecoder;
/// Current porting status.
pub(crate) const DC_METADATA_SPL_NAME_SERVICE_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcMetadataSplNameServiceDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_metadata_spl_name_service";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::METADATA_SPL_NAME_SERVICE_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,9 @@
// file: kb-lib/src/decoder/nft.rs
// version: 2
// version: 3
//! `nft` decoder family.
mod metaplex_bubblegum;
/// Pending `nft` decoder migration boundaries.
pub(crate) const DC_NFT_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[(
self::metaplex_bubblegum::DC_NFT_METAPLEX_BUBBLEGUM_LEGACY_CRATE,
self::metaplex_bubblegum::DC_NFT_METAPLEX_BUBBLEGUM_MIGRATION_STATUS,
)];
/// Reserved `kb_decoder_nft_metaplex_bubblegum` decoder.
pub use self::metaplex_bubblegum::DcNftMetaplexBubblegumDecoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/nft/metaplex_bubblegum.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_nft_metaplex_bubblegum`.
//! Reserved protocol decoder for `nft_metaplex_bubblegum`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_NFT_METAPLEX_BUBBLEGUM_LEGACY_CRATE: &str = "kb_decoder_nft_metaplex_bubblegum";
/// Reserved decoder for the `nft_metaplex_bubblegum` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcNftMetaplexBubblegumDecoder;
/// Current porting status.
pub(crate) const DC_NFT_METAPLEX_BUBBLEGUM_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcNftMetaplexBubblegumDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_nft_metaplex_bubblegum";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::NFT_METAPLEX_BUBBLEGUM_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/orderbook.rs
// version: 2
// version: 3
//! `orderbook` decoder family.
@@ -7,18 +7,9 @@ mod jupiter_limit_order;
mod jupiter_limit_order_v2;
mod openbook_v2;
/// Pending `orderbook` decoder migration boundaries.
pub(crate) const DC_ORDERBOOK_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[
(
self::jupiter_limit_order::DC_ORDERBOOK_JUPITER_LIMIT_ORDER_LEGACY_CRATE,
self::jupiter_limit_order::DC_ORDERBOOK_JUPITER_LIMIT_ORDER_MIGRATION_STATUS,
),
(
self::jupiter_limit_order_v2::DC_ORDERBOOK_JUPITER_LIMIT_ORDER_V2_LEGACY_CRATE,
self::jupiter_limit_order_v2::DC_ORDERBOOK_JUPITER_LIMIT_ORDER_V2_MIGRATION_STATUS,
),
(
self::openbook_v2::DC_ORDERBOOK_OPENBOOK_V2_LEGACY_CRATE,
self::openbook_v2::DC_ORDERBOOK_OPENBOOK_V2_MIGRATION_STATUS,
),
];
/// Reserved `kb_decoder_orderbook_jupiter_limit_order` decoder.
pub use self::jupiter_limit_order::DcOrderbookJupiterLimitOrderDecoder;
/// Reserved `kb_decoder_orderbook_jupiter_limit_order_v2` decoder.
pub use self::jupiter_limit_order_v2::DcOrderbookJupiterLimitOrderV2Decoder;
/// Reserved `kb_decoder_orderbook_openbook_v2` decoder.
pub use self::openbook_v2::DcOrderbookOpenbookV2Decoder;

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/orderbook/jupiter_limit_order.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_orderbook_jupiter_limit_order`.
//! Reserved protocol decoder for `orderbook_jupiter_limit_order`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ORDERBOOK_JUPITER_LIMIT_ORDER_LEGACY_CRATE: &str =
"kb_decoder_orderbook_jupiter_limit_order";
/// Reserved decoder for the `orderbook_jupiter_limit_order` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcOrderbookJupiterLimitOrderDecoder;
/// Current porting status.
pub(crate) const DC_ORDERBOOK_JUPITER_LIMIT_ORDER_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcOrderbookJupiterLimitOrderDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_orderbook_jupiter_limit_order";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ORDERBOOK_JUPITER_LIMIT_ORDER_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/orderbook/jupiter_limit_order_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_orderbook_jupiter_limit_order_v2`.
//! Reserved protocol decoder for `orderbook_jupiter_limit_order_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ORDERBOOK_JUPITER_LIMIT_ORDER_V2_LEGACY_CRATE: &str =
"kb_decoder_orderbook_jupiter_limit_order_v2";
/// Reserved decoder for the `orderbook_jupiter_limit_order_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcOrderbookJupiterLimitOrderV2Decoder;
/// Current porting status.
pub(crate) const DC_ORDERBOOK_JUPITER_LIMIT_ORDER_V2_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcOrderbookJupiterLimitOrderV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_orderbook_jupiter_limit_order_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ORDERBOOK_JUPITER_LIMIT_ORDER_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/orderbook/openbook_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_orderbook_openbook_v2`.
//! Reserved protocol decoder for `orderbook_openbook_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ORDERBOOK_OPENBOOK_V2_LEGACY_CRATE: &str = "kb_decoder_orderbook_openbook_v2";
/// Reserved decoder for the `orderbook_openbook_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcOrderbookOpenbookV2Decoder;
/// Current porting status.
pub(crate) const DC_ORDERBOOK_OPENBOOK_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcOrderbookOpenbookV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_orderbook_openbook_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ORDERBOOK_OPENBOOK_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/perpetuals.rs
// version: 2
// version: 3
//! `perpetuals` decoder family.
@@ -7,18 +7,9 @@ mod drift_v2;
mod jupiter;
mod zeta;
/// Pending `perpetuals` decoder migration boundaries.
pub(crate) const DC_PERPETUALS_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[
(
self::drift_v2::DC_PERPETUALS_DRIFT_V2_LEGACY_CRATE,
self::drift_v2::DC_PERPETUALS_DRIFT_V2_MIGRATION_STATUS,
),
(
self::jupiter::DC_PERPETUALS_JUPITER_LEGACY_CRATE,
self::jupiter::DC_PERPETUALS_JUPITER_MIGRATION_STATUS,
),
(
self::zeta::DC_PERPETUALS_ZETA_LEGACY_CRATE,
self::zeta::DC_PERPETUALS_ZETA_MIGRATION_STATUS,
),
];
/// Reserved `kb_decoder_perpetuals_drift_v2` decoder.
pub use self::drift_v2::DcPerpetualsDriftV2Decoder;
/// Reserved `kb_decoder_perpetuals_jupiter` decoder.
pub use self::jupiter::DcPerpetualsJupiterDecoder;
/// Reserved `kb_decoder_perpetuals_zeta` decoder.
pub use self::zeta::DcPerpetualsZetaDecoder;

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/perpetuals/drift_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_perpetuals_drift_v2`.
//! Reserved protocol decoder for `perpetuals_drift_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_PERPETUALS_DRIFT_V2_LEGACY_CRATE: &str = "kb_decoder_perpetuals_drift_v2";
/// Reserved decoder for the `perpetuals_drift_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcPerpetualsDriftV2Decoder;
/// Current porting status.
pub(crate) const DC_PERPETUALS_DRIFT_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcPerpetualsDriftV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_perpetuals_drift_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::PERPETUALS_DRIFT_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/perpetuals/jupiter.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_perpetuals_jupiter`.
//! Reserved protocol decoder for `perpetuals_jupiter`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_PERPETUALS_JUPITER_LEGACY_CRATE: &str = "kb_decoder_perpetuals_jupiter";
/// Reserved decoder for the `perpetuals_jupiter` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcPerpetualsJupiterDecoder;
/// Current porting status.
pub(crate) const DC_PERPETUALS_JUPITER_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcPerpetualsJupiterDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_perpetuals_jupiter";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::PERPETUALS_JUPITER_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/perpetuals/zeta.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_perpetuals_zeta`.
//! Reserved protocol decoder for `perpetuals_zeta`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_PERPETUALS_ZETA_LEGACY_CRATE: &str = "kb_decoder_perpetuals_zeta";
/// Reserved decoder for the `perpetuals_zeta` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcPerpetualsZetaDecoder;
/// Current porting status.
pub(crate) const DC_PERPETUALS_ZETA_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcPerpetualsZetaDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_perpetuals_zeta";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::PERPETUALS_ZETA_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/router.rs
// version: 2
// version: 3
//! `router` decoder family.
@@ -10,30 +10,15 @@ mod jupiter_dca;
mod okx_labs_v1;
mod okx_labs_v2;
/// Pending `router` decoder migration boundaries.
pub(crate) const DC_ROUTER_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[
(
self::dflow_aggregator_v4::DC_ROUTER_DFLOW_AGGREGATOR_V4_LEGACY_CRATE,
self::dflow_aggregator_v4::DC_ROUTER_DFLOW_AGGREGATOR_V4_MIGRATION_STATUS,
),
(
self::jupiter_aggregator_v4::DC_ROUTER_JUPITER_AGGREGATOR_V4_LEGACY_CRATE,
self::jupiter_aggregator_v4::DC_ROUTER_JUPITER_AGGREGATOR_V4_MIGRATION_STATUS,
),
(
self::jupiter_aggregator_v6::DC_ROUTER_JUPITER_AGGREGATOR_V6_LEGACY_CRATE,
self::jupiter_aggregator_v6::DC_ROUTER_JUPITER_AGGREGATOR_V6_MIGRATION_STATUS,
),
(
self::jupiter_dca::DC_ROUTER_JUPITER_DCA_LEGACY_CRATE,
self::jupiter_dca::DC_ROUTER_JUPITER_DCA_MIGRATION_STATUS,
),
(
self::okx_labs_v1::DC_ROUTER_OKX_LABS_V1_LEGACY_CRATE,
self::okx_labs_v1::DC_ROUTER_OKX_LABS_V1_MIGRATION_STATUS,
),
(
self::okx_labs_v2::DC_ROUTER_OKX_LABS_V2_LEGACY_CRATE,
self::okx_labs_v2::DC_ROUTER_OKX_LABS_V2_MIGRATION_STATUS,
),
];
/// Reserved `kb_decoder_router_dflow_aggregator_v4` decoder.
pub use self::dflow_aggregator_v4::DcRouterDflowAggregatorV4Decoder;
/// Reserved `kb_decoder_router_jupiter_aggregator_v4` decoder.
pub use self::jupiter_aggregator_v4::DcRouterJupiterAggregatorV4Decoder;
/// Reserved `kb_decoder_router_jupiter_aggregator_v6` decoder.
pub use self::jupiter_aggregator_v6::DcRouterJupiterAggregatorV6Decoder;
/// Reserved `kb_decoder_router_jupiter_dca` decoder.
pub use self::jupiter_dca::DcRouterJupiterDcaDecoder;
/// Reserved `kb_decoder_router_okx_labs_v1` decoder.
pub use self::okx_labs_v1::DcRouterOkxLabsV1Decoder;
/// Reserved `kb_decoder_router_okx_labs_v2` decoder.
pub use self::okx_labs_v2::DcRouterOkxLabsV2Decoder;

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/router/dflow_aggregator_v4.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_router_dflow_aggregator_v4`.
//! Reserved protocol decoder for `router_dflow_aggregator_v4`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ROUTER_DFLOW_AGGREGATOR_V4_LEGACY_CRATE: &str =
"kb_decoder_router_dflow_aggregator_v4";
/// Reserved decoder for the `router_dflow_aggregator_v4` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcRouterDflowAggregatorV4Decoder;
/// Current porting status.
pub(crate) const DC_ROUTER_DFLOW_AGGREGATOR_V4_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcRouterDflowAggregatorV4Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_router_dflow_aggregator_v4";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ROUTER_DFLOW_AGGREGATOR_V4_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/router/jupiter_aggregator_v4.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_router_jupiter_aggregator_v4`.
//! Reserved protocol decoder for `router_jupiter_aggregator_v4`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ROUTER_JUPITER_AGGREGATOR_V4_LEGACY_CRATE: &str =
"kb_decoder_router_jupiter_aggregator_v4";
/// Reserved decoder for the `router_jupiter_aggregator_v4` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcRouterJupiterAggregatorV4Decoder;
/// Current porting status.
pub(crate) const DC_ROUTER_JUPITER_AGGREGATOR_V4_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcRouterJupiterAggregatorV4Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_router_jupiter_aggregator_v4";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ROUTER_JUPITER_AGGREGATOR_V4_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/router/jupiter_aggregator_v6.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_router_jupiter_aggregator_v6`.
//! Reserved protocol decoder for `router_jupiter_aggregator_v6`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ROUTER_JUPITER_AGGREGATOR_V6_LEGACY_CRATE: &str =
"kb_decoder_router_jupiter_aggregator_v6";
/// Reserved decoder for the `router_jupiter_aggregator_v6` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcRouterJupiterAggregatorV6Decoder;
/// Current porting status.
pub(crate) const DC_ROUTER_JUPITER_AGGREGATOR_V6_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcRouterJupiterAggregatorV6Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_router_jupiter_aggregator_v6";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ROUTER_JUPITER_AGGREGATOR_V6_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/router/jupiter_dca.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_router_jupiter_dca`.
//! Reserved protocol decoder for `router_jupiter_dca`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ROUTER_JUPITER_DCA_LEGACY_CRATE: &str = "kb_decoder_router_jupiter_dca";
/// Reserved decoder for the `router_jupiter_dca` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcRouterJupiterDcaDecoder;
/// Current porting status.
pub(crate) const DC_ROUTER_JUPITER_DCA_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcRouterJupiterDcaDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_router_jupiter_dca";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ROUTER_JUPITER_DCA_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/router/okx_labs_v1.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_router_okx_labs_v1`.
//! Reserved protocol decoder for `router_okx_labs_v1`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ROUTER_OKX_LABS_V1_LEGACY_CRATE: &str = "kb_decoder_router_okx_labs_v1";
/// Reserved decoder for the `router_okx_labs_v1` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcRouterOkxLabsV1Decoder;
/// Current porting status.
pub(crate) const DC_ROUTER_OKX_LABS_V1_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcRouterOkxLabsV1Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_router_okx_labs_v1";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ROUTER_OKX_LABS_V1_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,10 +1,39 @@
// file: kb-lib/src/decoder/router/okx_labs_v2.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_router_okx_labs_v2`.
//! Reserved protocol decoder for `router_okx_labs_v2`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_ROUTER_OKX_LABS_V2_LEGACY_CRATE: &str = "kb_decoder_router_okx_labs_v2";
/// Reserved decoder for the `router_okx_labs_v2` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcRouterOkxLabsV2Decoder;
/// Current porting status.
pub(crate) const DC_ROUTER_OKX_LABS_V2_MIGRATION_STATUS: &str = "source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcRouterOkxLabsV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_router_okx_labs_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::ROUTER_OKX_LABS_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -1,12 +1,9 @@
// file: kb-lib/src/decoder/rwa.rs
// version: 2
// version: 3
//! `rwa` decoder family.
mod ondo_global_markets;
/// Pending `rwa` decoder migration boundaries.
pub(crate) const DC_RWA_MIGRATION_BOUNDARIES: &[(&str, &str)] = &[(
self::ondo_global_markets::DC_RWA_ONDO_GLOBAL_MARKETS_LEGACY_CRATE,
self::ondo_global_markets::DC_RWA_ONDO_GLOBAL_MARKETS_MIGRATION_STATUS,
)];
/// Reserved `kb_decoder_rwa_ondo_global_markets` decoder.
pub use self::ondo_global_markets::DcRwaOndoGlobalMarketsDecoder;

View File

@@ -1,12 +1,39 @@
// file: kb-lib/src/decoder/rwa/ondo_global_markets.rs
// version: 2
// version: 3
//! Migration boundary for legacy crate `kb_decoder_rwa_ondo_global_markets`.
//! Reserved protocol decoder for `rwa_ondo_global_markets`.
/// Legacy crate name retained for migration and compatibility tracking.
pub(crate) const DC_RWA_ONDO_GLOBAL_MARKETS_LEGACY_CRATE: &str =
"kb_decoder_rwa_ondo_global_markets";
/// Reserved decoder for the `rwa_ondo_global_markets` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcRwaOndoGlobalMarketsDecoder;
/// Current porting status.
pub(crate) const DC_RWA_ONDO_GLOBAL_MARKETS_MIGRATION_STATUS: &str =
"source-preserved-pending-port";
impl crate::DcApiProtocolDecoder for crate::DcRwaOndoGlobalMarketsDecoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_rwa_ondo_global_markets";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::RWA_ONDO_GLOBAL_MARKETS_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}

Some files were not shown because too many files have changed in this diff Show More