This commit is contained in:
2026-07-23 16:37:12 +02:00
parent 99c345f2f2
commit 0da75c1311
2159 changed files with 230833 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# file: kb_decoder_amm_fluxbeam/Cargo.toml
# version: 2
[package]
name = "kb_decoder_amm_fluxbeam"
version.workspace = true
edition.workspace = true
license.workspace = true
publish.workspace = true
[dependencies]
kb_core = { path = "../kb_core" }
kb_decoder_api = { path = "../kb_decoder_api" }
kb_model = { path = "../kb_model" }
kb_program_ids = { path = "../kb_program_ids" }
[lints]
workspace = true

View File

@@ -0,0 +1,14 @@
<!-- file: kb_decoder_amm_fluxbeam/README.md -->
<!-- version: 1 -->
# kb_decoder_amm_fluxbeam
Ce crate réserve la surface de décodage `amm_fluxbeam`. Aucun `program_id` local n'est encore fixé dans ce squelette.
## Rôle dans l'écosystème
Ce module transforme les observations Solana liées à `amm_fluxbeam` en événements protocolaires normalisés. Il ne doit pas accéder directement à PostgreSQL, au RPC, au wallet, à Tauri ou aux matérialisateurs.
## État initial
Le crate est créé comme point d'ancrage. Le décodage effectif, les discriminants, les IDL et les tests de couverture seront ajoutés dans des deltas dédiés.

View File

@@ -0,0 +1,7 @@
// file: kb_decoder_amm_fluxbeam/src/constants.rs
// version: 2
//! Local constants for the `kb_decoder_amm_fluxbeam` crate. Program identifiers live in `kb_program_ids`.
/// Canonical tracing target for this crate.
pub(crate) const TRACING_TARGET: &str = "kb_decoder_amm_fluxbeam";

View File

@@ -0,0 +1,41 @@
// file: kb_decoder_amm_fluxbeam/src/decoder.rs
// version: 5
//! Decoder scaffold for the `kb_decoder_amm_fluxbeam` crate.
/// Initial decoder implementation placeholder.
#[derive(Clone, Debug, Default)]
pub struct AmmFluxbeamDecoder;
impl kb_decoder_api::ProtocolDecoder for crate::AmmFluxbeamDecoder {
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: &kb_model::ProgramObservation,
) -> kb_decoder_api::DecoderSupport {
return if self.handles_program_id(&observation.program_id) {
kb_decoder_api::DecoderSupport::Maybe
} else {
kb_decoder_api::DecoderSupport::No
};
}
fn decode_observation(
&self,
_observation: &kb_model::ProgramObservation,
) -> kb_core::Result<std::vec::Vec<kb_model::DecodedProtocolEvent>> {
let _target = crate::TRACING_TARGET;
return std::result::Result::Ok(std::vec::Vec::new());
}
}

View File

@@ -0,0 +1,16 @@
// file: kb_decoder_amm_fluxbeam/src/lib.rs
// version: 2
//! Decoder crate for `amm_fluxbeam`.
#![warn(missing_docs)]
#![deny(unreachable_pub)]
#![forbid(unsafe_code)]
mod constants;
mod decoder;
/// Canonical tracing target for this crate.
pub(crate) use crate::constants::TRACING_TARGET;
/// Exposes the decoder type implemented by this crate.
pub use crate::decoder::AmmFluxbeamDecoder;