v0.1.0-pre.008

This commit is contained in:
2026-07-23 20:40:38 +02:00
parent f5bd8fab7f
commit 12b42a31b8
26 changed files with 6686 additions and 280 deletions

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder.rs
// version: 4
// version: 5
//! Consolidated decoder modules.
@@ -33,6 +33,8 @@ pub mod vesting;
pub mod wallet;
pub mod weighted;
/// One parsed SPL ElGamal registry instruction.
pub(crate) use self::spl::ParsedRegistryInstruction;
/// Current stable Associated Token Account decoded event contract version.
pub(crate) use self::spl::SPL_ASSOCIATED_TOKEN_ACCOUNT_EVENT_VERSION;
/// Exact Associated Token Account instructions published by the official interface.
@@ -51,6 +53,14 @@ pub(crate) use self::spl::SPL_ASSOCIATED_TOKEN_ACCOUNT_MAX_TRANSACTION_KEYS;
pub(crate) use self::spl::SPL_ASSOCIATED_TOKEN_ACCOUNT_SURFACE_CODE;
/// Canonical tracing target for the Associated Token Account decoder.
pub(crate) use self::spl::SPL_ASSOCIATED_TOKEN_ACCOUNT_TRACING_TARGET;
/// Current stable SPL ElGamal registry event contract version.
pub(crate) use self::spl::SPL_ELGAMAL_REGISTRY_EVENT_VERSION;
/// Maximum retained SPL ElGamal registry instruction payload size.
pub(crate) use self::spl::SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
/// Stable SPL ElGamal registry surface code.
pub(crate) use self::spl::SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
/// Canonical tracing target for the SPL ElGamal registry decoder.
pub(crate) use self::spl::SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
/// Maximum payload prefix retained for bounded diagnostics.
pub(crate) use self::spl::SPL_MEMO_DIAGNOSTIC_PREFIX_BYTES;
/// Current stable Memo decoded event contract version.
@@ -67,6 +77,24 @@ pub(crate) use self::spl::SPL_MEMO_V1_SURFACE_CODE;
pub(crate) use self::spl::SPL_MEMO_V3_SURFACE_CODE;
/// Stable Memo v4 surface code.
pub(crate) use self::spl::SPL_MEMO_V4_SURFACE_CODE;
/// Maximum prefix retained in bounded Token-2022 diagnostics.
pub(crate) use self::spl::SPL_TOKEN_2022_DIAGNOSTIC_PREFIX_BYTES;
/// Current stable Token-2022 decoded event contract version.
pub(crate) use self::spl::SPL_TOKEN_2022_EVENT_VERSION;
/// Exact top-level instruction inventory published by the resolved Token-2022 interface.
pub(crate) use self::spl::SPL_TOKEN_2022_INSTRUCTION_ENTRIES;
/// Maximum total account metas consumed by one Token-2022 batch.
pub(crate) use self::spl::SPL_TOKEN_2022_MAX_BATCH_ACCOUNTS;
/// Maximum decoded sub-instructions in one Token-2022 batch.
pub(crate) use self::spl::SPL_TOKEN_2022_MAX_BATCH_INSTRUCTIONS;
/// Maximum retained Token-2022 instruction payload size.
pub(crate) use self::spl::SPL_TOKEN_2022_MAX_INSTRUCTION_BYTES;
/// Maximum retained UTF-8 string size for embedded Token Metadata instructions.
pub(crate) use self::spl::SPL_TOKEN_2022_MAX_METADATA_STRING_BYTES;
/// Stable Token-2022 surface code.
pub(crate) use self::spl::SPL_TOKEN_2022_SURFACE_CODE;
/// Canonical tracing target for the Token-2022 decoder.
pub(crate) use self::spl::SPL_TOKEN_2022_TRACING_TARGET;
/// Maximum prefix retained in bounded classic SPL Token diagnostics.
pub(crate) use self::spl::SPL_TOKEN_DIAGNOSTIC_PREFIX_BYTES;
/// Current stable classic SPL Token decoded event contract version.
@@ -89,8 +117,20 @@ pub(crate) use self::spl::spl_associated_token_account_decode;
pub(crate) use self::spl::spl_associated_token_account_entry;
/// Reads one bounded Associated Token Account payload.
pub(crate) use self::spl::spl_associated_token_account_payload;
/// Decodes one bounded SPL ElGamal registry instruction.
pub(crate) use self::spl::spl_elgamal_registry_decode;
/// Decodes one bounded SPL ElGamal registry instruction payload.
pub(crate) use self::spl::spl_elgamal_registry_decode_payload;
/// Parses one exact SPL ElGamal registry instruction.
pub(crate) use self::spl::spl_elgamal_registry_parse;
/// Decodes one bounded SPL Memo instruction.
pub(crate) use self::spl::spl_memo_decode;
/// Decodes one bounded Token-2022 instruction.
pub(crate) use self::spl::spl_token_2022_decode;
/// Returns the exact entry matching one Token-2022 tag.
pub(crate) use self::spl::spl_token_2022_entry_for_tag;
/// Returns the first byte of one retained Token-2022 payload.
pub(crate) use self::spl::spl_token_2022_payload_tag;
/// Decodes one bounded classic SPL Token instruction.
pub(crate) use self::spl::spl_token_decode;
/// Returns the published entry matching one classic SPL Token tag.
@@ -98,9 +138,27 @@ pub(crate) use self::spl::spl_token_entry_for_tag;
/// Returns the first byte of one retained classic SPL Token payload.
pub(crate) use self::spl::spl_token_payload_tag;
/// Exact byte length of one SPL ElGamal registry account.
pub use self::spl::ELGAMAL_REGISTRY_ACCOUNT_LEN;
/// Parsed SPL ElGamal public-key registry account.
pub use self::spl::ElGamalRegistryState;
/// Exact decoder for the SPL Associated Token Account program.
pub use self::spl::SplAssociatedTokenAccountDecoder;
/// Exact decoder for the SPL ElGamal registry program.
pub use self::spl::SplElgamalRegistryDecoder;
/// Exact decoder for the three registered SPL Memo generations.
pub use self::spl::SplMemoDecoder;
/// Exact decoder for the Token-2022 program.
pub use self::spl::SplToken2022Decoder;
/// Exact decoder for the classic SPL Token program.
pub use self::spl::SplTokenDecoder;
/// Parsed Token-2022 Mint, Account, or Multisig state.
pub use self::spl::Token2022State;
/// Exact Token-2022 base account state kind.
pub use self::spl::Token2022StateKind;
/// One exact Token-2022 TLV entry.
pub use self::spl::Token2022TlvEntry;
/// Parses one exact SPL ElGamal registry account.
pub use self::spl::parse_elgamal_registry_state;
/// Parses one Token-2022 Mint, Account, or Multisig state.
pub use self::spl::parse_token_2022_state;